add local proxy addr configuration
This commit is contained in:
1 parent
5b98351e58
commit
3d7e96acad
28 files changed
+76
-26
No files matched your search
@@ -14,6 +14,8 @@ import (
|
||||
"sync"
|
||||
|
||||
"github.com/xjasonlyu/tun2socks/v2/engine"
|
||||
|
||||
"whitelist-bypass/relay/common"
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
@@ -54,7 +56,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")
|
||||
|
||||
Reference in new issue
Block a user