[Webkit-unassigned] [Bug 180408] WebDriver: implement proxy support
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Nov 8 05:06:28 PST 2019
https://bugs.webkit.org/show_bug.cgi?id=180408
--- Comment #4 from Carlos Alberto Lopez Perez <clopez at igalia.com> ---
Comment on attachment 383117
--> https://bugs.webkit.org/attachment.cgi?id=383117
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=383117&action=review
> Source/WebDriver/WebDriverService.cpp:367
> + if (proxy.type == "pac") {
> + String autoconfigURL;
> + if (!proxyObject.getString("proxyAutoconfigUrl"_s, autoconfigURL))
> + return WTF::nullopt;
> +
> + proxy.autoconfigURL = autoconfigURL;
> + return proxy;
> + }
This type of proxy doesn't seem to be handled.
Maybe returning an error is more according to the spec than silently accepting it and ignoring it?
> Source/WebDriver/WebDriverService.cpp:415
> + if (proxyObject.getValue("socksProxy", value)) {
> + String socksProxy;
> + if (!value->asString(socksProxy))
> + return WTF::nullopt;
> +
> + proxy.socksURL = URL({ }, makeString("socks://", socksProxy));
> + if (!proxy.socksURL->isValid())
> + return WTF::nullopt;
> +
> + RefPtr<JSON::Value> socksVersionValue;
> + if (!proxyObject.getValue("socksVersion", socksVersionValue))
> + return WTF::nullopt;
> +
> + auto socksVersion = unsignedValue(*socksVersionValue);
> + if (!socksVersion || socksVersion.value() > 255)
> + return WTF::nullopt;
> + proxy.socksVersion = socksVersion.value();
> + }
socksVersionValue seems to be ignored when constructing socksURL.
It is true that webkit_network_proxy_settings_add_proxy_for_scheme() works with the three types of sock proxies if not a specific version is specified, but I think its better to be specific here is the user/application has requested a specific type of proxy.
This is my suggestion:
* proxy.socksURL should start with:
- if socksVersionValue is invalid/missing or anything other than 4 or 5 -> socks://
- if socksVersionValue is 4 and socksURL is an IP Adresss -> socks4://
- if socksVersionValue is 4 and socksURL is a domain name -> socks4a://
- if socksVersionValue is 5 -> socks5://
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20191108/5d38a1b1/attachment.htm>
More information about the webkit-unassigned
mailing list