diff --git a/docs/pages/todo/todo_done.md b/docs/pages/todo/todo_done.md index 1f7f3644c..4cac4ad88 100644 --- a/docs/pages/todo/todo_done.md +++ b/docs/pages/todo/todo_done.md @@ -6987,3 +6987,5 @@ This will discard your redo history." - The high frequency shouldnt honestly cause such a drop - although it does even prevent first bullets or dashes from playing +- Enable gzip compression +- Test on opera diff --git a/hypersomnia/default_config.lua b/hypersomnia/default_config.lua index 76bf929f8..c0c2ac829 100644 --- a/hypersomnia/default_config.lua +++ b/hypersomnia/default_config.lua @@ -790,8 +790,12 @@ treat_as_music_sounds_longer_than_secs = 5, allow_webrtc_clients = true, + -- If true, connections will use only single UDP port. + -- In that case set webrtc_port_range_begin and webrtc_port_range_end to the same value. + webrtc_udp_mux = false, + webrtc_port_range_begin = 9000, - webrtc_port_range_end = 9100, + webrtc_port_range_end = 9010, -- If > 0, kicks players who do not provide either a Steam or Discord (TODO) session ticket upon connection. -- Will happen on all ranked servers by default. diff --git a/src/application/setups/server/server_setup.cpp b/src/application/setups/server/server_setup.cpp index c9955897d..639e3e8f2 100644 --- a/src/application/setups/server/server_setup.cpp +++ b/src/application/setups/server/server_setup.cpp @@ -401,7 +401,8 @@ class webrtc_server_detail { const std::string& signaling_server_url, const std::vector& iceServers, const port_type ports_begin, - const port_type ports_end + const port_type ports_end, + const bool udp_mux ) { LOG("Web port range: %x-%x", ports_begin, ports_end); self->config.iceServers = iceServers; @@ -411,6 +412,7 @@ class webrtc_server_detail { #else self->config.portRangeBegin = { ports_begin }; self->config.portRangeEnd = { ports_end }; + self->config.enableIceUdpMux = udp_mux; #endif #if USE_WEBSOCKET @@ -715,7 +717,8 @@ server_setup::server_setup( webrtc_signalling_server_url, ::get_ice_servers(), vars.webrtc_port_range_begin, - vars.webrtc_port_range_end + vars.webrtc_port_range_end, + vars.webrtc_udp_mux ); } diff --git a/src/application/setups/server/server_vars.h b/src/application/setups/server/server_vars.h index 96aae9d58..9dbe36524 100644 --- a/src/application/setups/server/server_vars.h +++ b/src/application/setups/server/server_vars.h @@ -111,8 +111,10 @@ struct server_vars { std::optional playtesting_context; bool allow_webrtc_clients = true; + + bool webrtc_udp_mux = false; port_type webrtc_port_range_begin = 9000; - port_type webrtc_port_range_end = 9100; + port_type webrtc_port_range_end = 9010; server_name_type server_name; address_string_type notified_server_list;