[p2p-hackers] traversing NAT and Java

gbildson at limepeer.com gbildson at limepeer.com
Sat Sep 17 21:29:15 UTC 2005


One note about using TFTP is that it can be very slow with the lock step acks. 
It can be a good starting point although you may end up with a more TCP like
protocol if you get fancier.

It would be nice to have a standard ICE implementation in Java.  I was
considering doing that myself at some distant time ...

Thanks
-greg
Quoting Adam Fisk <afisk at speedymail.org>:
> 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.  It just relays
> everything through non-firewalled relays.  It works and the API is
> elegant, but it's not very efficient.
>
> 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.  A simpler version using
> SIP and SDP may be the way to go, or you may have some home-grown
> solution that lets peers know the holes to punch.
>
> 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.  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
>






More information about the P2p-hackers mailing list