Apologies for these silly questions. As I am new to networking. For example, If I configured my browser to use proxy of IP address: a.b.c.d and my IP address: e.f.g.h. And I visit example.com. What does my packet contain to instruct the proxy server to forward to example.com? Do the packet contains multiple headers such as one with source IP: e.f.g.h and dest IP: a.b.c.d and another with source IP: e.f.g.h and dest IP: example.com?
When proxy is handling internet traffic in networks .proxy acts as gateway between your LAN and internet . It is a device or server act as a intermediate device to serve all outbound internet traffic initial from LAN. Even we can control traffic using proxy like web filtering, traffic shaping etc ,
When traffic is initiated from browser. With destination domain example .com a packet is created with L2 and L3 Header with source IP as desktop IP and destination IP example.com domain resolved public IP this entire packet is enclosed with another header as source IP as desktop IP destination IP as proxy IP which is mentioned in browser settings this enclosed packet will reach proxy . Now proxy will reset this connection and this session will be in mute state proxy will remove enclosed header and initiates new session with source as proxy IP and destination as examples .com domain resolved public IP. Once response is received from destination. proxy will again unmute session forward same response traffic to source desktop
So in this process proxy will initiates new session from proxy to destination...