diff --git a/packages/playwright-core/src/server/fetch.ts b/packages/playwright-core/src/server/fetch.ts index 0c2f4945b9..a4ba815c98 100644 --- a/packages/playwright-core/src/server/fetch.ts +++ b/packages/playwright-core/src/server/fetch.ts @@ -698,7 +698,7 @@ export function createProxyAgent(proxy: types.ProxySettings) { if (proxy.password) proxyURL.password = proxy.password; // TODO: We should use HttpProxyAgent conditional on proxyOpts.protocol instead of always using CONNECT method. - return new HttpsProxyAgent(proxy.server); + return new HttpsProxyAgent(proxyURL); } function toHeadersArray(rawHeaders: string[]): types.HeadersArray {