title: socket programming through proxy server
body: <p>my server.py and client.py works fine within same computer and within the computer directly connected with wifi modem. but if i want to use it between the computers which are connected through proxy they are not working. ping works fine between those computers. Is there any need to modification of my program or the proxy settings? firewalls are deactivated.</p>
  
  <p>I wrote the simple server program</p>
  
  <pre><code>import socket
  s=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
  host=socket.gethostname()
  port=12345
  s.bind((host, port))
  s.listen(5)
  while True:
      c, addr = s.accept()
      print 'got connection from',addr
      c.send('Thank you for connecting')
  
      c.close()
  </code></pre>
  
  <p>and client program is</p>
  
  <pre><code>import socket               
  
  s = socket.socket(socket.AF_INET,socket.SOCK_STREAM)        
  host = 'server-ip-address' 
  port = 12345               
  s.connect((host, port))
  print s.recv(1024)
  s.close                    
  </code></pre>
  
  <p>error is no connection is made because target machine actively refuse it. what is my mistake?</p>
  
  <p><img src="https://i.stack.imgur.com/qSfee.jpg" alt="enter image description here">
  my network is something like that. I want to connect PC2 and PC3 or PC1 and PC3. firewall of PC1,PC2 and PC3 are disabled. still refusing the connection. why?</p>