Skip to content

Commit 8693fd4

Browse files
committed
cherry-pick(#21848): fix(run-server): do not engage socks when not requested
Fixes #21762.
1 parent 98ff2a8 commit 8693fd4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/playwright-core/src/remote/playwrightConnection.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,8 @@ export class PlaywrightConnection {
226226
}
227227

228228
private async _createOwnedSocksProxy(playwright: Playwright): Promise<SocksProxy | undefined> {
229+
if (!this._options.socksProxyPattern)
230+
return;
229231
const socksProxy = new SocksProxy();
230232
socksProxy.setPattern(this._options.socksProxyPattern);
231233
playwright.options.socksProxyPort = await socksProxy.listen(0);

0 commit comments

Comments
 (0)