Showing posts with label Ad-hoc. Show all posts
Showing posts with label Ad-hoc. Show all posts

Saturday, October 27, 2007

New Update - Darknet Functions Improved


The following have been done:


2007-10-23

make the upnp device send out info about kerj not ANTs p2p and gwren.


So modified UPnPDescriptor.java


2007-10-23

remove ants branding replace with branding from http://www.kerjodando.com/ website


So replaced all antsp2p.sourceforge.net


2007-10-23

Remove the warning of new version detected


So modified ConnectionAntPanel.java


2007-10-23

An exception on startup of the application


So modified this_componentResized() in FrameAnt.java


2007-10-24

Make STUNT work better.


STUNT A_ST2 timeout problem modified STUNT.jar


2007-10-23

Make STUNT work better.


A STUNT doesn't work problem modified Ant.java, no port conversion for STUNT URI


2007-10-18

For a logined user who has two swarms, must update its trusted peers in two swarms,must add peer ips to ipfilter.dat


So modified a lot, using session to control users' action


2007-10-16

For registered user, two swarms but only need one kerjo insteady of two kerjoes


So added five lines to jnlp_controller.rb, so that no two kerjos will be running.if count == 1 thenflash[:notice]="joined the swarm."redirect_to :backreturnend


2007-10-16

Logined users can not get a connection to other host


So modified jnlp_controller.rb,for logined users, the identity is wrongly set.replace_str <


2007-10-10

Not working with all version of Java


I'v spending many time to find the cause. Finally the jnlp is modified:1.jnlp is downloaded as random filenames2.set the $$href to empty.(Which will prohibit the new JWSes from downloading jnlp twice)


2007-10-10

Make STUNT work better.


STUNT has an unhandled timeout for state A_ST1 Add timeout and retry mechanism to A_ST1


2007-10-9

STUNT souce code is uploaded to google code


Will make reference to Dargens.com and Digiworld Ltd who paid for the work as well as Casper. Will put link on kerjodando development site.


2007-10-8

Make work with all versions of Java


The ObjectInputStream handshaking problem, this problem may exist in jre1.6.03The problem is stated at http://forum.java.sun.com/thread.jspa?threadID=649207&messageID=3820132 add keyAgreementOutStream.flush() to SecureServerSocketThread.java and SecureClientSocketThread.java


2007-10-8

Java problem


Jre 1.6.0_03 concerning problem1.setup environment, all peers should use the new java version


2007-10-8

Don't forget that this is also for week one:Try one connection method until connected.Only try to connect if not connected and then try internal, direct and stunt in that order. Also, make sure STUNT is working correctly by investigating error messages.


Added ConnectionThreadManager.java to solve this problem. Now, if one site is connecting, no more retries until the connecting process is finished.

Monday, July 30, 2007

STUNT P2P TCP NAT Traversal on a Ad-hoc Overlay Network


I've been thinking about this TCP NAT Traversal (TCP hole punching a method that allows everyone to connect quickly without port forwarding).

I think the following changes are needed to kerjodando to make it work.

  1. Trusted Peers list (and itsDargens User database table) need to include two extra hidden fields, User ID (prob already in itsDargens database) and "use STUNT" flag. For example, if 100 users on a LAN connect to one group they will all have different user IDs although they have the same ip+port. Then when a user wants to connect to another user (after trying direct connection) they connect to STUNT using their user ID and signal (using SIPS) to another users ID. STUNT then tell them what ip+port to use to connect to that user ID. Also STUNT would set the "use STUNT flag" to yes.
  2. ItsDargens user database to change to include "use STUNT" flag
  3. Trusted peer file needs to download and use the included user IDs and "use STUNT" flag as well as ip+port.
The other thing I realised is that for signaling, users will have to maintain a connection to the STUNT server as long as they have a user (user ID) in their trusted peers list that they are not connected to.

However, once they have connected to all their trusted peers they can disconnect form the STUNT server.

Also, probably there will be some users that you can't connect to even with STUNT, maybe these should be marked as such in "use STUNT" flag and counted as connected when deciding if should disconnect form STUNT server.

To me a STUNT server consists of the following processes:
  1. Maintaing TCP user connections with many users (User IDs)
  2. Recording user (user ID) ip+port for at least two test connections from the user
  3. Calculating predicted ip+port for a user (User ID)
  4. Reply to a request to connect to a User ID with predicted ip+port
  5. Telling other User to also make a request etc
  6. Recording "STUNT flag" in user database table so that it can be included in downloaded trusted peers
  7. Recording if STUNT does not work


More About STUNT:

Found STUNT ( Simple Traversal of UDP Through NATs and TCP too) library in java:

http://nutss.gforge.cis.cornell.edu//jstunt-faq.php


What does the stunt.jar library provide?

It provides a way to establish unproxied TCP connections between two end-points, both of which can be behind a NAT. It returns a SocketChannel that can be used for blocking or non-blocking IO as the application desires.


How does one write a server-client or peer-to-peer applications with the library?

We have provided a simple server-client application consisting of an EchoServer ( http://nutss.gforge.cis.cornell.edu//EchoServer.java ) that accepts inbound connections from one or more EchoClient ( http://nutss.gforge.cis.cornell.edu//EchoClient.java ) applications.



Does the library require some infrastructure?

Yes. The library requires a rendezvous server (much like a directory server) where applications with one URI can find the application with another URI and coordinate to establish a connection. The library also requires some STUNT servers that help applications find out their external IP address and port for establishing the real connection.


Does the rendezvous server proxy data?

No. The rendezvous server only helps set up the connection. After that, all data is exchanged directly between the end-points and does not go through the rendezvous server.


Who provides the rendezvous and STUNT service? Who can use them?

We at Cornell University are providing a rendezvous and STUNT service for developers and researchers to use. However, if you wish to deploy your own application that uses the library, we ask that you set up rendezvous and STUNT servers only for your own applications such that you do not overburden the Cornell service (which is for research and development purposes) and so that outages and changes in the Cornell service doesn't affect your application. The rendezvous server ( https://gforge.cis.cornell.edu/frs/?group_id=15 )and STUNT server ( https://gforge.cis.cornell.edu/frs/?group_id=15 )code is freely available.


Is this library under active development? Will you implement feature X?

The library is a proof of concept that TCP NAT Traversal is possible and is intended to be a starting-poing for application developers who want to use it in a real-world deployable project. At the same time, it is a library that can be used more-or-less unmodified for research and quicky-development and prototyping of applications. Time permitting, I would like to implement various features that are requested; but I cannot promise that all features will be implemented in a timely fashion. I will do my best to make the library more suited to its primary goal -- show how the NAT TCP problem can be solved easily by applications.


I want to implement TCP NAT traversal in my application but don't want to use your library?

The TCP NAT traversal code is contained in the file STUNTCont.java ( https://gforge.cis.cornell.edu/plugins/scmcvs/cvsweb.php/old/stunt_java/src/net/nutss/stunt/STUNCont.java?cvsroot=cvsroot%2Fnutss ). It includes extensive documentation. Feel free to adapt the code to your application. The rendezvous service and the STUNT service are modular and may be replaced by your own implementations if you wish to use the rest of the library.



Also see http://en.wikipedia.org/wiki/STUN

Aslo see:

see STUNT

http://nutss.gforge.cis.cornell.edu/stunt.php

and

http://www1.ietf.org/mail-archive/web/p2prg/current/msg00789.html

and

http://en.wikipedia.org/wiki/NAT_traversal

and

http://reports-archive.adm.cs.cmu.edu/anon/isri2005/CMU-ISRI-05-104.pdf

and

http://emu.freenetproject.org/pipermail/tech/2005-September/011611.html