0

client <--> local SOCKS proxy <--> remote VPS (SSH) server

I wants to know , when the client sends a HTTP request (www.youtube.com) ,

and the request reached the VPS server through SOCKS proxy ,

how does the ssh server knows to get the youtube page for client and send back instead just drop it ?

I did NOT do any special configuration on VPS server's sshd_config

I had a lots of search about this , but it seems that all those articles are just talk

about the 'client->proxy->ssh server' part , not the 'ssh server -> outside world' part

2
  • Are you referring to the SOCKS proxy functionality built into ssh and sshd? Or is there really a "local SOCKS proxy" in this case?
    – MadHatter
    Jun 11, 2013 at 15:18
  • @MadHatter : what I means is the local SOCKS proxy with ssh -D
    – ailms
    Jun 11, 2013 at 15:19

1 Answer 1

0

It's the code inside sshd that implements SOCKS that is doing the work.

When you run ssh remote.server -D xxx, a local listener is set up on port xxx. Traffic to that local port is transmitted through the ssh tunnel to the SOCKS code in the remote server.

It works because the tunneling functionality is written into the client, and full SOCKS functionality is written into the server, in both cases by the code's authors. There's really not much more to say about it than that.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .