setLocalProxy method
@detail api
@author keshixing.rtc
@brief Sets local proxy.
@param configurations Local proxy configurations. Refer to ByteRTCLocalProxyInfo{@link #ByteRTCLocalProxyInfo} for details.
You can set both Http tunnel and Socks5 as your local proxies, or only set one of them based on your needs. If you set both Http tunnel and Socks5 as your local proxies, then media traffic and signaling are routed through Socks5 proxy and Http requests through Http tunnel proxy. If you set either Http tunnel or Socks5 as your local proxy, then media traffic, signaling and Http requests are all routed through the proxy you chose.
If you want to remove the existing local proxy configurations, you can call this API with the parameter set to null.
@note
- You must call this API before joining the room.
- After calling this API, you will receive rtcEngine:onLocalProxyStateChanged:withProxyState:withProxyError:{@link #ByteRTCEngineDelegate#rtcEngine:onLocalProxyStateChanged:withProxyState:withProxyError} callback that informs you of the states of local proxy connection.
Implementation
FutureOr<int> setLocalProxy(
NSArray<ByteRTCLocalProxyInfo> configurations) async {
return await nativeCall('setLocalProxy:', [configurations]);
}