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

fix post install script about execution error in proxy environment #92

Merged
merged 1 commit into from
Jun 23, 2021

Conversation

pillsilly
Copy link
Contributor

@pillsilly pillsilly commented Jun 23, 2021

Some explanation about why it would work in case you're confused by Got's document

In Got's readme it gives two example about setting proxy.

  • using "tunnel"

await got('https://sindresorhus.com', { agent: { https: tunnel.httpsOverHttp({ proxy: { host: 'localhost' } }) } });

  • or hpagent

await got('https://sindresorhus.com', { agent: { https: new HttpsProxyAgent({ keepAlive: true, keepAliveMsecs: 1000, maxSockets: 256, maxFreeSockets: 256, scheduling: 'lifo', proxy: 'https://localhost:8080' }) } });

But meanwhile if you check the "agent" chapter
it says

agent
Type: object

An object representing http, https and http2 keys for **http.Agent, https.Agent** and http2wrapper.Agent **instance**.

So the current proxy agent "'https-proxy-agent'" used by geckodriver
is actually feasible for "Got" as it's already a "http.Agent implementation"

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

Successfully merging this pull request may close these issues.

2 participants