add local proxy addr configuration

This commit is contained in:
kulikov0 committed 2026-05-25 16:21:22 +02:00
1 parent 5b98351e58
commit 3d7e96acad
28 files changed
+76 -26

No files matched your search

+3 -1
View File
@@ -10,6 +10,8 @@ import (
"sync"
"github.com/xjasonlyu/tun2socks/v2/engine"
"whitelist-bypass/relay/common"
)
// Config describes one wintun adapter and the SOCKS5 endpoint that
@@ -66,7 +68,7 @@ func New(cfg Config) (*Tunnel, error) {
cfg.MTU = 1500
}
if cfg.SocksHost == "" {
cfg.SocksHost = "127.0.0.1"
cfg.SocksHost = common.SocksLocalhostIP
}
if cfg.SocksPort <= 0 {
return nil, errors.New("desktoptun: SocksPort required")