Page: [root]/hellnet/hspawn/use | src | faq | css

Usage of Hellnet

WARNING: This part contains much unsettled stuff and interfaces that can be not convenient to use yet. This will change.

Simple data storage

All the data in Hellnet is stored in 256kb chunks. You can see your current cache in ~/.hellnet/store.

A chunk may be a filelink, which stores information about chunks that form a file.

So, to retrieve a piece of data, you have to know its hash (and encryption key if it's encrypted)

Data retrieval & connectivity

Currently Hellnet implements simple and probably naive networking. All nodes serve their chunks via HTTP and other nodes poll every node in network until they find requested chunks1

Action!

So, let's assume you need to share a copy of GPL2. It's named COPYING and located in current folder. Here you go:

% hell-insert COPYING
COPYING: hell://file/V1WV9NNGB2G4MM6565PG5NFK6KY3AYDASETR48WD3FHRC1XH68KB0M3AD7GTGZ1BY4AHGGYKDRR05FK0KJYH2919QP07X0GA9T2EZ9?name=COPYING

Hellnet inserts the file in local storage and gives you a link to the file. You might as well request to encrypt the file, to protect your privacy:

% hell-insert -e COPYING
COPYING:  hell://file/2ED6JC1KW83QZ4GZ5QCN8Y1JZTQQK2JH9QCQEP8ZSEWPYXTFA2K2KRQBMBRG4MWF2DYFVPNNXXYM8JB4PRBXPTPDBHN4RT2HC598WH?name=COPYING&key=17W5WP8MAAS1Z4WGQHTTBER1DPJAEEGKWP77CJDWK9T8RJM0PJEF

Link here consists of three or two parts, first is hash, second is encryption key. Third may be the file name. If you are using a link without filename, contents will be printed to STDOUT.

You can test how file is inserted then:

% hell-get "hell://file/2ED6JC1KW83QZ4GZ5QCN8Y1JZTQQK2JH9QCQEP8ZSEWPYXTFA2K2KRQBMBRG4MWF2DYFVPNNXXYM8JB4PRBXPTPDBHN4RT2HC598WH?name=COPYING2&key=17W5WP8MAAS1Z4WGQHTTBER1DPJAEEGKWP77CJDWK9T8RJM0PJEF"
diff COPYING COPYING.2

Now let's assume you have a friend who needs to receive a copy of GPL. First, you should bring up Hellnet server on your side:

% hell-serve 12345 &

where 12345 is port on your machine which is open to the world.

Then, your friend should run:

% hell-nodes add 123.12.1.0 12345

where 123.12.1.0 is your host and 12345 is your open port.

Then he can type as well:

% hell-get "hell://file/2ED6JC1KW83QZ4GZ5QCN8Y1JZTQQK2JH9QCQEP8ZSEWPYXTFA2K2KRQBMBRG4MWF2DYFVPNNXXYM8JB4PRBXPTPDBHN4RT2HC598WH?name=COPYING&key=17W5WP8MAAS1Z4WGQHTTBER1DPJAEEGKWP77CJDWK9T8RJM0PJEF"

And after short wait read the text of GPL.

Meta trees

Meta trees are tool to publish named information to Hellnet and keep it updated. Authenticity of information is guaranteed via digital signatures.

Create a key

First step is to create your own key that will be used to sign content.

% hell-meta genkey
Generating keys...
Your key ID is 18GDRMNGGZS1T7HT8WP0G4N77Z5J1A2DMB0EQDGJZY3GTPE9MAECRZMQ84X2MQ4PRD304MNDA60T5PWNMY2Q094XZHSAEDH6MFY479

This key ID is effectively public key's hash. It's rather long and hard to remember, so we can create client-side alias:

% hell-meta alias add testkey 18GDRMNGGZS1T7HT8WP0G4N77Z5J1A2DMB0EQDGJZY3GTPE9MAECRZMQ84X2MQ4PRD304MNDA60T5PWNMY2Q094XZHSAEDH6MFY479

Now you can refer to your key as "testkey"

Write a meta

Second step is editing your meta file. It's JSON and represents a filesystem of Hellnet links. Let us add our homepage:

% echo "<html>Hallo thar</html>" > index.html
% hell-insert index.html
hell://file/1M91REN6AP7N3S18MZRD842QBBH17NMA9C9QMCP0TVJA6BKMRXVXTWY9NKBK6G427VX7J4Q8HFF5Q0WHZ8DMSW60K5FY46Q5FEW4QHF?name=index.html

OK, we got a helllink to our home page. Let's insert it into meta:

% hell-meta new testkey homepage
% hell-meta edit testkey homepage

This will launch your favourite (or default) editor and open meta content in it. Editing, saving and exiting will overwrite meta content and update the meta. Let's write the following:

{
	"index.html" : "hell://file/1M91REN6AP7N3S18MZRD842QBBH17NMA9C9QMCP0TVJA6BKMRXVXTWY9NKBK6G427VX7J4Q8HFF5Q0WHZ8DMSW60K5FY46Q5FEW4QHF"
}

Save & exit. Now you can get your homepage by these tricky commands:

% hell-meta get testkey homepage /index.html
"hell://file/1M91REN6AP7N3S18MZRD842QBBH17NMA9C9QMCP0TVJA6BKMRXVXTWY9NKBK6G427VX7J4Q8HFF5Q0WHZ8DMSW60K5FY46Q5FEW4QHF"
% hell-get hell://file/1M91REN6AP7N3S18MZRD842QBBH17NMA9C9QMCP0TVJA6BKMRXVXTWY9NKBK6G427VX7J4Q8HFF5Q0WHZ8DMSW60K5FY46Q5FEW4QHF
<html>Hallo thar</html>

Other people can get it too, only using your key's real ID instead of "testkey".

Publish or access directory trees over Hellnet

hell-dir push . mykey mydir

or

hell-dir push . hell://26TFV4HWHP4P524QMDHM58T0E50AH7TT8S6C48THA21F3QVJJCWPXBA4SDVWHBBV7P9Q8R9QWA6Z12KQ8BJ07ZSD3GR3RVBBVZ59Z0Z/mydir

Publishes current directory as hell://meta/26TFV4HWHP4P524QMDHM58T0E50AH7TT8S6C48THA21F3QVJJCWPXBA4SDVWHBBV7P9Q8R9QWA6Z12KQ8BJ07ZSD3GR3RVBBVZ59Z0Z/mydir. You can also add ?key=ABCDEF to URI in second example to encrypt meta contents.

hell-dir pull . mykey mydir

Synchronizes current directory with specified meta.

If you have directory published, you can serve it via HTTP using hell-serve-meta:

hell-serve-meta 8887 hell://meta/26TFV4HWHP4P524QMDHM58T0E50AH7TT8S6C48THA21F3QVJJCWPXBA4SDVWHBBV7P9Q8R9QWA6Z12KQ8BJ07ZSD3GR3RVBBVZ59Z0Z/mydir

Here 8887 is port on which it will listen.

Discover more nodes

If you have already discovered at least one Hellnet node, you can use hell-nodes discover to scan the net for more. All found nodes will be added to your nodelist.

Share files without inserting them as chunks

If you don't want your files to take up space in hellnet store as well as in their original location, you can use key -i with hell-dir or hell-insert. Note that such chunks can be served only by "smart" server.

1 Or run out of nodes

2 Which is the most seeded content on GNUnet


Powered by bitcheese wiki engine