Configurate WebRTC to work across NATs
Using a public STUN server, allow the WebRTC connection to traverse
NATs.
This appears to work properly even when you do not have an Internet
connection. I also set up the options to make so that if there isn't
*any* non-loopback interface, things still work correctly.
Change-Id: Icb28f890bafa684c88be09afc45edc2039761362
diff --git a/aos/network/web_proxy.h b/aos/network/web_proxy.h
index e6d47c4..e7bf4e0 100644
--- a/aos/network/web_proxy.h
+++ b/aos/network/web_proxy.h
@@ -178,10 +178,16 @@
rtc::scoped_refptr<webrtc::DataChannelInterface> channel) override;
void OnRenegotiationNeeded() override {}
void OnIceConnectionChange(
- webrtc::PeerConnectionInterface::IceConnectionState /*state*/) override {}
+ webrtc::PeerConnectionInterface::IceConnectionState) override {}
void OnIceGatheringChange(
webrtc::PeerConnectionInterface::IceGatheringState) override {}
void OnIceCandidate(const webrtc::IceCandidateInterface *candidate) override;
+ void OnIceCandidateError(const std::string &host_candidate,
+ const std::string &url, int error_code,
+ const std::string &error_text) override {
+ LOG(ERROR) << "ICE Candidate Error on " << host_candidate << " for " << url
+ << " with error " << error_code << ": " << error_text;
+ }
void OnIceConnectionReceivingChange(bool) override {}
// CreateSessionDescriptionObserver implementation