-
Notifications
You must be signed in to change notification settings - Fork 0
/
console-client.html
159 lines (138 loc) · 6.79 KB
/
console-client.html
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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="UTF-8">
<title>P2P-Sync | Client</title>
<meta name="description" content="Try P2P-Sync by downloading and running it's console client" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" type="image/png" href="resources/img/sync-logo.png">
<link rel="stylesheet" type="text/css" href="resources/css/normalize.css" media="screen">
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="resources/css/stylesheet.css" media="screen">
<link rel="stylesheet" type="text/css" href="resources/css/github-light.css" media="screen">
<link rel="stylesheet" type="text/css" href="resources/css/main.css">
</head>
<body>
<section class="page-header-orig">
<h1 class="project-name"><img src="resources/img/sync-logo.png" height="39"> P2P-Sync</h1>
<h2 class="project-tagline">A simple library for distributed file synchronisation and sharing</h2>
<a href="https://github.com/p2p-sync/sync" class="btn">View on GitHub</a>
<a href="https://github.com/p2p-sync/sync/zipball/master" class="btn">Download .zip</a>
<a href="https://github.com/p2p-sync/sync/tarball/master" class="btn">Download .tar.gz</a>
</section>
<nav>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="installation.html">Installation</a></li>
<li><a href="documentation.html">Documentation</a></li>
<li><a href="console-client.html">Console Client</a></li>
</ul>
</nav>
<section class="main-content">
<h1>
<a id="p2p-sync" class="anchor" href="#p2p-sync" aria-hidden="true">
<span aria-hidden="true" class="octicon octicon-link"></span>
</a>
Console Client
</h1>
<p>
To try the library, a simple console client has been built.
It can be found in its dedicated GitHub repository <a href="https://github.com/p2p-sync/client">here</a>.
</p>
<h2>Features</h2>
<ul>
<li>Use any folder on your system as synchronised folder</li>
<li>Adjust your instance by editing its configuration</li>
</ul>
<h2>Get it</h2>
<p>
Release 1.0.0 is available for download <a href="https://github.com/p2p-sync/client/releases/tag/v1.0.0">here</a>.
</p>
<h2>Deployment</h2>
<p>
To simplify the deployment process of the library, a Shell script (<code>deploy.sh</code>) is provided in
the Git repository. Before invoking, make sure that the project has been assembled.
You may want to adjust the listed IP addresses to your needs.
<br>
<br>
<b>Note:</b> The provided RSA public and private key pair in this repository
is only used for test purposes in the local network! Do not use it in
your production environment! (Instead generate a new key pair as described
<a href="https://help.github.com/articles/generating-an-ssh-key/">here</a>)
</p>
<h2>Usage</h2>
<p>
After downloading the client, you will find a ZIP archive in the target directory.
To run the client, cd into the bin directory. In there, a log file (sync.log) and
an executable bash script is placed.
</p>
<h3>Help</h3>
<p>
To display a short help message about the available commands, use
<pre>./sync help</pre>
To get help about a particular command, type
<pre>./sync help <commandName></pre>
</p>
<h3>Intialise the Client</h3>
<p>
To create the default application configuration for P2P-Sync, run the following command:
<pre>./sync init -p <pathToTheSynchronisedFolder></pre>
whereas <code><pathToTheSynchronisedFolder></code> should be
replaced with an existing directory on your file system then used
as synchronised folder. Besides creating the necessary directories for
the shared folders, it will create the default configuration in your home
directory (<code>~/.syncconfig</code>). To specify in which folder the
configuration should be placed, add the flag <code>-a <pathToConfigDir></code> to the command above.
</p>
<h3>Configuration</h3>
<p>
After having initialised the default configuration, particular values
can be modified by using the command config. Use <code>./sync help config set-config</code>
to get a list of available config keys to set.
Setting a new value for port, for example, is done by typing:
<pre>./sync config set-config --port 4004</pre>
To get the current value of a setting, use
<pre>./sync config get-config --port</pre>
</p>
<h3>Connect</h3>
<p>
To create a network using the machine on which the command is invoked, run
<pre>./sync connect -p <pathToTheSynchronisedFolder></pre>
In case no default bootstrap location is configured, the node will
start up as bootstrap peer. Otherwise, it will try to connect to the
IP-address-port pair specified in the configuration.
<br>
In order to connect to a well-known node which has joined the network previously, type
<pre>./sync connect -p <pathToTheSynchronisedFolder> --bootstrap-ip <ipToNode> --bootstrap-port <portNrOfNode></pre>
with <code><ipToNode></code> the ip address (IPv4 or IPv6) and <code><portNrOfNode></code> the
port of the node to connect. The amendment of <code>-a <pathToConfigFile></code>
specifies the file in which the application configuration resides.
</p>
<h3>Sharing and Unsharing</h3>
<p>
After the node has been started successfully, a simple console interface
allows to share files or directories within the specified synchronised folder.
<br>
<br>
<b>Note:</b> Sharing with the own user is not permitted. Any attempt in doing so will result
in a sharing failure.
</p>
<h3>Clean Up</h3>
<p>
To clean all generated files (especially the configuration folder
<code>~/.syncconfig</code> and the object store in the synchronised folder), use
<pre>./sync clean --clean-all <pathToTheSynchronisedFolder></pre>
</p>
<footer class="site-footer">
<span class="site-footer-owner">
<a href="https://github.com/p2p-sync/client">P2P-Sync Client</a>
is maintained by <a href="https://github.com/p2p-sync">p2p-sync</a>.
</span>
<span class="site-footer-credits">
This site is using the <a href="https://github.com/jasonlong/cayman-theme">Cayman theme</a>
by <a href="https://twitter.com/jasonlong">Jason Long</a>.
</span>
</footer>
</section>
</body>
</html>