diff --git a/ProxySU_Core/Models/Developers/IParameters.cs b/ProxySU_Core/Models/Developers/IParameters.cs index eec2196..194ef7d 100644 --- a/ProxySU_Core/Models/Developers/IParameters.cs +++ b/ProxySU_Core/Models/Developers/IParameters.cs @@ -8,6 +8,10 @@ namespace ProxySU_Core.Models.Developers { int Port { get; set; } + int VLESS_gRPC_Port { get; set; } + + int VLESS_KCP_Port { get; set; } + int VMESS_KCP_Port { get; set; } int ShadowSocksPort { get; set; } diff --git a/ProxySU_Core/Models/Developers/Project.cs b/ProxySU_Core/Models/Developers/Project.cs index 9d695d6..3075ec8 100644 --- a/ProxySU_Core/Models/Developers/Project.cs +++ b/ProxySU_Core/Models/Developers/Project.cs @@ -316,6 +316,16 @@ namespace ProxySU_Core.Models.Developers portList.Add(Parameters.VMESS_KCP_Port); } + if (Parameters.Types.Contains(XrayType.VLESS_KCP)) + { + portList.Add(Parameters.VLESS_KCP_Port); + } + + if (Parameters.Types.Contains(XrayType.VLESS_gRPC)) + { + portList.Add(Parameters.VLESS_gRPC_Port); + } + OpenPort(portList.ToArray()); } @@ -481,7 +491,8 @@ namespace ProxySU_Core.Models.Developers SetPortFree(80); SetPortFree(443); SetPortFree(Parameters.Port); - SetPortFree(Parameters.VMESS_KCP_Port); + SetPortFree(Parameters.VLESS_gRPC_Port); + SetPortFree(Parameters.VLESS_KCP_Port); SetPortFree(Parameters.ShadowSocksPort); } } diff --git a/ProxySU_Core/Models/ShareLink.cs b/ProxySU_Core/Models/ShareLink.cs index e56adee..ba88476 100644 --- a/ProxySU_Core/Models/ShareLink.cs +++ b/ProxySU_Core/Models/ShareLink.cs @@ -21,6 +21,7 @@ namespace ProxySU_Core.Models case XrayType.VLESS_TCP_XTLS: case XrayType.VLESS_WS: case XrayType.VLESS_KCP: + case XrayType.VLESS_gRPC: case XrayType.Trojan_TCP: return BuildVlessShareLink(xrayType, settings); case XrayType.VMESS_TCP: @@ -99,7 +100,7 @@ namespace ProxySU_Core.Models var _domain = settings.Domain; var _port = settings.Port; var _type = string.Empty; - var _encryption = string.Empty; + var _encryption = "none"; var _security = "tls"; var _path = "/"; var _host = settings.Domain; @@ -112,21 +113,18 @@ namespace ProxySU_Core.Models case XrayType.VLESS_TCP: _protocol = "vless"; _type = "tcp"; - _encryption = "none"; _descriptiveText = "vless-tcp-tls"; break; case XrayType.VLESS_TCP_XTLS: _protocol = "vless"; _type = "tcp"; _security = "xtls"; - _encryption = "none"; _descriptiveText = "vless-tcp-xtls"; break; case XrayType.VLESS_WS: _protocol = "vless"; _type = "ws"; _path = settings.VLESS_WS_Path; - _encryption = "none"; _descriptiveText = "vless-ws-tls"; break; case XrayType.VLESS_KCP: diff --git a/ProxySU_Core/Models/XraySettings.cs b/ProxySU_Core/Models/XraySettings.cs index 2664d7c..73671bf 100644 --- a/ProxySU_Core/Models/XraySettings.cs +++ b/ProxySU_Core/Models/XraySettings.cs @@ -27,6 +27,8 @@ namespace ProxySU_Core.Models VLESS_WS_Path = "/vlessws"; VLESS_H2_Path = "/vlessh2"; + VLESS_KCP_Type = "none"; + VLESS_KCP_Seed = guid; VLESS_gRPC_ServiceName = "xray_gRPC"; VMESS_WS_Path = "/vmessws"; diff --git a/ProxySU_Core/ProxySU_Core.csproj b/ProxySU_Core/ProxySU_Core.csproj index 08c97c6..e136d8a 100644 --- a/ProxySU_Core/ProxySU_Core.csproj +++ b/ProxySU_Core/ProxySU_Core.csproj @@ -153,6 +153,9 @@ Trojan_TCP_Control.xaml + + VLESS_gRPC_Control.xaml + VLESS_KCP_Control.xaml @@ -295,7 +298,9 @@ PreserveNewest - + + PreserveNewest + PreserveNewest @@ -361,6 +366,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile diff --git a/ProxySU_Core/Templates/xray/server/05_inbounds/VLESS_KCP.json b/ProxySU_Core/Templates/xray/server/05_inbounds/VLESS_KCP.json index 8421a45..a619549 100644 --- a/ProxySU_Core/Templates/xray/server/05_inbounds/VLESS_KCP.json +++ b/ProxySU_Core/Templates/xray/server/05_inbounds/VLESS_KCP.json @@ -6,7 +6,8 @@ { "id": "" } - ] + ], + "decryption": "none" }, "streamSettings": { "network": "mkcp", diff --git a/ProxySU_Core/Templates/xray/server/05_inbounds/VLESS_gRPC.json b/ProxySU_Core/Templates/xray/server/05_inbounds/VLESS_gRPC.json index 9c71c0a..d223f32 100644 --- a/ProxySU_Core/Templates/xray/server/05_inbounds/VLESS_gRPC.json +++ b/ProxySU_Core/Templates/xray/server/05_inbounds/VLESS_gRPC.json @@ -16,4 +16,3 @@ } } } -} diff --git a/ProxySU_Core/ViewModels/XraySettingsViewModel.cs b/ProxySU_Core/ViewModels/XraySettingsViewModel.cs index bba9ff3..78826a8 100644 --- a/ProxySU_Core/ViewModels/XraySettingsViewModel.cs +++ b/ProxySU_Core/ViewModels/XraySettingsViewModel.cs @@ -89,13 +89,21 @@ namespace ProxySU_Core.ViewModels public string Domain { get => settings.Domain; - set => settings.Domain = value; + set + { + settings.Domain = value; + Notify("Domain"); + } } public string MaskDomain { get => settings.MaskDomain; - set => settings.MaskDomain = value; + set + { + settings.MaskDomain = value; + Notify("MaskDomain"); + } } public string TrojanPassword @@ -283,7 +291,7 @@ namespace ProxySU_Core.ViewModels set { CheckBoxChanged(value, XrayType.VLESS_TCP_XTLS); - Notify("Checked_VLESS_XTLS"); + Notify("Checked_VLESS_TCP_XTLS"); } } public string VLESS_TCP_XTLS_ShareLink diff --git a/ProxySU_Core/Views/ClientInfo/ClientInfoWindow.xaml b/ProxySU_Core/Views/ClientInfo/ClientInfoWindow.xaml index be2228a..b6f62d9 100644 --- a/ProxySU_Core/Views/ClientInfo/ClientInfoWindow.xaml +++ b/ProxySU_Core/Views/ClientInfo/ClientInfoWindow.xaml @@ -18,24 +18,39 @@ Style="{StaticResource MaterialDesignNavigatilRailTabControl}" Padding="10"> + + - + + + + + + + + @@ -71,7 +86,7 @@ + Header="Trojan-TCP"> diff --git a/ProxySU_Core/Views/ClientInfo/VLESS_KCP_Control.xaml b/ProxySU_Core/Views/ClientInfo/VLESS_KCP_Control.xaml index 9201d45..8ec5404 100644 --- a/ProxySU_Core/Views/ClientInfo/VLESS_KCP_Control.xaml +++ b/ProxySU_Core/Views/ClientInfo/VLESS_KCP_Control.xaml @@ -33,7 +33,7 @@ @@ -43,7 +43,7 @@ @@ -53,7 +53,7 @@ diff --git a/ProxySU_Core/Views/ClientInfo/VLESS_TCP_TLS_Control.xaml b/ProxySU_Core/Views/ClientInfo/VLESS_TCP_TLS_Control.xaml index 4e5f5d5..ae68915 100644 --- a/ProxySU_Core/Views/ClientInfo/VLESS_TCP_TLS_Control.xaml +++ b/ProxySU_Core/Views/ClientInfo/VLESS_TCP_TLS_Control.xaml @@ -48,7 +48,7 @@ diff --git a/ProxySU_Core/Views/ClientInfo/VLESS_gRPC_Control.xaml b/ProxySU_Core/Views/ClientInfo/VLESS_gRPC_Control.xaml new file mode 100644 index 0000000..6af48f0 --- /dev/null +++ b/ProxySU_Core/Views/ClientInfo/VLESS_gRPC_Control.xaml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ProxySU_Core/Views/ClientInfo/VLESS_gRPC_Control.xaml.cs b/ProxySU_Core/Views/ClientInfo/VLESS_gRPC_Control.xaml.cs new file mode 100644 index 0000000..c62f787 --- /dev/null +++ b/ProxySU_Core/Views/ClientInfo/VLESS_gRPC_Control.xaml.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace ProxySU_Core.Views.ClientInfo +{ + /// + /// VLESS_gRPC_Control.xaml 的交互逻辑 + /// + public partial class VLESS_gRPC_Control : UserControl + { + public VLESS_gRPC_Control() + { + InitializeComponent(); + } + } +} diff --git a/ProxySU_Core/Views/RecordEditor/VlessEditorControl.xaml b/ProxySU_Core/Views/RecordEditor/VlessEditorControl.xaml index 8a8bbb0..a4c9a93 100644 --- a/ProxySU_Core/Views/RecordEditor/VlessEditorControl.xaml +++ b/ProxySU_Core/Views/RecordEditor/VlessEditorControl.xaml @@ -26,6 +26,7 @@ + @@ -120,8 +121,8 @@ VerticalAlignment="Bottom" Width="260" /> - - + + - + + + + + + + + + - + + + - + + + + + + + + + + +