diff --git a/include/rtc/configuration.hpp b/include/rtc/configuration.hpp index 4ec95a0bf..9212e13fc 100644 --- a/include/rtc/configuration.hpp +++ b/include/rtc/configuration.hpp @@ -93,6 +93,10 @@ struct RTC_CPP_EXPORT Configuration { optional certificatePemFile; optional keyPemFile; optional keyPemPass; + + // Overriding ICE ufrag/pwd + optional iceUfrag; + optional icePwd; }; #ifdef RTC_ENABLE_WEBSOCKET diff --git a/src/impl/icetransport.cpp b/src/impl/icetransport.cpp index a27a2ed32..a636c42f4 100644 --- a/src/impl/icetransport.cpp +++ b/src/impl/icetransport.cpp @@ -90,6 +90,14 @@ IceTransport::IceTransport(const Configuration &config, candidate_callback candi jconfig.cb_recv = IceTransport::RecvCallback; jconfig.user_ptr = this; + if (config.iceUfrag) { + jconfig.ice_ufrag = config.iceUfrag->c_str(); + } + + if (config.icePwd) { + jconfig.ice_pwd = config.icePwd->c_str(); + } + if (config.enableIceTcp) { PLOG_WARNING << "ICE-TCP is not supported with libjuice"; }