prevent webrtc leak through proxy

This commit is contained in:
Egor Aristov 2025-02-18 11:59:05 +03:00
parent b4b93cd452
commit e13f05ea8a

View File

@ -51,6 +51,10 @@ func New(cfg Config) (*PwExtractor, error) {
return nil, fmt.Errorf("parse proxy: %w", err) return nil, fmt.Errorf("parse proxy: %w", err)
} }
e.chrome, err = e.pw.Chromium.Launch(playwright.BrowserTypeLaunchOptions{ 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"), Channel: playwright.String("chromium"),
ChromiumSandbox: playwright.Bool(true), ChromiumSandbox: playwright.Bool(true),
HandleSIGINT: playwright.Bool(false), HandleSIGINT: playwright.Bool(false),