fix(run-server): do not engage socks when not requested (#21848)

Fixes #21762.
This commit is contained in:
Dmitry Gozman 2023-03-21 14:06:55 -07:00 committed by GitHub
parent 1cf53da82a
commit 21e1c50bcd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -226,6 +226,8 @@ export class PlaywrightConnection {
}
private async _createOwnedSocksProxy(playwright: Playwright): Promise<SocksProxy | undefined> {
if (!this._options.socksProxyPattern)
return;
const socksProxy = new SocksProxy();
socksProxy.setPattern(this._options.socksProxyPattern);
playwright.options.socksProxyPort = await socksProxy.listen(0);