An HTTP Connect proxy configuration on which an nw_proxy_config_set_username_and_password call has been made, does not send the Proxy-Authorization header to the proxy server (not initially, and also not after getting a 407 Proxy Authentication Required response). Specifically, creating the proxy using: nw_endpoint_t endpoint = nw_endpoint_create_host("localhost", "8080"); nw_proxy_config_t proxyConfig = nw_proxy_config_create_http_connect(endpoint, nil); nw_proxy_config_set_username_and_password(proxyConfig, "alice", "superSecret"); and then setting it on WKWebsiteDataStore, I do get CONNECT requests to the proxy server, but the Proxy-Authorization header is never sent, not even after the server responds with 407 (Proxy Authentication Required). I've also filed FB13343450 with a sample app.
rdar://118028838
This ended up being tracked as an issue below WebKit. Please continue communicating about this via Feedback Assistant.