diff options
author | dvn <git@dvn.me> | 2018-08-01 14:19:41 +0200 |
---|---|---|
committer | dvn <git@dvn.me> | 2018-08-01 14:19:41 +0200 |
commit | 8f2201c8fcf359623fb90d876937054e7f01cf8b (patch) | |
tree | ab4c76a55b5794e53c0a31da9e87059c10f3e44a /README.md | |
parent | cca76741cab20706a255d2a72b879b90dfdd40f2 (diff) | |
download | gnunet-8f2201c8fcf359623fb90d876937054e7f01cf8b.tar.gz gnunet-8f2201c8fcf359623fb90d876937054e7f01cf8b.zip |
README.md: Add file transfer via cadet usage example.
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 50 |
1 files changed, 35 insertions, 15 deletions
@@ -77,22 +77,19 @@ docker build -t gnunet . | |||
77 | 77 | ||
78 | 78 | ||
79 | 79 | ||
80 | ## Using GNUnet | 80 | Using GNUnet |
81 | ------------- | ||
81 | 82 | ||
82 | There are many possible ways to use the subsystems of GNUnet, we will provide a few examples in this section. | 83 | There are many possible ways to use the subsystems of GNUnet, so we will provide a few examples in this section. |
83 | 84 | ||
84 | <p align="center"> | 85 | <p align="center"> |
85 | <a href="contrib/gnunet-arch-full.svg"><img src="contrib/gnunet-arch-full.svg" alt="GNUnet Modular Architecture" width="400px" border="1px"/></a> | 86 | <a href="contrib/gnunet-arch-full.svg"><img src="contrib/gnunet-arch-full.svg" alt="GNUnet Modular Architecture" width="500px" border="1px"/></a> |
86 | </p> | 87 | </p> |
87 | 88 | ||
88 | >***GNUnet is composed of over 30 modular subsystems*** | 89 | >***GNUnet is composed of over 30 modular subsystems*** |
89 | 90 | ||
90 | 91 | ||
91 | 92 | ||
92 | ### GNS | ||
93 | |||
94 | *coming soon* | ||
95 | |||
96 | ### Cadet | 93 | ### Cadet |
97 | 94 | ||
98 | #### Examples | 95 | #### Examples |
@@ -101,14 +98,14 @@ Open a Cadet connection: | |||
101 | 98 | ||
102 | ```shell | 99 | ```shell |
103 | # Node 1 | 100 | # Node 1 |
104 | cadet -o <shared secret> | 101 | gnunet-cadet -o <shared secret> |
105 | ``` | 102 | ``` |
106 | 103 | ||
107 | Conect to peer: | 104 | Conect to peer: |
108 | 105 | ||
109 | ```shell | 106 | ```shell |
110 | # Node 2 | 107 | # Node 2 |
111 | cadet <peer-id of Node 1> <shared secret> | 108 | gnunet-cadet <peer-id of Node 1> <shared secret> |
112 | ``` | 109 | ``` |
113 | 110 | ||
114 | #### Sharing Files | 111 | #### Sharing Files |
@@ -117,20 +114,43 @@ With the cli tool, you can also share files: | |||
117 | 114 | ||
118 | ```shell | 115 | ```shell |
119 | # Node 1 | 116 | # Node 1 |
120 | cadet -o <shared secret> > filename | 117 | gnunet-cadet -o <shared secret> > filename |
121 | ``` | 118 | ``` |
122 | 119 | ||
120 | On the Node 2 we're going to send the file to Node 1, and to do this we need to make use of [coprocesses](https://www.gnu.org/software/bash/manual/html_node/Coprocesses.html). | ||
121 | The syntax for using coprocesses varies per shell. In our example we are assuming Bash. More info for different shells can be found [here](https://unix.stackexchange.com/questions/86270/how-do-you-use-the-command-coproc-in-various-shells) | ||
122 | |||
123 | ```shell | 123 | ```shell |
124 | # Node 2 | 124 | # Node 2 |
125 | cadet <peer-id of Node 1> <shared secret> | 125 | coproc gnunet-cadet <peer-id of Node 1> <shared secret> |
126 | cat <file> >&"${COPROC[1]}" | ||
126 | ``` | 127 | ``` |
127 | 128 | ||
129 | Now this enables us to do some fun things, such as streaming video by piping to a media player: | ||
128 | 130 | ||
129 | VPN | 131 | ```shell |
130 | --- | 132 | # Node 1 |
133 | gnunet-cadet -o <shared secret> | vlc - | ||
134 | ``` | ||
131 | 135 | ||
132 | Running a Hostlist Server | 136 | ```shell |
133 | -------------------------- | 137 | # Node 2 |
138 | coproc gnunet-cadet <peer-id of Node 1> <shared secret> | ||
139 | cat <video-file> >&"${COPROC[1]}" | ||
140 | ``` | ||
141 | |||
142 | ### GNS | ||
143 | |||
144 | *coming soon* | ||
145 | |||
146 | |||
147 | ### VPN | ||
148 | |||
149 | *coming soon* | ||
150 | |||
151 | ### Running a Hostlist Server | ||
152 | |||
153 | *coming soon* | ||
134 | 154 | ||
135 | GNUnet Configuration | 155 | GNUnet Configuration |
136 | -------------------------- | 156 | -------------------------- |