diff options
Diffstat (limited to 'template/use.html.j2')
-rw-r--r-- | template/use.html.j2 | 722 |
1 files changed, 367 insertions, 355 deletions
diff --git a/template/use.html.j2 b/template/use.html.j2 index 1aef50cf..cfdd2e60 100644 --- a/template/use.html.j2 +++ b/template/use.html.j2 | |||
@@ -6,378 +6,390 @@ | |||
6 | <h1>{{ _("How to use GNUnet - in a nutshell") }}</h1> | 6 | <h1>{{ _("How to use GNUnet - in a nutshell") }}</h1> |
7 | </header> | 7 | </header> |
8 | 8 | ||
9 | <section> | 9 | <div class="row"> |
10 | <p> | 10 | <div class="col-2 d-none d-lg-block"><!-- for large viewports show menu for better orientation --> |
11 | This document is just a brief intro on what can be done with GNUnet. Find much more in our <a ref="https://docs.gnunet.org/handbook/">handbook / reference manual</a>, e.g. in the section <a href="https://docs.gnunet.org/handbook/#toc-Using-GNUnet-1">"using GNUnet"</a>. | 11 | <nav class="nav subnav position-fixed flex-column border-right" style="position:fixed"> |
12 | <a class="nav-link" href="#filesharing">{{ _("Filesharing") }}</a> | ||
13 | <a class="nav-link" href="#cadet">{{ _("CADET") }}</a> | ||
14 | <a class="nav-link" href="#groupchat">{{ _("Minimal Groupchat") }}</a> | ||
15 | <a class="nav-link" href="#gns_cli">{{ _("GNS with CLI") }}</a> | ||
16 | <a class="nav-link" href="#gns_browser">{{ _("GNS with Browser") }}</a> | ||
17 | <a class="nav-link" href="#vpn">{{ _("VPN") }}</a> | ||
18 | <a class="nav-link" href="#conversation">{{ _("Conversation") }}</a> | ||
19 | </nav> | ||
20 | </div> | ||
12 | 21 | ||
13 | The configuration in the handbook / reference manual is done with the UI interface gnunet-gtk. | 22 | <div class="col"> |
14 | </p> | 23 | <section> |
15 | </section> | 24 | <p> |
25 | This document is just a brief intro on what can be done with GNUnet. Find much more in our <a ref="https://docs.gnunet.org/">documentation</a>, e.g. in the section <a href="https://docs.gnunet.org/handbook/#toc-Using-GNUnet-1">"using GNUnet"</a> in the handbook. | ||
16 | 26 | ||
17 | <section> | 27 | The configuration in the handbook is done with the UI interface gnunet-gtk. |
18 | <h3>{{ _("Make sure your GNUnet installation works...") }}</h3> | 28 | </p> |
19 | <p>After installing and starting GNUnet you should make sure that your peer is connecting | 29 | </section> |
20 | to the P2P-network. By typing gnunet-core you should see something like this: | ||
21 | </p> | ||
22 | <p> | ||
23 | <code> | ||
24 | $ gnunet-core <br> | ||
25 | Tue Oct 30 19:58:48 2018: connection established DSTJ (timeout in 293 s)<br> | ||
26 | Tue Oct 30 19:58:48 2018: connection established A4MK (timeout in 292 s)<br> | ||
27 | Tue Oct 30 19:58:48 2018: connection established 7WRD (timeout in 299 s)<br> | ||
28 | Tue Oct 30 19:58:48 2018: connection established 5WBG (timeout in 299 s)<br> | ||
29 | </code> | ||
30 | </p> | ||
31 | </section> | ||
32 | <section> | ||
33 | <h4>{{ _("... and play around with it.") }}</h4> | ||
34 | <p> | ||
35 | So let's try out some of GNUnet's use cases. Please mind that some should be done in a particular order, one after another: | ||
36 | </p> | ||
37 | 30 | ||
38 | <ul> | 31 | <section> |
39 | <li>filesharing</li> | 32 | <h3>{{ _("Make sure your GNUnet installation works...") }}</h3> |
40 | <li>A simple chat using CADET</li> | 33 | <p>After installing and starting GNUnet you should make sure that your peer is connecting |
41 | <li>Another simple chat using a nim client</i> | 34 | to the P2P-network. By typing gnunet-core you should see something like this: |
42 | <li>Name resolution using GNS on the command line</li> | 35 | </p> |
43 | <li>Name resolution using GNS with a browser (do it on the command line first)</li> | 36 | <p> |
44 | <li>Serving a website using VPN (do name resolution with a browser first)</li> | 37 | <code> |
45 | </ul> | 38 | $ gnunet-core <br> |
46 | </section> | 39 | Tue Oct 30 19:58:48 2018: connection established DSTJ (timeout in 293 s)<br> |
40 | Tue Oct 30 19:58:48 2018: connection established A4MK (timeout in 292 s)<br> | ||
41 | Tue Oct 30 19:58:48 2018: connection established 7WRD (timeout in 299 s)<br> | ||
42 | Tue Oct 30 19:58:48 2018: connection established 5WBG (timeout in 299 s)<br> | ||
43 | </code> | ||
44 | </p> | ||
45 | </section> | ||
46 | <section> | ||
47 | <h3>{{ _("... and play around with it.") }}</h3> | ||
48 | <p> | ||
49 | So let's try out some of GNUnet's use cases. Please mind that some should be done in a particular order, one after another: | ||
50 | </p> | ||
47 | 51 | ||
52 | <ul> | ||
53 | <li>filesharing</li> | ||
54 | <li>A simple chat using CADET</li> | ||
55 | <li>Another simple chat using a nim client</i> | ||
56 | <li>Name resolution using GNS on the command line</li> | ||
57 | <li>Name resolution using GNS with a browser (do it on the command line first)</li> | ||
58 | <li>Serving a website using VPN (do name resolution with a browser first)</li> | ||
59 | </ul> | ||
60 | </section> | ||
48 | 61 | ||
49 | <section> | ||
50 | <h4><a name="fs"></a>{{ _("Filesharing") }}</h4> | ||
51 | 62 | ||
52 | <p> | 63 | <section> |
53 | Let's publish a file in the GNUnet filesharing network. We use the keywords | 64 | <h3><a name="filesharing" class="subnav-anchor"></a>{{ _("Filesharing") }}</h3> |
54 | ("commons" and "state") so other people will be able to search for the file. | ||
55 | </p> | ||
56 | 65 | ||
57 | <p> | 66 | <p> |
58 | We can choose any file and describe it with meaningful keywords (using the | 67 | Let's publish a file in the GNUnet filesharing network. We use the keywords |
59 | `-k` command line option). | 68 | ("commons" and "state") so other people will be able to search for the file. |
60 | </p> | 69 | </p> |
61 | <p> | ||
62 | <code> | ||
63 | $ gnunet-publish -k commons -k state ostrom.pdf<br> | ||
64 | Publishing `/home/myself/ostrom.pdf' done.<br> | ||
65 | URI is `gnunet://fs/chk/M57SXDJ72EWS25CT6307KKJ8K0GCNSPTAZ649NA1NS10MJB4A1GZ9EN4Y02KST9VA5BHE8B335RPXQVBWVZ587Y83WQ7J3DHMBX30Q8.DHNGBN4CB2DBX1QRZ1R0B1Q18WTEAK4R94S9D57C9JMJJ3H7SSQDCV4D1218C4S2VP085AMQQSMG18FCP6NQMZQZJ91XR5NBX7YF0V0.42197237'. | ||
66 | </code> | ||
67 | </p> | ||
68 | <p> | ||
69 | Finding the file by keyword works with `gnunet-search`. | ||
70 | </p> | ||
71 | <p> | ||
72 | <code> | ||
73 | $ gnunet-search commons<br> | ||
74 | #1:<br> | ||
75 | gnunet-download -o "ostrom.pdf" gnunet://fs/chk/M57SXDJ72EWS25CT6307KKJ8K0GCNSPTAZ649NA1NS10MJB4A1GZ9EN4Y02KST9VA5BHE8B335RPXQVBWVZ587Y83WQ7J3DHMBX30Q8.DHNGBN4CB2DBX1QRZ1R0B1Q18WTEAK4R94S9D57C9JMJJ3H7SSQDCV4D1218C4S2VP085AMQQSMG18FCP6NQMZQZJ91XR5NBX7YF0V0.42197237 | ||
76 | </code> | ||
77 | </p> | ||
78 | <p> | ||
79 | It gives us the command line call to download the file (and store it as | ||
80 | ostrom.pdf)! | ||
81 | </p> | ||
82 | <p> | ||
83 | Please also refer to the chapter on <a href="=> https://docs.gnunet.org/handbook/#File_002dsharing | ||
84 | ">filesharing in the handbook</a>. | ||
85 | 70 | ||
86 | </section> | 71 | <p> |
72 | We can choose any file and describe it with meaningful keywords (using the | ||
73 | `-k` command line option). | ||
74 | </p> | ||
75 | <p> | ||
76 | <code> | ||
77 | $ gnunet-publish -k commons -k state ostrom.pdf<br> | ||
78 | Publishing `/home/myself/ostrom.pdf' done.<br> | ||
79 | URI is `gnunet://fs/chk/M57S... | ||
80 | </code> | ||
81 | </p> | ||
82 | <p> | ||
83 | Finding the file by keyword works with `gnunet-search`. | ||
84 | </p> | ||
85 | <p> | ||
86 | <code> | ||
87 | $ gnunet-search commons<br> | ||
88 | #1:<br> | ||
89 | gnunet-download -o "ostrom.pdf" gnunet://fs/chk/M57S... | ||
90 | </code> | ||
91 | </p> | ||
92 | <p> | ||
93 | It gives us the command line call to download the file (and store it as | ||
94 | ostrom.pdf)! | ||
95 | </p> | ||
96 | <p> | ||
97 | Please also refer to the chapter on | ||
98 | <a href="https://docs.gnunet.org/#File_002dsharing">filesharing in the handbook</a>. | ||
87 | 99 | ||
100 | </section> | ||
101 | <section> | ||
88 | 102 | ||
103 | <h3><a name="cadet" class="subnav-anchor"></a>{{ _("CADET (and Chat)") }}</h3> | ||
104 | <p> | ||
105 | We can use the `gnunet-cadet` command line tool to open a port and from | ||
106 | another machine connect to this port and chat or transfer data. First we need | ||
107 | our *peer ID* of the GNUnet peer opening the port. | ||
108 | </p> | ||
109 | <p> | ||
110 | <code> | ||
111 | $ gnunet-peerinfo -s<br> | ||
112 | I am peer `P4T5GHS1PCZ06R82D3KW8Z8J1113BQZWAWGYHTZ8G1ZXMWXQGAVG'. | ||
113 | </code> | ||
114 | </p> | ||
115 | <p> | ||
116 | Now we open the port (it can be any string!): | ||
117 | </p> | ||
118 | <p> | ||
119 | <code> | ||
120 | $ gnunet-cadet -o my-secret-port | ||
121 | </code> | ||
122 | </p> | ||
123 | <p>On the other machine we can connect using the peer ID and the port and start chatting!</p> | ||
124 | <p> | ||
125 | <code> | ||
126 | $ gnunet-cadet P4T5GHS1PCZ06R82D3KW8Z8J1113BQZWAWGYHTZ8G1ZXMWXQGAVG my-secret-port | ||
127 | </code> | ||
128 | </p> | ||
129 | <p> | ||
130 | If you are interested into CADET in detail, please have a look in the <a href="https://docs.gnunet.org/#CADET-Subsystem">chapter "Cadet-Subsystem" in our handbook</a>. | ||
131 | </p> | ||
89 | 132 | ||
90 | <section> | 133 | </section> |
91 | <h4>{{ _("CADET (and Chat)") }}</h4> | ||
92 | 134 | ||
93 | <p> | 135 | <section> |
94 | We can use the `gnunet-cadet` command line tool to open a port and from | 136 | <h3><a name="groupchat" class="subnav-anchor"></a>{{ _("Chatting with a (simple) client") }}</h3> |
95 | another machine connect to this port and chat or transfer data. First we need | 137 | <p> |
96 | our *peer ID* of the GNUnet peer opening the port. | 138 | To chat a tiny bit prettier, we need to install and compile additional software. |
97 | </p> | 139 | If you join the chat mentioned below and no one is there, feel free to ping on |
98 | <p> | 140 | IRC/freenode #gnunet and ask if someone can join to test with you! (But we are |
99 | <code> | 141 | trying to be there as often as possible). |
100 | $ gnunet-peerinfo -s<br> | 142 | </p> |
101 | I am peer `P4T5GHS1PCZ06R82D3KW8Z8J1113BQZWAWGYHTZ8G1ZXMWXQGAVG'. | 143 | <p> |
102 | </code> | 144 | <code> |
103 | </p> | 145 | $ git clone https://gnunet.org/git/gnunet-nim.git<br> |
104 | <p> | 146 | $ cd gnunet-nim/examples<br> |
105 | Now we open the port (it can be any string!): | 147 | $ nim c groupchat.nim<br> |
106 | </p> | 148 | </code> |
107 | <p> | 149 | <p> |
108 | <code> | 150 | <p> |
109 | $ gnunet-cadet -o my-secret-port | 151 | Fine! We can now try to enter a chat server running on another GNUnet node. |
110 | </code> | 152 | </p> |
111 | </p> | 153 | <p> |
112 | <p>On the other machine we can connect using the peer ID and the port and start chatting!</p> | 154 | <code> |
113 | <p> | 155 | $ LD_LIBRARY_PATH=/path/to/gnunetlibs ./groupchat --config=/path/to/gnunet.conf --server=88RXABKJNMT426FY81N2DXN0M2X37SW5Q1NR005YPDZ1Q7A22CHG --port=t3ss --nick=YOURNICK<br> |
114 | <code> | 156 | </code> |
115 | $ gnunet-cadet P4T5GHS1PCZ06R82D3KW8Z8J1113BQZWAWGYHTZ8G1ZXMWXQGAVG my-secret-port | 157 | <p> |
116 | </code> | 158 | (or as alternative server "YV6G9EP9K3X41BM3FJ3D29BDZR6358XNZ6KDZVV7DFW729YB0KCG" and port "welcome") |
117 | </p> | 159 | </p> |
118 | <p> | 160 | <p> |
119 | If you are interested into CADET in detail, please have a look in the <a href="https://docs.gnunet.org/handbook/#CADET-Subsystem">chapter "Cadet-Subsystem" in our handbook</a>. | 161 | The peer and port in this example should work in real, because that peer is almost always online and running groupchat on that port. |
120 | </p> | 162 | <p> |
163 | You should now see something like this: | ||
164 | </p> | ||
165 | <p> | ||
166 | <code> | ||
167 | > 2018-10-30 19:50:10 Welcome 8Q2T! participants: @[]<br> | ||
168 | Hello GNUnet!<br> | ||
169 | 2018-10-30 19:52:53 [8Q2T] Hello GNUnet!<br> | ||
170 | </code> | ||
171 | <p> | ||
172 | <p> | ||
173 | Here we have typed "Hello gnunet!" to standard in which is then written out to standard out after having been sent back from GNUnet. | ||
174 | </p> | ||
175 | </section> | ||
121 | 176 | ||
122 | </section> | 177 | <section> |
178 | <h3><a name="gns_cli" class="subnav-anchor"></a>{{ _("Name resolution using GNS on the command line") }}</h3> | ||
179 | <p>GNS is the GNU name service, a fully decentralized alternatice to DNS. We'll publish an IP address in a GNS record try to resolve it on the command line. First we need an identity which is the | ||
180 | equivalent to a zone in DNS. We'll call it "myself" and create it using the | ||
181 | `gnunet-identity` command line tool. Instead of "myself" you can surely use your | ||
182 | nick or any other name. </p> | ||
183 | <p> | ||
184 | <code> | ||
185 | $ gnunet-identity -C myself | ||
186 | </code> | ||
187 | </p> | ||
188 | <p>We can check if it worked using the same tool. We expect the name of our identity and the corresponding public key to be displayed.</p> | ||
189 | <p> | ||
190 | <code> | ||
191 | $ gnunet-identity -d<br> | ||
192 | myself - HWTYD3P5D77JVFNVMZ1M5T10V4SZYNMY3PCGQCSVENKD6ZCRKPMG | ||
193 | </code> | ||
194 | </p> | ||
195 | <p> | ||
196 | Now we add a public `A` record to our zone. It has the name "ccc", a value | ||
197 | of "195.54.164.39" and it expires after one day. | ||
198 | </p> | ||
199 | <p> | ||
200 | <code> | ||
201 | $ gnunet-namestore -z myself -a -e "1 d" -p -t A -n ccc -V 195.54.164.39 | ||
202 | </code> | ||
203 | </p> | ||
204 | <p>Now we can query that record using the command line tool `gnunet-gns`.</p> | ||
205 | <p> | ||
206 | <code> | ||
207 | $ gnunet-gns -t A -u ccc.myself<br> | ||
208 | ccc.myself:<br> | ||
209 | Got `A' record: 195.54.164.39 | ||
210 | </code> | ||
211 | </p> | ||
212 | <p> | ||
213 | So it worked! But only resolving our own records is boring. So we | ||
214 | can give our identity (the public key of it to be precise) to | ||
215 | someone else so they can try to resolve our records, too. The | ||
216 | other person (Bob) has to add it to his namestore like this: | ||
217 | </p> | ||
218 | <p> | ||
219 | <code> | ||
220 | $ gnunet-namestore -z myself -a -e never -p -t PKEY -n alice -V HWTYD3P5D77JVFNVMZ1M5T10V4SZYNMY3PCGQCSVENKD6ZCRKPMG | ||
221 | </code> | ||
222 | </p> | ||
223 | <p> | ||
224 | Our identity in Bobs namestore is a public record (-p) and never | ||
225 | expires (-e never). Now Bob (let's assume he has called his | ||
226 | identity myself, too) should be able to resolve our "ccc" record, | ||
227 | too! | ||
228 | </p> | ||
229 | <p> | ||
230 | <code> | ||
231 | $ gnunet-gns -t A -u ccc.alice.myself<br> | ||
232 | ccc.alice.myself:<br> | ||
233 | Got `A' record: 195.54.164.39 | ||
234 | </code> | ||
235 | </p> | ||
236 | <p> | ||
237 | It can continue like this. A friend of Bob would be able to | ||
238 | resolve our records too because Bob published our identity in a | ||
239 | public record. Bobs friend would simply use "ccc.alice.bob.myself" | ||
240 | to resolve our "ccc" record. | ||
241 | </p> | ||
242 | <p> | ||
243 | See the <a href="https://docs.gnunet.org/#First-steps-_002d-Using-the-GNU-Name-System">chapter "Using the GNU Name System" in our handbook</a> for a more detailed documentation. | ||
244 | </p> | ||
245 | </section> | ||
123 | 246 | ||
124 | <section> | ||
125 | <h4>{{ _("Chatting with a (simple) client") }}</h4> | ||
126 | <p> | ||
127 | To chat a tiny bit prettier, we need to install and compile additional software. | ||
128 | If you join the chat mentioned below and no one is there, feel free to ping on | ||
129 | IRC/freenode #gnunet and ask if someone can join to test with you! (But we are | ||
130 | trying to be there as often as possible). | ||
131 | </p> | ||
132 | <p> | ||
133 | <code> | ||
134 | $ git clone https://gnunet.org/git/gnunet-nim.git<br> | ||
135 | $ cd gnunet-nim/examples<br> | ||
136 | $ nim c groupchat.nim<br> | ||
137 | </code> | ||
138 | <p> | ||
139 | <p> | ||
140 | Fine! We can now try to enter a chat server running on another GNUnet node. | ||
141 | </p> | ||
142 | <p> | ||
143 | <code> | ||
144 | $LD_LIBRARY_PATH=/path/to/gnunetlibs ./groupchat --config=/path/to/gnunet.conf --server=88RXABKJNMT426FY81N2DXN0M2X37SW5Q1NR005YPDZ1Q7A22CHG --port=t3ss --nick=YOURNICK | ||
145 | </code> | ||
146 | </p> | ||
147 | <p> | ||
148 | The peer and port in this example should work in real, because that peer is almost online and running groupchat on that port. | ||
149 | <p> | ||
150 | You should now see something like this: | ||
151 | </p> | ||
152 | <p> | ||
153 | <code> | ||
154 | > 2018-10-30 19:50:10 Welcome 8Q2T! participants: @[]<br> | ||
155 | Hello GNUnet!<br> | ||
156 | 2018-10-30 19:52:53 [8Q2T] Hello GNUnet!<br> | ||
157 | </code> | ||
158 | <p> | ||
159 | <p> | ||
160 | Here we have typed "Hello gnunet!" to standard in which is then written out to standard out after having been sent back from GNUnet. | ||
161 | </p> | ||
162 | </section> | ||
163 | 247 | ||
248 | <section id='gns_proxy'> | ||
249 | <h3><a name="gns_browser" class="subnav-anchor"></a>{{ _("Name resolution using GNS with a browser") }}</h3> | ||
164 | 250 | ||
251 | <p> | ||
252 | In the previous use case "Name resolution using GNS on the command line" we got an idea | ||
253 | about what GNS is about, but now let's use it with a browser, to make it actually useful. Currently Firefox and Chromium are known to work. | ||
254 | </p> | ||
165 | 255 | ||
166 | <section> | 256 | <p> |
167 | <h4><a name="gns"></a>{{ _("Name resolution using GNS on the command line") }}</h4> | 257 | Many websites enforce HTTPS and thus provide certificates for |
258 | their hostnames (and not our GNS names). Browsers don't like wrong | ||
259 | hostnames in certificates and will present error messages. So GNUnet | ||
260 | has to trick them by generating own certificates for our GNS | ||
261 | names. This means we need to create our own certificate authority | ||
262 | and tell our browser about it. Luckily there's a script for it: | ||
263 | </p> | ||
264 | <p> | ||
265 | <code> | ||
266 | $ gnunet-gns-proxy-setup-ca | ||
267 | </code> | ||
268 | </p> | ||
269 | <p>After executing this script the Browser has to be restarted.</p> | ||
168 | 270 | ||
169 | <p>GNS is the GNU name service, a fully decentralized alternatice to DNS. We'll publish an IP address in a GNS record try to resolve it on the command line. First we need an identity which is the | 271 | <p> |
170 | equivalent to a zone in DNS. We'll call it "myself" and create it using the | 272 | GNUnet provides a proxy service (gnunet-gns-proxy) that the |
171 | `gnunet-identity` command line tool. Instead of "myself" you can surely use your | 273 | browser can send DNS and HTTP traffic to. It will try to resolve |
172 | nick or any other name. </p> | 274 | names with GNS first and forward the rest of the DNS traffic to |
173 | <p> | 275 | the system's DNS resolver. It will also take care of the HTTP |
174 | <code> | 276 | traffic, so the browser gets valid certificates and the web server |
175 | $ gnunet-identity -C myself | 277 | will not be confused by our GNS hostnames. Our GNS namestore |
176 | </code> | 278 | doesn't know about any DNS hostnames yet, so we have to store |
177 | </p> | 279 | them, too. For our "ccc" A record, we have to store a LEHO (legacy |
178 | <p>We can check if it worked using the same tool. We expect the name of our identity and the corresponding public key to be displayed.</p> | 280 | hostname) record, too. It must contain the website's original DNS |
179 | <p> | 281 | hostname: |
180 | <code> | 282 | </p> |
181 | $ gnunet-identity -d<br> | 283 | <p> |
182 | myself - HWTYD3P5D77JVFNVMZ1M5T10V4SZYNMY3PCGQCSVENKD6ZCRKPMG | 284 | <code> |
183 | </code> | 285 | $ gnunet-namestore -z myself -a -e "1 d" -p -t LEHO -n ccc -V www.ccc.de |
184 | </p> | 286 | </code> |
185 | <p> | 287 | </p> |
186 | Now we add a public `A` record to our zone. It has the name "ccc", a value | 288 | <p>Now let's start gnunet-gns-proxy.</p> |
187 | of "195.54.164.39" and it expires after one day. | 289 | <p> |
188 | </p> | 290 | <code> |
189 | <p> | 291 | $ /usr/lib/gnunet/libexec/gnunet-gns-proxy |
190 | <code> | 292 | </code> |
191 | $ gnunet-namestore -z myself -a -e "1 d" -p -t A -n ccc -V 195.54.164.39 | 293 | </p> |
192 | </code> | 294 | <p> |
193 | </p> | 295 | Our browser has to be configured so it uses our proxy. In Firefox |
194 | <p>Now we can query that record using the command line tool `gnunet-gns`.</p> | 296 | we have to set these options under "about:config": |
195 | <p> | 297 | </p> |
196 | <code> | 298 | <p> |
197 | $ gnunet-gns -t A -u ccc.myself<br> | 299 | <code> |
198 | ccc.myself:<br> | 300 | network.proxy.socks: localhost<br> |
199 | Got `A' record: 195.54.164.39 | 301 | network.proxy.socks_port: 7777<br> |
200 | </code> | 302 | network.proxy.socks_remote_dns true<br> |
201 | </p> | 303 | network.proxy.type: 1 |
202 | <p> | 304 | </code> |
203 | So it worked! But only resolving our own records is boring. So we | 305 | </p> |
204 | can give our identity (the public key of it to be precise) to | 306 | <p> |
205 | someone else so they can try to resolve our records, too. The | 307 | To tell Chromium to use the proxy, it has to be started with the |
206 | other person (Bob) has to add it to his namestore like this: | 308 | "--proxy-server" command line option: |
207 | </p> | 309 | </p> |
208 | <p> | 310 | <p> |
209 | <code> | 311 | <code> |
210 | $ gnunet-namestore -z myself -a -e never -p -t PKEY -n alice -V HWTYD3P5D77JVFNVMZ1M5T10V4SZYNMY3PCGQCSVENKD6ZCRKPMG | 312 | $ chromium --proxy-server="socks5://127.0.0.1:7777" |
211 | </code> | 313 | </code> |
212 | </p> | 314 | </p> |
213 | <p> | 315 | <p> |
214 | Our identity in Bobs namestore is a public record (-p) and never | 316 | Now we should be able to resolve our GNS names in the browser! We |
215 | expires (-e never). Now Bob (let's assume he has called his | 317 | just have to type "https://ccc.myself" into the address bar. If |
216 | identity myself, too) should be able to resolve our "ccc" record, | 318 | our friend Bob prepared his system, too, he can resolve our record |
217 | too! | 319 | by typing "ccc.alice.myself". |
218 | </p> | 320 | </p> |
219 | <p> | 321 | <p> |
220 | <code> | 322 | See the <a href="https://docs.gnunet.org/#Integration-with-Browsers">chapter on Integration with Browsers in our handbook</a> for a more detailed description. |
221 | $ gnunet-gns -t A -u ccc.alice.myself<br> | 323 | </p> |
222 | ccc.alice.myself:<br> | 324 | </section> |
223 | Got `A' record: 195.54.164.39 | 325 | <section> |
224 | </code> | 326 | <h3><a name="vpn" class="subnav-anchor"></a>{{ _("VPN") }}</h3> |
225 | </p> | 327 | <p> |
226 | <p> | 328 | VPN can be used to share your Internet connection (yes, this may be dangerous, just as running a Tor exit node) or to provide access to services on your host (this should be less dangerous, as long as those services are secure). |
227 | It can continue like this. A friend of Bob would be able to | 329 | </p> |
228 | resolve our records too because Bob published our identity in a | 330 | <p> |
229 | public record. Bobs friend would simply use "ccc.alice.bob.myself" | 331 | In this tutorial we concentrate on providing access to services on your host. |
230 | to resolve our "ccc" record. | 332 | </p> |
231 | </p> | 333 | <p> |
232 | <p> | 334 | For documentation to share your Internet connection have a look into <a href="https://docs.gnunet.org/#Configuring-the-GNUnet-VPN">chapter "Configuring the GNUnet VPN" in the handbook.</a> |
233 | See the <a href="https://docs.gnunet.org/handbook/#First-steps-_002d-Using-the-GNU-Name-System">chapter "Using the GNU Name System" in our handbook</a> for a more detailed documentation. | 335 | </p> |
234 | </p> | 336 | <p> |
235 | </section> | 337 | First you have to edit your gnunet.conf and add this section. |
236 | 338 | </p> | |
237 | 339 | <p> | |
238 | <section id='gns_proxy'> | 340 | <code> |
239 | <h4>{{ _("Name resolution using GNS with a browser") }}</h4> | 341 | [exit]</br> |
240 | 342 | START_ON_DEMAND = YES | |
241 | <p> | 343 | </code> |
242 | In the previous use case "Name resolution using GNS on the command line" we got an idea | 344 | </p> |
243 | about what GNS is about, but now let's use it with a browser, to make it actually useful. Currently Firefox and Chromium are known to work. | 345 | <p> |
244 | </p> | 346 | This is necessary to start the exit daemon. |
245 | 347 | </p> | |
246 | <p> | 348 | <p> |
247 | Many websites enforce HTTPS and thus provide certificates for | 349 | Furthermore you need to add a section for your service. |
248 | their hostnames (and not our GNS names). Browsers don't like wrong | 350 | </p> |
249 | hostnames in certificates and will present error messages. So GNUnet | 351 | <p> |
250 | has to trick them by generating own certificates for our GNS | 352 | <code> |
251 | names. This means we need to create our own certificate authority | 353 | [http.gnunet.]</br> |
252 | and tell our browser about it. Luckily there's a script for it: | 354 | TCP_REDIRECTS = 80:169.254.86.1:80 |
253 | </p> | 355 | </code> |
254 | <p> | 356 | </p> |
255 | <code> | 357 | <p> |
256 | $ gnunet-gns-proxy-setup-ca | 358 | Here a service named 'http' is configured to be accessed on a remote and local host on port 80. The IP address is the default IP address for the exit interface. If you like to change to another private IP address range you can use can change |
257 | </code> | 359 | </p> |
258 | </p> | 360 | <p> |
259 | <p>After executing this script the Browser has to be restarted.</p> | 361 | <code> |
260 | 362 | IPV4ADDR = 169.254.86.1 | |
261 | <p> | 363 | </code> |
262 | GNUnet provides a proxy service (gnunet-gns-proxy) that the | 364 | </p> |
263 | browser can send DNS and HTTP traffic to. It will try to resolve | 365 | <p> |
264 | names with GNS first and forward the rest of the DNS traffic to | 366 | in section 'exit'. |
265 | the system's DNS resolver. It will also take care of the HTTP | 367 | </p> |
266 | traffic, so the browser gets valid certificates and the web server | 368 | <p> |
267 | will not be confused by our GNS hostnames. Our GNS namestore | 369 | Now we have to add a GNS record to the namestore. |
268 | doesn't know about any DNS hostnames yet, so we have to store | 370 | </p> |
269 | them, too. For our "ccc" A record, we have to store a LEHO (legacy | 371 | <p> |
270 | hostname) record, too. It must contain the website's original DNS | 372 | <code> |
271 | hostname: | 373 | gnunet-namestore -z myself -a -e "1 d" -p -t VPN -n www -V "1 PKEY http" |
272 | </p> | 374 | </code> |
273 | <p> | 375 | </p> |
274 | <code> | 376 | <p> |
275 | $ gnunet-namestore -z myself -a -e "1 d" -p -t LEHO -n ccc -V www.ccc.de | 377 | Where myself is the name of the zone we already used <a href='#gns_proxy'>above</a>, but now we are adding a record of type VPN, and the value is a string containing three values. A boolean indicating the use of TCP or UDP (TCP in the example above), the public key of your node and the identifier of the service we used <a href='#'>above</a> ([http.gnunet.]. |
276 | </code> | 378 | </p> |
277 | </p> | 379 | <p> |
278 | <p>Now let's start gnunet-gns-proxy.</p> | 380 | After we added this record we should be able to access www.myself like we did ccc.myself via the browser <a href='#gns_proxy'>above</a>. |
279 | <p> | 381 | </p> |
280 | <code> | 382 | <p> |
281 | $ /usr/lib/gnunet/libexec/gnunet-gns-proxy | 383 | The UI version of this Tutorial can be find in Chapter <a href='https://docs.gnunet.org/#First-steps-_002d-Using-the-GNUnet-VPN'>Using the GNUnet VPN</a> in the handbook. |
282 | </code> | 384 | </p> |
283 | </p> | 385 | </section> |
284 | <p> | 386 | <section> |
285 | Our browser has to be configured so it uses our proxy. In Firefox | 387 | <h3><a name="conversation" class="subnav-anchor"></a>{{ _("Conversation") }}</h3> |
286 | we have to set these options under "about:config": | 388 | <p> |
287 | </p> | 389 | TBD, see <a href="https://docs.gnunet.org/#First-steps-_002d-Using-GNUnet-Conversation">chapter "Using GNUnet Conversation" in the handbook.</a> |
288 | <p> | 390 | </p> |
289 | <code> | 391 | </section> |
290 | network.proxy.socks: localhost<br> | 392 | </div> |
291 | network.proxy.socks_port: 7777<br> | 393 | </div> |
292 | network.proxy.socks_remote_dns true<br> | ||
293 | network.proxy.type: 1 | ||
294 | </code> | ||
295 | </p> | ||
296 | <p> | ||
297 | To tell Chromium to use the proxy, it has to be started with the | ||
298 | "--proxy-server" command line option: | ||
299 | </p> | ||
300 | <p> | ||
301 | <code> | ||
302 | $ chromium --proxy-server="socks5://127.0.0.1:7777" | ||
303 | </code> | ||
304 | </p> | ||
305 | <p> | ||
306 | Now we should be able to resolve our GNS names in the browser! We | ||
307 | just have to type "https://ccc.myself" into the address bar. If | ||
308 | our friend Bob prepared his system, too, he can resolve our record | ||
309 | by typing "ccc.alice.myself". | ||
310 | </p> | ||
311 | <p> | ||
312 | See the <a href="https://docs.gnunet.org/handbook/#Integration-with-Browsers">chapter on Integration with Browsers in our handbook</a> for a more detailed description. | ||
313 | </p> | ||
314 | </section> | ||
315 | <section> | ||
316 | <h4>{{ _("VPN") }}</h4> | ||
317 | <p> | ||
318 | VPN can be used to share your Internet connection (yes, this may be dangerous, just as running a Tor exit node) or to provide access to services on your host (this should be less dangerous, as long as those services are secure). | ||
319 | </p> | ||
320 | <p> | ||
321 | In this tutorial we concentrate on providing access to services on your host. | ||
322 | </p> | ||
323 | <p> | ||
324 | For documentation to share your Internet connection have a look into <a href="https://docs.gnunet.org/handbook/#Configuring-the-GNUnet-VPN">chapter "Configuring the GNUnet VPN" in the handbook.</a> | ||
325 | </p> | ||
326 | <p> | ||
327 | First you have to edit your gnunet.conf and add this section. | ||
328 | </p> | ||
329 | <p> | ||
330 | <code> | ||
331 | [exit]</br> | ||
332 | START_ON_DEMAND = YES | ||
333 | </code> | ||
334 | </p> | ||
335 | <p> | ||
336 | This is necessary to start the exit daemon. | ||
337 | </p> | ||
338 | <p> | ||
339 | Furthermore you need to add a section for your service. | ||
340 | </p> | ||
341 | <p> | ||
342 | <code> | ||
343 | [http.gnunet.]</br> | ||
344 | TCP_REDIRECTS = 80:169.254.86.1:80 | ||
345 | </code> | ||
346 | </p> | ||
347 | <p> | ||
348 | Here a service named 'http' is configured to be accessed on a remote and local host on port 80. The IP address is the default IP address for the exit interface. If you like to change to another private IP address range you can use can change | ||
349 | </p> | ||
350 | <p> | ||
351 | <code> | ||
352 | IPV4ADDR = 169.254.86.1 | ||
353 | </code> | ||
354 | </p> | ||
355 | <p> | ||
356 | in section 'exit'. | ||
357 | </p> | ||
358 | <p> | ||
359 | Now we have to add a GNS record to the namestore. | ||
360 | </p> | ||
361 | <p> | ||
362 | <code> | ||
363 | gnunet-namestore -z myself -a -e "1 d" -p -t VPN -n www -V "1 PKEY http" | ||
364 | </code> | ||
365 | </p> | ||
366 | <p> | ||
367 | Where myself is the name of the zone we already used <a href='#gns_proxy'>above</a>, but now we are adding a record of type VPN, and the value is a string containing three values. A boolean indicating the use of TCP or UDP (TCP in the example above), the public key of your node and the identifier of the service we used <a href='#'>above</a> ([http.gnunet.]. | ||
368 | </p> | ||
369 | <p> | ||
370 | After we added this record we should be able to access www.myself like we did ccc.myself via the browser <a href='#gns_proxy'>above</a>. | ||
371 | </p> | ||
372 | <p> | ||
373 | The UI version of this Tutorial can be find in Chapter <a href='https://docs.gnunet.org/handbook/#First-steps-_002d-Using-the-GNUnet-VPN'>Using the GNUnet VPN</a> in the handbook. | ||
374 | </p> | ||
375 | </section> | ||
376 | <section> | ||
377 | <h4>{{ _("Conversation") }}</h4> | ||
378 | <p> | ||
379 | TBD, see <a href="hhttps://docs.gnunet.org/handbook/#First-steps-_002d-Using-GNUnet-Conversation">chapter "Using GNUnet Conversation" in the handbook.</a> | ||
380 | </p> | ||
381 | </section> | ||
382 | </article> | 394 | </article> |
383 | {% endblock body_content %} | 395 | {% endblock body_content %} |