Introduce an experimental feature to toggle WebRTC socket proxying
authoryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 1 Aug 2021 16:02:21 +0000 (16:02 +0000)
committeryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 1 Aug 2021 16:02:21 +0000 (16:02 +0000)
commitce1a2b97c0be250445956dc5d23797b14c9fce65
tree85c817377cc4a3352b93b6b2150da39d1e2848ee
parent535e14332488b8712b5655b96f8c65d84406767c
Introduce an experimental feature to toggle WebRTC socket proxying
https://bugs.webkit.org/show_bug.cgi?id=228681

Reviewed by Eric Carlson.

Source/WebKit:

Decide whether to disable proxying based on experimental feature in WebProcess.
Send the disable relay value from WebProcess to NetworkProcess for TCP sockets.
Manually tested.

* NetworkProcess/webrtc/NetworkRTCProvider.cpp:
(WebKit::NetworkRTCProvider::createClientTCPSocket):
* NetworkProcess/webrtc/NetworkRTCProvider.h:
* NetworkProcess/webrtc/NetworkRTCProvider.messages.in:
* NetworkProcess/webrtc/NetworkRTCTCPSocketCocoa.h:
* NetworkProcess/webrtc/NetworkRTCTCPSocketCocoa.mm:
(WebKit::NetworkRTCTCPSocketCocoa::createClientTCPSocket):
(WebKit::NetworkRTCTCPSocketCocoa::NetworkRTCTCPSocketCocoa):
* WebProcess/Network/webrtc/LibWebRTCProvider.cpp:
(WebKit::RTCSocketFactory::CreateClientTcpSocket):
(WebKit::LibWebRTCProvider::createSocketFactory):
* WebProcess/Network/webrtc/LibWebRTCSocketFactory.cpp:
(WebKit::LibWebRTCSocketFactory::createClientTcpSocket):
* WebProcess/Network/webrtc/LibWebRTCSocketFactory.h:

Source/WTF:

* Scripts/Preferences/WebPreferencesExperimental.yaml:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280523 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
Source/WTF/ChangeLog
Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml
Source/WebKit/ChangeLog
Source/WebKit/NetworkProcess/webrtc/NetworkRTCProvider.cpp
Source/WebKit/NetworkProcess/webrtc/NetworkRTCProvider.h
Source/WebKit/NetworkProcess/webrtc/NetworkRTCProvider.messages.in
Source/WebKit/NetworkProcess/webrtc/NetworkRTCTCPSocketCocoa.h
Source/WebKit/NetworkProcess/webrtc/NetworkRTCTCPSocketCocoa.mm
Source/WebKit/WebProcess/Network/webrtc/LibWebRTCProvider.cpp
Source/WebKit/WebProcess/Network/webrtc/LibWebRTCProvider.h
Source/WebKit/WebProcess/Network/webrtc/LibWebRTCSocketFactory.cpp
Source/WebKit/WebProcess/Network/webrtc/LibWebRTCSocketFactory.h