On Tue, Apr 25, 2006 at 10:55:25PM +0200, Thomas King wrote:
> On Monday 24 April 2006 21:15, Matthew Toseland wrote:
> > On Fri, Apr 21, 2006 at 09:40:06PM +0200, Thomas King wrote:
> > > Dear Freenet Hackers,
> > > I occasionally use Freenet and I am highly interested in this technology
> > > (not only because of my studies). However, during my usage I experienced
> > > a few network problems due to NATs.
> > >
> > > So, I think about to apply for Google's Sommer of Code with the following
> > > proposal:
> > > - Adding STUN-support (RFC 3489) to Freenet to automatically collect NAT
> > > related information. These information will be used to automatically
> > > configure Freenet.
> >
> > We already have basic NAT hopping support (including on network IP
> > address detection); more will be coming... The main remaining problem is
> > the combination of NATs and dynamic IPs.
> > Proposed measures in the near future:
> > - Remembering the last detected address for each node across restarts
> >   (separately from its claimed address).
> Okay, I can also add such a feature.

That's likely to go in in the relatively near future.
> 
> > - ARKs. If you can connect to one node, it can tell your other peers
> >   what your new address is via an Address Resolution Key or similar
> >   mechanism.
> Sounds interesting. We should discuss this in more detail. Could you please 
> describe was is already available and what should be implemented.

ARKs were once implemented in 0.5, and didn't work (because routing
didn't work). The idea is simply that you have an updatable key
associated with each node, (on 0.7 it would be a USK), which contains
the node's current reference. The identity and pubkey should not change,
but the physical.udp can. When we have connected to the network but
can't connect to all our peers, we look up our neighbour's ARKs (these
are included on their references or are generated from their pubkeys),
to find what their new IP is. This is designed as an in-freenet
substitute for dyndns (which is blocked in China), but obviously doesn't
work if you can't get a single connection up.
> 
> > Now, with regards to STUN, this is a mechanism whereby you can contact a
> > well known server to discover your own IP address, and those of any
> > NATs, in order to do hole punching? Note that if you can contact ANY of
> > your peers, you can discover your IP anyway, tell your other peers what
> > your IP is, and connect to them... Nonetheless, STUN support does sound
> > useful (provided that STUN servers are widely deployed, that STUN clients
> > are widely deployed, and that the way Freenet uses it will not
> > distinguish it from other STUN clients). Is it feasible to do this in
> > Java? Does it require raw packets? And is there already a (java) library
> > out there to do it? (Less duplicated code => less bugs)!

> STUN does not only tell you your official ip address, instead it also tells 
> you what kind of NAT is in-between you and your communication peer. This 
> information can be helpful to setup a communication between two hosts that 
> are behind NATs. 

That is potentially useful yes; it could tell us that we are on the same
LAN as the node, and we could publish our LAN address to our darknet
peers.

> There are lots of public available STUN server out there. Almost all 
> sip-based 
> VoIP applications use STUN to detect their official ip address. So, I doubt 
> it will be possible to detect a freenet client only by intercepting STUN 
> packets (if we add not a freenet-specific fingerprint to the STUN 
> communication).

Good.

> Yes, STUN is easily doable with Java. All you need are UDP packets. I already 
> started implementing a STUN library a few month ago because I would like to 
> use such a library in another tool. So far, the basic stuff is implemented. 
> However, I would like to develop additional features. 

Excellent. There aren't any existing libraries we could use? There are
for UP&P...
> 
> > I will gladly answer any questions any would-be freenet developer has on
> > how the code works in order to assist them in building useful features. If
> > you want to apply for Google SoC then by all means do, but it looks like
> > there will be some competition.

> I like competition. ;-)

:)
> 
> > > Thanks in advance,
> > > Thomas King
-- 
Matthew J Toseland - toad at amphibian.dyndns.org
Freenet Project Official Codemonkey - http://freenetproject.org/
ICTHUS - Nothing is impossible. Our Boss says so.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: 
<https://emu.freenetproject.org/pipermail/tech/attachments/20060425/9ac77993/attachment.pgp>

Reply via email to