title: How packets reaches Destination through proxy servers?
body: <p>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.</p>
  
  <p>so we have three addresses here. </p>
  
  <pre><code>1) my private ip address
  2) proxy server address
  3) destination address (google.com)
  </code></pre>
  
  <p>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.</p>
  
  <p>in the ip network layer I have source and destination address.</p>
  
  <p>I don't know whether http also has addresses.</p>
  
  <p>so when my packet leaves my machine, what address would it be containing. so that it reaches my proxy server through gateways in between. ?</p>
  
  <p>once it reaches proxy server, NAT can be used to send it to destination.
  but I am confused about how it reaches proxy server.</p>
  
  <p>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?</p>