Skip to content

Commit 1b0ec4d

Browse files
authored
fix: document uppercase ALL_PROXY support (#1024)
Syncthing’s proxy documentation incorrectly states that only lowercase `all_proxy` is supported. `golang.org/x/net/proxy` accepts both `ALL_PROXY` and `all_proxy`, with the uppercase form taking precedence and thus being preferred. This corrects both affected documentation passages while leaving the existing examples unchanged. Uppercase support was added in [golang/net commit 054b33e](golang/net@054b33e) and subsequently shipped by Syncthing. More background is available [here](https://max.pm/posts/go-proxy-mess/#syncthing-all-proxy-capitalization).
1 parent 99c109f commit 1b0ec4d

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

users/proxying.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ HTTP proxies requiring basic authentication can be specified by embedding
3737
credentials in the proxy URL. When credentials are used over a cleartext HTTP
3838
proxy, a warning will be logged.
3939

40-
Note that this environment variable is *not* named with capital letters - it
41-
must be exactly ``all_proxy``. The "Proxy settings detected" log message
42-
indicates that Syncthing is using the proxy configuration.
40+
Both the uppercase ``ALL_PROXY`` and lowercase ``all_proxy`` spellings are
41+
supported. If both are set, ``ALL_PROXY`` takes precedence. The "Proxy settings
42+
detected" log message indicates that Syncthing is using the proxy configuration.
4343

4444
Disabling Fallback
4545
------------------

users/syncthing.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -337,11 +337,10 @@ Proxies
337337
Syncthing can use a SOCKS, HTTP, or HTTPS proxy to talk to the outside
338338
world. The proxy is used for outgoing connections only - it is not possible
339339
to accept incoming connections through the proxy. The proxy is configured
340-
through the environment variable ``all_proxy``. Somewhat unusually, this
341-
variable must be named in lower case - it is not ":strike:`ALL_PROXY`". For
342-
example::
340+
through the environment variable ``ALL_PROXY`` or its lowercase variant
341+
``all_proxy``. If both are set, ``ALL_PROXY`` takes precedence. For example::
343342

344-
$ export all_proxy=socks://192.0.2.42:8081
343+
$ export ALL_PROXY=socks://192.0.2.42:8081
345344

346345
Development Settings
347346
--------------------

0 commit comments

Comments
 (0)