chore: shadowsocks listener support the "udp" setting

This commit is contained in:
wwqgtxx
2023-03-21 12:40:36 +08:00
parent 154fbb34ea
commit 0336435ebc
6 changed files with 44 additions and 36 deletions

View File

@ -11,6 +11,7 @@ type ShadowSocksOption struct {
BaseOption
Password string `inbound:"password"`
Cipher string `inbound:"cipher"`
UDP bool `inbound:"udp,omitempty"`
}
func (o ShadowSocksOption) Equal(config C.InboundConfig) bool {
@ -37,6 +38,7 @@ func NewShadowSocks(options *ShadowSocksOption) (*ShadowSocks, error) {
Listen: base.RawAddress(),
Password: options.Password,
Cipher: options.Cipher,
Udp: options.UDP,
},
}, nil
}