Authenticate with ProxyConfiguration in WebKit

Hello,

I am trying to apply ProxyConfiguration on the WebKit webview.

I've tried HTTP and SOCKSv5 without authentication, and it proxies normally. However, after I set up username authenticate on the server side, then set username and password with applyCredential on the client side, it couldn't authenticate the connection.

Logs on the server side show the client side says it doesn't support any authentication.

So I have some questions about the authentication:

  • Does the ProxyConfiguration support authentication now?
  • Does applyCredential apply credentials on HTTP/HTTPS and SOCKSv5 proxy?

I've got the same problem, specifically with a HTTP proxy. Without authentication I can use the proxy fine, but when authentication is enabled I get the error:

The operation couldn’t be completed. Authentication error in the didFailProvisionalNavigation WKNavigationDelegate function.

Update to this: When trying to do this on a physical device rather than a simulator, I get a pop up that says:

Proxy Authentication Required Enter the password for the HTTP proxy [proxy url] in Settings.

After opening the Settings app and entering the username and password, the proxy works as expected on the web view.

Unfortunately this doesn't particularly help my use case. Hopefully this is intended to be able to be done using applyCredential.

I looked into this as part of a recent DTS incident. My conclusion was that this was a bug. We’ve made some progress on fixing it in the latest betas (r. 113346270) but AFAIK things aren’t yet working as expected (FB13350370).

Customer Feedback:

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

We are observing same issue on iOS simulator. Xcode-15 Version 15.3 (15E204a) and Intel Mac. No pop-up comes to enter proxy details. And applyCredential method is not doing anything.

Tried same thing on physical device and it is working.

  • Is this expected?
  • Can this be fixed for simulators as well (it helps in testing + automation)?
Authenticate with ProxyConfiguration in WebKit
 
 
Q