Add trojan inbound/outbound

This commit is contained in:
世界
2022-08-08 08:56:04 +08:00
parent df6635c620
commit 6d78cf6b58
19 changed files with 521 additions and 9 deletions

21
option/trojan.go Normal file
View File

@@ -0,0 +1,21 @@
package option
type TrojanInboundOptions struct {
ListenOptions
Users []TrojanUser `json:"users,omitempty"`
TLS *InboundTLSOptions `json:"tls,omitempty"`
}
type TrojanUser struct {
Name string `json:"name"`
Password string `json:"password"`
}
type TrojanOutboundOptions struct {
OutboundDialerOptions
ServerOptions
Password string `json:"password"`
Network NetworkList `json:"network,omitempty"`
TLSOptions *OutboundTLSOptions `json:"tls,omitempty"`
MultiplexOptions *MultiplexOptions `json:"multiplex,omitempty"`
}