Enable HTTP and HTTPS proxies on iOS and make it a property of the NSURLSession
authorsbarati@apple.com <sbarati@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 10 Dec 2018 01:56:16 +0000 (01:56 +0000)
committersbarati@apple.com <sbarati@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 10 Dec 2018 01:56:16 +0000 (01:56 +0000)
commit13bc729a757e64e9bd86e6f54f08b49aae9ba0ce
tree660aba9558fbdfb3bbb3111a7736165bb526cea0
parent243dadc2475ebb38364c4e166dabafcc52b24b74
Enable HTTP and HTTPS proxies on iOS and make it a property of the NSURLSession
https://bugs.webkit.org/show_bug.cgi?id=192374
<rdar://problem/46506286>

Reviewed by Alex Christensen.

Source/WebCore/PAL:

* pal/spi/cf/CFNetworkSPI.h:
Remove the now-unused SPI declaration.

Source/WebKit:

This patch makes it so that we can use HTTP/HTTPS proxies on iOS as well.
To enable on iOS, you can do something like:
$ defaults write -g WebKit2HTTPProxy -string "http://localhost:8080"
$ defaults write -g WebKit2HTTPSProxy -string "http://localhost:8080"

This patch also changes the Proxy to be enabled on a per NSURLSession
basis instead of a per process basis.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::initializeNetworkProcess):
* NetworkProcess/NetworkSessionCreationParameters.cpp:
(WebKit::NetworkSessionCreationParameters::privateSessionParameters):
(WebKit::NetworkSessionCreationParameters::encode const):
(WebKit::NetworkSessionCreationParameters::decode):
* NetworkProcess/NetworkSessionCreationParameters.h:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::proxyDictionary):
(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
* NetworkProcess/mac/NetworkProcessMac.mm:
(WebKit::NetworkProcess::platformInitializeNetworkProcess):
(WebKit::overrideSystemProxies): Deleted.
* UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(-[WKWebsiteDataStore _initWithConfiguration:]):
* UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h:
* UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm:
(-[_WKWebsiteDataStoreConfiguration httpProxy]):
(-[_WKWebsiteDataStoreConfiguration setHTTPProxy:]):
(-[_WKWebsiteDataStoreConfiguration httpsProxy]):
(-[_WKWebsiteDataStoreConfiguration setHTTPSProxy:]):
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeNetworkProcess):
* UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
(WebKit::WebsiteDataStore::parameters):
* UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp:
(WebKit::WebsiteDataStoreConfiguration::copy):
* UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h:
(WebKit::WebsiteDataStoreConfiguration::httpProxy const):
(WebKit::WebsiteDataStoreConfiguration::setHTTPProxy):
(WebKit::WebsiteDataStoreConfiguration::httpsProxy const):
(WebKit::WebsiteDataStoreConfiguration::setHTTPSProxy):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239023 268f45cc-cd09-0410-ab3c-d52691b4dbfc
15 files changed:
Source/WebCore/PAL/ChangeLog
Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h
Source/WebKit/ChangeLog
Source/WebKit/NetworkProcess/NetworkProcess.cpp
Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.cpp
Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.h
Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm
Source/WebKit/NetworkProcess/mac/NetworkProcessMac.mm
Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm
Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h
Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm
Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm
Source/WebKit/UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp
Source/WebKit/UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h