Nylas-mail: Usage behind a proxy

Created on 21 Oct 2015  Â·  54Comments  Â·  Source: nylas/nylas-mail

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!

enhancement-request

Most helpful comment

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

All 54 comments

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

+1

+1

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

great work!

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

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

+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).

+1. sock5 proxy

+1

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 World this work for NylasAPI requests which are made through the node request module?

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

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

I don't remember the specifics of the override.

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.

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!

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

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.

+1

+1

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

+1

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.

+1

+1

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

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 =/

+1

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.

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

+1

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

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

@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 ?

+1

Still no progress on that ?

+1

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

+1

It works with proxychains

$ proxychains nylas # from terminal

+1

+1

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

Any update on this ?

+1

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

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

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

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

+1

@fffx awesome!! it works.

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

@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.

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"

Was this page helpful?
0 / 5 - 0 ratings

Related issues

puttin picture puttin  Â·  3Comments

jcguinea picture jcguinea  Â·  4Comments

danielbayley picture danielbayley  Â·  3Comments

JeroenBoersma picture JeroenBoersma  Â·  4Comments

davidkoplik picture davidkoplik  Â·  4Comments