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

Standalone Signal-Desktop has problems connecting through a proxy #1632

Closed
1 task done
janLo opened this issue Nov 1, 2017 · 215 comments
Closed
1 task done

Standalone Signal-Desktop has problems connecting through a proxy #1632

janLo opened this issue Nov 1, 2017 · 215 comments

Comments

@janLo
Copy link

janLo commented Nov 1, 2017

  • I have searched open and closed issues for duplicates

Bug description

I've set the http_proxy and https_proxy variables on my system. Sognal-Desktop however seems to ignore them. I cannot get a connection to get the QR code. An strace says:

[pid 17437] 01:57:05.094195 connect(36, {sa_family=AF_INET, sin_port=htons(443), sin_addr=inet_addr("52.206.164.16")}, 16) = -1 EINPROGRESS (Operation now in progress)

Which is clearly not the proxy.

Steps to reproduce

  • Install Signal-Desktop behind a proxy
  • Try to follow the steps to set it up.

Actual result: No QR code, Server not reachable
Expected result: QR Code, normal operation.

Platform info

Operating System: GNU/Linux
Browser: Chrome

Signal version: v1.0.34

Link to debug log

https://gist.github.com/0bbe048ee23480d58dae34f0b07e16fe

@NipponBill
Copy link

Same here. Environment variables set for my company proxy in Windows 8.1, also proxy set in Internet Options.

No QR Code: fails to connect.

@cboehm-it
Copy link

I also configured a proxy and Signal Desktop does not connect.

@delight
Copy link

delight commented Nov 1, 2017

Confirmation, no signal desktop behind the proxy ... tried linux and windows v1.0.34

You shouldn't have disabled the chrome-app before fixing this ... anyways hope to see a working version soon.

@scottnonnenberg
Copy link
Contributor

Signal Desktop on Chrome is absolutely still useable. If you've already exported and imported to Signal Desktop Standalone, you can remove the Chrome version and reinstall from scratch.

This issue is on my list.

@pieceofsoul
Copy link

Same issue on Windows 10.

@scottnonnenberg scottnonnenberg changed the title Standalone Signal-Desktop ignores the http(s)_proxy variables Standalone Signal-Desktop has problems connecting through a proxy Nov 16, 2017
@mattismyname
Copy link

Happy to be guinea pig tester on this

@bseibold
Copy link

Still valid for v1.0.38

@gfairchild
Copy link

Experiencing this on macOS 10.12.6.

@scottnonnenberg
Copy link
Contributor

The beta build installed today has support for using a proxy specified in environment variables -
please try it out! https://github.com/WhisperSystems/Signal-Desktop/releases/tag/v1.1.0-beta.3. The environment variables consulted are discussed here: #1855

@je-vv
Copy link

je-vv commented Dec 5, 2017

This is great news... There 2 new dependencies to take into account when using next release, or when testing the beta release:

https://github.com/Rob--W/proxy-from-env
https://github.com/TooTallNate/node-proxy-agent

Which can be confirmed on package.json, the commit added:

  • "proxy-agent": "^2.1.0",
  • "proxy-from-env": "^1.0.0",

Is it possible to somehow publish those new requirements? Just so people and/or distribution developers take that into account... Thanks a lot !

@gfairchild
Copy link

@scottnonnenberg, I saw your comment on the PR:

My understanding is that most proxies on MacOS are system-wide and transparent, so it's not so urgent.

I'm on macOS Sierra, and while the proxies generally are system-wide and transparent, each program still needs to have built-in support for reading them. Signal does not currently work for me when I'm behind a proxy. I do have environment variables set in my terminal, but those are only available within a terminal session.

@scottnonnenberg
Copy link
Contributor

@gfairchild for now it would be useful to determine whether those environment variables work for you, by running from the command line. Just gotta reach into that app to find the executable. :0)

@gfairchild
Copy link

Yeah, that'll certainly be a start. That should work. I'm not in a place where I can compile/test the beta. Is there by chance a pre-built beta for macs that I could use to test?

@scottnonnenberg
Copy link
Contributor

You can find the latest prebuilt beta windows install here: https://updates.signal.org/desktop/beta.yml and the latest beta mac install here: https://updates.signal.org/desktop/beta-mac.yml

@gfairchild
Copy link

Just tried the current beta, and it doesn't appear to be working. I see this when I try to setup a new install:

screen shot 2017-12-05 at 2 57 44 pm

I tried both launching the app natively and from the command line, where I have an HTTPS_PROXY environment variable set. I just tossed Signal Beta.app onto my desktop. Here's the debugging output from the command line launch:

gfairchild@meow ~/Desktop/Signal Beta.app/Contents/MacOS> env | grep -i proxy
HTTP_PROXY=http://proxyout.xxx.xxx:8080
https_proxy=http://proxyout.xxx.xxx:8080
http_proxy=http://proxyout.xxx.xxx:8080
no_proxy=localhost,127.0.0.1,xxx.xxx
NO_PROXY=localhost,127.0.0.1,xxx.xxx
HTTPS_PROXY=http://proxyout.xxx.xxx:8080
gfairchild@meow ~/Desktop/Signal Beta.app/Contents/MacOS> ./Signal\ Beta
NODE_ENV production
NODE_CONFIG_DIR /Users/gfairchild/Desktop/Signal Beta.app/Contents/Resources/app.asar/config
NODE_CONFIG {}
ALLOW_CONFIG_MUTATIONS undefined
HOSTNAME undefined
NODE_APP_INSTANCE undefined
SUPPRESS_NO_CONFIG_WARNING undefined
setting AUMID to org.whispersystems.signal-desktop-beta
userData: /Users/gfairchild/Library/Application Support/Signal Beta
making app single instance
{"name":"log","hostname":"meow.xxx.xxx","pid":51986,"level":30,"msg":"OS Release: 16.7.0 - notifications polyfill? false","time":"2017-12-05T21:57:39.854Z","v":0}
{"name":"log","hostname":"meow.xxx.xxx","pid":51986,"level":30,"msg":"app ready","time":"2017-12-05T21:57:39.900Z","v":0}
{"name":"log","hostname":"meow.xxx.xxx","pid":51986,"level":30,"msg":"Initializing BrowserWindow config: {\"show\":true,\"width\":800,\"height\":610,\"minWidth\":700,\"minHeight\":360,\"autoHideMenuBar\":false,\"webPreferences\":{\"nodeIntegration\":false,\"preload\":\"/Users/gfairchild/Desktop/Signal Beta.app/Contents/Resources/app.asar/preload.js\"},\"icon\":\"/Users/gfairchild/Desktop/Signal Beta.app/Contents/Resources/app.asar/images/icon_256.png\",\"maximized\":false,\"x\":320,\"y\":123}","time":"2017-12-05T21:57:39.913Z","v":0}
Checking for update
Update for version 1.1.0-beta.3 is not available (latest version: 1.1.0-beta.3, downgrade is disallowed.
{"name":"log","hostname":"meow.xxx.xxx","pid":51986,"level":30,"msg":"Using OS-level spell check API with locale en_US.UTF-8","time":"2017-12-05T21:57:40.930Z","v":0}
{"name":"log","hostname":"meow.xxx.xxx","pid":51986,"level":30,"msg":"pre-main prep time: 2 ms","time":"2017-12-05T21:57:41.132Z","v":0}
{"name":"log","hostname":"meow.xxx.xxx","pid":51986,"level":30,"msg":"Build expires:  2018-03-05T01:27:01.000Z","time":"2017-12-05T21:57:41.159Z","v":0}
{"name":"log","hostname":"meow.xxx.xxx","pid":51986,"level":30,"msg":"background page reloaded","time":"2017-12-05T21:57:41.185Z","v":0}
{"name":"log","hostname":"meow.xxx.xxx","pid":51986,"level":30,"msg":"environment: production","time":"2017-12-05T21:57:41.185Z","v":0}
{"name":"log","hostname":"meow.xxx.xxx","pid":51986,"level":30,"msg":"ConversationController: starting initial fetch","time":"2017-12-05T21:57:41.257Z","v":0}
{"name":"log","hostname":"meow.xxx.xxx","pid":51986,"level":30,"msg":"ConversationController: done with initial fetch","time":"2017-12-05T21:57:41.259Z","v":0}
{"name":"log","hostname":"meow.xxx.xxx","pid":51986,"level":30,"msg":"listening for registration events","time":"2017-12-05T21:57:41.275Z","v":0}
{"name":"log","hostname":"meow.xxx.xxx","pid":51986,"level":30,"msg":"Updating BrowserWindow config: {\"maximized\":false,\"autoHideMenuBar\":false,\"width\":800,\"height\":610,\"x\":320,\"y\":122}","time":"2017-12-05T21:57:42.195Z","v":0}
{"name":"log","hostname":"meow.xxx.xxx","pid":51986,"level":30,"msg":"opening provisioning socket https://textsecure-service.whispersystems.org","time":"2017-12-05T21:57:42.520Z","v":0}
{"name":"log","hostname":"meow.xxx.xxx","pid":51986,"level":30,"msg":"provisioning socket closed 1006","time":"2017-12-05T21:57:42.537Z","v":0}
{"name":"log","hostname":"meow.xxx.xxx","pid":51986,"level":30,"msg":"provisioning failed Error: websocket closed\n    at W3CWebSocket.socket.onclose (file:///Users/gfairchild/Desktop/Signal%20Beta.app/Contents/Resources/app.asar/js/libtextsecure.js:37941:36)\n    at W3CWebSocket._dispatchEvent [as dispatchEvent] (/Users/gfairchild/Desktop/Signal Beta.app/Contents/Resources/app.asar/node_modules/yaeti/lib/EventTarget.js:107:17)\n    at W3CWebSocket.onConnectFailed (/Users/gfairchild/Desktop/Signal Beta.app/Contents/Resources/app.asar/node_modules/websocket/lib/W3CWebSocket.js:219:14)\n    at WebSocketClient.<anonymous> (/Users/gfairchild/Desktop/Signal Beta.app/Contents/Resources/app.asar/node_modules/websocket/lib/W3CWebSocket.js:59:25)\n    at emitOne (events.js:96:13)\n    at WebSocketClient.emit (events.js:191:7)\n    at ClientRequest.handleRequestError (/Users/gfairchild/Desktop/Signal Beta.app/Contents/Resources/app.asar/node_modules/websocket/lib/WebSocketClient.js:215:14)\n    at emitOne (events.js:96:13)\n    at ClientRequest.emit (events.js:191:7)\n    at TLSSocket.socketErrorListener (_http_client.js:358:9)","time":"2017-12-05T21:57:42.540Z","v":0}
{"name":"log","hostname":"meow.xxx.xxx","pid":51986,"level":30,"msg":"Updating BrowserWindow config: {\"maximized\":false,\"autoHideMenuBar\":false,\"width\":800,\"height\":610,\"x\":320,\"y\":122}","time":"2017-12-05T21:57:47.226Z","v":0}

@scottnonnenberg
Copy link
Contributor

@gfairchild Glad to see that you're trying out the beta. You can either provide HTTPS_PROXY (for our REST calls) and WSS_PROXY (for websocket) or ALL_PROXY to provide one proxy URL for both.

@gfairchild
Copy link

You mean provide one of those as an argument when launching? So something like this?:

gfairchild@meow ~/Desktop/Signal Beta.app/Contents/MacOS> ./Signal\ Beta HTTPS_PROXY=http://proxyout.xxx.xxx:8080

?

@scottnonnenberg
Copy link
Contributor

They're environment variables, so you can set them with export HTTPS_PROXY=blah on a previous line in that session. Or you can put it before the executable right inline like that. https://en.wikipedia.org/wiki/Environment_variable#Unix

@gfairchild
Copy link

Ah, sorry, I didn't make it clear, but I do have those set. If you look at the very first line of my big blob, I'm outputting my current proxy environment variables. So HTTPS_PROXY is set, but I still see a "Failed to connect to server." error when trying to setup a new install.

@scottnonnenberg
Copy link
Contributor

Yes, and you need to add either WSS_PROXY to cover the websocket cases, or change over to using just ALL_PROXY to capture all cases.

@gfairchild
Copy link

Ahhhhhh, gotcha. I'll try that....

@gfairchild
Copy link

gfairchild commented Dec 5, 2017

Adding WSS_PROXY doesn't seem to fix it:

gfairchild@meow ~/Desktop/Signal Beta.app/Contents/MacOS> export WSS_PROXY=http://proxyout.xxx.xxx:8080
gfairchild@meow ~/Desktop/Signal Beta.app/Contents/MacOS> env | grep -i proxy
HTTP_PROXY=http://proxyout.xxx.xxx:8080
WSS_PROXY=http://proxyout.xxx.xxx:8080
https_proxy=http://proxyout.xxx.xxx:8080
http_proxy=http://proxyout.xxx.xxx:8080
no_proxy=localhost,127.0.0.1,xxx.xxx
NO_PROXY=localhost,127.0.0.1,xxx.xxx
HTTPS_PROXY=http://proxyout.xxx.xxx:8080
gfairchild@meow ~/Desktop/Signal Beta.app/Contents/MacOS> ./Signal\ Beta
NODE_ENV production
NODE_CONFIG_DIR /Users/gfairchild/.Trash/Signal Beta.app/Contents/Resources/app.asar/config
NODE_CONFIG {}
ALLOW_CONFIG_MUTATIONS undefined
HOSTNAME undefined
NODE_APP_INSTANCE undefined
SUPPRESS_NO_CONFIG_WARNING undefined
setting AUMID to org.whispersystems.signal-desktop-beta
userData: /Users/gfairchild/Library/Application Support/Signal Beta
making app single instance
{"name":"log","hostname":"meow.xxx.xxx","pid":56837,"level":30,"msg":"OS Release: 16.7.0 - notifications polyfill? false","time":"2017-12-05T22:27:20.518Z","v":0}
{"name":"log","hostname":"meow.xxx.xxx","pid":56837,"level":30,"msg":"app ready","time":"2017-12-05T22:27:20.587Z","v":0}
{"name":"log","hostname":"meow.xxx.xxx","pid":56837,"level":30,"msg":"Initializing BrowserWindow config: {\"show\":true,\"width\":800,\"height\":610,\"minWidth\":700,\"minHeight\":360,\"autoHideMenuBar\":false,\"webPreferences\":{\"nodeIntegration\":false,\"preload\":\"/Users/gfairchild/.Trash/Signal Beta.app/Contents/Resources/app.asar/preload.js\"},\"icon\":\"/Users/gfairchild/.Trash/Signal Beta.app/Contents/Resources/app.asar/images/icon_256.png\",\"maximized\":false,\"x\":320,\"y\":122}","time":"2017-12-05T22:27:20.603Z","v":0}
Checking for update
{"name":"log","hostname":"meow.xxx.xxx","pid":56837,"level":30,"msg":"Using OS-level spell check API with locale en_US.UTF-8","time":"2017-12-05T22:27:21.694Z","v":0}
{"name":"log","hostname":"meow.xxx.xxx","pid":56837,"level":30,"msg":"pre-main prep time: 2 ms","time":"2017-12-05T22:27:21.924Z","v":0}
{"name":"log","hostname":"meow.xxx.xxx","pid":56837,"level":30,"msg":"Build expires:  2018-03-05T01:27:01.000Z","time":"2017-12-05T22:27:21.951Z","v":0}
{"name":"log","hostname":"meow.xxx.xxx","pid":56837,"level":30,"msg":"background page reloaded","time":"2017-12-05T22:27:21.976Z","v":0}
{"name":"log","hostname":"meow.xxx.xxx","pid":56837,"level":30,"msg":"environment: production","time":"2017-12-05T22:27:21.976Z","v":0}
{"name":"log","hostname":"meow.xxx.xxx","pid":56837,"level":30,"msg":"ConversationController: starting initial fetch","time":"2017-12-05T22:27:22.114Z","v":0}
{"name":"log","hostname":"meow.xxx.xxx","pid":56837,"level":30,"msg":"ConversationController: done with initial fetch","time":"2017-12-05T22:27:22.116Z","v":0}
{"name":"log","hostname":"meow.xxx.xxx","pid":56837,"level":30,"msg":"listening for registration events","time":"2017-12-05T22:27:22.133Z","v":0}
{"name":"log","hostname":"meow.xxx.xxx","pid":56837,"level":30,"msg":"opening provisioning socket https://textsecure-service.whispersystems.org","time":"2017-12-05T22:27:23.229Z","v":0}
{"name":"log","hostname":"meow.xxx.xxx","pid":56837,"level":30,"msg":"createSocket: using proxy url http://proxyout.xxx.xxx:8080","time":"2017-12-05T22:27:23.230Z","v":0}
Update for version 1.1.0-beta.3 is not available (latest version: 1.1.0-beta.3, downgrade is disallowed.
{"name":"log","hostname":"meow.xxx.xxx","pid":56837,"level":30,"msg":"provisioning socket closed 1006","time":"2017-12-05T22:27:23.750Z","v":0}
{"name":"log","hostname":"meow.xxx.xxx","pid":56837,"level":30,"msg":"provisioning failed Error: websocket closed\n    at W3CWebSocket.socket.onclose (file:///Users/gfairchild/.Trash/Signal%20Beta.app/Contents/Resources/app.asar/js/libtextsecure.js:37941:36)\n    at W3CWebSocket._dispatchEvent [as dispatchEvent] (/Users/gfairchild/.Trash/Signal Beta.app/Contents/Resources/app.asar/node_modules/yaeti/lib/EventTarget.js:107:17)\n    at W3CWebSocket.onConnectFailed (/Users/gfairchild/.Trash/Signal Beta.app/Contents/Resources/app.asar/node_modules/websocket/lib/W3CWebSocket.js:219:14)\n    at WebSocketClient.<anonymous> (/Users/gfairchild/.Trash/Signal Beta.app/Contents/Resources/app.asar/node_modules/websocket/lib/W3CWebSocket.js:59:25)\n    at emitOne (events.js:96:13)\n    at WebSocketClient.emit (events.js:191:7)\n    at ClientRequest.handleRequestError (/Users/gfairchild/.Trash/Signal Beta.app/Contents/Resources/app.asar/node_modules/websocket/lib/WebSocketClient.js:215:14)\n    at emitOne (events.js:96:13)\n    at ClientRequest.emit (events.js:191:7)\n    at TLSSocket.socketErrorListener (_http_client.js:358:9)","time":"2017-12-05T22:27:23.753Z","v":0}
{"name":"log","hostname":"meow.xxx.xxx","pid":56837,"level":30,"msg":"Updating BrowserWindow config: {\"maximized\":false,\"autoHideMenuBar\":false,\"width\":800,\"height\":610,\"x\":320,\"y\":122}","time":"2017-12-05T22:27:30.557Z","v":0}

And I see similar results even if I specify ALL_PROXY.

@scottnonnenberg
Copy link
Contributor

@gfairchild Well, the good news is that we're attempting to use the proxy. Maybe the right thing is to take this offline - feel free to contact me directly.

@gfairchild
Copy link

Sounds good. Just pinged you on Twitter.

@TurkeyMan
Copy link

+1 ... Signal doesn't work on my work PC because the company proxies all our traffic.

@tomlawesome
Copy link

tomlawesome commented Jan 13, 2022

Agree. Still does not work at my work.

Doesn't work when tethering to a phone for me, either. Only thing I can assume is that the iPhone personal hotspot acting as a proxy triggers the same issue.

@sesamechicken
Copy link

I agree that this is pretty unreasonable, but this does work for us:
https://github.com/sesamechicken/signal-proxy

#1632 (comment)

@gfairchild
Copy link

I still maintain that until Signal bakes the proxy configuration into the app, it has no hope of any sort of adoption. Currently, what it has is a nice beta-level demonstration of the ability to work with a proxy, but that’s it. This issue shouldn’t be closed until proxy support is added to the UI and made accessible to the general user base.

@dbrum
Copy link

dbrum commented Jan 15, 2022

@gfairchild you do realize Signal has over 40 million users right? I think your 'no hope of any sort of adoption' comment is slightly dellusional.

@gfairchild
Copy link

@gfairchild you do realize Signal has over 40 million users right? I think your 'no hope of any sort of adoption' comment is slightly dellusional.

The service as a whole has that many users, but I’m clearly referring to the desktop app, which I absolutely promise you does not have that many users.

@Nexusmeister
Copy link

Any updates on this? Can we hope with a proxy configuration in the UI in the near future? Workarounds didn't work for me and I don't want to use the app by a workaround.

@stale
Copy link

stale bot commented Jul 11, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jul 11, 2022
@Nexusmeister
Copy link

Still relevant.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot removed the stale label Jul 16, 2022
@lcoandrade
Copy link

The fact that no one have worked on this issue doesn’t change its relevance. It is still relevant, even more in a working environment.

@liam0215
Copy link

liam0215 commented Aug 5, 2022

This issue shouldn’t be closed until proxy support is added to the UI and made accessible to the general user base.

I'm interested in contributing to this, should I open a new issue, or should I just point the PR here?

I'm thinking the UI should be similar to Telegram's proxy setting flow, but would that cause legal issues?

@Nexusmeister
Copy link

I'm thinking the UI should be similar to Telegram's proxy setting flow, but would that cause legal issues?

I don't think there would be legal issues if the gui concept is in some sort similar

@stale
Copy link

stale bot commented Nov 18, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Nov 18, 2022
@Nexusmeister
Copy link

The fact that no one have worked on this issue doesn’t change its relevance. It is still relevant, even more in a working environment.

I can only repeat that statement

@stale stale bot removed the stale label Nov 20, 2022
@ra0e
Copy link

ra0e commented Nov 22, 2022

Well, we do really need some sort of solution to this. Do not close this Issue until it is completed

@Nexusmeister
Copy link

Today I tried the following bat Script:

set HTTP_PROXY=<YOURPROXY>
set HTTPS_PROXY=%HTTP_PROXY%
start %LOCALAPPDATA%\Programs\signal-desktop\Signal.exe

Source

And I was able to connect through the proxy and use Signal (Don't know if a sysadmin will cut my throat for doing this 😄).
But it is more a workaround than a solution.

@incyi
Copy link

incyi commented Nov 30, 2023

Workaround still works on: version 6.40.0

@WhyNotHugo
Copy link
Contributor

Setting HTTPS_PROXY seems to work fine:

HTTPS_PROXY=socks5h://127.0.0.1:9900 signal-desktop

I think this has been properly resolved?

@indutny-signal
Copy link
Contributor

We indeed made some changes to our proxy code and hope that they work better now! Thanks for confirming it.

@WhyNotHugo
Copy link
Contributor

WhyNotHugo commented Dec 6, 2023 via email

@CaptainDoubleYou
Copy link

CaptainDoubleYou commented Jan 6, 2024

Today I tried the following bat Script:

set HTTP_PROXY=<YOURPROXY>
set HTTPS_PROXY=%HTTP_PROXY%
start %LOCALAPPDATA%\Programs\signal-desktop\Signal.exe

Source

And I was able to connect through the proxy and use Signal (Don't know if a sysadmin will cut my throat for doing this 😄). But it is more a workaround than a solution.

Just wanted to say that this worked for me! I was using PDAnet+ but hide tethering usage stopped working. Maybe because of Android 14 (Pixel 7 Pro owner). I reached out to the developer to see if this can be fixed. I switched to NetShare Pro and since it uses a proxy 192.168.49.1:8282 Signal Desktop stopped working for me. After several trial and errors I was able to get Signal Desktop on Windows to work with NetShare app.
I created a bat file with the following
set HTTP_PROXY=http://192.168.49.1:8282
set HTTPS_PROXY=%HTTP_PROXY%
start %LOCALAPPDATA%"\Programs\signal-desktop-beta\Signal Beta.exe"

I had to use the Beta since the standard version refused to connect. Also because Signal Beta.exe has a space between the two words I had to use "" to make it work. Maybe using a dash or an underscore in the app name would have been better since signal-desktop-beta avoids spacing anyway.

I'm happy this is working now on my Windows! Great work team!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests