I read an exchange about this topic on github and I believe that this excellent app would benefit from making it able to communicate behind the proxy. The are a few related topics on this forum but none is a clear request about making Joplin’s sync function work behind a proxy.
It appears there is a way to force node.js apps to go through a proxy with global-tunnel-ng
var globalTunnel = require('global-tunnel-ng');
globalTunnel.initialize({
host: '10.0.0.10',
port: 8080,
proxyAuth: 'userId:password', // optional authentication
sockets: 50 // optional pool size for each http and https
});
@aviret Laurent mentioned he would add it, if there’s a solution that works. So if yours does, create a PR and you have added proxy support to Joplin. Wouldn’t that be something?
@bhlevca ir’s more than likely that Laurent missed your post. I did. And I try to read and look at every topic, but sometimes there are just too many.
I have inserted your code and update my proxy server in the following file ElectronClient/app/gui/MainScreen.jsx. Then I have to load the module with ‘npm install global-tunnel-ng’, recompile and that’s it.
@aviret can you please blank out the user/pwd and host with ***** and send us the file ElectronClient/app/gui/MainScreen.jsx. You can zip it and attach it here.
I have made the test with a release from the tag 7ad407a8c8060b412640ef6066709b7e46c7dffb ( tag: v1.0.175 ), but now with the last release of master, I get this message when checking the config:
Cannot read property ‘proxy’ of undefined. I will redo a checkout to this release and keep you informed.
@nVir Could you post a solution here with the global-agent? Some details about what files are modified, platform, file sources (Git or precompiled, etc.) thanks.
I just read that global-agent supports only node.js 12.0 and above. It will not work with older versions. A bit of a mess in the node.js networking world