ok, another problem is how can i create listen socket to communicate to other, my ip 192.xxx.xxx.xxx is local, not have gloval ip. so you can't connect directly to me. i'm in simple linux firewall. anyone have good idea? sorry for lame eng, thanx for advice, - piiix
I had (or have actually) the same problem, I'm running Proxy+ on the internet computer, which has a SOCKS server. You can write your program to support SOCKS, there is not very much documentation about it, but an RFC (RFC1928) gives sufficient info. You can connect to the SOCKS server normally (to 192.168.0.1 in my case), then send a BIND request to bind the internet computer to a given port, and then pass all data to the clientcomp(local)->proxy connection. My problem with this was that this works for 1 connection, but not for multiple connections, once a client of your server connects, it uses your local client->proxy connection to pass data, but any further connections won't be passed (please correct me if I'm wrong at this, at least I couldn't figure out how to do this). I decided to write a simple proxy myself for my own program but I guess a win32asm program wouldn't work on linux ;-) Thomas
I also had/have a similar problem, although it's more to do with the firewall itself - so I don't know if it is the same problem. The firewall is set up to 'eat' any packets addressed to local ip addresses that come from outside, so anyone trying to connect to your machine will not be able to do so - because the packets are eaten, not because the ip is wrong. But it does work the other way around - you connecting to another computer outside of the firewall. But the problem still remains of receiving packets from outside! The only way I can think to get round it is to disguise the packets as HTTP packets (by adding a header, and sending it through port 80) - although I haven't actually tried it yet. Don't know if that helps(?) Tedd
I'm not familiar with that kind of proxies/firewalls, but I think it is possible to route all incomming connections on a given port to other computers in the local network, but these are just static mappings. The program i'm writing is a file transfer that uses http to transfer files, the first version is already on my site but is very limited in function, I'm now writing the second version which has support for multiple connections. I tried to use SOCKS as a proxy but this didn't work because I could only listen to one incomming connection. As this isn't a static web server but a transfer program that is not continously used and neither always on the same local computer, I need a proxy protocol that can dynamically listen for connections and route it to the right local computer. I haven't seen any of such proxies yet so I'm writing my own now.