You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+38-18Lines changed: 38 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -119,12 +119,23 @@ $ chisel server --help
119
119
--port, -p, Defines the HTTP listening port (defaults to the environment
120
120
variable PORT and fallsback to port 8080).
121
121
122
-
--key, An optional string to seed the generation of a ECDSA public
122
+
--key, (deprecated use --keygen and --keyfile instead)
123
+
An optional string to seed the generation of a ECDSA public
123
124
and private key pair. All communications will be secured using this
124
125
key pair. Share the subsequent fingerprint with clients to enable detection
125
126
of man-in-the-middle attacks (defaults to the CHISEL_KEY environment
126
127
variable, otherwise a new key is generate each run).
127
128
129
+
--keygen, A path to write a newly generated PEM-encoded SSH private key file.
130
+
If users depend on your --key fingerprint, you may also include your --key to
131
+
output your existing key. Use - (dash) to output the generated key to stdout.
132
+
133
+
--keyfile, An optional path to a PEM-encoded SSH private key. When
134
+
this flag is set, the --key option is ignored, and the provided private key
135
+
is used to secure all communications. (defaults to the CHISEL_KEY_FILE
136
+
environment variable). Since ECDSA keys are short, you may also set keyfile
137
+
to an inline base64 private key (e.g. chisel server --keygen - | base64).
138
+
128
139
--authfile, An optional path to a users.json file. This file should
129
140
be an object with users defined like:
130
141
{
@@ -300,6 +311,9 @@ $ chisel client --help
300
311
--hostname, Optionally set the 'Host' header (defaults to the host
301
312
found in the server url).
302
313
314
+
--sni, Override the ServerName when using TLS (defaults to the
315
+
hostname).
316
+
303
317
--tls-ca, An optional root certificate bundle used to verify the
304
318
chisel server. Only valid when connecting to the server with
305
319
"https" or "wss". By default, the operating system CAs will be used.
@@ -341,38 +355,42 @@ $ chisel client --help
341
355
342
356
### Security
343
357
344
-
Encryption is always enabled. When you start up a chisel server, it will generate an in-memory ECDSA public/private key pair. The public key fingerprint (base64 encoded SHA256) will be displayed as the server starts. Instead of generating a random key, the server may optionally specify a key seed, using the `--key` option, which will be used to seed the key generation. When clients connect, they will also display the server's public key fingerprint. The client can force a particular fingerprint using the `--fingerprint` option. See the `--help` above for more information.
358
+
Encryption is always enabled. When you start up a chisel server, it will generate an in-memory ECDSA public/private key pair. The public key fingerprint (base64 encoded SHA256) will be displayed as the server starts. Instead of generating a random key, the server may optionally specify a key file, using the `--keyfile` option. When clients connect, they will also display the server's public key fingerprint. The client can force a particular fingerprint using the `--fingerprint` option. See the `--help` above for more information.
345
359
346
360
### Authentication
347
361
348
362
Using the `--authfile` option, the server may optionally provide a `user.json` configuration file to create a list of accepted users. The client then authenticates using the `--auth` option. See [users.json](example/users.json) for an example authentication configuration file. See the `--help` above for more information.
349
363
350
364
Internally, this is done using the _Password_ authentication method provided by SSH. Learn more about `crypto/ssh` here http://blog.gopheracademy.com/go-and-ssh/.
351
365
352
-
### SOCKS5 Guide
366
+
### SOCKS5 Guide with Docker
367
+
368
+
1. Print a new private key to the terminal
369
+
370
+
```sh
371
+
chisel server --keygen -
372
+
# or save it to disk --keygen /path/to/mykey
373
+
```
353
374
354
375
1. Start your chisel server
355
376
356
-
```sh
357
-
docker run \
358
-
--name chisel -p 9312:9312 \
359
-
-d --restart always \
360
-
jpillora/chisel server -p 9312 --socks5 --key supersecret
361
-
```
377
+
```sh
378
+
jpillora/chisel server --keyfile '<ck-base64 string or file path>' -p 9312 --socks5
379
+
```
362
380
363
-
2. Connect your chisel client (using server's fingerprint)
381
+
1. Connect your chisel client (using server's fingerprint)
0 commit comments