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

HTTP proxy support #34

Closed
bouchezb opened this issue Jan 5, 2018 · 2 comments
Closed

HTTP proxy support #34

bouchezb opened this issue Jan 5, 2018 · 2 comments

Comments

@bouchezb
Copy link

bouchezb commented Jan 5, 2018

Hi i try to use the module behind an http proxy.
I get this error :

2018-01-05 16:42:24 [10744] [error]: 	uncaughtException: connect ETIMEDOUT 216.58.208.211:443
Error: connect ETIMEDOUT 216.58.208.211:443
    at Object._errnoException (util.js:999:13)
    at _exceptionWithHostPort (util.js:1020:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1207:14) {
  "error": {
    "errno": "ETIMEDOUT",
    "code": "ETIMEDOUT",
    "syscall": "connect",
    "address": "216.58.208.211",
    "port": 443
  },
  "stack": "Error: connect ETIMEDOUT 216.58.208.211:443\n    at Object._errnoException (util.js:999:13)\n    at _exceptionWithHostPort (util.js:1020:20)\n    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1207:14)"

On the request module page i can see that i can override defaults.

var r = request.defaults({'proxy':'http://localproxy.com'})

How can i use it with node-pushbullet-api ?

@simonporter007
Copy link

Until it's added, have you tried using environment variables? From the request documentation it states:

The following environment variables are respected by request:

HTTP_PROXY / http_proxy
HTTPS_PROXY / https_proxy
NO_PROXY / no_proxy
When HTTP_PROXY / http_proxy are set, they will be used to proxy non-SSL requests that do not have an explicit proxy configuration option present. Similarly, HTTPS_PROXY / https_proxy will be respected for SSL requests that do not have an explicit proxy configuration option.

@alexwhitman
Copy link
Owner

I would say that the environment variable method is good enough rather than adding code to the package.

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

No branches or pull requests

3 participants