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

feat: add proxy and bypass list parameters to createIncognitoBrowserContext #7516

Merged
merged 5 commits into from Sep 18, 2021

Conversation

joone
Copy link
Contributor

@joone joone commented Aug 23, 2021

No description provided.

@google-cla google-cla bot added the cla: yes label Aug 23, 2021
@joone joone force-pushed the proxy branch 2 times, most recently from 1418f23 to 24e9e12 Compare August 23, 2021 23:29
@joone joone changed the title feat: add proxy and bypass list parameters to createIncognitoBrowserContext (#678) feat: add proxy and bypass list parameters to createIncognitoBrowserContext Aug 23, 2021
@stjava
Copy link

stjava commented Aug 27, 2021

is cool,i need this,When will it be released to the master version?

Copy link
Contributor

@jschfflr jschfflr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated the change in some places - I hope that was ok for you!
Let me know if I can land it like this :)

@jschfflr
Copy link
Contributor

@joone Can you update the documentation accordingly?

@joone
Copy link
Contributor Author

joone commented Sep 13, 2021

@jschfflr LGTM. By the way, which document should I update?

@jschfflr
Copy link
Contributor

@jschfflr LGTM. By the way, which document should I update?

There's a linter error for the documentation:
https://github.com/puppeteer/puppeteer/pull/7516/checks?check_run_id=3570463706#step:6:63

You can run the linter locally with npm run doc.

Thanks!

async createIncognitoBrowserContext(): Promise<BrowserContext> {
async createIncognitoBrowserContext(
proxyServer?: string,
proxyBypassList?: string
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah sorry, one more thing: Could you change this to be an object instead of normal arguments. createIncognitoBrowserContext will probably accept other arguments in the future too so this might be a good way to prevent a breaking change later.

@jschfflr
Copy link
Contributor

@joone So sorry but one more thing that came up. Could you address that too?

Joone Hur and others added 4 commits September 16, 2021 18:51
…ontext

Issue: puppeteer#678

Example:

(async () => {
  const browser = await puppeteer.launch();
  const context = await browser.createIncognitoBrowserContext('myproxy.com:3128');
  const page = await context.newPage()
  await page.authenticate({username: 'foo', password: 'bar' });
  await page.goto('https://google.com');
  await browser.close();
})();
@google-cla
Copy link

google-cla bot commented Sep 17, 2021

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added cla: no and removed cla: yes labels Sep 17, 2021
@joone
Copy link
Contributor Author

joone commented Sep 17, 2021

@jschfflr can you help me fix documentation errors?

@jschfflr
Copy link
Contributor

@googlebot I consent.

@google-cla google-cla bot added cla: yes and removed cla: no labels Sep 17, 2021
@jschfflr
Copy link
Contributor

@jschfflr can you help me fix documentation errors?

Sure, I updated the patch and moved the type definition into Browser.ts and addressed the eslint and doc lint errors.

@jschfflr
Copy link
Contributor

And I changed proxyBypassList to be an array of strings.

@jschfflr jschfflr merged commit 8e45a1c into puppeteer:main Sep 18, 2021
@joone
Copy link
Contributor Author

joone commented Sep 20, 2021

@jschfflr Thanks for the review!

@jschfflr
Copy link
Contributor

@joone Sure, happy to help!

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

Successfully merging this pull request may close these issues.

None yet

3 participants