1

New to web based programming.

I have 2 computers (I know their IPs).
One computer has to use a proxy to connect to the internet. The other doesn't connect via a proxy. They are not on the same LAN.

My Question:
Is it possible to connect them using only their IPs (through the proxy) and transfer data between them (at least a text stream)? Or even sockets?

If not, is it possible to connect them using other information, which is obtainable locally from the computers?

It's OK if
1. I have to install modules on both systems;
2. Both of the computers need to have a .py file;

I am using Python 2.7 on Windows 7 on one system(the one behind proxy), but the other has to work with Windows, Debian and Linux(and doesn't use any proxies).

EDIT 1
The Proxy uses Authentication.

pradyunsg
  • 18,287
  • 11
  • 43
  • 96
  • There is not enough information about firewalls. A proxy by itself does not block incoming connections, only serves as a bridge for outgoing traffic. If there are no firewalls on either computer, it should be possible. At least one has to have an incoming port open if you want to communicate. Also, no information is given about the communication protocol and port. I assume this is http via port 80? What kind of service is this? – tiago Jan 20 '13 at 17:14
  • @tiago The proxy is for all protocols, and blocks any incoming connections other than the authenticated ones (don't know how that works, institute proxy), so the connection has got to go outward from the 'proxied' computer.. and yes, the proxy uses port 80. Also, i can use any protocol, but the proxy is present. And, Firewalls are not a problem, atleast now. – pradyunsg Jan 20 '13 at 17:23
  • Sounds like the only communication possible is connecting from the machine behind the proxy to the second machine. – tiago Jan 20 '13 at 17:29
  • @tiago That's what I meant by 'proxied' :) Do you have any ideas? – pradyunsg Jan 20 '13 at 17:30

1 Answers1

0

A possibility is to run a webserver with some web services on your machine that is not behind the proxy. Assuming you can get a mechanism to upload files as well on this server, you can transfer data to and from the machine behind the proxy.

Using python, you can e.g. use urllib2. To make it use the proxy (if it's not transparent), you'll need to set the environment variable HTTP_PROXY, or configure urrlib2 to use it (see this question).

Community
  • 1
  • 1
tiago
  • 22,602
  • 12
  • 72
  • 88