Skip to content

Commit 841c07b

Browse files
committed
upd doc
1 parent cc83053 commit 841c07b

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,37 @@ Supported proxy schemes are:
346346
* `url` - actual proxy URL. Note that just like any query string parameter this one has to be URL-encoded to be passed as query string value.
347347
* `ttl` - time to live for cache record. Examples: `15s`, `2m`, `1h`.
348348

349+
## Configuration files
350+
351+
Reading options from configuration file is now supported too! For example, command from one of examples above:
352+
353+
```
354+
dumbproxy \
355+
-bind-address 127.0.0.1:10443 \
356+
-proxyproto \
357+
-auth basicfile://?path=/etc/dumbproxy.htpasswd \
358+
-cert=/etc/letsencrypt/live/proxy.example.com/fullchain.pem \
359+
-key=/etc/letsencrypt/live/proxy.example.com/privkey.pem
360+
```
361+
362+
becomes just
363+
364+
```
365+
dumbproxy -config dp.cfg
366+
```
367+
368+
having dp.cfg file with following content:
369+
370+
```
371+
bind-address 127.0.0.1:10443
372+
proxyproto
373+
auth basicfile://?path=/etc/dumbproxy.htpasswd
374+
cert /etc/letsencrypt/live/proxy.example.com/fullchain.pem
375+
key /etc/letsencrypt/live/proxy.example.com/privkey.pem
376+
```
377+
378+
Configuration format is [RFC 4180](https://www.rfc-editor.org/rfc/rfc4180.html) CSV with space character (`" "`) as a field separator instead of comma, `#` as a comment start character. Lines with only one field are treated as boolean flags, lines with two or more fields are treated as a key and its value, having extra fields joined with space.
379+
349380
## Synopsis
350381

351382
```
@@ -395,6 +426,8 @@ Usage of /home/user/go/bin/dumbproxy:
395426
enable TLS and use certificate
396427
-ciphers string
397428
colon-separated list of enabled ciphers
429+
-config value
430+
read configuration from file with space-separated keys and values
398431
-curves string
399432
colon-separated list of enabled key exchange curves
400433
-deny-dst-addr value

0 commit comments

Comments
 (0)