Changed stun
This commit is contained in:
@@ -69,20 +69,8 @@ VoiceBridge::VoiceBridge(const shared_ptr<WebClient>& owner) : _owner(owner) {
|
||||
config->nice_config = make_shared<rtc::NiceWrapper::Config>();
|
||||
|
||||
config->nice_config->ice_port_range = {config::web::webrtc_port_min, config::web::webrtc_port_max};
|
||||
for(const auto& entry : config::web::ice_servers) {
|
||||
auto dp = entry.find(':');
|
||||
if(dp == string::npos) continue;
|
||||
auto host = entry.substr(0, dp);
|
||||
auto port = entry.substr(dp + 1);
|
||||
if(port.find_last_not_of("0123456789") != string::npos) continue;
|
||||
|
||||
if(host == "stun.l.google.com" && port == "9302")
|
||||
port = "19302"; /* fix for the invalid config value until 1.3.14beta1 :) */
|
||||
|
||||
try {
|
||||
config->nice_config->stun_server = {host,(uint16_t) stoi(port)};
|
||||
} catch(std::exception& ex) {}
|
||||
}
|
||||
if(config::web::stun_enabled)
|
||||
config->nice_config->stun_server = { config::web::stun_host, config::web::stun_port };
|
||||
|
||||
config->nice_config->allow_ice_udp = true;
|
||||
config->nice_config->allow_ice_tcp = false;
|
||||
|
||||
Reference in New Issue
Block a user