Merge pull request #5410 from adriansmares/feature/add-hybrid-mode
Add Tor hybrid connectivity mode
This commit is contained in:
6 files changed
+92
-34
No files matched your search
@@ -904,9 +904,10 @@ func ValidateConfig(cfg Config, usageMessage string,
|
||||
// our real information.
|
||||
if cfg.Tor.Active {
|
||||
cfg.net = &tor.ProxyNet{
|
||||
SOCKS: cfg.Tor.SOCKS,
|
||||
DNS: cfg.Tor.DNS,
|
||||
StreamIsolation: cfg.Tor.StreamIsolation,
|
||||
SOCKS: cfg.Tor.SOCKS,
|
||||
DNS: cfg.Tor.DNS,
|
||||
StreamIsolation: cfg.Tor.StreamIsolation,
|
||||
SkipProxyForClearNetTargets: cfg.Tor.SkipProxyForClearNetTargets,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1320,7 +1321,7 @@ func ValidateConfig(cfg Config, usageMessage string,
|
||||
// connections.
|
||||
if len(cfg.RawListeners) == 0 {
|
||||
addr := fmt.Sprintf(":%d", defaultPeerPort)
|
||||
if cfg.Tor.Active {
|
||||
if cfg.Tor.Active && !cfg.Tor.SkipProxyForClearNetTargets {
|
||||
addr = fmt.Sprintf("localhost:%d", defaultPeerPort)
|
||||
}
|
||||
cfg.RawListeners = append(cfg.RawListeners, addr)
|
||||
|
||||
Reference in new issue
Block a user