port forward: share one multiplexed tunnel across a window's listeners

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EZ49AbZJYfm8NTp5yDPMab
This commit is contained in:
rustdesk
2026-09-04 01:36:24 +08:00
parent 97b7d161cf
commit 064b78787e
5 changed files with 191 additions and 186 deletions

View File

@@ -1167,6 +1167,13 @@ pub fn get_ipv6_punch_enabled() -> bool {
)
}
pub fn get_port_forward_mux_enabled() -> bool {
config::option2bool(
keys::OPTION_ENABLE_PORT_FORWARD_MUX,
&get_local_option(keys::OPTION_ENABLE_PORT_FORWARD_MUX),
)
}
pub fn get_local_option(key: &str) -> String {
let v = LocalConfig::get_option(key);
if key == keys::OPTION_ENABLE_UDP_PUNCH || key == keys::OPTION_ENABLE_IPV6_PUNCH {