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
@@ -43,6 +43,7 @@ func resolveHostname(hostname string) (string, error) {
|
||||
func main() {
|
||||
tmLink := flag.String("tm-link", "", "Telemost conference URI to join (required)")
|
||||
displayName := flag.String("name", "Joiner", "display name in the conference")
|
||||
socksHost := flag.String("socks-host", common.SocksLocalhostIP, "SOCKS5 listen address (use 0.0.0.0 to expose on LAN)")
|
||||
socksPort := flag.Int("socks-port", 1080, "SOCKS5 listen port")
|
||||
socksUser := flag.String("socks-user", "", "SOCKS5 username (optional)")
|
||||
socksPass := flag.String("socks-pass", "", "SOCKS5 password (optional)")
|
||||
@@ -86,7 +87,7 @@ func main() {
|
||||
}
|
||||
bridge := tunnel.NewRelayBridgeWithAuth(tun, "joiner", readBuf, log.Printf, *socksUser, *socksPass)
|
||||
bridge.MarkReady()
|
||||
addr := fmt.Sprintf("127.0.0.1:%d", *socksPort)
|
||||
addr := fmt.Sprintf("%s:%d", *socksHost, *socksPort)
|
||||
go func() {
|
||||
if err := bridge.ListenSOCKS(addr); err != nil {
|
||||
log.Printf("socks listen: %v", err)
|
||||
|
||||
Reference in new issue
Block a user