Skip to content

Commit f9a9328

Browse files
luizlucacalmh
andauthored
users/proxy: HTTP/HTTPS proxy support via all_proxy (#987)
Update the proxying documentation to reflect support for HTTP and HTTPS proxies in addition to SOCKS5. The documentation now describes: - Use of http:// and https:// proxy URLs via the all_proxy environment variable - Embedded basic authentication in proxy URLs - A warning when credentials are sent over cleartext HTTP proxies - Limitations of HTTP(S) proxies (outbound TCP only) (related to syncthing/syncthing#10572) --------- Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com> Co-authored-by: Jakob Borg <jakob@kastelo.net>
1 parent 93fa56d commit f9a9328

1 file changed

Lines changed: 22 additions & 2 deletions

File tree

users/proxying.rst

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,16 @@ Using Proxies
55

66
.. versionadded:: 0.12.0
77

8-
Syncthing can run behind a SOCKS5 proxy. This enables use behind some corporate
8+
Syncthing can run behind a SOCKS5, HTTP, or HTTPS proxy. This enables use behind some corporate
99
firewalls, tunneling via SSH, and over Tor. The Syncthing instance that is
1010
behind the proxy is limited to outbound connections - it can not listen for
1111
incoming connections via the proxy. It is however possible to receive incoming
1212
connections via :ref:`relaying`.
1313

14+
.. versionadded:: 2.1.0
15+
16+
Support for HTTP and HTTPS proxies via ``all_proxy``.
17+
1418
There is no graphical configuration to enable proxy usage in Syncthing.
1519
Instead, an environment variable ``all_proxy`` must be set that points to the
1620
proxy. The value of this variable is the proxy URL. For example, on a
@@ -22,6 +26,17 @@ Linux-like system::
2226
...
2327
[monitor] 11:25:40 INFO: Proxy settings detected
2428

29+
Or for an HTTP/HTTPS proxy::
30+
31+
$ export all_proxy=http://10.20.30.40:8080
32+
$ # Or with authentication and encryption
33+
$ export all_proxy=https://user:password@proxy.example.com:8443
34+
$ syncthing
35+
36+
HTTP proxies requiring basic authentication can be specified by embedding
37+
credentials in the proxy URL. When credentials are used over a cleartext HTTP
38+
proxy, a warning will be logged.
39+
2540
Note that this environment variable is *not* named with capital letters - it
2641
must be exactly ``all_proxy``. The "Proxy settings detected" log message
2742
indicates that Syncthing is using the proxy configuration.
@@ -50,7 +65,12 @@ Caveats
5065
-------
5166

5267
Syncthing will use the ``http_proxy`` / ``https_proxy`` settings in combination with
53-
``all_proxy``. Proxies specified with ``http_`` variants will be used behind the socks proxy.
68+
``all_proxy``. Proxies specified with ``http_`` variants will be used behind the
69+
configured proxy.
5470

5571
If this is not desired, make sure to undefine the ``http_proxy`` / ``https_proxy``
5672
variables for syncthing.
73+
74+
When using an HTTP proxy via ``all_proxy``, only outbound TCP connections are
75+
supported. Non-TCP transports and listening sockets are not supported through
76+
HTTP or HTTPS proxies.

0 commit comments

Comments
 (0)