From e13f05ea8af228753e9f7ae68f3c02585ae78d61 Mon Sep 17 00:00:00 2001 From: Egor Aristov Date: Tue, 18 Feb 2025 11:59:05 +0300 Subject: [PATCH] prevent webrtc leak through proxy --- internal/extractors/pwextractor/pwextractor.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/extractors/pwextractor/pwextractor.go b/internal/extractors/pwextractor/pwextractor.go index 59b2b08..eb5ba9f 100644 --- a/internal/extractors/pwextractor/pwextractor.go +++ b/internal/extractors/pwextractor/pwextractor.go @@ -51,6 +51,10 @@ func New(cfg Config) (*PwExtractor, error) { return nil, fmt.Errorf("parse proxy: %w", err) } e.chrome, err = e.pw.Chromium.Launch(playwright.BrowserTypeLaunchOptions{ + Args: []string{ + "--webrtc-ip-handling-policy=disable_non_proxied_udp", + "--force-webrtc-ip-handling-policy", + }, Channel: playwright.String("chromium"), ChromiumSandbox: playwright.Bool(true), HandleSIGINT: playwright.Bool(false),