forked from hyphanet/pyFreenet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.freedisk
141 lines (82 loc) · 3.21 KB
/
README.freedisk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
--------------------------------------------------
README file for freedisk - the freenet filesystem
--------------------------------------------------
Here's a basic checklist for getting your freenetfs up and running:
[ ] FUSE library is installed (http://fuse.sf.net)
(or debian package 'libfuse2')
[ ] FUSE python bindings are installed (ditto)
(or debian package 'python-fuse')
[ ] FUSE kernel module is built and installed
(debian package 'fuse-source')
[ ] FUSE kernel module is loaded (su -c "modprobe fuse")
[ ] A group called 'fuse' exists
[ ] You are a member of group 'fuse'
[ ] You have an entry in /etc/fstab like:
/dev/fuse /mnt/freenet freenetfs defaults,noauto,user,exec,suid,config=/path/to/freedisk.conf 0 0
[ ] Your chosen mountpoint (/mnt/freenet, or whatever you
changed it to in /etc/fstab) exists as a writable directory
[ ] You have create a symlink from freedisk.py to /sbin/mount.freenetfs
Debian installation instructions:
1) apt-get install fuse-source libfuse2 python-fuse
2) build and install the FUSE kernel module:
$ su
Password:
# cd /usr/src
# tar xfj fuse.tar.bz2
# cd modules/fuse/kernel
# ./configure
# make
# make install
3) Add yourself to 'fuse' usergroup, via 'useradd' command or by hacking
/etc/group
4) Edit 'freedisk.conf' and stick in your own keypair, and adjust the
cache path as needed
Installation for other Linux distros:
- sorry, you'll have to study the debian instructions and figure
it out for your own distro. You could just download/install
FUSE, the FUSE kernel module and the FUSE python module from source.
Running FreenetFS
-----------------
If you've succeeded with all the above, then you can just type:
$ mount /mnt/freenet
Fetch a key:
$ cat /mnt/freenet/get/KSK@hello
See that the key is cached:
$ ls -las /mnt/freenet/get
Clear the key from the cache:
$ rm /mnt/freenet/get/KSK@hello
Generate a couple SSK keypairs:
$ cat /mnt/freenet/keys/fred
$ cat /mnt/freenet/keys/mary
You'll see in each case a public key on one line, then a private key.
Now, let's insert something:
$ echo "Hello" > /mnt/freenet/put/KSK@something
Now, wait a bit, and do:
$ ls -las /mnt/freenet/get
once the key is inserted, you'll see it in the 'get'
directory.
Now, something smarter - we can insert CHKs...
$ echo "This is a chk" > /mnt/freenet/put/[email protected]
Now test it:
$ ls -l /mnt/freenet/put
You should see a file [email protected]
Type:
$ cat /mnt/freenet/put/[email protected]
and you should get a single word, 'pending'.
After a time, the file's contents will change to either
'failed', meaning the insert failed, or a freenet URI,
in which case it succeeded.
If it succeeded, do:
$ ls -las /mnt/freenet/get
You should see an entry '[email protected]'.
You can rm any of these entries.
------------------------------------------------------------------
STATUS:
- key generation working:
$ cat /mnt/freenet/genkey
$ cat /mnt/freenet/genkeypair
- partial key retrieve (only for URIs with no slashes):
$ cat /mnt/freenet/keys/KSK@hello
- key deletion from cache (via 'rm') working
- write not done
- fancy shit not done yet