0

I want to open any arbitrary TCP socket on a server, but it's behind a proxy and I can only use a port that is intended for HTTP hosting only. Simply put, what is the most transparent way to wrap such a socket into an HTTP connection? Preferably I would call a *nix program through a shell script in the server that would take care of translating the requests.

I apologize if this was answered before, but I am struggling to find and understand anything.

Xerz
  • 284
  • 1
  • 3
  • 13

1 Answers1

0

I ended up going with Chisel, which provides a single binary for both servers and clients, with features like authentication and reverse port forwarding. For instance:

chisel server

will run an HTTP server in $PORT or 8080, and

chisel client server.com 4567:123

connects to server.com and maps the remote port 123 into the local port 4567.

Other solutions are still welcome, particularly if they involve more transparency, frequently preinstalled tools like netcat, and if they also provide support for other protocols like UDP.

Xerz
  • 284
  • 1
  • 3
  • 13