From 86971126f37d01f3e3fcea00887a552a86c1a382 Mon Sep 17 00:00:00 2001 From: "Dr. Brandon Wiley" Date: Mon, 15 Jan 2018 13:34:34 -0600 Subject: Allow for the client proxy listening address to be specified on the command line --- shapeshifter-dispatcher/shapeshifter-dispatcher.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'shapeshifter-dispatcher') diff --git a/shapeshifter-dispatcher/shapeshifter-dispatcher.go b/shapeshifter-dispatcher/shapeshifter-dispatcher.go index de85e8d..de30b97 100644 --- a/shapeshifter-dispatcher/shapeshifter-dispatcher.go +++ b/shapeshifter-dispatcher/shapeshifter-dispatcher.go @@ -60,7 +60,6 @@ import ( const ( dispatcherVersion = "0.0.7-dev" dispatcherLogFile = "dispatcher.log" - socksAddr = "127.0.0.1:0" ) var stateDir string @@ -101,6 +100,9 @@ func main() { extorport := flag.String("extorport", "", "Specify the address of a server implementing the Extended OR Port protocol, which is used for per-connection metadata") authcookie := flag.String("authcookie", "", "Specify an authentication cookie, for use in authenticating with the Extended OR Port") + // Experimental flags under consideration for PT 2.1 + socksAddr := flag.String("proxylistenaddr", "127.0.0.1:0", "Specify the bind address for the local SOCKS server provided by the client") + // Additional command line flags inherited from obfs4proxy showVer := flag.Bool("version", false, "Print version and exit") logLevelStr := flag.String("logLevel", "ERROR", "Log level (ERROR/WARN/INFO/DEBUG)") @@ -158,7 +160,7 @@ func main() { } else { ptClientProxy, names := getClientNames(ptversion, transportsList, proxy) - launched = transparent_udp.ClientSetup(termMon, *target, ptClientProxy, names, *options) + launched = transparent_udp.ClientSetup(termMon, *socksAddr, *target, ptClientProxy, names, *options) } } else { log.Infof("%s - initializing server transport listeners", execName) @@ -180,7 +182,7 @@ func main() { } else { ptClientProxy, names := getClientNames(ptversion, transportsList, proxy) - launched, clientListeners = transparent_tcp.ClientSetup(termMon, *target, ptClientProxy, names, *options) + launched, clientListeners = transparent_tcp.ClientSetup(termMon, *socksAddr, *target, ptClientProxy, names, *options) } } else { log.Infof("%s - initializing server transport listeners", execName) @@ -202,7 +204,7 @@ func main() { } else { ptClientProxy, names := getClientNames(ptversion, transportsList, proxy) - launched = stun_udp.ClientSetup(termMon, *target, ptClientProxy, names, *options) + launched = stun_udp.ClientSetup(termMon, *socksAddr, *target, ptClientProxy, names, *options) } } else { log.Infof("%s - initializing server transport listeners", execName) @@ -220,7 +222,7 @@ func main() { log.Infof("%s - initializing client transport listeners", execName) ptClientProxy, names := getClientNames(ptversion, transportsList, proxy) - launched, clientListeners = pt_socks5.ClientSetup(termMon, *target, ptClientProxy, names, *options) + launched, clientListeners = pt_socks5.ClientSetup(termMon, *socksAddr, *target, ptClientProxy, names, *options) } else { log.Infof("%s - initializing server transport listeners", execName) ptServerInfo := getServerInfo(ptversion, bindAddr, options, transportsList, orport, extorport, authcookie) -- cgit v1.2.3