diff --git a/main/common/const.go b/main/common/const.go index 61c780e..3b8b88e 100644 --- a/main/common/const.go +++ b/main/common/const.go @@ -31,5 +31,7 @@ var ( ) func init() { - ExternalIPv6, _ = getExternalIPv6Addr() + if ext, err := getExternalIPv6Addr(); err != nil { + ExternalIPv6 = append(ExternalIPv6, ext...) + } } diff --git a/main/proxies/tproxy/tproxy.go b/main/proxies/tproxy/tproxy.go index d04e289..0fb6cd7 100644 --- a/main/proxies/tproxy/tproxy.go +++ b/main/proxies/tproxy/tproxy.go @@ -14,7 +14,7 @@ const tagTproxy = "tproxy" var useDummy bool func init() { - if common.ExternalIPv6 != nil && common.CheckIPv6Connection() { + if len(common.ExternalIPv6) > 0 { useDummy = false } else { useDummy = true