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
+26-10Lines changed: 26 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -295,13 +295,7 @@ dumbproxy can select upstream proxy dynamically invoking `getProxy` JS function
295
295
296
296
Note that this option can be repeated multiple times, same as `-proxy` option for chaining of proxies. These two options can be used together and order of chaining will be as they come in command line. For generalization purposes we can say that `-proxy` option is equivalent to `-js-proxy-router` option with script which returns just one static proxy.
297
297
298
-
`getProxy` function is invoked with the [same parameters](#access-filter-by-js-script) as the `access` function. But unlike `access` function it is expected to return proxy URL in string format *scheme://[user:password@]host:port* or empty string `""` if no additional upstream proxy needed (i.e. direct connection if there are no other proxy dialers defined in chain).
299
-
300
-
Supported proxy schemes are:
301
-
*`http` - regular HTTP proxy with the CONNECT method support.
302
-
*`https` - HTTP proxy over TLS connection.
303
-
*`socks5`, `socks5h` - SOCKS5 proxy with hostname resolving via remote proxy.
304
-
*`set-src-hints` - not an actual proxy, but a signal to use different source IP address hints for this connection. It's useful to route traffic across multiple network interfaces, including VPN connections. URL has to have one query parameter `hints` with a comma-separated list of IP addresses. See `-ip-hints` command line option for more details. Example: `set-src-hints://?hints=10.2.0.2`
298
+
`getProxy` function is invoked with the [same parameters](#access-filter-by-js-script) as the `access` function. But unlike `access` function it is expected to return proxy URL in string format *scheme://[user:password@]host:port* or empty string `""` if no additional upstream proxy needed (i.e. direct connection if there are no other proxy dialers defined in chain). See [supported upstream proxy schemes](#supported-upstream-proxy-schemes) for details.
305
299
306
300
Example:
307
301
@@ -321,6 +315,24 @@ function getProxy(req, dst, username) {
321
315
>
322
316
> This shouldn't be much of concern, though, if `getProxy` function doesn't use dst.resolvedHost and returns consistent values across invocations with the rest of inputs having same values.
323
317
318
+
## Supported upstream proxy schemes
319
+
320
+
Supported proxy schemes are:
321
+
322
+
*`http` - regular HTTP proxy with the CONNECT method support. Examples: `http://example.org:3128`.
323
+
*`https` - HTTP proxy over TLS connection. Examples: `https://user:[email protected]`, `https://example.org?cert=cert.pem&key=key.pem`. This method also supports additional parameters passed in query string:
324
+
*`cafile` - file with CA certificates in PEM format used to verify TLS peer.
325
+
*`sni` - override value of ServerName Indication extension.
326
+
*`peername` - expect specified name in peer certificate. Empty string relaxes any name constraints.
327
+
*`cert` - file with user certificate for mutual TLS authentication. Should be used in conjunction with `key`.
328
+
*`key` - file with private key matching user certificate specified with `cert` option.
329
+
*`ciphers` - colon-separated list of enabled TLS ciphersuites.
330
+
*`curves` - colon-separated list of enabled TLS key exchange curves.
331
+
*`min-tls-version` - minimum TLS version.
332
+
*`max-tls-version` - maximum TLS version.
333
+
*`socks5`, `socks5h` - SOCKS5 proxy with hostname resolving via remote proxy. Example: `socks5://127.0.0.1:9050`.
334
+
*`set-src-hints` - not an actual proxy, but a signal to use different source IP address hints for this connection. It's useful to route traffic across multiple network interfaces, including VPN connections. URL has to have one query parameter `hints` with a comma-separated list of IP addresses. See `-ip-hints` command line option for more details. Example: `set-src-hints://?hints=10.2.0.2`
335
+
324
336
## Synopsis
325
337
326
338
```
@@ -354,8 +366,6 @@ Usage of /home/user/go/bin/dumbproxy:
354
366
restrict autocert domains to this comma-separated list
355
367
-bind-address string
356
368
HTTP proxy listen address. Set empty value to use systemd socket activation. (default ":8080")
357
-
-proxyproto
358
-
listen proxy protocol
359
369
-bind-pprof string
360
370
enables pprof debug endpoints
361
371
-bind-reuseport
@@ -372,6 +382,8 @@ Usage of /home/user/go/bin/dumbproxy:
372
382
enable TLS and use certificate
373
383
-ciphers string
374
384
colon-separated list of enabled ciphers
385
+
-curves string
386
+
colon-separated list of enabled key exchange curves
375
387
-deny-dst-addr value
376
388
comma-separated list of CIDR prefixes of forbidden IP addresses (default 127.0.0.0/8, 0.0.0.0/32, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 169.254.0.0/16, ::1/128, ::/128, fe80::/10)
377
389
-disable-http2
@@ -400,16 +412,20 @@ Usage of /home/user/go/bin/dumbproxy:
400
412
key for TLS certificate
401
413
-list-ciphers
402
414
list ciphersuites
415
+
-list-curves
416
+
list key exchange curves
403
417
-max-tls-version value
404
418
maximum TLS version accepted by server (default TLS13)
405
419
-min-tls-version value
406
-
minimal TLS version accepted by server (default TLS12)
420
+
minimum TLS version accepted by server (default TLS12)
407
421
-passwd string
408
422
update given htpasswd file and add/set password for username. Username and password can be passed as positional arguments or requested interactively
0 commit comments