nylas-mail icon indicating copy to clipboard operation
nylas-mail copied to clipboard

Usage behind a proxy

Open arturo182 opened this issue 9 years ago • 54 comments

Hi,

I'm trying to use N1 behind a corporate proxy. I'm using Ubuntu and have both $http_proxy and $https_proxy set.

I set up my private gmail acount and that part worked, but I cannot send any emails, I get the "Your draft could not be sent. Please check your connection and try again" error. I'm also trying to setup Exchange account and I get "Tunneling socket could not be established, cause=write EPROTO". Also for Exchange, shouldn't there be an option supplying EWS URL?

Thanks!

arturo182 avatar Oct 21 '15 08:10 arturo182

+1. I would like to have the option to manually set proxy / use system settings (reloaded without reloading N1). Thanks Valerio

valeriocuscuna avatar Oct 21 '15 11:10 valeriocuscuna

+1

sergiokopplin avatar Oct 21 '15 21:10 sergiokopplin

+1

toXel avatar Oct 23 '15 10:10 toXel

it's working after the last update! o//

sergiokopplin avatar Oct 28 '15 12:10 sergiokopplin

great work!

buhe avatar Oct 29 '15 03:10 buhe

+1 It's very important for users in China. @sergiokopplin What are the steps to use it?

gutenye avatar Oct 30 '15 04:10 gutenye

@gutenye for me, just the update was enough. Nothing more.

sergiokopplin avatar Oct 30 '15 11:10 sergiokopplin

+1 this would be great for when people travel to networks that aren't their own and have to work behind a proxy server (like visiting corporate clients).

sboss avatar Nov 05 '15 23:11 sboss

+1. sock5 proxy

vincihu avatar Nov 24 '15 04:11 vincihu

+1

tonybenoy avatar Dec 18 '15 04:12 tonybenoy

Sounds like this is fixed so I'm going to close! We generally recommend setting up your OS's networking configuration to use the desired proxy settings.

grinich avatar Jan 08 '16 02:01 grinich

@grinich World this work for NylasAPI requests which are made through the node request module?

mbilker avatar Jan 08 '16 02:01 mbilker

What a pity! I wouldn't be able to use it in China until it supports proxy.

edwinyzh avatar Jan 14 '16 06:01 edwinyzh

@edwinyzh If you want to implement the feature, you can override the request module to use a proxy.

mbilker avatar Jan 14 '16 06:01 mbilker

I don't remember the specifics of the override.

mbilker avatar Jan 14 '16 06:01 mbilker

Can this be reopened, @grinich? Doesn't seem to be fixed, at least for me, and also for some others going by the new tickets @mbilker and others are rolling into this one.

bonaldi avatar Jan 29 '16 12:01 bonaldi

maybe helpful: https://www.npmjs.com/package/global-tunnel

lalitkapoor avatar Feb 26 '16 16:02 lalitkapoor

Thanks for the link @lalitkapoor. It looks like that'd do the trick, but we may try to rewrite our HTTP request logic to use XMLHTTPRequest instead of the request library. Chromium does some really nice auto-detection of system proxy settings, and we'd like to be able to use that rather than making users provide proxy settings, or trying to read them on each platform ourselves. Stay tuned!

bengotow avatar Feb 26 '16 23:02 bengotow

+1 for manually proxy configuration. I'm running N1 on Windows, behind a corporate proxy, and it doesn't reach the api.

msmosso avatar Feb 29 '16 13:02 msmosso

This is in development. On Mon, Feb 29, 2016 at 8:34 AM Matheus Mósso [email protected] wrote:

+1 for manually proxy configuration. I'm running N1 on Windows, behind a corporate proxy, and it doesn't reach the api.

— Reply to this email directly or view it on GitHub https://github.com/nylas/N1/issues/104#issuecomment-190213908.

mbilker avatar Feb 29 '16 13:02 mbilker

+1

ex0b1t avatar Mar 04 '16 08:03 ex0b1t

+1

drodmun avatar Mar 29 '16 08:03 drodmun

Guys, is there any progress? I´m also behind the corporate proxy which makes using this app only a dream.

jansestakgooddata avatar Apr 19 '16 07:04 jansestakgooddata

+1

cybertk avatar Apr 22 '16 06:04 cybertk

Currently, if you modify the program to make node-request use the proxy and set your system's proxy settings, then it will use the proxy settings. Since a large part of N1 runs in the Electron main process, it cannot use things like XHRHttpRequest or window.fetch to get resources and follow proxy settings. The main process uses node-request which is unaware of system proxy settings and is not specifically designed for Electron usage with proxies.

mbilker avatar Apr 25 '16 05:04 mbilker

+1

brwolfgang avatar Apr 25 '16 15:04 brwolfgang

+1

Without proxy support it cannot be used inside any corporate network.

carlos-jenkins avatar Apr 28 '16 19:04 carlos-jenkins

You can follow up what is being developed on Waffle. Filter the board using "proxy" to see where it is. Currently there's no one working on it =/

brwolfgang avatar May 03 '16 12:05 brwolfgang

+1

cmmata avatar May 05 '16 07:05 cmmata

Nylas N1 is great but it's unusable at work. Please, add proxy support. Or maybe you know a software or a tips for Nylas N1 can force proxy.

jrm06 avatar May 11 '16 03:05 jrm06

might be able to get away with something like this on the mac (they have windows version too) https://www.proxifier.com/mac/

lalitkapoor avatar May 11 '16 04:05 lalitkapoor

+1

zaaack avatar Jun 30 '16 10:06 zaaack

Another request for this: https://nylas.zendesk.com/agent/tickets/3844

hallamoore avatar Jul 08 '16 18:07 hallamoore

@arturo182 on linux, just run with --proxy-server param.

nylas --proxy-server=socks5://127.0.0.1:1080

anxsec avatar Aug 25 '16 02:08 anxsec

@anxsec

  • option --proxy-server param does not work for me
  • neither does http_proxy and https_proxy correctly set

-> still a proxy problem for me ! (OS Kubuntu 16.04) Are you guys still facing this proxy problem ?

viveris-villeurbanne avatar Sep 23 '16 15:09 viveris-villeurbanne

+1

Still no progress on that ?

louisrubet avatar Oct 04 '16 08:10 louisrubet

+1

jenghung avatar Nov 01 '16 06:11 jenghung

+1, can not use it reliably without proxy for work

wuairc avatar Dec 08 '16 06:12 wuairc

+1

fffx avatar Jan 12 '17 12:01 fffx

It works with proxychains

$ proxychains nylas # from terminal

fffx avatar Jan 12 '17 12:01 fffx

+1

oikonomopo avatar May 03 '17 15:05 oikonomopo

+1

ghost avatar May 19 '17 03:05 ghost

No proxy means it's unusable for me on some networks behind firewalls.

nelsonhoover avatar May 24 '17 19:05 nelsonhoover

Any update on this ?

ConeyLiu avatar Jun 08 '17 00:06 ConeyLiu

+1

NoZiL avatar Jun 20 '17 15:06 NoZiL

I'm having this problem too, I think. When I try to add an Office365 account, it wait for a few seconds with the "Adding account..." caption on the button, the it stops and shows a red message: "Greeting never received". However, I know the account works because I can connect without problems with Wavebox.

This is what I get in the log file:

{"host":"xmper8q3.gcv.dom","timestamp":"2017-07-05T11:10:12.734Z","payload":"Error\n    at new APIError (/src/flux/errors.es6:57:19)\n    at Request._callback (/src/flux/nylas-api-request.es6:75:26)\n    at Request.self.callback (/usr/share/nylas-mail/resources/app.asar/node_modules/request/request.js:186:22)\n    at emitTwo (events.js:106:13)\n    at Request.emit (events.js:191:7)\n    at Request.<anonymous> (/usr/share/nylas-mail/resources/app.asar/node_modules/request/request.js:1081:10)\n    at emitOne (events.js:96:13)\n    at Request.emit (events.js:188:7)\n    at IncomingMessage.<anonymous> (/usr/share/nylas-mail/resources/app.asar/node_modules/request/request.js:1001:12)\n    at IncomingMessage.g (events.js:286:16)\n    at emitNone (events.js:91:20)\n    at IncomingMessage.emit (events.js:185:7)\n    at endReadableNT (_stream_readable.js:974:12)\n    at _combinedTickCallback (internal/process/next_tick.js:74:11)\n    at process._tickDomainCallback (internal/process/next_tick.js:122:9)"}
{"host":"xmper8q3.gcv.dom","timestamp":"2017-07-05T11:10:12.737Z","payload":{"fingerprint":["{{ default }}","api error","http://localhost:2578/auth",500,"Greeting never received"],"rateLimit":{"ratePerHour":30,"key":"APIError:http://localhost:2578/auth:500:Greeting never received"},"pluginIds":[]}}
{"host":"xmper8q3.gcv.dom","timestamp":"2017-07-05T11:10:12.764Z","payload":"{ Error\n    at new APIError (/src/flux/errors.es6:57:19)\n    at Request._callback (/src/flux/nylas-api-request.es6:75:26)\n    at Request.self.callback (/usr/share/nylas-mail/resources/app.asar/node_modules/request/request.js:186:22)\n    at emitTwo (events.js:106:13)\n    at Request.emit (events.js:191:7)\n    at Request.<anonymous> (/usr/share/nylas-mail/resources/app.asar/node_modules/request/request.js:1081:10)\n    at emitOne (events.js:96:13)\n    at Request.emit (events.js:188:7)\n    at IncomingMessage.<anonymous> (/usr/share/nylas-mail/resources/app.asar/node_modules/request/request.js:1001:12)\n    at IncomingMessage.g (events.js:286:16)\n    at emitNone (events.js:91:20)\n    at IncomingMessage.emit (events.js:185:7)\n    at endReadableNT (_stream_readable.js:974:12)\n    at _combinedTickCallback (internal/process/next_tick.js:74:11)\n    at process._tickDomainCallback (internal/process/next_tick.js:122:9)\n  name: 'APIError',\n  error: null,\n  body: { message: 'Greeting never received', type: 'api_error' },\n  requestOptions: \n   { url: 'http://localhost:2578/auth',\n     method: 'POST',\n     json: true,\n     timeout: 180000,\n     path: '/auth',\n     body: \n      { provider: 'office365',\n        email: 'guadagnino.cristiano@AMENDEDt',\n        name: 'Cristiano Guadagnino',\n        settings: [Object] } },\n  statusCode: 500,\n  message: 'Greeting never received',\n  errorType: 'api_error' } { pluginIds: [] }\n"}
{"host":"xmper8q3.gcv.dom","timestamp":"2017-07-05T11:10:13.028Z","payload":"undefined\n"}
{"host":"xmper8q3.gcv.dom","timestamp":"2017-07-05T11:10:13.029Z","payload":"undefined\n"}
{"host":"xmper8q3.gcv.dom","timestamp":"2017-07-05T11:10:13.029Z","payload":"undefined\n"}

I tried to proxify nylas-mail with proxychains-ng but it did not work (nylas-mail or proxychains hangs).

Any suggestion?

TIA Cris

p.s. I did not say it before, but I'm behind an enterprise firewall too

Cris70 avatar Jul 05 '17 11:07 Cris70

Instead of using the proxychains-ng executable available in openSUSE's repos (which is v4.11), I compiled it myself (v4.12).

proxychains-ng itself worked ok after compiling my private copy, but nylas-mail did not.

Apparently nylas-mail is always trying to connect to this address: http://localhost:2578/auth, which does not seems correct to me. It is doing this both when I launch it alone and when I proxify it through proxychains-ng.

Any ideas?

TIA Cris

Cris70 avatar Jul 07 '17 10:07 Cris70

Replying to myself: adding localnet 127.0.0.0/255.0.0.0 to my proxychains.conf file made nylas-mail work!!

Cris70 avatar Jul 11 '17 07:07 Cris70

Not able to get it to work through proxychains. Can anyone help?

karnikram avatar Jul 21 '17 14:07 karnikram

+1

unkemptArc99 avatar Sep 10 '17 04:09 unkemptArc99

@fffx awesome!! it works.

livc avatar Nov 11 '17 09:11 livc

Sorry, in my situation, it only can log into Gmail but can not send emails with proxychains.

livc avatar Nov 11 '17 10:11 livc

@livc are you sure you cannot? In my case, sending takes a long time (about a minute) but in the end it succeeds. Don't know why it takes so long, though.

Cris70 avatar Nov 12 '17 10:11 Cris70

I can't use nylas at all -- I have the http_proxy, https_proxy, and no_proxy env vars set properly in my environment. No matter what I try to configure, it fails with some type of error. For GMail it says "Could not establish tunneling socket"

rothn avatar Dec 05 '17 15:12 rothn