-
-
Notifications
You must be signed in to change notification settings - Fork 73
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
proxy feature not work #326
Comments
@v3470 I'm unable to reproduce any issue. The node.js client uses the I'm using Charles (on macOS 11.1) for a quick proxy, and when I set $ export https_proxy="https://127.0.0.1:8888"
$ tldr -u
✔ Updating...
✔ Creating index...
$ Can you share more details, such as the following?
|
@v3470 the Node.js client currently uses a very popular HTTP client called axios, which handles proxy configuration automatically. In case you're interested, support for the |
@bl-ue I tested again on a different virtual machine, and this time I'm almost sure that it's the First I config the proxy env variable with Then I tested it with Next I tried to use > ax({method:'get',url:'http://google.com',proxy:{protocol:'http',host:'192.168.1.2',port:7890}}).then(function(resp){console.log(resp)}).catch(function(err){console.log(err)});
Promise { <pending> }
> Error: connect ECONNREFUSED 127.0.0.1:80
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16)
at TCPConnectWrap.callbackTrampoline (internal/async_hooks.js:129:14) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 80,
config: {
url: 'http://google.com',
method: 'get',
headers: {
Accept: 'application/json, text/plain, */*',
'User-Agent': 'axios/0.20.0'
},
proxy: { protocol: 'http', host: '192.168.1.2', port: 7890 },
...
response: undefined,
isAxiosError: true,
...
} Also, if I use proxy env variable with To test this without proxy, I also tried with I don't know what's wrong with the |
Expected behaviour
The node client should get the
http_proxy
orhttps_proxy
environment variables and send request via proxy config.Actual behaviour
The node client did not use proxy anyway.
In current version of this client, I can not find related implement like tldr-pages/tldr#72 . Is that mean the proxy detect feature has been remove for long time ago?
Environment
The text was updated successfully, but these errors were encountered: