snowflake-client's `-url` option is intolerant of a missing path
I was following server-webrtc's README and I made a small mistake in the client torrc. Instead of
-url http://127.0.0.1:8080/
I had (no trailing slash):
-url http://127.0.0.1:8080
This caused the client to fail with this error:
2018/03/13 03:10:40 Negotiating via BrokerChannel...
Target URL:
Front URL: 127.0.0.1:8080
2018/03/13 03:10:40 BrokerChannel Error: dial tcp: unknown port tcp/8080client
2018/03/13 03:10:40 Failed to retrieve answer. Retrying in 10 seconds
This is because the URL to request is built using string concatenation. It built the string "http://127.0.0.1:8080client"
instead of "http://127.0.0.1:8080/client"
.
request, err := http.NewRequest("POST", bc.url.String()+"client", data)