[JDEV] Q: oob and direct P2P communications

Oliver Jones oj at world.std.com
Fri Mar 30 10:11:44 CST 2001


At 10:03 AM 3/28/01 -0800, Jens Alfke wrote:


>As I understand it the flow of control looks like this:
>* Sender opens a TCP port on its host and listens for HTTP connections on it.
>* Sender sends a Jabber message to receiver with an 'oob'-namespace 
>element containing an HTTP URL pointing to its own IP address and the 
>opened port.
>* Receiver initiates an HTTP download via the URL.
>* Sender gets the HTTP connection on the port it opened and sends the file 
>data.
>* Both sides close the connection, and the sender stops listening on that 
>port.

The issue with peer-to-peer transport is that the acceptor of the 
peer-to-peer TCP connection (probably but not definitely also the recipient 
of the transfer) needs to be visible on the network to the initiator of the 
connection.

When the acceptor is behind a firewall or a NAT (ipmasq), that's a problem.

The JabberCOM client library  contains support for initiating OUTBOUND 
connections (from the client to a Jabber server) via a SOCKS proxy server.

The SOCKS proxy server spec also contains a protocol by which an 
application can accept INBOUND connections through the proxy server.  Both 
the proxy server implementations I know of implement this correctly.  For 
what it's worth, the Napster client supports this method of exposing an 
internal server to an external client, and, as we all know, works really well.

Here's my brief bibliography on SOCKS, for your information.

1.      General Information on SOCKS proxy servers and 
protocols:  http://www.socks.nec.com
2.      SOCKS version 5 protocol specification, 
RFC1928  http://www.socks.nec.com/rfc/rfc1928.txt
3.      SOCKS version 5 Username/password authentication, RFC1929 
http://www.socks.nec.com/rfc/rfc1929.txt
4.      SOCKS version 4 Protocol 
http://www.socks.nec.com/protocol/socks4.protocol
5.      SOCKS Technology background paper. 
http://www.eborder.nec.com/Library/techgrounder.pdf
6.      Dante open-source SOCKS proxy server implementation: 
http://www.inet.no/dante/
7.      Squid open-source HTTP proxy server implementation:
http://www.squid-cache.org/Versions/v2/

Regards,
Oliver Jones





More information about the JDev mailing list