diff --git a/ProxySU_Core/Views/ClientInfo/ClientInfoWindow.xaml b/ProxySU_Core/Views/ClientInfo/ClientInfoWindow.xaml index d034a26..d95b8cb 100644 --- a/ProxySU_Core/Views/ClientInfo/ClientInfoWindow.xaml +++ b/ProxySU_Core/Views/ClientInfo/ClientInfoWindow.xaml @@ -1,10 +1,10 @@ - /// ClientInfoWindow.xaml 的交互逻辑 @@ -36,93 +36,5 @@ namespace ProxySU_Core.Views.ClientInfo Settings = new XraySettingsViewModel(record.Settings); DataContext = this; } - - - private void BuildQrCode(object sender, SelectionChangedEventArgs e) - { - var tabControl = e.Source as TabControl; - var item = (tabControl.SelectedItem as TabItem); - if (item == null) return; - var type = (XrayType)item.Tag; - BuildQrCode(type); - } - - private void SaveImage(object sender, RoutedEventArgs e) - { - SaveFileDialog sfd = new SaveFileDialog(); - sfd.FileName += QrImage.Tag; - sfd.Filter = "Image Files (*.bmp, *.png, *.jpg)|*.bmp;*.png;*.jpg | All Files | *.*"; - sfd.RestoreDirectory = true;//保存对话框是否记忆上次打开的目录 - if (sfd.ShowDialog() == true) - { - var encoder = new PngBitmapEncoder(); - encoder.Frames.Add(BitmapFrame.Create((BitmapSource)QrImage.Source)); - using (FileStream stream = new FileStream(sfd.FileName, FileMode.Create)) - encoder.Save(stream); - } - } - - private void BuildQrCode(XrayType type) - { - string shareLink = string.Empty; - switch (type) - { - case XrayType.VLESS_TCP_XTLS: - shareLink = Settings.VLESS_TCP_XTLS_ShareLink; - break; - case XrayType.VLESS_TCP: - shareLink = Settings.VLESS_TCP_ShareLink; - break; - case XrayType.VLESS_WS: - shareLink = Settings.VLESS_WS_ShareLink; - break; - case XrayType.VLESS_H2: - break; - case XrayType.VLESS_KCP: - shareLink = Settings.VLESS_KCP_ShareLink; - break; - case XrayType.VLESS_gRPC: - shareLink = Settings.VLESS_gRPC_ShareLink; - break; - case XrayType.VMESS_TCP: - shareLink = Settings.VMESS_TCP_ShareLink; - break; - case XrayType.VMESS_WS: - shareLink = Settings.VMESS_WS_ShareLink; - break; - case XrayType.VMESS_H2: - break; - case XrayType.VMESS_KCP: - shareLink = Settings.VMESS_KCP_ShareLink; - break; - case XrayType.Trojan_TCP: - shareLink = Settings.Trojan_TCP_ShareLink; - break; - case XrayType.Trojan_WS: - break; - case XrayType.ShadowsocksAEAD: - shareLink = Settings.ShadowSocksShareLink; - break; - default: - break; - } - - - QRCodeGenerator qrGenerator = new QRCodeGenerator(); - QRCodeData qrCodeData = qrGenerator.CreateQrCode(shareLink, QRCodeGenerator.ECCLevel.Q); - QRCode qrCode = new QRCode(qrCodeData); - - Bitmap qrCodeImage = qrCode.GetGraphic(20); - MemoryStream ms = new MemoryStream(); - qrCodeImage.Save(ms, System.Drawing.Imaging.ImageFormat.Bmp); - byte[] bytes = ms.GetBuffer(); - ms.Close(); - BitmapImage image = new BitmapImage(); - image.BeginInit(); - image.StreamSource = new MemoryStream(bytes); - image.EndInit(); - QrImage.Source = image; - QrImage.Tag = type.ToString(); - } } } diff --git a/ProxySU_Core/Views/ClientInfo/ShadowSocksControl.xaml b/ProxySU_Core/Views/ClientInfo/ShadowSocksControl.xaml index 16e1878..1580a51 100644 --- a/ProxySU_Core/Views/ClientInfo/ShadowSocksControl.xaml +++ b/ProxySU_Core/Views/ClientInfo/ShadowSocksControl.xaml @@ -1,9 +1,9 @@ - diff --git a/ProxySU_Core/Views/ClientInfo/ShadowSocksControl.xaml.cs b/ProxySU_Core/Views/ClientInfo/ShadowSocksControl.xaml.cs index e4455d1..f4d3175 100644 --- a/ProxySU_Core/Views/ClientInfo/ShadowSocksControl.xaml.cs +++ b/ProxySU_Core/Views/ClientInfo/ShadowSocksControl.xaml.cs @@ -13,7 +13,7 @@ using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; -namespace ProxySU_Core.Views.ClientInfo +namespace ProxySuper.WPF.Controls { /// /// ShadowSocksClientInfoControl.xaml 的交互逻辑 diff --git a/ProxySU_Core/Views/ClientInfo/Trojan_TCP_Control.xaml b/ProxySU_Core/Views/ClientInfo/Trojan_TCP_Control.xaml index d969f46..822d0f4 100644 --- a/ProxySU_Core/Views/ClientInfo/Trojan_TCP_Control.xaml +++ b/ProxySU_Core/Views/ClientInfo/Trojan_TCP_Control.xaml @@ -1,9 +1,9 @@ - diff --git a/ProxySU_Core/Views/ClientInfo/Trojan_TCP_Control.xaml.cs b/ProxySU_Core/Views/ClientInfo/Trojan_TCP_Control.xaml.cs index 9bfd136..3701ab9 100644 --- a/ProxySU_Core/Views/ClientInfo/Trojan_TCP_Control.xaml.cs +++ b/ProxySU_Core/Views/ClientInfo/Trojan_TCP_Control.xaml.cs @@ -13,7 +13,7 @@ using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; -namespace ProxySU_Core.Views.ClientInfo +namespace ProxySuper.WPF.Controls { /// /// Trojan_TCP_Control.xaml 的交互逻辑 diff --git a/ProxySU_Core/Views/ClientInfo/VLESS_KCP_Control.xaml b/ProxySU_Core/Views/ClientInfo/VLESS_KCP_Control.xaml index 69c9035..d0c331c 100644 --- a/ProxySU_Core/Views/ClientInfo/VLESS_KCP_Control.xaml +++ b/ProxySU_Core/Views/ClientInfo/VLESS_KCP_Control.xaml @@ -1,9 +1,9 @@ - diff --git a/ProxySU_Core/Views/ClientInfo/VLESS_KCP_Control.xaml.cs b/ProxySU_Core/Views/ClientInfo/VLESS_KCP_Control.xaml.cs index efa174b..414c4b1 100644 --- a/ProxySU_Core/Views/ClientInfo/VLESS_KCP_Control.xaml.cs +++ b/ProxySU_Core/Views/ClientInfo/VLESS_KCP_Control.xaml.cs @@ -13,7 +13,7 @@ using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; -namespace ProxySU_Core.Views.ClientInfo +namespace ProxySuper.WPF.Controls { /// /// VLESS_KCP_Control.xaml 的交互逻辑 diff --git a/ProxySU_Core/Views/ClientInfo/VLESS_TCP_TLS_Control.xaml b/ProxySU_Core/Views/ClientInfo/VLESS_TCP_TLS_Control.xaml index 1bf4e57..8b7eeec 100644 --- a/ProxySU_Core/Views/ClientInfo/VLESS_TCP_TLS_Control.xaml +++ b/ProxySU_Core/Views/ClientInfo/VLESS_TCP_TLS_Control.xaml @@ -1,9 +1,9 @@ - diff --git a/ProxySU_Core/Views/ClientInfo/VLESS_TCP_TLS_Control.xaml.cs b/ProxySU_Core/Views/ClientInfo/VLESS_TCP_TLS_Control.xaml.cs index f0c4070..c147188 100644 --- a/ProxySU_Core/Views/ClientInfo/VLESS_TCP_TLS_Control.xaml.cs +++ b/ProxySU_Core/Views/ClientInfo/VLESS_TCP_TLS_Control.xaml.cs @@ -13,7 +13,7 @@ using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; -namespace ProxySU_Core.Views.ClientInfo +namespace ProxySuper.WPF.Controls { /// /// VLESS_TCP_TLS_Control.xaml 的交互逻辑 diff --git a/ProxySU_Core/Views/ClientInfo/VLESS_WS_TLS_Control.xaml b/ProxySU_Core/Views/ClientInfo/VLESS_WS_TLS_Control.xaml index e8c37be..257ef57 100644 --- a/ProxySU_Core/Views/ClientInfo/VLESS_WS_TLS_Control.xaml +++ b/ProxySU_Core/Views/ClientInfo/VLESS_WS_TLS_Control.xaml @@ -1,9 +1,9 @@ - diff --git a/ProxySU_Core/Views/ClientInfo/VLESS_WS_TLS_Control.xaml.cs b/ProxySU_Core/Views/ClientInfo/VLESS_WS_TLS_Control.xaml.cs index 71f3cd2..7e3f8a9 100644 --- a/ProxySU_Core/Views/ClientInfo/VLESS_WS_TLS_Control.xaml.cs +++ b/ProxySU_Core/Views/ClientInfo/VLESS_WS_TLS_Control.xaml.cs @@ -13,7 +13,7 @@ using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; -namespace ProxySU_Core.Views.ClientInfo +namespace ProxySuper.WPF.Controls { /// /// VLESS_WS_TLS_Control.xaml 的交互逻辑 diff --git a/ProxySU_Core/Views/ClientInfo/VLESS_XTLS_Control.xaml b/ProxySU_Core/Views/ClientInfo/VLESS_XTLS_Control.xaml index 61e2034..f601d8f 100644 --- a/ProxySU_Core/Views/ClientInfo/VLESS_XTLS_Control.xaml +++ b/ProxySU_Core/Views/ClientInfo/VLESS_XTLS_Control.xaml @@ -1,9 +1,9 @@ - diff --git a/ProxySU_Core/Views/ClientInfo/VLESS_XTLS_Control.xaml.cs b/ProxySU_Core/Views/ClientInfo/VLESS_XTLS_Control.xaml.cs index 5358a86..185f6a1 100644 --- a/ProxySU_Core/Views/ClientInfo/VLESS_XTLS_Control.xaml.cs +++ b/ProxySU_Core/Views/ClientInfo/VLESS_XTLS_Control.xaml.cs @@ -13,7 +13,7 @@ using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; -namespace ProxySU_Core.Views.ClientInfo +namespace ProxySuper.WPF.Controls { /// /// VLESS_XTLS_Control.xaml 的交互逻辑 diff --git a/ProxySU_Core/Views/ClientInfo/VLESS_gRPC_Control.xaml b/ProxySU_Core/Views/ClientInfo/VLESS_gRPC_Control.xaml index 9cc0fa1..9e731e5 100644 --- a/ProxySU_Core/Views/ClientInfo/VLESS_gRPC_Control.xaml +++ b/ProxySU_Core/Views/ClientInfo/VLESS_gRPC_Control.xaml @@ -1,9 +1,9 @@ - diff --git a/ProxySU_Core/Views/ClientInfo/VLESS_gRPC_Control.xaml.cs b/ProxySU_Core/Views/ClientInfo/VLESS_gRPC_Control.xaml.cs index c62f787..2b346ae 100644 --- a/ProxySU_Core/Views/ClientInfo/VLESS_gRPC_Control.xaml.cs +++ b/ProxySU_Core/Views/ClientInfo/VLESS_gRPC_Control.xaml.cs @@ -13,7 +13,7 @@ using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; -namespace ProxySU_Core.Views.ClientInfo +namespace ProxySuper.WPF.Controls { /// /// VLESS_gRPC_Control.xaml 的交互逻辑 diff --git a/ProxySU_Core/Views/ClientInfo/VMESS_KCP_Control.xaml b/ProxySU_Core/Views/ClientInfo/VMESS_KCP_Control.xaml index aa733a7..461765e 100644 --- a/ProxySU_Core/Views/ClientInfo/VMESS_KCP_Control.xaml +++ b/ProxySU_Core/Views/ClientInfo/VMESS_KCP_Control.xaml @@ -1,9 +1,9 @@ - diff --git a/ProxySU_Core/Views/ClientInfo/VMESS_KCP_Control.xaml.cs b/ProxySU_Core/Views/ClientInfo/VMESS_KCP_Control.xaml.cs index 4045983..0dccb5a 100644 --- a/ProxySU_Core/Views/ClientInfo/VMESS_KCP_Control.xaml.cs +++ b/ProxySU_Core/Views/ClientInfo/VMESS_KCP_Control.xaml.cs @@ -13,7 +13,7 @@ using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; -namespace ProxySU_Core.Views.ClientInfo +namespace ProxySuper.WPF.Controls { /// /// VMESS_KCP_Control.xaml 的交互逻辑 diff --git a/ProxySU_Core/Views/ClientInfo/VMESS_TCP_TLS_Control.xaml b/ProxySU_Core/Views/ClientInfo/VMESS_TCP_TLS_Control.xaml index dfcf8bc..a651729 100644 --- a/ProxySU_Core/Views/ClientInfo/VMESS_TCP_TLS_Control.xaml +++ b/ProxySU_Core/Views/ClientInfo/VMESS_TCP_TLS_Control.xaml @@ -1,9 +1,9 @@ - diff --git a/ProxySU_Core/Views/ClientInfo/VMESS_TCP_TLS_Control.xaml.cs b/ProxySU_Core/Views/ClientInfo/VMESS_TCP_TLS_Control.xaml.cs index 735e7cf..12714fa 100644 --- a/ProxySU_Core/Views/ClientInfo/VMESS_TCP_TLS_Control.xaml.cs +++ b/ProxySU_Core/Views/ClientInfo/VMESS_TCP_TLS_Control.xaml.cs @@ -13,7 +13,7 @@ using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; -namespace ProxySU_Core.Views.ClientInfo +namespace ProxySuper.WPF.Controls { /// /// VMESS_TCP_TLS_Control.xaml 的交互逻辑 diff --git a/ProxySU_Core/Views/ClientInfo/VMESS_WS_TLS_Control.xaml b/ProxySU_Core/Views/ClientInfo/VMESS_WS_TLS_Control.xaml index c764eba..37b9882 100644 --- a/ProxySU_Core/Views/ClientInfo/VMESS_WS_TLS_Control.xaml +++ b/ProxySU_Core/Views/ClientInfo/VMESS_WS_TLS_Control.xaml @@ -1,9 +1,9 @@ - diff --git a/ProxySU_Core/Views/ClientInfo/VMESS_WS_TLS_Control.xaml.cs b/ProxySU_Core/Views/ClientInfo/VMESS_WS_TLS_Control.xaml.cs index 435ca80..f8502d9 100644 --- a/ProxySU_Core/Views/ClientInfo/VMESS_WS_TLS_Control.xaml.cs +++ b/ProxySU_Core/Views/ClientInfo/VMESS_WS_TLS_Control.xaml.cs @@ -13,7 +13,7 @@ using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; -namespace ProxySU_Core.Views.ClientInfo +namespace ProxySuper.WPF.Controls { /// /// VMESS_WS_TLS_Control.xaml 的交互逻辑 diff --git a/ProxySU_Core/Views/MainWindow.xaml.cs b/ProxySU_Core/Views/MainWindow.xaml.cs index 4191d90..1137066 100644 --- a/ProxySU_Core/Views/MainWindow.xaml.cs +++ b/ProxySU_Core/Views/MainWindow.xaml.cs @@ -5,7 +5,7 @@ using ProxySU_Core.Common; using ProxySU_Core.Models; using ProxySU_Core.ViewModels; using ProxySU_Core.Views; -using ProxySU_Core.Views.ClientInfo; +using ProxySuper.WPF.Controls; using ProxySU_Core.Views.RecordEditor; using System; using System.Collections.Generic; diff --git a/ProxySuper.Core/Models/Projects/XraySettings_SS.cs b/ProxySuper.Core/Models/Projects/XraySettings_SS.cs index aa5f751..b7d454a 100644 --- a/ProxySuper.Core/Models/Projects/XraySettings_SS.cs +++ b/ProxySuper.Core/Models/Projects/XraySettings_SS.cs @@ -1,4 +1,5 @@ -using System; +using ProxySuper.Core.Services; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -22,5 +23,13 @@ namespace ProxySuper.Core.Models.Projects /// ss port /// public int ShadowSocksPort { get; set; } + + public string ShadowSocksShareLink + { + get + { + return ShareLink.Build(XrayType.ShadowsocksAEAD, this); + } + } } } diff --git a/ProxySuper.Core/Models/Projects/XraySettings_Trojan.cs b/ProxySuper.Core/Models/Projects/XraySettings_Trojan.cs index c733264..301032e 100644 --- a/ProxySuper.Core/Models/Projects/XraySettings_Trojan.cs +++ b/ProxySuper.Core/Models/Projects/XraySettings_Trojan.cs @@ -1,4 +1,5 @@ -using System; +using ProxySuper.Core.Services; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -9,5 +10,13 @@ namespace ProxySuper.Core.Models.Projects public partial class XraySettings { public string TrojanPassword { get; set; } + + public string Trojan_TCP_ShareLink + { + get + { + return ShareLink.Build(XrayType.Trojan_TCP, this); + } + } } } diff --git a/ProxySuper.Core/Models/Projects/XraySettings_VLESS.cs b/ProxySuper.Core/Models/Projects/XraySettings_VLESS.cs index b0d9008..63d8574 100644 --- a/ProxySuper.Core/Models/Projects/XraySettings_VLESS.cs +++ b/ProxySuper.Core/Models/Projects/XraySettings_VLESS.cs @@ -1,4 +1,5 @@ -using System; +using ProxySuper.Core.Services; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -8,11 +9,44 @@ namespace ProxySuper.Core.Models.Projects { public partial class XraySettings { + /// + /// vless xtls shareLink + /// + public string VLESS_TCP_XTLS_ShareLink + { + get + { + return ShareLink.Build(XrayType.VLESS_TCP_XTLS, this); + } + } + + /// + /// vless tcp shareLink + /// + public string VLESS_TCP_ShareLink + { + get + { + return ShareLink.Build(XrayType.VLESS_TCP, this); + } + } + /// /// websocket path /// public string VLESS_WS_Path { get; set; } + /// + /// VLESS WS ShareLink + /// + public string VLESS_WS_ShareLink + { + get + { + return ShareLink.Build(XrayType.VLESS_WS, this); + } + } + /// /// kcp seed /// @@ -28,6 +62,17 @@ namespace ProxySuper.Core.Models.Projects /// public int VLESS_KCP_Port { get; set; } + /// + /// VLESS KCP ShareLink + /// + public string VLESS_KCP_ShareLink + { + get + { + return ShareLink.Build(XrayType.VLESS_KCP, this); + } + } + /// /// grpc port /// @@ -37,5 +82,16 @@ namespace ProxySuper.Core.Models.Projects /// grpc service name /// public string VLESS_gRPC_ServiceName { get; set; } + + /// + /// vless grpc share link + /// + public string VLESS_gRPC_ShareLink + { + get + { + return ShareLink.Build(XrayType.VLESS_gRPC, this); + } + } } } diff --git a/ProxySuper.Core/Models/Projects/XraySettings_VMESS.cs b/ProxySuper.Core/Models/Projects/XraySettings_VMESS.cs index d4e10c6..b9c0664 100644 --- a/ProxySuper.Core/Models/Projects/XraySettings_VMESS.cs +++ b/ProxySuper.Core/Models/Projects/XraySettings_VMESS.cs @@ -1,4 +1,5 @@ -using System; +using ProxySuper.Core.Services; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -13,11 +14,33 @@ namespace ProxySuper.Core.Models.Projects /// public string VMESS_WS_Path { get; set; } + /// + /// vmess ws sharelink + /// + public string VMESS_WS_ShareLink + { + get + { + return ShareLink.Build(XrayType.VMESS_WS, this); + } + } + /// /// mvess tcp path /// public string VMESS_TCP_Path { get; set; } + /// + /// vmess tcp ShareLink + /// + public string VMESS_TCP_ShareLink + { + get + { + return ShareLink.Build(XrayType.VMESS_TCP, this); + } + } + /// /// vmess kcp seed /// @@ -32,5 +55,16 @@ namespace ProxySuper.Core.Models.Projects /// vmess kcp port /// public int VMESS_KCP_Port { get; set; } + + /// + /// vmess kcp ShareLink + /// + public string VMESS_KCP_ShareLink + { + get + { + return ShareLink.Build(XrayType.VMESS_KCP, this); + } + } } } diff --git a/ProxySuper.Core/Models/Record.cs b/ProxySuper.Core/Models/Record.cs index 518c3ea..ee14a49 100644 --- a/ProxySuper.Core/Models/Record.cs +++ b/ProxySuper.Core/Models/Record.cs @@ -63,6 +63,9 @@ namespace ProxySuper.Core.Models [JsonIgnore] public IMvxCommand NavToEditorCommand => new MvxAsyncCommand(NavigateToEditor); + [JsonIgnore] + public IMvxCommand NavToConfigCommand => new MvxAsyncCommand(NavigateToConfig); + public async Task NavigateToEditor() { if (Type == ProjectType.Xray) @@ -97,5 +100,17 @@ namespace ProxySuper.Core.Models await NavigationService.Navigate(this); } } + + public async Task NavigateToConfig() + { + if (Type == ProjectType.Xray) + { + await NavigationService.Navigate(this.XraySettings); + } + if (Type == ProjectType.TrojanGo) + { + //await NavigationService.Navigate(this); + } + } } } diff --git a/ProxySuper.Core/ProxySuper.Core.csproj b/ProxySuper.Core/ProxySuper.Core.csproj index bf0272d..5a8fdc0 100644 --- a/ProxySuper.Core/ProxySuper.Core.csproj +++ b/ProxySuper.Core/ProxySuper.Core.csproj @@ -40,6 +40,9 @@ + + ..\packages\QRCoder.1.4.1\lib\net40\QRCoder.dll + ..\packages\SSH.NET.2020.0.1\lib\net40\Renci.SshNet.dll @@ -89,6 +92,7 @@ + diff --git a/ProxySuper.Core/ViewModels/XrayConfigViewModel.cs b/ProxySuper.Core/ViewModels/XrayConfigViewModel.cs new file mode 100644 index 0000000..97b9f2a --- /dev/null +++ b/ProxySuper.Core/ViewModels/XrayConfigViewModel.cs @@ -0,0 +1,29 @@ +using Microsoft.Win32; +using MvvmCross.ViewModels; +using ProxySuper.Core.Models.Projects; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Media.Imaging; +using QRCoder; + +namespace ProxySuper.Core.ViewModels +{ + public class XrayConfigViewModel : MvxViewModel + { + + public XraySettings Settings { get; set; } + + public override void Prepare(XraySettings parameter) + { + Settings = parameter; + } + + + } +} diff --git a/ProxySuper.Core/packages.config b/ProxySuper.Core/packages.config index 294bf72..7880216 100644 --- a/ProxySuper.Core/packages.config +++ b/ProxySuper.Core/packages.config @@ -1,6 +1,7 @@  + \ No newline at end of file diff --git a/ProxySuper.WPF/Controls/ShadowSocksControl.xaml b/ProxySuper.WPF/Controls/ShadowSocksControl.xaml new file mode 100644 index 0000000..d0e6e75 --- /dev/null +++ b/ProxySuper.WPF/Controls/ShadowSocksControl.xaml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + diff --git a/ProxySuper.WPF/Controls/ShadowSocksControl.xaml.cs b/ProxySuper.WPF/Controls/ShadowSocksControl.xaml.cs new file mode 100644 index 0000000..f4d3175 --- /dev/null +++ b/ProxySuper.WPF/Controls/ShadowSocksControl.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 ProxySuper.WPF.Controls +{ + /// + /// ShadowSocksClientInfoControl.xaml 的交互逻辑 + /// + public partial class ShadowSocksControl : UserControl + { + public ShadowSocksControl() + { + InitializeComponent(); + } + } +} diff --git a/ProxySuper.WPF/Controls/Trojan_TCP_Control.xaml b/ProxySuper.WPF/Controls/Trojan_TCP_Control.xaml new file mode 100644 index 0000000..46f848e --- /dev/null +++ b/ProxySuper.WPF/Controls/Trojan_TCP_Control.xaml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + diff --git a/ProxySuper.WPF/Controls/Trojan_TCP_Control.xaml.cs b/ProxySuper.WPF/Controls/Trojan_TCP_Control.xaml.cs new file mode 100644 index 0000000..3701ab9 --- /dev/null +++ b/ProxySuper.WPF/Controls/Trojan_TCP_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 ProxySuper.WPF.Controls +{ + /// + /// Trojan_TCP_Control.xaml 的交互逻辑 + /// + public partial class Trojan_TCP_Control : UserControl + { + public Trojan_TCP_Control() + { + InitializeComponent(); + } + } +} diff --git a/ProxySuper.WPF/Controls/VLESS_KCP_Control.xaml b/ProxySuper.WPF/Controls/VLESS_KCP_Control.xaml new file mode 100644 index 0000000..c9630f5 --- /dev/null +++ b/ProxySuper.WPF/Controls/VLESS_KCP_Control.xaml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ProxySuper.WPF/Controls/VLESS_KCP_Control.xaml.cs b/ProxySuper.WPF/Controls/VLESS_KCP_Control.xaml.cs new file mode 100644 index 0000000..414c4b1 --- /dev/null +++ b/ProxySuper.WPF/Controls/VLESS_KCP_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 ProxySuper.WPF.Controls +{ + /// + /// VLESS_KCP_Control.xaml 的交互逻辑 + /// + public partial class VLESS_KCP_Control : UserControl + { + public VLESS_KCP_Control() + { + InitializeComponent(); + } + } +} diff --git a/ProxySuper.WPF/Controls/VLESS_TCP_TLS_Control.xaml b/ProxySuper.WPF/Controls/VLESS_TCP_TLS_Control.xaml new file mode 100644 index 0000000..f892b30 --- /dev/null +++ b/ProxySuper.WPF/Controls/VLESS_TCP_TLS_Control.xaml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ProxySuper.WPF/Controls/VLESS_TCP_TLS_Control.xaml.cs b/ProxySuper.WPF/Controls/VLESS_TCP_TLS_Control.xaml.cs new file mode 100644 index 0000000..c147188 --- /dev/null +++ b/ProxySuper.WPF/Controls/VLESS_TCP_TLS_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 ProxySuper.WPF.Controls +{ + /// + /// VLESS_TCP_TLS_Control.xaml 的交互逻辑 + /// + public partial class VLESS_TCP_TLS_Control : UserControl + { + public VLESS_TCP_TLS_Control() + { + InitializeComponent(); + } + } +} diff --git a/ProxySuper.WPF/Controls/VLESS_WS_TLS_Control.xaml b/ProxySuper.WPF/Controls/VLESS_WS_TLS_Control.xaml new file mode 100644 index 0000000..0b28fba --- /dev/null +++ b/ProxySuper.WPF/Controls/VLESS_WS_TLS_Control.xaml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ProxySuper.WPF/Controls/VLESS_WS_TLS_Control.xaml.cs b/ProxySuper.WPF/Controls/VLESS_WS_TLS_Control.xaml.cs new file mode 100644 index 0000000..7e3f8a9 --- /dev/null +++ b/ProxySuper.WPF/Controls/VLESS_WS_TLS_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 ProxySuper.WPF.Controls +{ + /// + /// VLESS_WS_TLS_Control.xaml 的交互逻辑 + /// + public partial class VLESS_WS_TLS_Control : UserControl + { + public VLESS_WS_TLS_Control() + { + InitializeComponent(); + } + } +} diff --git a/ProxySuper.WPF/Controls/VLESS_XTLS_Control.xaml b/ProxySuper.WPF/Controls/VLESS_XTLS_Control.xaml new file mode 100644 index 0000000..b596ca2 --- /dev/null +++ b/ProxySuper.WPF/Controls/VLESS_XTLS_Control.xaml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ProxySuper.WPF/Controls/VLESS_XTLS_Control.xaml.cs b/ProxySuper.WPF/Controls/VLESS_XTLS_Control.xaml.cs new file mode 100644 index 0000000..185f6a1 --- /dev/null +++ b/ProxySuper.WPF/Controls/VLESS_XTLS_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 ProxySuper.WPF.Controls +{ + /// + /// VLESS_XTLS_Control.xaml 的交互逻辑 + /// + public partial class VLESS_XTLS_Control : UserControl + { + public VLESS_XTLS_Control() + { + InitializeComponent(); + } + } +} diff --git a/ProxySuper.WPF/Controls/VLESS_gRPC_Control.xaml b/ProxySuper.WPF/Controls/VLESS_gRPC_Control.xaml new file mode 100644 index 0000000..42cf4d2 --- /dev/null +++ b/ProxySuper.WPF/Controls/VLESS_gRPC_Control.xaml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ProxySuper.WPF/Controls/VLESS_gRPC_Control.xaml.cs b/ProxySuper.WPF/Controls/VLESS_gRPC_Control.xaml.cs new file mode 100644 index 0000000..2b346ae --- /dev/null +++ b/ProxySuper.WPF/Controls/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 ProxySuper.WPF.Controls +{ + /// + /// VLESS_gRPC_Control.xaml 的交互逻辑 + /// + public partial class VLESS_gRPC_Control : UserControl + { + public VLESS_gRPC_Control() + { + InitializeComponent(); + } + } +} diff --git a/ProxySuper.WPF/Controls/VMESS_KCP_Control.xaml b/ProxySuper.WPF/Controls/VMESS_KCP_Control.xaml new file mode 100644 index 0000000..4fbf0e0 --- /dev/null +++ b/ProxySuper.WPF/Controls/VMESS_KCP_Control.xaml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ProxySuper.WPF/Controls/VMESS_KCP_Control.xaml.cs b/ProxySuper.WPF/Controls/VMESS_KCP_Control.xaml.cs new file mode 100644 index 0000000..0dccb5a --- /dev/null +++ b/ProxySuper.WPF/Controls/VMESS_KCP_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 ProxySuper.WPF.Controls +{ + /// + /// VMESS_KCP_Control.xaml 的交互逻辑 + /// + public partial class VMESS_KCP_Control : UserControl + { + public VMESS_KCP_Control() + { + InitializeComponent(); + } + } +} diff --git a/ProxySuper.WPF/Controls/VMESS_TCP_TLS_Control.xaml b/ProxySuper.WPF/Controls/VMESS_TCP_TLS_Control.xaml new file mode 100644 index 0000000..e22f34f --- /dev/null +++ b/ProxySuper.WPF/Controls/VMESS_TCP_TLS_Control.xaml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ProxySuper.WPF/Controls/VMESS_TCP_TLS_Control.xaml.cs b/ProxySuper.WPF/Controls/VMESS_TCP_TLS_Control.xaml.cs new file mode 100644 index 0000000..12714fa --- /dev/null +++ b/ProxySuper.WPF/Controls/VMESS_TCP_TLS_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 ProxySuper.WPF.Controls +{ + /// + /// VMESS_TCP_TLS_Control.xaml 的交互逻辑 + /// + public partial class VMESS_TCP_TLS_Control : UserControl + { + public VMESS_TCP_TLS_Control() + { + InitializeComponent(); + } + } +} diff --git a/ProxySuper.WPF/Controls/VMESS_WS_TLS_Control.xaml b/ProxySuper.WPF/Controls/VMESS_WS_TLS_Control.xaml new file mode 100644 index 0000000..4532868 --- /dev/null +++ b/ProxySuper.WPF/Controls/VMESS_WS_TLS_Control.xaml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ProxySuper.WPF/Controls/VMESS_WS_TLS_Control.xaml.cs b/ProxySuper.WPF/Controls/VMESS_WS_TLS_Control.xaml.cs new file mode 100644 index 0000000..f8502d9 --- /dev/null +++ b/ProxySuper.WPF/Controls/VMESS_WS_TLS_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 ProxySuper.WPF.Controls +{ + /// + /// VMESS_WS_TLS_Control.xaml 的交互逻辑 + /// + public partial class VMESS_WS_TLS_Control : UserControl + { + public VMESS_WS_TLS_Control() + { + InitializeComponent(); + } + } +} diff --git a/ProxySuper.WPF/ProxySuper.WPF.csproj b/ProxySuper.WPF/ProxySuper.WPF.csproj index 6661ee0..e6f868d 100644 --- a/ProxySuper.WPF/ProxySuper.WPF.csproj +++ b/ProxySuper.WPF/ProxySuper.WPF.csproj @@ -43,6 +43,9 @@ ..\packages\MvvmCross.Platforms.Wpf.7.1.2\lib\net461\MvvmCross.Platforms.Wpf.dll + + ..\packages\QRCoder.1.4.1\lib\net40\QRCoder.dll + ..\packages\SSH.NET.2020.0.1\lib\net40\Renci.SshNet.dll @@ -53,6 +56,7 @@ ..\packages\System.Console.4.3.1\lib\net46\System.Console.dll + ..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll @@ -79,6 +83,36 @@ HostControl.xaml + + ShadowSocksControl.xaml + + + Trojan_TCP_Control.xaml + + + VLESS_gRPC_Control.xaml + + + VLESS_KCP_Control.xaml + + + VLESS_TCP_TLS_Control.xaml + + + VLESS_WS_TLS_Control.xaml + + + VLESS_XTLS_Control.xaml + + + VMESS_KCP_Control.xaml + + + VMESS_TCP_TLS_Control.xaml + + + VMESS_WS_TLS_Control.xaml + XraySettingsControl.xaml @@ -97,6 +131,9 @@ XrayEditorView.xaml + + XrayConfigView.xaml + XrayInstallerView.xaml @@ -104,6 +141,46 @@ Designer MSBuild:Compile + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + Designer MSBuild:Compile @@ -147,6 +224,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile diff --git a/ProxySuper.WPF/Resources/Languages/en.xaml b/ProxySuper.WPF/Resources/Languages/en.xaml index cf9abac..4d230e4 100644 --- a/ProxySuper.WPF/Resources/Languages/en.xaml +++ b/ProxySuper.WPF/Resources/Languages/en.xaml @@ -5,6 +5,9 @@ Random Save + SaveAs + Install + Settings Add Host @@ -26,6 +29,7 @@ Action Install Edit + ViewConfig Delete @@ -79,6 +83,15 @@ xray Port default port is 443 + + Install + UpdateSettings + UpdateCore + Uninstall + InstallCert + UploadWeb + UploadCert + Address Port diff --git a/ProxySuper.WPF/Resources/Languages/zh_cn.xaml b/ProxySuper.WPF/Resources/Languages/zh_cn.xaml index e86d0c9..7d0a7e7 100644 --- a/ProxySuper.WPF/Resources/Languages/zh_cn.xaml +++ b/ProxySuper.WPF/Resources/Languages/zh_cn.xaml @@ -5,6 +5,9 @@ 随机 保存 + 另存为 + 安装 + 配置 添加主机 @@ -26,6 +29,7 @@ 操作 安装 编辑 + 查看配置 删除 @@ -79,6 +83,15 @@ xray端口 默认端口443,不建议修改 + + 一键安装 + 更新配置 + 更新内核 + 卸载代理 + 手动续签证书 + 上传伪装网站 + 上传自有证书 + 域名 diff --git a/ProxySuper.WPF/Views/HomeView.xaml b/ProxySuper.WPF/Views/HomeView.xaml index e8f646c..d8e7a43 100644 --- a/ProxySuper.WPF/Views/HomeView.xaml +++ b/ProxySuper.WPF/Views/HomeView.xaml @@ -76,7 +76,12 @@ Margin="5,0" Padding="12,3" Content="{DynamicResource MainDataGridColumnActionEdit}" /> - + + - +