I am confused about how packets from my machine reaches their destination through proxy servers. my machine has a private ip for intranet and we have a proxy server with public ip to talk to world.
so we have three addresses here.
1) my private ip address
2) proxy server address
3) destination address (google.com)
now in the tcp packet that I send I have source and destination port to distinguish the various programs (like mozilla , chrome , ie) on my machine and destinations.
in the ip network layer I have source and destination address.
I don't know whether http also has addresses.
so when my packet leaves my machine, what address would it be containing. so that it reaches my proxy server through gateways in between. ?
once it reaches proxy server, NAT can be used to send it to destination. but I am confused about how it reaches proxy server.
EDIT: should my packet contain address of my proxy server (local private one) to reach it? I can change my proxy server by configuring my browser. how does my packet once it leaves my machine knows which proxy server it would go?
Packets are transmitted over a network from one computer to another. They are routed through a series of interconnected devices, such as routers and switches, before reaching their final destination. When packets arrive at their destination, they are reassembled into the original data.
Some proxies explicitly extract packet layer information from the source connection and apply these to the target connection when forwarding the data. Often this is the destination IP address when the proxy is configured to be used in a destination transparent way.
A forward proxy is the most common form of a proxy server and is generally used to pass requests from an isolated, private network to the Internet through a firewall. Using a forward proxy, requests from an isolated network, or intranet, can be rejected or allowed to pass through a firewall.
The packet doesn't reach the target at all. The data inside it reaches the target as part of a new connection between the proxy and the server, in completely new packets, whose size and number may be different from those in the downstream connection. From the server TCP's point of view it is connected to the proxy, not the downstream client.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With