How to use Proxy under Windows 10

Hello,

after trying to get SyncThing and SyncTrayzor to use a Socks5-Proxy for about two days, without any success, I hope someone can help me/point me in the right direction. Somehow I can’t find any tutorial on how to do this. The “Using Proxies” chapter in the Docs doesn’t really help for windows at all. I already tried setting a System-wide Environment Variable and I used the field in SyncTrayzor, without success.

I really hope someone can help with that.

Greetings, Glissa

It prints a message in the logs if it finds proxy environment variable, so you could check if its being picked up.

Thanks for the fast reply. As far as I can see, it is not picked up. In the SyncTrayzor settings under “Syncthing Environmental Variables” my config is: proxy_all=socks5:127.0.0.1:xxxxx; ALL_PROXY_NO_FALLBACK=1

SyncThing should not connect to a network, without the Proxy running, if I understand the function of ALL_PROXY correctly. It doesn’t matter wether the Proxy is up or down, SyncThing connects to a relay server in both cases, after detecting strict NAT from the firewall. There is nothing in the logs indicating anything about proxy-usage or the IP/Port used/to use.

Summary

17:52:56 INFO: syncthing v1.3.4 “Fermium Flea” (go1.13.7 windows-amd64) teamcity @build.syncthing.net 2020-01-14 07:01:03 UTC

17:52:56 INFO: My ID: xxxxx

17:52:57 INFO: Single thread SHA256 performance is 1120 MB/s using minio/sha256-simd (261 MB/s using crypto/sha256).

17:52:57 INFO: Hashing performance is 586.25 MB/s

17:52:57 INFO: Overall send rate is unlimited, receive rate is unlimited

17:52:57 INFO: Using discovery server https ://discovery.syncthing.net/v2/?noannounce&id=LYXKCHX

17:52:57 INFO: Using discovery server https ://discovery-v4.syncthing.net/v2/?nolookup&id=LYXKCHX

17:52:57 INFO: Using discovery server https ://discovery-v6.syncthing.net/v2/?nolookup&id=LYXKCHX

17:52:57 INFO: Ready to synchronize “xxxxx” (default) (sendreceive)

17:52:57 INFO: QUIC listener ([::]:22000) starting

17:52:57 INFO: Relay listener (dynamic+https ://relays.syncthing.net/endpoint) starting

17:52:57 INFO: TCP listener ([::]:22000) starting

17:52:57 INFO: GUI and API listening on 127.0.0.1:8384

17:52:57 INFO: Access the GUI via the following URL: http ://localhost:8384/

17:52:57 INFO: My name is “xxxxx”

17:52:57 INFO: Device xxxxx is “syncthing” at [dynamic]

17:53:00 INFO: Completed initial scan of sendreceive folder “xxxxx” (default)

17:53:09 INFO: New NAT port mapping: external TCP address xxx.xxx.xxx.xxx:xxx to local address 0.0.0.0:22000.

17:53:09 INFO: New NAT port mapping: external TCP address xxx.xxx.xxx.xxx:xxx to local address 0.0.0.0:22000.

17:53:09 INFO: Detected 3 NAT services

17:53:16 INFO: Established secure connection to xxxxx at xxx.xxx.xxx.xxx:22000-xxx.xxx.xxx.xxx:xx673/tcp-server/TLS1.3- TLS_AES_128_GCM_SHA256

17:53:16 INFO: Device xxxxx client is “syncthing v1.3.0” named “syncthing” at xxx.xxx.xxx.xxx:22000-xxx.xxx.xxx.xxx:xx673/tcp-server/TLS1.3-TLS_AES_128_GCM_SHA256

17:53:17 INFO: quic://0.0.0.0:22000 detected NAT type: Port restricted NAT

17:53:17 INFO: quic://0.0.0.0:22000 resolved external address quic://xxx.xxx.xxx.xxx:22000 (via stun.syncthing.net:3478)

17:53:18 INFO: Connected to already connected device xxxxx (existing: xxx.xxx.xxx.xxx:22000-xxx.xxx.xxx.xxx:xx673/tcp-server/TLS1.3- TLS_AES_128_GCM_SHA256 new: xxx.xxx.xxx.xxx:xx548-xxx.xxx.xxx.xxx:xx067/relay-client/TLS1.3-TLS_AES_128_GCM_SHA256)

17:53:35 INFO: Joined relay relay://xxx.xxx.xxx.xxx:443

Syncthing respects proxy settings even when connecting to relays, as in some cases proxy is the only way out. If it’s not, that is why we have the fallback which you are explicitly disabling.

It seems env var you set is invalid as it’s missing slashes, so I wouldn’t be surprised if go just ignores it.

Oh, that is quite embarassing.

After inserting the slashes and double checking everything with the doku, nothing changes. The Log still shows exactly the same lines, only changing the IP-Adresses of the discovery/relay servers.

I suggest you try running syncthing outside of synctrayzor, via cmd, setting the env var before hand in the same shell and see if that works.

You want all_proxy, not proxy_all.

https://docs.syncthing.net/users/proxying.html

Thank you both for answering.

I just did as @AudriusButkevicius suggested and started SyncThing via cmd and voila, proxy works. @calmh, yes, I corrected the commands, it did not change anything.

I guess I will write a batchfile to start Syncthing instead of using SyncTrayzor, sadly.

Does it make any difference to write socks or socks5? The Doku has both in it, but at least in SyncTrayzor neither of them seems to do anything. In cmd socks seems to work.