Setting proxy on ios

289 views
Skip to first unread message

Mirko Flores V.

unread,
Apr 4, 2024, 10:44:07 AMApr 4
to net...@chromium.org
Hello
I am working with chromium for ios, how could I add a proxy to use it when browsing, modify the method of the net/proxy_resolution/proxy_config_service_ios.cc file
void GetCurrentProxyConfig(const NetworkTrafficAnnotationTag traffic_annotation,
ProxyConfigWithAnnotation* config) {
ProxyConfig proxy_config;
ProxyChain proxy_chain = ProxyStorageToProxyChain("proxy_ip", 3128);
if (proxy_chain.IsValid()) {
LOG(INFO) << " GetCurrentProxyConfig ";
proxy_config.proxy_rules().type =
ProxyConfig::ProxyRules::Type::PROXY_LIST_PER_SCHEME;
proxy_config.proxy_rules().proxies_for_http.SetSingleProxyChain(
proxy_chain);
// Desktop Safari applies the HTTP proxy to http:// URLs only, but
// Mobile Safari applies the HTTP proxy to https:// URLs as well.
proxy_config.proxy_rules().proxies_for_https.SetSingleProxyChain(
proxy_chain);
}

// Proxy bypass list is not supported.
// The kCFNetworkProxiesExceptionsList key is not available on iOS.

// Proxy bypass boolean is not supported.
// The kCFNetworkProxiesExcludeSimpleHostnames key is not available on iOS.

// Source
proxy_config.set_from_system(true);
// proxy_config.set_auto_detect(true);
*config = ProxyConfigWithAnnotation(proxy_config, traffic_annotation);
}
and checking the proxy logs you can see the requests made with the browser, but when visiting the pages that show you what your IP is (https://whatismyipaddress.com/) the proxy IP does not appear, it shows me my IP provided by the internet provider, this does not happen when I configure directly in the system proxy


proxy.json

Matt Menke

unread,
Apr 4, 2024, 10:49:05 AMApr 4
to Mirko Flores V., net...@chromium.org
I'm not sure if there's a public Chromium iOS mailing list, but if there is, you may have more luck asking there.  Since most network requests flow through WebKit's network stack on iOS, networking there is very different from other platforms.

--
You received this message because you are subscribed to the Google Groups "net-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to net-dev+u...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/net-dev/CAGgxU3tS5kpBGWfpeoG2LDOOKMWrCL_0q9xjb%3Dnm9rTm4gDpiw%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages