Refactor inbound/outbound options struct

This commit is contained in:
世界
2023-12-11 18:36:06 +08:00
parent 36b0f2e91a
commit 6ddcd3954d
31 changed files with 844 additions and 697 deletions

View File

@@ -2,8 +2,8 @@ package option
type TrojanInboundOptions struct {
ListenOptions
Users []TrojanUser `json:"users,omitempty"`
TLS *InboundTLSOptions `json:"tls,omitempty"`
Users []TrojanUser `json:"users,omitempty"`
InboundTLSOptionsContainer
Fallback *ServerOptions `json:"fallback,omitempty"`
FallbackForALPN map[string]*ServerOptions `json:"fallback_for_alpn,omitempty"`
Multiplex *InboundMultiplexOptions `json:"multiplex,omitempty"`
@@ -18,9 +18,9 @@ type TrojanUser struct {
type TrojanOutboundOptions struct {
DialerOptions
ServerOptions
Password string `json:"password"`
Network NetworkList `json:"network,omitempty"`
TLS *OutboundTLSOptions `json:"tls,omitempty"`
Password string `json:"password"`
Network NetworkList `json:"network,omitempty"`
OutboundTLSOptionsContainer
Multiplex *OutboundMultiplexOptions `json:"multiplex,omitempty"`
Transport *V2RayTransportOptions `json:"transport,omitempty"`
}