[p2p-hackers] traversing NAT and Java

Bernard Traversat Bernard.Traversat at Sun.COM
Tue Sep 20 00:36:28 UTC 2005


Adam Fisk wrote:
> You could also create a Socket subclass that delegates to the TFTP 
> implementation in the Jakarta Commons Net project.  This doesn't do the 
> hole punching for you per se, but all you really have to do is send a 
> packet in each direction just prior to starting the TFTP transfer, 
> ideally using some for of session offer/answer protocol like SIP.  There 
> is also a reliable UDP socket in LimeWire that subclasses Socket that 
> you could extract pretty easily, but the transfer is a little sluggish.
> JXTA doesn't do any hole punching, unfortunately.  
An update as things keep moving, we are close to add a UDP hole
punching transport to JXTA. This will target NAT/Firewall home user
configuration. The UDP transport will be able to leverage the
already existing reliable and secure JXTAsocket service to create
secure and reliable communication channels over UDP as we
do today for TCP/IP and HTTP.

> As a larger point, though, the hole punching itself is much less of an 
> issue than knowing which holes to punch.  The ICE draft lays out really 
> the ideal way to do it, but it's complicated.  
Agree. JXTA endpoint service, peer advertisements with their endpoint addresses
and JXTA Rendezvous service provide some of the core infrastructure to
implement ICE.  Anybody interested to get an ICE implementation for JXTA
let me know.

> 
> Also keep in mind all the cases you have to deal with, such as symmetric 
> NAT's.  Relaying is required in some instances, so you could look at 
> TURN or use JXTA. 
This is true as we are seeing some commercial P2P requirements where multi-hop
routes will be required for supporting multi DMZ traversal even with ICE.

Cheers,

B.
> Again, ICE handles this very robustly, but it's not 
> trivial, especially if you're implementing it from scratch.
> 
> -Adam
> 
> 
> Davide Carboni wrote:
> 
>> Hi, I'm looking for a good and reusable Java implementation of NAT
>> traversal solution like connection reversal,  UDP/TCP hole punching
>> etc.
>> I'm aware that JXTA provides NAT traversal but I do not want to
>> redesign my applications with JXTA. I'm also aware of P2PSockets which
>> hides JXTA under the hood but I've tried it without success and the
>> project seems a little "inactive".
>>
>> Bye
>> Davide
>>  
>>
> _______________________________________________
> p2p-hackers mailing list
> p2p-hackers at zgp.org
> http://zgp.org/mailman/listinfo/p2p-hackers
> _______________________________________________
> Here is a web page listing P2P Conferences:
> http://www.neurogrid.net/twiki/bin/view/Main/PeerToPeerConferences


-- 
--http://weblogs.java.net/blog/tra
"As Java implies platform independence, and XML implies language
independence, JXTA implies network independence."




More information about the P2p-hackers mailing list