Open
Description
The options parameter of the Translator constructor only takes one type of proxy as ProxyConfig
(looks same as AxiosProxyConfig
).
It would be useful to be able to use a proxy URL string as proxy parameter. An axios instance creation in the client should look like this:
import { HttpProxyAgent, HttpProxyAgent } from 'hpagent';
axios.create({
proxy: true,
httpsAgent: new HttpsProxyAgent({ proxy: 'http://user:[email protected]:4567' })
httpAgent: new HttpProxyAgent({ proxy: 'http://user:[email protected]:4567' })
})
Would it be an improvement in flexibility?
I always use one secret for the whole proxy URL, so it would help a lot.
The most flexible approach would be to have an axiosInstanace
parameter for the Translator constructor, but this would cause a lot of code rewrites :(
Metadata
Assignees
Labels
No labels