feat(server): IPv6 only mode

fix #168
This commit is contained in:
Haruue Icymoon
2021-12-09 18:38:35 +08:00
parent d7bda39f9e
commit 476e045451
3 changed files with 19 additions and 0 deletions

View File

@@ -128,6 +128,10 @@ func server(config *serverConfig) {
if len(config.Obfs) > 0 {
obfuscator = obfs.NewXPlusObfuscator([]byte(config.Obfs))
}
// IPv6 only mode
if config.IPv6Only {
transport.DefaultTransport = transport.IPv6OnlyTransport
}
// ACL
var aclEngine *acl.Engine
if len(config.ACL) > 0 {