Open jiajunhuang opened 5 years ago
Currently setting a proxy is not possible. So it is a missing feature.
As a workaround you could follow https://github.com/syncthing/syncthing-macos/issues/154#issuecomment-832946496
@opensource21 setting environment variables is not possible with #154 only commandline parameters
@xor-gate This why I link to the workaround where a shell-script is called. Otherwise, I had written it's solved with #154
Here is a less elegant way to achieve the goal: export all_proxy=socks5://127.0.0.1:1234 && open /Applications/Syncthing.app;
Yeah I understand you need to bypass the (corporate) firewall or proxy via e.g Tor using the SOCKS5 protocol. For my own reference we need to inject the all_proxy
envvar.
Code need to be touched located here:
Yeah I understand you need to bypass the (corporate) firewall or proxy via e.g Tor using the SOCKS5 protocol. For my own reference we need to inject the
all_proxy
envvar.
Yes, I have checked the documentation on environment variables for a specific agent. Is there another way to specify the agent through the application, rather than, as I mentioned earlier, using the command line to start the app to achieve the purpose of injecting environment variables?
No currently the only environment variable we set/inject is STNOUPGRADE
. As a intermediate solution we could use the hidden turning knob like settings commandline argument as documented here https://github.com/syncthing/syncthing-macos?tab=readme-ov-file#preferences. We then could add something like:
defaults write com.github.xor-gate.syncthing-macosx Proxy 'socks5://127.0.0.1:1234'
It would be more nice to have two turning knobs in the GUI so you can set the URL and enable/disable proxying.
I can't promise when I implement this, but its not that hard. Syncthing macOS is a one man show, I do it in my (expensive) free time.
Maybe we should also detect system wide proxy: https://apple.stackexchange.com/a/396066.
No currently the only environment variable we set/inject is
STNOUPGRADE
. As a intermediate solution we could use the hidden turning knob like settings commandline argument as documented here https://github.com/syncthing/syncthing-macos?tab=readme-ov-file#preferences. We then could add something like:defaults write com.github.xor-gate.syncthing-macosx Proxy 'socks5://127.0.0.1:1234'
It would be more nice to have two turning knobs in the GUI so you can set the URL and enable/disable proxying.
I can't promise when I implement this, but its not that hard. Syncthing macOS is a one man show, I do it in my (expensive) free time.
Thank you sir. Unfortunately, after tested, the command "defaults write com.github.xor-gate.syncthing-macosx Proxy 'socks5://127.0.0.1:1234'" did not work.
Thank you sir. Unfortunately, after tested, the command "defaults write com.github.xor-gate.syncthing-macosx Proxy 'socks5://127.0.0.1:1234'" did not work.
Sure it doesn't work, it was a proposal for myself if that was not clear. It has not been implemented yet to inject the proxy environment variable.
how can I use proxy in
syncthing-macos
? I can set aall_proxy=...
in systemd service file, but it does not provide a way to set environment variable in syncthing-macos.