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