Most recent edit on 2007-07-21 15:34:31 by MatthewToseland [some updates]
Additions:
The plugin directory is the beginnings of a new plugin system, which will be much cleaner.
The pluginmanager directory is the implementation and interfaces for the old plugin system, which is very low-level, requiring plugin authors to access node classes etc directly.
The store directory is for the datastore, the only implementation at the moment uses Berkeley DB Java Edition for its index.
The support directory contains miscellaneous helper classes, most of which could be reused in other code.
Deletions:
The plugin directory is for dealing with the Freenet Plugins that can be added.
The pluginmanager directory is for the managing the Freenet plugins.
The store directory deals with the storage of the date in the BerkeleyDB database.
The support directory contains miscellaneous helper classes.
The transport directory is for autodetection of the node's IP address?
Edited on 2006-11-08 17:49:30 by MatthewToseland [tools]
Additions:
The tools directory contains tools classes i.e. classes that can be called from outside through the jar
Deletions:
The tools directory only has one class in it??
Edited on 2006-09-17 20:53:41 by IanClarke [is it really necessary to explain what an OO language is in this day and age?]
Additions:
Freenet is written in Java∞.
Deletions:
Freenet is written in Java∞. This is an object-oriented programming language, which may be confusing at first if you are used to working in a procedural language.
Edited on 2006-09-12 17:03:31 by JaQa
Additions:
Each of these 32KB chunks is hashed and encrypted. To retrieve the file chunk, you need to know its hash, which is used as an index to the file. To decrypt the file chunk, you need to know its decryption key. The node storing the chunk only knows the hash, not the decryption key. So when you publicly advertise the file, you need to tell people both the hash (where to find it) and the decryption key (how to decipher the file chunk once you have retrieved it).
Deletions:
Each of these 32KB chunks is hashed and encrypted. To retrieve the file chunk, you need to know its hash, which is used as an index to the file. To decrypt the file chunk, you need to know its decryption key.
Edited on 2006-09-12 16:54:52 by JaQa
Additions:
Freenet stores data in chunks of 32KB. If you insert a file larger than 32KB, it breaks it up into pieces, and creates a kind of index to these pieces, called a manifest. This level of detail is hidden to the end user: as far as they are concerned they just insert the whole file, and retrieve the whole file.
Each of these 32KB chunks is hashed and encrypted. To retrieve the file chunk, you need to know its hash, which is used as an index to the file. To decrypt the file chunk, you need to know its decryption key.
Edited on 2006-09-12 16:33:59 by JaQa
Additions:
The Freenet Keys
To understand how Freenet works, you need to understand how data inserted to Freenet is encrypted, identified, stored and retrieved.
Edited on 2006-09-12 16:32:25 by JaQa
Additions:
The basic directory structure
The pluginmanager directory is for the managing the Freenet plugins.
Where the code starts from
Deletions:
The pluginmanager is for the managing the Freenet plugins.
Edited on 2006-09-12 16:30:41 by JaQa
Additions:
You might be thinking: which class kicks it all off, where do we start? Have a look in the build.xml file in the root directory. You can see somewhere in there it says:
<attribute name="Main-Class" value="freenet/node/Node"/>
This means that when you run Freenet, it start by running the code in the main() method of src/node/Node.class.
This in turn calls the main() method of src/node/NodeStarter.class.
Edited on 2006-09-12 16:21:50 by JaQa
Additions:
The store directory deals with the storage of the date in the BerkeleyDB database.
Deletions:
The store directory deals with the storage of the date in the BerkeleyDB database.
Edited on 2006-09-12 16:17:20 by JaQa
Additions:
If you look in the freenet/src∞ directory, you can see a freenet∞ directory. This is where the main code is stored. There are also directories called net∞ and org∞ for some outside code, plugins for optional plugins to the main Freenet, and test∞, which is for some test programs.
If we look in the freenet/src/freenet∞ directory, we can see several subdirectories:
The client directory has code for enabling client applications to talk to the Freenet node.
The clients directory is for the web front end to Freenet, also know as FProxy.
The config directory sorts out the various configuration options of Freenet.
The crypt directory is all the encryption and hashing code used in Freenet.
The io directory is for fairly low-level code related to how Freenet talks to other nodes.
The keys directory has code for manipulating the various Freenet identification keys: CHK, SSK, USK, KSK.
The node directory is for the higher-level communication between Freenet nodes.
The plugin directory is for dealing with the Freenet Plugins that can be added.
The pluginmanager is for the managing the Freenet plugins.
The store directory deals with the storage of the date in the BerkeleyDB database.
The support directory contains miscellaneous helper classes.
The tools directory only has one class in it??
The transport directory is for autodetection of the node's IP address?
Edited on 2006-09-12 15:25:25 by JaQa
Additions:
There are instructions for downloading and building/compiling the source code.
Deletions:
Once you have downloaded the source code (Instructions here) you will see there is a freenet directory with these files:
build_binary.xml
build.xml
LICENSE.Freenet
LICENSE.Mantissa
README
The build.xml file is similar to the Makefiles you often get with C/C++ programs. It contains all the information necessary to build freenet from the source. To do this, you need a program called ant∞. You should be able to build Freenet just by changing to this directory and running this simple command:
This should compile all the source code and output a file called freenet-cvs-snapshot.jar in the lib directory. You can then stop Freenet, copy this to your main Freenet installation and overwrite the freenet.jar file with it, then restart Freenet again.
Oldest known version of this page was edited on 2006-09-12 15:19:56 by JaQa []
Page view:
Guide to the Freenet Source Code
Freenet is written in
Java∞. This is an object-oriented programming language, which may be confusing at first if you are used to working in a procedural language.
Once you have downloaded the source code (
Instructions here) you will see there is a
freenet directory with these files:
build_binary.xml
build.xml
LICENSE.Freenet
LICENSE.Mantissa
README
The
build.xml file is similar to the Makefiles you often get with C/C++ programs. It contains all the information necessary to build freenet from the source. To do this, you need a program called
ant∞. You should be able to build Freenet just by changing to this directory and running this simple command:
This should compile all the source code and output a file called freenet-cvs-snapshot.jar in the
lib directory. You can then stop Freenet, copy this to your main Freenet installation and overwrite the freenet.jar file with it, then restart Freenet again.