Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synchronization does not support proxy #164

Closed
gibboni opened this issue Jan 15, 2018 · 92 comments
Closed

Synchronization does not support proxy #164

gibboni opened this issue Jan 15, 2018 · 92 comments
Labels
backlog We'll get to it... eventually... enhancement Feature requests and code enhancements

Comments

@gibboni
Copy link

gibboni commented Jan 15, 2018

Operating system

  • [X ] Windows 7
  • [X ] Windows 10

Application

  • [X ] Desktop

Error

The desktop-app does not support proxy or it fails to use system-wide proxy settings. When the synchronise-button is pressed, nothing seem to happen. There is no visible error message. The error, ECONNREFUSED, is however logged properly into the log file.

@laurent22
Copy link
Owner

I'm wondering, is it the application that fails to use the proxy, or OneDrive that is refusing connections via this proxy? Does the native OneDrive client work in this setup?

@gibboni
Copy link
Author

gibboni commented Jan 15, 2018

Native OneDrive works just fine. Based on the log, the app tries to connect directly to graph.microsoft.com. Are there any environment or command line settings I could try?

@laurent22
Copy link
Owner

It seems Node indeed does not use the system proxy settings by default - https://stackoverflow.com/a/27825729/561309 So this will need to be implemented

@laurent22 laurent22 added the enhancement Feature requests and code enhancements label Jan 17, 2018
@jogi4github
Copy link

Is there a way to tackle this on windows systems. On Linux I guess an export of http[s]_proxy will work - but what about Windows? I was not able to find a hack for the proxy issue here...

@artelse
Copy link

artelse commented Mar 4, 2018

I get the same reason: connect ECONNREFUSED error when trying to connect to a local webdav server. Is there a workaround/solution?

@aksdb
Copy link

aksdb commented Mar 13, 2018

On Linux I also get ECONNREFUSED, even though I have http[s]_proxy set.

@crequill
Copy link

Same problem here on linux: with http[s]_proxy set, I get network timeout error with desktop application and nextcloud synchronization.

@cossio
Copy link

cossio commented Apr 16, 2018

Same problem here. Trying to setup Dropbox sync, but it gets stuck in the "Enter the code provided by Dropbox" dialog.

I am on Linux, with $http_proxy set.

@PyroP
Copy link

PyroP commented May 13, 2018

Same problem here in Windows 10.

@think-nice-things
Copy link

Hi -- any update on this?
I'm on windows 7 and the system proxy isn't recognized :-(

@laurent22 laurent22 added bug It's a bug and removed enhancement Feature requests and code enhancements nice to have labels Jun 9, 2018
@garzy
Copy link

garzy commented Jun 15, 2018

same problem too. Windows version must have a dialog for configure proxy setttiongs.

Thanks!

@Wildbill-Z
Copy link

Is there any way to handle that manually? I'm using the portable app with Windows 7 and just got stuck as it is not recognizing the system-wide settings for the proxy server which is used here at the side.
Would be good to get this solved as now Joplin is a bit of useless here at my place of work.

Nevertheless, on Android and my private Linux its just amazing. 👍

Greets, Jürgen

@jogi4github
Copy link

Hello Jürgen,

I got it working by installing the NextCloud client, syncing the folder with the md files and configuring a file system snyc in Joplin.
Not sure if this is the best way, but at least it works for me.

  • Jogi

@Wildbill-Z
Copy link

Hi,

yeah, that would be an idea but just a bit of overkill. Instead of installing an further app to sync files it would be great if Joplin could handle proxy settings by its own or just use the system settings.
But thanks. I think this will be fixed in the future and until then, your idea is a nice workaround. I just don't want to install any file sync tool as thats not wanted here at the place but could sync files manually. :-)

Greets, Jürgen

@laurent22
Copy link
Owner

Implemented there: https://github.com/laurent22/joplin/commits/proxy_test but there are issues with timeout when the provided proxy URL is incorrect (the requests never time out) so that still needs to be fixed. The underlying network lib unfortunately doesn't allow controlling timeout properly so not sure what the fix is at this point.

@dimpflmoser
Copy link

Excellent, is there a binary / AppImage to test it?
The effect of requests that don't time out also exist today if you run the App behind a proxy, so it's no step backwards only one forward.

@laurent22
Copy link
Owner

No binary yet as I consider it's not stable enough for release. If you think it could be use, I can add it to the next release anyway and mark it as "Alpha" for instance.

@dimpflmoser
Copy link

It's definitely a valuable feature. Currently I use Android-Only (NextCloud) Notes by Stefan Niedermann, however it's markdown capabilities are rather limited. On the other hand editing Notes, especially migrating my existing notes on your Android client is a pain, so I would like to do it on the desktop. At work I'm caught behind a firewall and a proxy I cannot use it right now.

Sure a fallback if the proxy is not reachable would be great, however I'd regard that as the second step.

@aksdb
Copy link

aksdb commented Sep 5, 2018

I would also be happy about that feature - even if marked as "alpha" or "use at your own risk".

@stale stale bot removed the stale An issue that hasn't been active for a while... label Oct 13, 2020
@nokoa77
Copy link

nokoa77 commented Oct 13, 2020

Hi, I confirm this feature is still an open issue for Joplin to work properly on all configurations, including when one is using it "at work" in a corporate company where proxy is the standard. There seems to be workarounds (like 1/ sync on file and 2/ sync this file with nextcloud or dropbox...) but it is not very efficient : I tried for several weeks and had to stop because of too many sync errors and fails.

@onatbas
Copy link

onatbas commented Oct 21, 2020

Hey guys, I appreciate the efforts put into Joplin, I truly do! But at the same time I can't believe how proxy support can be dismissed for so long. I believe you're underestimating the amount of people who direly needs proxy support. This is a major hurdle for some (including me.)

@laurent22 laurent22 added the backlog We'll get to it... eventually... label Oct 21, 2020
@laurent22
Copy link
Owner

It's not a ignored, I've spent quite a bit of time tried to get it working but failed. I'd gladly accept a pull request for it but it would have to be rock solid or supported by a company or very motivated contributor, because I won't be able to fix any issue with it (setting up a proxy is too much hassle and when things don't work it's very hard to debug).

@g4c
Copy link

g4c commented Oct 21, 2020

@laurent22 Thanks for the answer and all your work! I believed it should be more about getting new customers or companies. From my perspective this is basic functionally for every bigger company and there is also some competition on the market. Just don't understand why a company should insist on adding proxy? They just evaluate what's on the market and how it suits their needs. If they consider Joplin among others and find out it cannot work in their environment/infrastructure they just give up and choose something different instead. This is how it works based on my experience. But, of course, this is your business and your decision.

@gibboni
Copy link
Author

gibboni commented Oct 21, 2020

@laurent22, have you tested global-agent? It works transparently to tunnel modules that use node's default http.request() method as well as the request module. It was made to replace the older global-tunnel library.

@vvvlad
Copy link

vvvlad commented Mar 22, 2021

Any update about this topic, is there any plan to resolve it? Any workaround for MacOS?
Really hoped I could switch to Joplin but this is a deal breaker as I have proxy at work.

@jbockle
Copy link

jbockle commented Mar 24, 2021

@laurent22 as an alternative with file system synchronization and github, maybe joplin can expose post synchronization functionality where a user can specify a command/arguments to it so we can script a call to commit/push. This could also open up additional use cases as well, such as publishing to a wiki/blog.

@kleinfelter
Copy link

I wonder if this could be accomplished via a transparent, local WebDAV proxy?

Instead of configuring Joplin to sync via WebDAV to https://my-real-server/webdav it would be configured to sync with https://localhost/webdav. Then one would create a program to run on the local computer which presents a WebDAV interface, while silently relaying requests via the upstream corporate proxy.

@tiancheng2000
Copy link

As a workaround, I figured it out by configuring Tunnel mode on my Proxy Client (CFW in my case).
So maybe this issue can be ranked a lower priority?

@nokoa77
Copy link

nokoa77 commented Apr 24, 2021

As a workaround, I figured it out by configuring Tunnel mode on my Proxy Client (CFW in my case).
So maybe this issue can be ranked a lower priority?

Hi,
I'm not sure it is a solution for all situations, for instance in my situation (syncing with nextcloud on https), syncing on localhost won't work even via ssh tunneling :-(

@janLo
Copy link

janLo commented Apr 24, 2021

There is at least signal, super-productivity and vscode that I know work with a proxy and use electron in some way. Maybe someone can have a look how these achieve this.

@linusguan
Copy link

Can anyone tell me the endpoint URL for synching with Joplin Cloud? Maybe I could ask our IT to set up bypass for it at the proxy side. Thanks!
@laurent22 maybe?

@laurent22
Copy link
Owner

laurent22 commented Sep 28, 2021

That would be api.joplincloud.com

@mjysci
Copy link

mjysci commented Sep 29, 2021

If you're using Windows, you can use proxifier to redirect Joplin's connection via proxy.
For Linux, use proxychains, run it like this: proxychains ~/.joplin/Joplin.AppImage.
Still, I'd prefer a native proxy support that doesn't require 3rd party software :)

@vbo75
Copy link

vbo75 commented Jan 14, 2022

Hi,
Great job for new Joplin 2.6 version but PLEASE, add proxy support.
It's really a "Must Have" feature for business context where proxy is the standard.
Thanks a lot !

@laurent22 laurent22 added enhancement Feature requests and code enhancements and removed bug It's a bug labels Jan 14, 2022
@laurent22
Copy link
Owner

If I'm not mistaken the majority of users who need this feature need it because they are behind a company firewall.

In that case, consider asking your company to either fund the project, or post a bounty that will motivate developers. Or to allocate one of their own developers on the feature.

There's no need to keep posting to say it's a super important feature if no-one is willing to work on it.

@bhlevca
Copy link

bhlevca commented Jan 14, 2022

I don't think and company which has a firewall would fund anything like that. They would use software that is "allowed" in the company, usually Google or Microsoft. On the contrary, they would see that as a breach in security.

If cost is the issue and it is not technical, perhaps the solution would be crowdfunding, some of the links below could be a good start:
https://www.gofundme.com/en-ca/c/crowdfunding
https://www.kickstarter.com/

I am convinced that some if not all all on this email list would contribute with something, you just need to estimate the costs and come up with a project plan.

@jasonwilliams
Copy link
Contributor

jasonwilliams commented May 25, 2022

Hey @laurent22 I'm happy to look into this if you can point me in the right direction. I understand it's NodeJS trying to make a request but it could hang right? Im sure its possible to add a timeout in there at this point. My guess is somewhere around here

From doing some digging around https://github.com/delvedor/hpagent seems like the best choice, 1 because it has timeout support and it also looks to be maintained (http-node-proxy library isn't anymore).

I'm assuming it should be possible to add a configuration section for people to enter proxy information, or fallback to checking environment variables. These can be passed into the http(s) agent, there should also be a chance for it to fallback to requesting without a proxy should that fail (this is useful for those who go in and out of corporate networks).

Is there any way this can be tested by one of us? My company would not contribute financially but I can be given time for open source contributions and can test it with our firewall.

There's also many on this thread willing to test should we get some dev build out.

@jasonwilliams
Copy link
Contributor

I'm pleased to say I have a working PR, details are here: #6537
It would be helpful if some people here could check it out and try it in their environment then report back on the PR.

@agiz10
Copy link

agiz10 commented Jul 12, 2022

Thank you @jasonwilliams

Any chance of a socks proxy support as well?

@jasonwilliams
Copy link
Contributor

jasonwilliams commented Jul 12, 2022

@agiz10 the dependency I used only supports http(s) so it would require some work adding in something like https://github.com/JoshGlazebrook/socks
You could follow my pr to see what I did, should be easy

@echo672
Copy link

echo672 commented Mar 2, 2023

If you're using Windows, you can use proxifier to redirect Joplin's connection via proxy. For Linux, use proxychains, run it like this: proxychains ~/.joplin/Joplin.AppImage. Still, I'd prefer a native proxy support that doesn't require 3rd party software :)

I use this method solving this problem in debian

export http_proxy="http://ip:port"
export https_proxy="https:ip:port"
.joplin/Joplin.AppImage

@bernd-wechner
Copy link

bernd-wechner commented Mar 9, 2023

The equivalent in Powershell would be:

$env:http_proxy = 'http://127.0.0.1:port'
$env:https_proxy = 'https://127.0.0.1:port'
.\JoplinePortable.exe

Alas it doesn't work with a SOCKS5 proxy :-(.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog We'll get to it... eventually... enhancement Feature requests and code enhancements
Projects
None yet
Development

No branches or pull requests