mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
browser(firefox): support proxy bypass (#2467)
This commit is contained in:
parent
58e2ffc991
commit
a26311a18a
@ -1 +1 @@
|
||||
1102
|
||||
1103
|
||||
|
@ -166,6 +166,10 @@ class NetworkObserver {
|
||||
proxyFilter.onProxyFilterResult(defaultProxyInfo);
|
||||
return;
|
||||
}
|
||||
if (proxy.bypass.some(domain => channel.URI.host.endsWith(domain))) {
|
||||
proxyFilter.onProxyFilterResult(defaultProxyInfo);
|
||||
return;
|
||||
}
|
||||
proxyFilter.onProxyFilterResult(protocolProxyService.newProxyInfo(
|
||||
proxy.type,
|
||||
proxy.host,
|
||||
|
@ -151,8 +151,8 @@ class BrowserHandler {
|
||||
this._targetRegistry.browserContextForId(browserContextId).httpCredentials = nullToUndefined(credentials);
|
||||
}
|
||||
|
||||
async setProxy({browserContextId, type, host, port}) {
|
||||
this._targetRegistry.browserContextForId(browserContextId).proxy = { type, host, port };
|
||||
async setProxy({browserContextId, type, host, port, bypass}) {
|
||||
this._targetRegistry.browserContextForId(browserContextId).proxy = { type, host, port, bypass };
|
||||
}
|
||||
|
||||
setRequestInterception({browserContextId, enabled}) {
|
||||
|
@ -263,6 +263,7 @@ const Browser = {
|
||||
params: {
|
||||
browserContextId: t.Optional(t.String),
|
||||
type: t.Enum(['http', 'https', 'socks', 'socks4']),
|
||||
bypass: t.Array(t.String),
|
||||
host: t.String,
|
||||
port: t.Number,
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user