From 21e1c50bcd7157397a9530f23b342ed7e9b44238 Mon Sep 17 00:00:00 2001 From: Dmitry Gozman Date: Tue, 21 Mar 2023 14:06:55 -0700 Subject: [PATCH] fix(run-server): do not engage socks when not requested (#21848) Fixes #21762. --- packages/playwright-core/src/remote/playwrightConnection.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/playwright-core/src/remote/playwrightConnection.ts b/packages/playwright-core/src/remote/playwrightConnection.ts index 3098b7aee4..2a664e99ba 100644 --- a/packages/playwright-core/src/remote/playwrightConnection.ts +++ b/packages/playwright-core/src/remote/playwrightConnection.ts @@ -226,6 +226,8 @@ export class PlaywrightConnection { } private async _createOwnedSocksProxy(playwright: Playwright): Promise { + if (!this._options.socksProxyPattern) + return; const socksProxy = new SocksProxy(); socksProxy.setPattern(this._options.socksProxyPattern); playwright.options.socksProxyPort = await socksProxy.listen(0);