0

As I know that NAT tracks the Source IP & port number of the packet before change the IP header to external IP and send to the internet. When receive the response packet, NAT change the packet's header from external IP to private IP by using the value that tracked before.

For proxy server, in 1 second, proxy server retrieves a lot of packets from the clients, proxy server changes the IP header of packet from client's IP to proxy server's IP and send to the internet. When receive response packets, proxy server change IP header from proxy server's IP to client's IP and send back the client.

So, my question is the detail of process how proxy server work? And with the limit of ports(65535), how many connections between proxy server and proxy clients can be established at the same time?

Thanks you very much.

closed as off-topic by Anders, Matthew, Rory Alsop Sep 13 '17 at 12:07

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question does not appear to be about Information security within the scope defined in the help center." – Anders, Rory Alsop
If this question can be reworded to fit the rules in the help center, please edit the question.

0

A HTTP proxy or SOCKS proxy simply accepts a TCP connection from the client and maybe after some initial handshake with the client creates a TCP connection to the server. From then on it forwards data (not packets - this is application level!) received on one TCP connection via the other TCP connection as long as both TCP connections are open. There is nothing special about it - it just needs to associate one TCP connection with the other which a simple programming task.

how many connections between proxy server and proxy clients can be established at the same time?

This is not a security question, but: if the IP address of proxy and client are constant and the proxy is only listening on a single port then of the 4 parts of the connection tuple only the source port on the client can vary. Thus there are in theory at most 65535 connections between client and proxy and in practice even less since the client will not use all ports for connections to the proxy.

  • I think I should research more about the "simple programming task", do you have any document about that? Because that is the exactly I want to know. Thanks you so much :D. – Trai Nguyen Sep 13 '17 at 10:14

Not the answer you're looking for? Browse other questions tagged or ask your own question.