Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tunnel HTTP via Proxy Using Telnet

Here is the scenario : I have to connect to a proxy server(say s1), but it's not accessible directly. As a solution, I can log-in to a remote server(let's call it s2) and then forward my connection to s1.

In connecting to both s1 & s2 I have to use telnet.

$>telnet s2
password : 
server s2> telnet s2 80 /stream
Trying s1 80 ...... open

What should I do in my application so that I can tunnel all my http connections through this route?

EDIT: I had reversed s1 & s2

like image 288
vivek Avatar asked Feb 15 '26 05:02

vivek


1 Answers

Try to tunnel via ssh.... and use localhost:8080 as a proxy

ssh -f user@s1 -L 8080:s2:80 -N
like image 88
hexathos Avatar answered Feb 16 '26 19:02

hexathos



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!