OperatorFoundation / shapeshifter-dispatcher

Shapeshifter Dispatcher converts Pluggable Transports that implement the Go API from the Pluggable Transports 2.1 specification into proxies usable by applications. Several proxy modes are provided, including proxying of both TCP and UDP traffic.
https://OperatorFoundation.org/
MIT License
177 stars 28 forks source link

Fix parameter validation in SOCKS5 mode #35

Open dlwcarr opened 4 years ago

dlwcarr commented 4 years ago

validateServerBindAddr is always getting called, which requires that a valid combination of --bindaddr, --bindhost, and --bindport are set, but those parameters can't be used in SOCKS5 mode. This just skips the parameter validation in SOCKS5 mode, because the TOR_PT_SERVER_BINDADDR env var will get validated later in getServerBindaddrs anyway.

I also updated the README example so that the env var parses correctly.