aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authordvn <git@dvn.me>2018-08-01 14:19:41 +0200
committerdvn <git@dvn.me>2018-08-01 14:19:41 +0200
commit8f2201c8fcf359623fb90d876937054e7f01cf8b (patch)
treeab4c76a55b5794e53c0a31da9e87059c10f3e44a /README.md
parentcca76741cab20706a255d2a72b879b90dfdd40f2 (diff)
downloadgnunet-8f2201c8fcf359623fb90d876937054e7f01cf8b.tar.gz
gnunet-8f2201c8fcf359623fb90d876937054e7f01cf8b.zip
README.md: Add file transfer via cadet usage example.
Diffstat (limited to 'README.md')
-rw-r--r--README.md50
1 files changed, 35 insertions, 15 deletions
diff --git a/README.md b/README.md
index abaed5134..4e18660ce 100644
--- a/README.md
+++ b/README.md
@@ -77,22 +77,19 @@ docker build -t gnunet .
77 77
78 78
79 79
80## Using GNUnet 80Using GNUnet
81-------------
81 82
82There are many possible ways to use the subsystems of GNUnet, we will provide a few examples in this section. 83There 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
104cadet -o <shared secret> 101gnunet-cadet -o <shared secret>
105``` 102```
106 103
107Conect to peer: 104Conect to peer:
108 105
109```shell 106```shell
110# Node 2 107# Node 2
111cadet <peer-id of Node 1> <shared secret> 108gnunet-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
120cadet -o <shared secret> > filename 117gnunet-cadet -o <shared secret> > filename
121``` 118```
122 119
120On 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).
121The 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
125cadet <peer-id of Node 1> <shared secret> 125coproc gnunet-cadet <peer-id of Node 1> <shared secret>
126cat <file> >&"${COPROC[1]}"
126``` 127```
127 128
129Now this enables us to do some fun things, such as streaming video by piping to a media player:
128 130
129VPN 131```shell
130--- 132# Node 1
133gnunet-cadet -o <shared secret> | vlc -
134```
131 135
132Running a Hostlist Server 136```shell
133-------------------------- 137# Node 2
138coproc gnunet-cadet <peer-id of Node 1> <shared secret>
139cat <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
135GNUnet Configuration 155GNUnet Configuration
136-------------------------- 156--------------------------