forked from I2P_Developers/i2p.i2p
- Move net.i2p.kademlia package from i2psnark to core, and convert netdb to use it. - Delete old implementation in netdb - Fixups in netdb for generics - Add debug output to /debug This is the next step in the development plan, in which we previously: - Copied the code from netdb to the i2p.zzz.kademlia branch, fixed it, and made it generic for hash size (June 2012); - Moved it from the i2p.zzz.kademlia branch to the i2p.i2p.zzz.dhtsnark branch, and implemented KRPC with it (June 2012); - Propped it from i2p.i2p.zzz.dhtsnark to trunk for 0.9.2 (July-Sept. 2012); - Proved it out in 0.9.2 - 0.9.9 (Oct. 2012 - Nov. 2013) The plan was to maintain the KBucketSet public methods throughout the development so we could drop the new version back into netdb, so here we drop it in. Setting of K=16, B=3 is just an initial guess, to be reviewed. This moves about 18 KB from i2psnark.jar to i2p.jar and removes about 12 KB from router.jar. Unit test fixup: todo.
The routerconsole application is an embedable web server / servlet container. In it there is a bundled routerconsole.war containing JSPs (per jsp/*) that implement a web based control panel for the router. This console gives the user a quick view into how their router is operating and exposes some pages to configure it. The web server itself is Jetty [1] and is contained within the various jar files under lib/. To embed this web server and the included router console, the startRouter script needs to be updated to include those jar files in the class path, plus the router.config needs appropriate entries to start up the server: clientApp.3.main=net.i2p.router.web.RouterConsoleRunner clientApp.3.name=webConsole clientApp.3.args=7657 0.0.0.0 ./webapps/ That instructs the router to fire up the webserver listening on port 7657 on all of its interfaces (0.0.0.0), loading up any .war files under the ./webapps/ directory. The RouterConsoleRunner itself configures the Jetty server to give the ./webapps/routerconsole.war control over the root context, directing a request to http://localhost:7657/index.jsp to the routerconsole.war's index.jsp. Any other .war file will be mounted under their filename's context (e.g. myi2p.war would be reachable at http://localhost:7657/myi2p/index.jsp). [1] http://jetty.mortbay.com/jetty/index.html