Description
Summary
There appears to be no way to configure the TURN client to work through an HTTP or SOCKS5 proxy, nor even over an SSH tunnel.
Motivation
While working on galene-stt, I was given access to a server with a powerful GPU. Unfortunately, the server was firewalled away from the Internet: the only ways it could communicate with the outside world were an HTTP proxy and ssh access.
The obvious solution would have been to configure Pion to use TURN over TCP over HTTP CONNECT. The other solution would have been to use the built-in SOCKS proxy of ssh. Unfortunately, there's no way to tell our TURN client to use a proxy.
Describe alternatives you've considered
I ended up hacking the client code to speak TURN over TCP over an ssh tunnel. It wasn't pretty.
Additional context
I think the right way to do that would be to have an implementation of transport.Net
that uses golang.org/x/net/proxy
. Not sure how the client code would request that — should it be honouring some environment variable, or should there be an extra option to pion.NewApi
?