From 6c5d590169a9f70dd9dc5f76f4d64b09218dad78 Mon Sep 17 00:00:00 2001 From: Nethius Date: Mon, 19 Aug 2024 16:17:09 +0700 Subject: [PATCH] fixed xray port processing (#983) * fixed xray port processing * fixed saving port when changing xray settings and saving transport protocol when changing all the protocols settings --- client/protocols/protocols_defs.cpp | 1 + .../xray/configure_container.sh | 4 +- client/server_scripts/xray/template.json | 2 +- client/ui/models/protocols/awgConfigModel.cpp | 65 +++++++------------ .../ui/models/protocols/cloakConfigModel.cpp | 13 ++-- .../ui/models/protocols/ikev2ConfigModel.cpp | 10 +-- .../models/protocols/openvpnConfigModel.cpp | 59 ++++++----------- .../protocols/shadowsocksConfigModel.cpp | 13 ++-- .../models/protocols/wireguardConfigModel.cpp | 3 + .../ui/models/protocols/xrayConfigModel.cpp | 7 +- 10 files changed, 70 insertions(+), 107 deletions(-) diff --git a/client/protocols/protocols_defs.cpp b/client/protocols/protocols_defs.cpp index 2c9cf1862..ac5bb1ad8 100644 --- a/client/protocols/protocols_defs.cpp +++ b/client/protocols/protocols_defs.cpp @@ -154,6 +154,7 @@ bool ProtocolProps::defaultPortChangeable(Proto p) case Proto::Awg: return true; case Proto::Ikev2: return false; case Proto::L2tp: return false; + case Proto::Xray: return true; case Proto::TorWebSite: return false; case Proto::Dns: return false; diff --git a/client/server_scripts/xray/configure_container.sh b/client/server_scripts/xray/configure_container.sh index bf6f4a425..a84751c7f 100644 --- a/client/server_scripts/xray/configure_container.sh +++ b/client/server_scripts/xray/configure_container.sh @@ -29,7 +29,7 @@ cat > /opt/amnezia/xray/server.json < /opt/amnezia/xray/server.json <