Skip to content

Commit

Permalink
tproxy method no longer check ipv6 connection
Browse files Browse the repository at this point in the history
  • Loading branch information
whalechoi committed Jun 4, 2024
1 parent ddc0845 commit 69b2b07
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion main/common/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,7 @@ var (
)

func init() {
ExternalIPv6, _ = getExternalIPv6Addr()
if ext, err := getExternalIPv6Addr(); err != nil {
ExternalIPv6 = append(ExternalIPv6, ext...)
}
}
2 changes: 1 addition & 1 deletion main/proxies/tproxy/tproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 69b2b07

Please sign in to comment.