diff --git a/ProxySuper.Core/Models/Hosts/Host.cs b/ProxySuper.Core/Models/Hosts/Host.cs index 20baa6d..eb0b2c6 100644 --- a/ProxySuper.Core/Models/Hosts/Host.cs +++ b/ProxySuper.Core/Models/Hosts/Host.cs @@ -1,5 +1,6 @@ using Microsoft.Win32; using MvvmCross.Commands; +using Newtonsoft.Json; using System.ComponentModel; using System.Threading.Tasks; using System.Windows; diff --git a/ProxySuper.Core/Models/Projects/MTProxyGoSettings.cs b/ProxySuper.Core/Models/Projects/MTProtoGoSettings.cs similarity index 87% rename from ProxySuper.Core/Models/Projects/MTProxyGoSettings.cs rename to ProxySuper.Core/Models/Projects/MTProtoGoSettings.cs index 532207b..26cfabd 100644 --- a/ProxySuper.Core/Models/Projects/MTProxyGoSettings.cs +++ b/ProxySuper.Core/Models/Projects/MTProtoGoSettings.cs @@ -6,9 +6,9 @@ using System.Threading.Tasks; namespace ProxySuper.Core.Models.Projects { - public class MTProxyGoSettings : IProjectSettings + public class MTProtoGoSettings : IProjectSettings { - public MTProxyGoSettings() + public MTProtoGoSettings() { Port = 443; diff --git a/ProxySuper.Core/Models/Projects/ProjectType.cs b/ProxySuper.Core/Models/Projects/ProjectType.cs index 58549b0..15b3e48 100644 --- a/ProxySuper.Core/Models/Projects/ProjectType.cs +++ b/ProxySuper.Core/Models/Projects/ProjectType.cs @@ -7,6 +7,6 @@ NaiveProxy = 2, Brook = 3, V2ray = 4, - MTProxyGo = 5, + MTProtoGo = 5, } } diff --git a/ProxySuper.Core/Models/Record.cs b/ProxySuper.Core/Models/Record.cs index 522920a..0363a9b 100644 --- a/ProxySuper.Core/Models/Record.cs +++ b/ProxySuper.Core/Models/Record.cs @@ -42,14 +42,14 @@ namespace ProxySuper.Core.Models [JsonProperty("trojanGoSettings")] public TrojanGoSettings TrojanGoSettings { get; set; } - [JsonProperty("naiveProxySettings")] + [JsonProperty("naiveProtoSettings")] public NaiveProxySettings NaiveProxySettings { get; set; } [JsonProperty("brook")] public BrookSettings BrookSettings { get; set; } - [JsonProperty("mtProxyGoSettings")] - public MTProxyGoSettings MTProxyGoSettings { get; set; } + [JsonProperty("mtProtoGoSettings")] + public MTProtoGoSettings MTProtoGoSettings { get; set; } [JsonIgnore] @@ -65,7 +65,7 @@ namespace ProxySuper.Core.Models if (NaiveProxySettings != null) return ProjectType.NaiveProxy; - if (MTProxyGoSettings != null) return ProjectType.MTProxyGo; + if (MTProtoGoSettings != null) return ProjectType.MTProtoGo; return ProjectType.Brook; } diff --git a/ProxySuper.Core/ProxySuper.Core.csproj b/ProxySuper.Core/ProxySuper.Core.csproj index bb0752f..2b7140f 100644 --- a/ProxySuper.Core/ProxySuper.Core.csproj +++ b/ProxySuper.Core/ProxySuper.Core.csproj @@ -75,7 +75,7 @@ - + @@ -90,7 +90,7 @@ - + @@ -105,9 +105,9 @@ - - - + + + diff --git a/ProxySuper.Core/Services/BrookService.cs b/ProxySuper.Core/Services/BrookService.cs index aefa01a..d5904ff 100644 --- a/ProxySuper.Core/Services/BrookService.cs +++ b/ProxySuper.Core/Services/BrookService.cs @@ -1,5 +1,6 @@ using ProxySuper.Core.Models.Hosts; using ProxySuper.Core.Models.Projects; +using ProxySuper.Core.ViewModels; using System; using System.Collections.Generic; using System.Linq; @@ -72,6 +73,8 @@ namespace ProxySuper.Core.Services AppendCommand("分享连接:"); AppendCommand(ShareLink.BuildBrook(Settings)); + + NavigationService.Navigate(Settings); } catch (Exception ex) { diff --git a/ProxySuper.Core/Services/MTProxyGoService.cs b/ProxySuper.Core/Services/MTProtoGoService.cs similarity index 89% rename from ProxySuper.Core/Services/MTProxyGoService.cs rename to ProxySuper.Core/Services/MTProtoGoService.cs index acb6a24..b6992c4 100644 --- a/ProxySuper.Core/Services/MTProxyGoService.cs +++ b/ProxySuper.Core/Services/MTProtoGoService.cs @@ -1,5 +1,6 @@ using ProxySuper.Core.Models.Hosts; using ProxySuper.Core.Models.Projects; +using ProxySuper.Core.ViewModels; using System; using System.Collections.Generic; using System.Linq; @@ -9,9 +10,9 @@ using System.Windows; namespace ProxySuper.Core.Services { - public class MTProxyGoService : ServiceBase + public class MTProtoGoService : ServiceBase { - public MTProxyGoService(Host host, MTProxyGoSettings settings) : base(host, settings) + public MTProtoGoService(Host host, MTProtoGoSettings settings) : base(host, settings) { } @@ -53,9 +54,9 @@ namespace ProxySuper.Core.Services RunCmd($"echo \"bind-to=\\\"0.0.0.0:{Settings.Port}\\\"\" >> /etc/mtg.toml"); Progress.Percentage = 80; - Progress.Step = "7. 启动MTProxy服务"; + Progress.Step = "7. 启动MTProto服务"; RunCmd($"docker run -d -v /etc/mtg.toml:/config.toml --name=mtg --restart=always -p {Settings.Port + ":" + Settings.Port} nineseconds/mtg"); - Progress.Desc = "设置自启动MTProxy服务"; + Progress.Desc = "设置自启动MTProto服务"; Progress.Step = "安装完成"; Progress.Percentage = 100; @@ -64,6 +65,7 @@ namespace ProxySuper.Core.Services AppendCommand("Port: " + Settings.Port); AppendCommand("Secret: " + Settings.SecretText); + NavigationService.Navigate(Settings); } catch (Exception ex) { @@ -79,7 +81,7 @@ namespace ProxySuper.Core.Services try { Progress.Percentage = 0; - Progress.Step = "卸载MTProxy"; + Progress.Step = "卸载MTProto"; Progress.Desc = "检测系统环境"; EnsureRootUser(); @@ -106,9 +108,9 @@ namespace ProxySuper.Core.Services try { Progress.Percentage = 0; - Progress.Step = "更新MTProxy配置"; + Progress.Step = "更新MTProto配置"; - Progress.Desc = "暂停MTProxy服务"; + Progress.Desc = "暂停MTProto服务"; var cid = RunCmd("docker ps -q --filter name=mtg"); RunCmd($"docker stop {cid}"); Progress.Percentage = 50; @@ -122,7 +124,7 @@ namespace ProxySuper.Core.Services RunCmd($"echo \"bind-to=\\\"0.0.0.0:{Settings.Port}\\\"\" >> /etc/mtg.toml"); Progress.Percentage = 80; - Progress.Desc = "重启MTProxy服务"; + Progress.Desc = "重启MTProto服务"; RunCmd($"docker restart {cid}"); Progress.Percentage = 100; diff --git a/ProxySuper.Core/Services/NaiveProxyService.cs b/ProxySuper.Core/Services/NaiveProxyService.cs index dfbf008..47980f5 100644 --- a/ProxySuper.Core/Services/NaiveProxyService.cs +++ b/ProxySuper.Core/Services/NaiveProxyService.cs @@ -3,6 +3,7 @@ using MvvmCross.ViewModels; using ProxySuper.Core.Models; using ProxySuper.Core.Models.Hosts; using ProxySuper.Core.Models.Projects; +using ProxySuper.Core.ViewModels; using System; using System.Collections.Generic; using System.ComponentModel; @@ -69,6 +70,8 @@ namespace ProxySuper.Core.Services AppendCommand("分享连接:"); AppendCommand(ShareLink.BuildNaiveProxy(Settings)); + + NavigationService.Navigate(Settings); } catch (Exception ex) { diff --git a/ProxySuper.Core/Services/ServiceBase.cs b/ProxySuper.Core/Services/ServiceBase.cs index d6168b9..fcda9c0 100644 --- a/ProxySuper.Core/Services/ServiceBase.cs +++ b/ProxySuper.Core/Services/ServiceBase.cs @@ -1,4 +1,6 @@ -using ProxySuper.Core.Helpers; +using MvvmCross; +using MvvmCross.Navigation; +using ProxySuper.Core.Helpers; using ProxySuper.Core.Models; using ProxySuper.Core.Models.Hosts; using ProxySuper.Core.Models.Projects; @@ -9,6 +11,8 @@ using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; +using System.Windows; +using System.Windows.Navigation; namespace ProxySuper.Core.Services { @@ -30,7 +34,6 @@ namespace ProxySuper.Core.Services { private Host _host; - private SshClient _sshClient; private ProjectProgress _progress; @@ -41,7 +44,11 @@ namespace ProxySuper.Core.Services Settings = settings; - _sshClient = new SshClient(CreateConnectionInfo()); + var connection = CreateConnectionInfo(); + if (connection != null) + { + _sshClient = new SshClient(connection); + } _progress = new ProjectProgress(); @@ -54,6 +61,8 @@ namespace ProxySuper.Core.Services IPv6 = string.Empty; IsOnlyIPv6 = false; + + NavigationService = Mvx.IoCProvider.Resolve(); } public string RunCmd(string command) @@ -89,12 +98,20 @@ namespace ProxySuper.Core.Services public bool IsOnlyIPv6 { get; set; } + public IMvxNavigationService NavigationService { get; set; } + #region 公用方法 public void Connect() { Task.Run(() => { + if (_sshClient == null) + { + MessageBox.Show("无法建立连接,连接参数有误!"); + return; + } + if (_sshClient.IsConnected == false) { Progress.Desc = ("正在与服务器建立连接"); @@ -115,7 +132,7 @@ namespace ProxySuper.Core.Services { Task.Run(() => { - _sshClient.Disconnect(); + _sshClient?.Disconnect(); }); } @@ -314,7 +331,6 @@ namespace ProxySuper.Core.Services } } - public void UninstallCaddy() { Progress.Desc = "关闭Caddy服务"; @@ -751,35 +767,52 @@ namespace ProxySuper.Core.Services private ConnectionInfo CreateConnectionInfo() { - var authMethods = new List(); - - if (!string.IsNullOrEmpty(_host.Password)) + try { - authMethods.Add(new PasswordAuthenticationMethod(_host.UserName, _host.Password)); - } + var authMethods = new List(); - if (_host.SecretType == LoginSecretType.PrivateKey) - { - authMethods.Add(new PrivateKeyAuthenticationMethod(_host.UserName, new PrivateKeyFile(_host.PrivateKeyPath))); - } + if (_host.SecretType == LoginSecretType.Password) + { + authMethods.Add(new PasswordAuthenticationMethod(_host.UserName, _host.Password)); + } + + if (_host.SecretType == LoginSecretType.PrivateKey) + { + PrivateKeyFile keyFile; + if (string.IsNullOrEmpty(_host.Password)) + { + keyFile = new PrivateKeyFile(_host.PrivateKeyPath); + } + else + { + keyFile = new PrivateKeyFile(_host.PrivateKeyPath, _host.Password); + } + authMethods.Add(new PrivateKeyAuthenticationMethod(_host.UserName, keyFile)); + } + + if (_host.Proxy.Type == ProxyTypes.None) + { + return new ConnectionInfo( + host: _host.Address, + username: _host.UserName, + authenticationMethods: authMethods.ToArray()); + } - if (_host.Proxy.Type == ProxyTypes.None) - { return new ConnectionInfo( host: _host.Address, + port: _host.Port, username: _host.UserName, + proxyType: _host.Proxy.Type, + proxyHost: _host.Proxy.Address, + proxyPort: _host.Proxy.Port, + proxyUsername: _host.Proxy.UserName, proxyPassword: _host.Proxy.Password, authenticationMethods: authMethods.ToArray()); } - - return new ConnectionInfo( - host: _host.Address, - port: _host.Port, - username: _host.UserName, - proxyType: _host.Proxy.Type, - proxyHost: _host.Proxy.Address, - proxyPort: _host.Proxy.Port, - proxyUsername: _host.Proxy.UserName, proxyPassword: _host.Proxy.Password, - authenticationMethods: authMethods.ToArray()); + catch (Exception ex) + { + MessageBox.Show(ex.Message); + return null; + } } #endregion } diff --git a/ProxySuper.Core/Services/TrojanGoService.cs b/ProxySuper.Core/Services/TrojanGoService.cs index eac9470..11264be 100644 --- a/ProxySuper.Core/Services/TrojanGoService.cs +++ b/ProxySuper.Core/Services/TrojanGoService.cs @@ -1,6 +1,7 @@ using Microsoft.Win32; using ProxySuper.Core.Models.Hosts; using ProxySuper.Core.Models.Projects; +using ProxySuper.Core.ViewModels; using System; using System.Collections.Generic; using System.ComponentModel; @@ -93,6 +94,10 @@ namespace ProxySuper.Core.Services { Progress.Step = "安装成功,请上传您的 TLS 证书。"; } + else + { + NavigationService.Navigate(Settings); + } } catch (Exception ex) { @@ -202,12 +207,12 @@ namespace ProxySuper.Core.Services { try { - EnsureRootUser(); Progress.Step = "续签证书"; Progress.Percentage = 0; Progress.Desc = "检测系统环境"; + EnsureRootUser(); EnsureSystemEnv(); Progress.Percentage = 20; diff --git a/ProxySuper.Core/Services/V2rayService.cs b/ProxySuper.Core/Services/V2rayService.cs index c6d5236..a061443 100644 --- a/ProxySuper.Core/Services/V2rayService.cs +++ b/ProxySuper.Core/Services/V2rayService.cs @@ -1,6 +1,7 @@ using Microsoft.Win32; using ProxySuper.Core.Models.Hosts; using ProxySuper.Core.Models.Projects; +using ProxySuper.Core.ViewModels; using System; using System.Collections.Generic; using System.ComponentModel; @@ -88,6 +89,10 @@ namespace ProxySuper.Core.Services { Progress.Step = "安装成功,请上传您的 TLS 证书。"; } + else + { + NavigationService.Navigate(Settings); + } } catch (Exception ex) { @@ -236,6 +241,11 @@ namespace ProxySuper.Core.Services Progress.Percentage = 0; Progress.Step = "续签证书"; + Progress.Desc = "检测系统环境"; + EnsureRootUser(); + EnsureSystemEnv(); + + Progress.Desc = "安装证书"; InstallCert( dirPath: "/usr/local/etc/v2ray/ssl", certName: "v2ray_ssl.crt", diff --git a/ProxySuper.Core/Services/XrayService.cs b/ProxySuper.Core/Services/XrayService.cs index 7dae882..dce2df3 100644 --- a/ProxySuper.Core/Services/XrayService.cs +++ b/ProxySuper.Core/Services/XrayService.cs @@ -2,6 +2,7 @@ using ProxySuper.Core.Helpers; using ProxySuper.Core.Models.Hosts; using ProxySuper.Core.Models.Projects; +using ProxySuper.Core.ViewModels; using System; using System.Collections.Generic; using System.ComponentModel; @@ -90,6 +91,10 @@ namespace ProxySuper.Core.Services { Progress.Step = "安装成功,请上传您的 TLS 证书。"; } + else + { + NavigationService.Navigate(Settings); + } } catch (Exception ex) { @@ -238,6 +243,11 @@ namespace ProxySuper.Core.Services Progress.Percentage = 0; Progress.Step = "续签证书"; + Progress.Desc = "检测系统环境"; + EnsureRootUser(); + EnsureSystemEnv(); + + Progress.Desc = "安装证书"; InstallCert( dirPath: "/usr/local/etc/xray/ssl", certName: "xray_ssl.crt", diff --git a/ProxySuper.Core/ViewModels/HomeViewModel.cs b/ProxySuper.Core/ViewModels/HomeViewModel.cs index 2d01c58..f01c7c5 100644 --- a/ProxySuper.Core/ViewModels/HomeViewModel.cs +++ b/ProxySuper.Core/ViewModels/HomeViewModel.cs @@ -100,7 +100,7 @@ namespace ProxySuper.Core.ViewModels public IMvxCommand AddNaiveProxyCommand => new MvxAsyncCommand(AddNaiveProxyRecord); - public IMvxCommand AddMTProxyGoCommand => new MvxAsyncCommand(AddMTProxyGoRecord); + public IMvxCommand AddMTProtoGoCommand => new MvxAsyncCommand(AddMTProtoGoRecord); public IMvxCommand AddBrookCommand => new MvxAsyncCommand(AddBrookRecord); @@ -155,14 +155,14 @@ namespace ProxySuper.Core.ViewModels SaveToJson(); } - public async Task AddMTProxyGoRecord() + public async Task AddMTProtoGoRecord() { Record record = new Record(); record.Id = Utils.GetTickID(); record.Host = new Host(); - record.MTProxyGoSettings = new MTProxyGoSettings(); + record.MTProtoGoSettings = new MTProtoGoSettings(); - var result = await _navigationService.Navigate(record); + var result = await _navigationService.Navigate(record); if (result == null) return; Records.Add(result); @@ -247,13 +247,13 @@ namespace ProxySuper.Core.ViewModels record.Host = result.Host; record.BrookSettings = result.BrookSettings; } - if (record.Type == ProjectType.MTProxyGo) + if (record.Type == ProjectType.MTProtoGo) { - result = await _navigationService.Navigate(record); + result = await _navigationService.Navigate(record); if (result == null) return; record.Host = result.Host; - record.MTProxyGoSettings = result.MTProxyGoSettings; + record.MTProtoGoSettings = result.MTProtoGoSettings; } SaveToJson(); @@ -299,9 +299,9 @@ namespace ProxySuper.Core.ViewModels { await _navigationService.Navigate(record.BrookSettings); } - if (record.Type == ProjectType.MTProxyGo) + if (record.Type == ProjectType.MTProtoGo) { - await _navigationService.Navigate(record.MTProxyGoSettings); + await _navigationService.Navigate(record.MTProtoGoSettings); } } @@ -331,9 +331,9 @@ namespace ProxySuper.Core.ViewModels { await _navigationService.Navigate(record); } - if (record.Type == ProjectType.MTProxyGo) + if (record.Type == ProjectType.MTProtoGo) { - await _navigationService.Navigate(record); + await _navigationService.Navigate(record); } SaveToJson(); diff --git a/ProxySuper.Core/ViewModels/MTProxyGoConfigViewModel.cs b/ProxySuper.Core/ViewModels/MTProtoGoConfigViewModel.cs similarity index 64% rename from ProxySuper.Core/ViewModels/MTProxyGoConfigViewModel.cs rename to ProxySuper.Core/ViewModels/MTProtoGoConfigViewModel.cs index b9473dc..a6058ca 100644 --- a/ProxySuper.Core/ViewModels/MTProxyGoConfigViewModel.cs +++ b/ProxySuper.Core/ViewModels/MTProtoGoConfigViewModel.cs @@ -9,11 +9,11 @@ using System.Threading.Tasks; namespace ProxySuper.Core.ViewModels { - public class MTProxyGoConfigViewModel : MvxViewModel + public class MTProtoGoConfigViewModel : MvxViewModel { - public MTProxyGoSettings Settings { get; set; } + public MTProtoGoSettings Settings { get; set; } - public override void Prepare(MTProxyGoSettings parameter) + public override void Prepare(MTProtoGoSettings parameter) { Settings = parameter; } diff --git a/ProxySuper.Core/ViewModels/MTProxyGoEditorViewModel.cs b/ProxySuper.Core/ViewModels/MTProtoGoEditorViewModel.cs similarity index 78% rename from ProxySuper.Core/ViewModels/MTProxyGoEditorViewModel.cs rename to ProxySuper.Core/ViewModels/MTProtoGoEditorViewModel.cs index 4ab5336..fa983bf 100644 --- a/ProxySuper.Core/ViewModels/MTProxyGoEditorViewModel.cs +++ b/ProxySuper.Core/ViewModels/MTProtoGoEditorViewModel.cs @@ -13,9 +13,9 @@ using System.Threading.Tasks; namespace ProxySuper.Core.ViewModels { - public class MTProxyGoEditorViewModel : MvxViewModel + public class MTProtoGoEditorViewModel : MvxViewModel { - public MTProxyGoEditorViewModel(IMvxNavigationService navigationService) + public MTProtoGoEditorViewModel(IMvxNavigationService navigationService) { NavigationService = navigationService; } @@ -30,7 +30,7 @@ namespace ProxySuper.Core.ViewModels public Host Host { get; set; } - public MTProxyGoSettings Settings { get; set; } + public MTProtoGoSettings Settings { get; set; } public override void Prepare(Record parameter) { @@ -38,7 +38,7 @@ namespace ProxySuper.Core.ViewModels Id = record.Id; Host = record.Host; - Settings = record.MTProxyGoSettings; + Settings = record.MTProtoGoSettings; } private void Save() @@ -47,7 +47,7 @@ namespace ProxySuper.Core.ViewModels { Id = this.Id, Host = this.Host, - MTProxyGoSettings = Settings, + MTProtoGoSettings = Settings, }); } @@ -57,10 +57,10 @@ namespace ProxySuper.Core.ViewModels { Id = this.Id, Host = this.Host, - MTProxyGoSettings = Settings, + MTProtoGoSettings = Settings, }; NavigationService.Close(this, record); - NavigationService.Navigate(record); + NavigationService.Navigate(record); } } } diff --git a/ProxySuper.Core/ViewModels/MTProxyGoInstallViewModel.cs b/ProxySuper.Core/ViewModels/MTProtoGoInstallViewModel.cs similarity index 89% rename from ProxySuper.Core/ViewModels/MTProxyGoInstallViewModel.cs rename to ProxySuper.Core/ViewModels/MTProtoGoInstallViewModel.cs index 74888c1..794d4f1 100644 --- a/ProxySuper.Core/ViewModels/MTProxyGoInstallViewModel.cs +++ b/ProxySuper.Core/ViewModels/MTProtoGoInstallViewModel.cs @@ -13,26 +13,26 @@ using System.Threading.Tasks; namespace ProxySuper.Core.ViewModels { - public class MTProxyGoInstallViewModel : MvxViewModel + public class MTProtoGoInstallViewModel : MvxViewModel { Host _host; - MTProxyGoSettings _settings; + MTProtoGoSettings _settings; - MTProxyGoService _mtproxyService; + MTProtoGoService _mtproxyService; Action _onSave; public override void Prepare(Record parameter) { _host = parameter.Host; - _settings = parameter.MTProxyGoSettings; + _settings = parameter.MTProtoGoSettings; _onSave = parameter.OnSave; } public override Task Initialize() { - _mtproxyService = new MTProxyGoService(_host, _settings); + _mtproxyService = new MTProtoGoService(_host, _settings); _mtproxyService.Progress.StepUpdate = () => RaisePropertyChanged("Progress"); _mtproxyService.Progress.LogsUpdate = () => RaisePropertyChanged("Logs"); _mtproxyService.Connect(); diff --git a/ProxySuper.WPF/ProxySuper.WPF.csproj b/ProxySuper.WPF/ProxySuper.WPF.csproj index bc4d57b..d10a899 100644 --- a/ProxySuper.WPF/ProxySuper.WPF.csproj +++ b/ProxySuper.WPF/ProxySuper.WPF.csproj @@ -144,14 +144,14 @@ MTProxyGoInstallView.xaml - - NaiveProxyConfigView.xaml + + NaiveProtoConfigView.xaml - - NaiveProxyEditorView.xaml + + NaiveProtoEditorView.xaml - - NaiveProxyInstallView.xaml + + NaiveProtoInstallView.xaml ShareLinkView.xaml @@ -299,15 +299,15 @@ Designer MSBuild:Compile - + 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 f9872c9..50a5e08 100644 --- a/ProxySuper.WPF/Resources/Languages/en.xaml +++ b/ProxySuper.WPF/Resources/Languages/en.xaml @@ -127,9 +127,9 @@ Password GuiseHost - - Address - Port - Cleantext - Secret + + Address + Port + Cleantext + Secret \ No newline at end of file diff --git a/ProxySuper.WPF/Resources/Languages/tw_cn.xaml b/ProxySuper.WPF/Resources/Languages/tw_cn.xaml index dce35ce..48c8c5f 100644 --- a/ProxySuper.WPF/Resources/Languages/tw_cn.xaml +++ b/ProxySuper.WPF/Resources/Languages/tw_cn.xaml @@ -127,9 +127,9 @@ 密碼 偽裝網站 - - 域名/IP - 端口 - 加密前字符 - 密鑰 + + 域名/IP + 端口 + 加密前字符 + 密鑰 \ No newline at end of file diff --git a/ProxySuper.WPF/Resources/Languages/zh_cn.xaml b/ProxySuper.WPF/Resources/Languages/zh_cn.xaml index 4aeb1bd..c33beca 100644 --- a/ProxySuper.WPF/Resources/Languages/zh_cn.xaml +++ b/ProxySuper.WPF/Resources/Languages/zh_cn.xaml @@ -128,9 +128,9 @@ 密码 伪装网站 - - 域名/IP - 端口 - 加密前字符 - 密钥 + + 域名/IP + 端口 + 加密前字符 + 密钥 \ No newline at end of file diff --git a/ProxySuper.WPF/Views/HomeView.xaml b/ProxySuper.WPF/Views/HomeView.xaml index 7e5d14b..34c5ff3 100644 --- a/ProxySuper.WPF/Views/HomeView.xaml +++ b/ProxySuper.WPF/Views/HomeView.xaml @@ -17,7 +17,7 @@ - + diff --git a/ProxySuper.WPF/Views/MTProxyGo/MTProxyGoConfigView.xaml b/ProxySuper.WPF/Views/MTProxyGo/MTProxyGoConfigView.xaml index 064606e..238cbf4 100644 --- a/ProxySuper.WPF/Views/MTProxyGo/MTProxyGoConfigView.xaml +++ b/ProxySuper.WPF/Views/MTProxyGo/MTProxyGoConfigView.xaml @@ -1,14 +1,14 @@ - + Title="MTProto-Go节点配置" Height="450" Width="800"> diff --git a/ProxySuper.WPF/Views/MTProxyGo/MTProxyGoConfigView.xaml.cs b/ProxySuper.WPF/Views/MTProxyGo/MTProxyGoConfigView.xaml.cs index d64b71e..243d354 100644 --- a/ProxySuper.WPF/Views/MTProxyGo/MTProxyGoConfigView.xaml.cs +++ b/ProxySuper.WPF/Views/MTProxyGo/MTProxyGoConfigView.xaml.cs @@ -13,14 +13,14 @@ using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Shapes; -namespace ProxySuper.WPF.Views.MTProxyGo +namespace ProxySuper.WPF.Views.MTProtoGo { /// - /// MTProxyGoConfigView.xaml 的交互逻辑 + /// MTProtoGoConfigView.xaml 的交互逻辑 /// - public partial class MTProxyGoConfigView : MvxWindow + public partial class MTProtoGoConfigView : MvxWindow { - public MTProxyGoConfigView() + public MTProtoGoConfigView() { InitializeComponent(); } diff --git a/ProxySuper.WPF/Views/MTProxyGo/MTProxyGoEditorView.xaml b/ProxySuper.WPF/Views/MTProxyGo/MTProxyGoEditorView.xaml index da02520..b410ee2 100644 --- a/ProxySuper.WPF/Views/MTProxyGo/MTProxyGoEditorView.xaml +++ b/ProxySuper.WPF/Views/MTProxyGo/MTProxyGoEditorView.xaml @@ -1,9 +1,9 @@ - + Title="MTProto-Go编辑配置" Height="600" Width="1000"> @@ -36,13 +36,13 @@ - diff --git a/ProxySuper.WPF/Views/MTProxyGo/MTProxyGoEditorView.xaml.cs b/ProxySuper.WPF/Views/MTProxyGo/MTProxyGoEditorView.xaml.cs index 1ba51ba..231813a 100644 --- a/ProxySuper.WPF/Views/MTProxyGo/MTProxyGoEditorView.xaml.cs +++ b/ProxySuper.WPF/Views/MTProxyGo/MTProxyGoEditorView.xaml.cs @@ -13,14 +13,14 @@ using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Shapes; -namespace ProxySuper.WPF.Views.MTProxyGo +namespace ProxySuper.WPF.Views.MTProtoGo { /// - /// MTProxyGoEditorView.xaml 的交互逻辑 + /// MTProtoGoEditorView.xaml 的交互逻辑 /// - public partial class MTProxyGoEditorView : MvxWindow + public partial class MTProtoGoEditorView : MvxWindow { - public MTProxyGoEditorView() + public MTProtoGoEditorView() { InitializeComponent(); } diff --git a/ProxySuper.WPF/Views/MTProxyGo/MTProxyGoInstallView.xaml b/ProxySuper.WPF/Views/MTProxyGo/MTProxyGoInstallView.xaml index a67d821..ba763e3 100644 --- a/ProxySuper.WPF/Views/MTProxyGo/MTProxyGoInstallView.xaml +++ b/ProxySuper.WPF/Views/MTProxyGo/MTProxyGoInstallView.xaml @@ -1,14 +1,14 @@ - + Title="MTProto-Go安装" Height="600" Width="1000"> diff --git a/ProxySuper.WPF/Views/MTProxyGo/MTProxyGoInstallView.xaml.cs b/ProxySuper.WPF/Views/MTProxyGo/MTProxyGoInstallView.xaml.cs index 377c8d9..5f7af9c 100644 --- a/ProxySuper.WPF/Views/MTProxyGo/MTProxyGoInstallView.xaml.cs +++ b/ProxySuper.WPF/Views/MTProxyGo/MTProxyGoInstallView.xaml.cs @@ -13,14 +13,14 @@ using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Shapes; -namespace ProxySuper.WPF.Views.MTProxyGo +namespace ProxySuper.WPF.Views.MTProtoGo { /// - /// MTProxyInstallView.xaml 的交互逻辑 + /// MTProtoInstallView.xaml 的交互逻辑 /// - public partial class MTProxyGoInstallView : MvxWindow + public partial class MTProtoGoInstallView : MvxWindow { - public MTProxyGoInstallView() + public MTProtoGoInstallView() { InitializeComponent(); } diff --git a/ProxySuper.WPF/Views/NaiveProxy/NaiveProxyConfigView.xaml b/ProxySuper.WPF/Views/NaiveProto/NaiveProtoConfigView.xaml similarity index 96% rename from ProxySuper.WPF/Views/NaiveProxy/NaiveProxyConfigView.xaml rename to ProxySuper.WPF/Views/NaiveProto/NaiveProtoConfigView.xaml index c5b29ac..ab48e08 100644 --- a/ProxySuper.WPF/Views/NaiveProxy/NaiveProxyConfigView.xaml +++ b/ProxySuper.WPF/Views/NaiveProto/NaiveProtoConfigView.xaml @@ -1,4 +1,4 @@ - /// NaiveProxyConfigView.xaml 的交互逻辑 /// - public partial class NaiveProxyConfigView : MvxWindow + public partial class NaiveProtoConfigView : MvxWindow { - public NaiveProxyConfigView() + public NaiveProtoConfigView() { InitializeComponent(); } diff --git a/ProxySuper.WPF/Views/NaiveProxy/NaiveProxyEditorView.xaml b/ProxySuper.WPF/Views/NaiveProto/NaiveProtoEditorView.xaml similarity index 98% rename from ProxySuper.WPF/Views/NaiveProxy/NaiveProxyEditorView.xaml rename to ProxySuper.WPF/Views/NaiveProto/NaiveProtoEditorView.xaml index 43158fb..cbd2b58 100644 --- a/ProxySuper.WPF/Views/NaiveProxy/NaiveProxyEditorView.xaml +++ b/ProxySuper.WPF/Views/NaiveProto/NaiveProtoEditorView.xaml @@ -1,4 +1,4 @@ - /// NaiveProxyEditorView.xaml 的交互逻辑 /// - public partial class NaiveProxyEditorView : MvxWindow + public partial class NaiveProtoEditorView : MvxWindow { - public NaiveProxyEditorView() + public NaiveProtoEditorView() { InitializeComponent(); } diff --git a/ProxySuper.WPF/Views/NaiveProxy/NaiveProxyInstallView.xaml b/ProxySuper.WPF/Views/NaiveProto/NaiveProtoInstallView.xaml similarity index 99% rename from ProxySuper.WPF/Views/NaiveProxy/NaiveProxyInstallView.xaml rename to ProxySuper.WPF/Views/NaiveProto/NaiveProtoInstallView.xaml index aecd9c0..0798cd3 100644 --- a/ProxySuper.WPF/Views/NaiveProxy/NaiveProxyInstallView.xaml +++ b/ProxySuper.WPF/Views/NaiveProto/NaiveProtoInstallView.xaml @@ -1,4 +1,4 @@ - /// NaiveProxyInstallViewModel.xaml 的交互逻辑 /// - public partial class NaiveProxyInstallView : MvxWindow + public partial class NaiveProtoInstallView : MvxWindow { - public NaiveProxyInstallView() + public NaiveProtoInstallView() { InitializeComponent(); }