googleapis / gaxios

An HTTP request client that provides an axios like interface over top of node-fetch. Super lightweight. Supports proxies and all sorts of other stuff.
Apache License 2.0
776 stars 58 forks source link

support socks5 proxy #211

Open muzuiget opened 4 years ago

muzuiget commented 4 years ago

Currently gaxios not support https_proxy environment variable like socks5://127.0.0.1:8080. I did a litte hack on the code, just change the file https://github.com/googleapis/gaxios/blob/v2.2.0/src/gaxios.ts#L60

HttpsProxyAgent = require('https-proxy-agent');

to

HttpsProxyAgent = require('proxy-agent');

Then it work fine.

proxy-agent also write by the https-proxy-agent author.

bcoe commented 4 years ago

thanks for the suggestion @muzuiget :+1:

danielbankhead commented 1 month ago

Related:

danielbankhead commented 1 month ago

If we migrate to fetch this may be an upstream blocker:

Related: