1
0
Fork 0
mirror of https://github.com/proxysu/ProxySU.git synced 2025-04-04 06:13:37 +03:00

Merge branch 'proxysu:master' into master

This commit is contained in:
Stklv 2023-05-07 15:56:24 +08:00 committed by GitHub
commit f97199cb22
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 99 additions and 65 deletions

View file

@ -28,6 +28,8 @@ namespace ProxySuper.Core.Models.Hosts
public string PrivateKeyPath { get; set; }
public string PrivateKeyPassPhrase { get; set; }
public LocalProxy Proxy { get; set; }
public LoginSecretType SecretType { get; set; }

View file

@ -42,7 +42,10 @@ namespace ProxySuper.Core.Services
Progress.Percentage = 50;
Progress.Step = "5. 生成密钥";
Settings.SecretText = RunCmd($"docker run nineseconds/mtg generate-secret {Settings.Cleartext}").TrimEnd('\n');
//RunCmd("docker pull nineseconds/mtg:2"); //拉取v2版本命令但是似乎不用也可以。
//下面的命令是v1版本的命令格式。可以保留。将来如启用v1可用。
//Settings.SecretText = RunCmd($"docker run nineseconds/mtg:1 generate-secret -c {Settings.Cleartext} tls").TrimEnd('\n');
Settings.SecretText = RunCmd($"docker run nineseconds/mtg:2 generate-secret {Settings.Cleartext}").TrimEnd('\n');
Progress.Percentage = 65;
Progress.Step = "6. 生成配置文件";
@ -55,7 +58,7 @@ namespace ProxySuper.Core.Services
Progress.Percentage = 80;
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");
RunCmd($"docker run -d -v /etc/mtg.toml:/config.toml --name=mtg --restart=always -p {Settings.Port + ":" + Settings.Port} nineseconds/mtg:2");
Progress.Desc = "设置自启动MTProto服务";
Progress.Step = "安装完成";
@ -116,7 +119,8 @@ namespace ProxySuper.Core.Services
Progress.Percentage = 50;
Progress.Desc = "生成密钥";
Settings.SecretText = RunCmd($"docker run nineseconds/mtg generate-secret {Settings.Cleartext}").TrimEnd('\n');
//Settings.SecretText = RunCmd($"docker run nineseconds/mtg:1 generate-secret -c {Settings.Cleartext} tls").TrimEnd('\n'); //v1版本
Settings.SecretText = RunCmd($"docker run nineseconds/mtg:2 generate-secret {Settings.Cleartext}").TrimEnd('\n');
Progress.Percentage = 65;
Progress.Desc = "修改配置文件";

View file

@ -802,13 +802,13 @@ namespace ProxySuper.Core.Services
if (_host.SecretType == LoginSecretType.PrivateKey)
{
PrivateKeyFile keyFile;
if (string.IsNullOrEmpty(_host.Password))
if (string.IsNullOrEmpty(_host.PrivateKeyPassPhrase))
{
keyFile = new PrivateKeyFile(_host.PrivateKeyPath);
}
else
{
keyFile = new PrivateKeyFile(_host.PrivateKeyPath, _host.Password);
keyFile = new PrivateKeyFile(_host.PrivateKeyPath, _host.PrivateKeyPassPhrase);
}
authMethods.Add(new PrivateKeyAuthenticationMethod(_host.UserName, keyFile));
}

View file

@ -17,7 +17,7 @@
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="300" />
<RowDefinition Height="330" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
@ -36,6 +36,7 @@
<RowDefinition Height="36" />
<RowDefinition Height="36" />
<RowDefinition Height="36" />
<RowDefinition Height="36" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
@ -105,7 +106,18 @@
Converter={StaticResource SecretTypeConverter},
ConverterParameter={x:Static host:LoginSecretType.PrivateKey}
}"
Content="{DynamicResource HostUploadSecretKey}" />
Content="{DynamicResource HostUploadSecretKey}" />
<Label Content="{DynamicResource HostSertTypePrivateKeyPassPhrase}" Grid.Row="7" Grid.Column="0" />
<TextBox Grid.Row="7" Grid.Column="1"
Width="170"
Text="{Binding Host.PrivateKeyPassPhrase}"
IsEnabled="{
Binding Host.SecretType,
Converter={StaticResource SecretTypeConverter},
ConverterParameter={x:Static host:LoginSecretType.PrivateKey}
}"
VerticalContentAlignment="Center" />
</Grid>
</GroupBox>

View file

@ -116,29 +116,28 @@
<TextBox Text="{Binding Path=Domain}" Width="200" />
</StackPanel>
<!--Mask Domain-->
<StackPanel Margin="0,15,0,0" Orientation="Horizontal">
<Label Content="{DynamicResource XrayMarkDomain}" Width="120" />
<TextBox Text="{Binding Path=MaskDomain}" Width="200" />
</StackPanel>
<!--UUID-->
<StackPanel Margin="0,15,0,0" Orientation="Horizontal">
<Label Content="{DynamicResource XrayUUID}" Width="120" />
<TextBox Text="{Binding Path=UUID}" Width="200" />
<Button Margin="5,0,0,0"
Padding="12,3"
Command="{Binding Path=RandomUuid}"
Content="{DynamicResource Random}" />
</StackPanel>
<!--v2ray prot-->
<StackPanel Margin="0,15,0,0" Orientation="Horizontal">
<Label Content="{DynamicResource V2rayPort}" Width="120" />
<TextBox Text="{Binding Path=Port}" Width="120" />
<Label Content="{DynamicResource XrayPortDefault}" Foreground="Red" />
</StackPanel>
<!--#endregion-->
<!--more params-->
<Expander ExpandDirection="Down" Margin="0,10,0,0">
<Expander.Header>
<TextBlock Text="更多参数" FontWeight="Bold" />
<TextBlock Text="{DynamicResource MoreParameters}" FontWeight="Bold" />
</Expander.Header>
<Expander.Content>
@ -153,6 +152,12 @@
VerticalAlignment="Center" />
</StackPanel>
<!--#endregion-->
<!--Mask Domain-->
<StackPanel Margin="0,15,0,0" Orientation="Horizontal">
<Label Content="{DynamicResource XrayMarkDomain}" Width="120" />
<TextBox Text="{Binding Path=MaskDomain}" Width="200" />
</StackPanel>
<!--#region VLESS WebSocket Settings -->
<!--WebSocket Path-->
@ -437,13 +442,6 @@
<Label Content="{DynamicResource TrojanPassword}" Foreground="CadetBlue" Width="120" />
<TextBox Text="{Binding Path=TrojanPassword}" Width="200" />
</StackPanel>
<!--v2ray prot-->
<StackPanel Margin="0,15,0,0" Orientation="Horizontal">
<Label Content="{DynamicResource V2rayPort}" Foreground="Gray" Width="120" />
<TextBox Text="{Binding Path=Port}" Width="120" />
<Label Content="{DynamicResource XrayPortDefault}" Foreground="Red" />
</StackPanel>
<!--#endregion-->
<!--#region Multiple Users Settings -->

View file

@ -145,7 +145,7 @@
<!--more params-->
<Expander ExpandDirection="Down" Margin="0,10,0,0">
<Expander.Header>
<TextBlock Text="更多参数" FontWeight="Bold" />
<TextBlock Text="{DynamicResource MoreParameters}" FontWeight="Bold" />
</Expander.Header>
<Expander.Content>

View file

@ -8,7 +8,7 @@
mc:Ignorable="d"
WindowStartupLocation="CenterScreen"
Icon="/Resources/ProxySU.ico"
Title="ProxySU" Height="600" Width="1000">
Title="ProxySU v4.1.10" Height="600" Width="1000">
<Grid>
</Grid>

View file

@ -49,5 +49,5 @@ using System.Windows;
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("4.1.6.0")]
[assembly: AssemblyFileVersion("4.1.6.0")]
[assembly: AssemblyVersion("4.1.10.0")]
[assembly: AssemblyFileVersion("4.1.10.0")]

View file

@ -22,7 +22,7 @@
<sys:String x:Key="MainMenuLanguageEn">English</sys:String>
<sys:String x:Key="MainMenuLanguageCn">中文</sys:String>
<sys:String x:Key="MainMenuLanguageTw">正體</sys:String>
<sys:String x:Key="MainMenuLanguageFr">Fr</sys:String>
<sys:String x:Key="MainMenuLanguageFr">فارسی</sys:String>
<sys:String x:Key="MainMenuHelper">Helper</sys:String>
<sys:String x:Key="MainMenuHelperGithub">Github</sys:String>
@ -40,7 +40,7 @@
<sys:String x:Key="MainDataGridColumnActionViewConfig">ViewConfig</sys:String>
<sys:String x:Key="MainDataGridColumnActionDelete">Delete</sys:String>
<sys:String x:Key="MainDataGridColumnActionSortUp">Up</sys:String>
<sys:String x:Key="MainDataGridColumnActionSortDone">Done</sys:String>
<sys:String x:Key="MainDataGridColumnActionSortDone">Down</sys:String>
<!--Editor Window-->
@ -54,6 +54,7 @@
<sys:String x:Key="HostUploadSecretKey">UploadKey</sys:String>
<sys:String x:Key="HostSertTypePassword">Password</sys:String>
<sys:String x:Key="HostSertTypePrivateKey">PrivateKey</sys:String>
<sys:String x:Key="HostSertTypePrivateKeyPassPhrase">PKPassword</sys:String>
<sys:String x:Key="ProxyGroupName">Proxy</sys:String>
@ -118,6 +119,7 @@
<sys:String x:Key="V2rayPort">v2ray Port</sys:String>
<sys:String x:Key="XrayPort">xray Port</sys:String>
<sys:String x:Key="XrayPortDefault">default port is 443</sys:String>
<sys:String x:Key="MoreParameters">More Parameters</sys:String>
<!--xray installer-->
<sys:String x:Key="XrayInstallerInstall">Install</sys:String>

View file

@ -3,44 +3,44 @@
xmlns:sys="clr-namespace:System;assembly=mscorlib">
<!--common-->
<sys:String x:Key="Random">Random</sys:String>
<sys:String x:Key="Random">تصادفی</sys:String>
<sys:String x:Key="Save">ذخیره</sys:String>
<sys:String x:Key="SaveAndInstall">ذخیره و نصب</sys:String>
<sys:String x:Key="SaveAs">ذخیره به عنوان</sys:String>
<sys:String x:Key="Install">نصب</sys:String>
<sys:String x:Key="Settings">تنظیمات</sys:String>
<sys:String x:Key="ReadmeWebsiteDemo">The following is a static web page connection provided by netizens, please check whether there is an index.html file by yourself</sys:String>
<sys:String x:Key="ReadmeWebsiteDemo">موارد زیر یک اتصال صفحه وب ثابت است که توسط کاربران اینترنتی ارائه شده است، لطفاً بررسی کنید که آیا فایل index.html توسط خودتان وجود دارد یا خیر.</sys:String>
<!--Main Menu-->
<sys:String x:Key="MainMenuAddHost">Add Host</sys:String>
<sys:String x:Key="MainMenuActions">Actions</sys:String>
<sys:String x:Key="MainMenuActionsExportSettings">Export Settings</sys:String>
<sys:String x:Key="MainMenuActionsExportSubscribe">Export Subscribe</sys:String>
<sys:String x:Key="MainMenuActionsGetRoot">Get Root</sys:String>
<sys:String x:Key="MainMenuAddHost">میزبان اضافه کنید</sys:String>
<sys:String x:Key="MainMenuActions">عمل کنند</sys:String>
<sys:String x:Key="MainMenuActionsExportSettings">پیکربندی صادرات</sys:String>
<sys:String x:Key="MainMenuActionsExportSubscribe">اشتراک صادرات</sys:String>
<sys:String x:Key="MainMenuActionsGetRoot">اکانت روت را فعال کنید</sys:String>
<sys:String x:Key="MainMenuLanguage">زبان</sys:String>
<sys:String x:Key="MainMenuLanguage">زبان(Language)</sys:String>
<sys:String x:Key="MainMenuLanguageEn">English</sys:String>
<sys:String x:Key="MainMenuLanguageCn">中文</sys:String>
<sys:String x:Key="MainMenuLanguageTw">正體</sys:String>
<sys:String x:Key="MainMenuLanguageFr">Fr</sys:String>
<sys:String x:Key="MainMenuLanguageFr">فارسی</sys:String>
<sys:String x:Key="MainMenuHelper">Helper</sys:String>
<sys:String x:Key="MainMenuHelper">یاور</sys:String>
<sys:String x:Key="MainMenuHelperGithub">Github</sys:String>
<sys:String x:Key="MainMenuHelperUseRoot">UseRoot</sys:String>
<sys:String x:Key="MainMenuHelperCertQuestion">CertQuestion</sys:String>
<sys:String x:Key="MainMenuHelperPrivateKey">PrivateKey</sys:String>
<sys:String x:Key="MainMenuHelperUseRoot">اکانت روت را فعال کنید</sys:String>
<sys:String x:Key="MainMenuHelperCertQuestion">در مورد گواهینامه</sys:String>
<sys:String x:Key="MainMenuHelperPrivateKey">در مورد سوال</sys:String>
<!--Main DataGrid-->
<sys:String x:Key="MainDataGridColumnTag">برچسب</sys:String>
<sys:String x:Key="MainDataGridColumnAddress">آدرس</sys:String>
<sys:String x:Key="MainDataGridColumnType">نوع</sys:String>
<sys:String x:Key="MainDataGridColumnAction">Action</sys:String>
<sys:String x:Key="MainDataGridColumnAction">عمل کنند</sys:String>
<sys:String x:Key="MainDataGridColumnActionInstall">نصب</sys:String>
<sys:String x:Key="MainDataGridColumnActionEdit">ویرایش</sys:String>
<sys:String x:Key="MainDataGridColumnActionViewConfig">ViewConfig</sys:String>
<sys:String x:Key="MainDataGridColumnActionDelete">Delete</sys:String>
<sys:String x:Key="MainDataGridColumnActionSortUp">Up</sys:String>
<sys:String x:Key="MainDataGridColumnActionSortDone">Done</sys:String>
<sys:String x:Key="MainDataGridColumnActionViewConfig">مشاهده پیکربندی</sys:String>
<sys:String x:Key="MainDataGridColumnActionDelete">حذف</sys:String>
<sys:String x:Key="MainDataGridColumnActionSortUp">بالاا</sys:String>
<sys:String x:Key="MainDataGridColumnActionSortDone">پایین</sys:String>
<!--Editor Window-->
@ -50,10 +50,11 @@
<sys:String x:Key="HostUserName">نام کاربری</sys:String>
<sys:String x:Key="HostPassword">رمز عبور</sys:String>
<sys:String x:Key="HostPort">پورت</sys:String>
<sys:String x:Key="HostSecretType">SecretType</sys:String>
<sys:String x:Key="HostUploadSecretKey">UploadKey</sys:String>
<sys:String x:Key="HostSecretType">نوع تأیید ورود</sys:String>
<sys:String x:Key="HostUploadSecretKey">کلید آپلود</sys:String>
<sys:String x:Key="HostSertTypePassword">رمز عبور</sys:String>
<sys:String x:Key="HostSertTypePrivateKey">PrivateKey</sys:String>
<sys:String x:Key="HostSertTypePrivateKey">کلید خصوصی</sys:String>
<sys:String x:Key="HostSertTypePrivateKeyPassPhrase">رمز عبور PK</sys:String>
<sys:String x:Key="ProxyGroupName">پروکسی</sys:String>
@ -90,8 +91,8 @@
<sys:String x:Key="XrayUUID">UUID</sys:String>
<sys:String x:Key="Flow">Flow</sys:String>
<sys:String x:Key="UTLS">uTLS</sys:String>
<sys:String x:Key="MultiUser">Multi User</sys:String>
<sys:String x:Key="MultiUserHelp">Multi Id split with ","</sys:String>
<sys:String x:Key="MultiUser">چند کاربره</sys:String>
<sys:String x:Key="MultiUserHelp">چند شناسه تقسیم با ","</sys:String>
<sys:String x:Key="VlessWsPath">VLESS WS Path</sys:String>
<sys:String x:Key="VlessKcpSeed">VLESS KCP Seed</sys:String>
<sys:String x:Key="VlessKcpType">VLESS KCP Type</sys:String>
@ -115,9 +116,10 @@
<sys:String x:Key="SSPort">SS Port</sys:String>
<sys:String x:Key="TrojanPassword">Trojan Pwd</sys:String>
<sys:String x:Key="TrojanPort">پورت تروجان</sys:String>
<sys:String x:Key="V2rayPort">v2ray Port</sys:String>
<sys:String x:Key="XrayPort">xray Port</sys:String>
<sys:String x:Key="XrayPortDefault">default port is 443</sys:String>
<sys:String x:Key="V2rayPort">v2ray بندر</sys:String>
<sys:String x:Key="XrayPort">xray بندر</sys:String>
<sys:String x:Key="XrayPortDefault">پورت پیش فرض 443 است</sys:String>
<sys:String x:Key="MoreParameters">پارامترهای بیشتر</sys:String>
<!--xray installer-->
<sys:String x:Key="XrayInstallerInstall">نصب</sys:String>

View file

@ -22,7 +22,7 @@
<sys:String x:Key="MainMenuLanguageEn">English</sys:String>
<sys:String x:Key="MainMenuLanguageCn">中文</sys:String>
<sys:String x:Key="MainMenuLanguageTw">正體</sys:String>
<sys:String x:Key="MainMenuLanguageFr">法语</sys:String>
<sys:String x:Key="MainMenuLanguageFr">فارسی</sys:String>
<sys:String x:Key="MainMenuHelper">幫助</sys:String>
<sys:String x:Key="MainMenuHelperGithub">Github</sys:String>
@ -55,6 +55,7 @@
<sys:String x:Key="HostUploadSecretKey">上傳Key</sys:String>
<sys:String x:Key="HostSertTypePassword">密碼</sys:String>
<sys:String x:Key="HostSertTypePrivateKey">私鑰</sys:String>
<sys:String x:Key="HostSertTypePrivateKeyPassPhrase">私鑰密碼</sys:String>
<sys:String x:Key="ProxyGroupName">代理</sys:String>
<sys:String x:Key="ProxyAddress">IP/地址</sys:String>
@ -119,6 +120,7 @@
<sys:String x:Key="V2rayPort">V2ray端口</sys:String>
<sys:String x:Key="XrayPort">XRAY端口</sys:String>
<sys:String x:Key="XrayPortDefault">默認端口443不建議修改</sys:String>
<sys:String x:Key="MoreParameters">更多參數</sys:String>
<!--xray installer-->
<sys:String x:Key="XrayInstallerInstall">一鍵安裝</sys:String>

View file

@ -22,7 +22,7 @@
<sys:String x:Key="MainMenuLanguageEn">English</sys:String>
<sys:String x:Key="MainMenuLanguageCn">中文</sys:String>
<sys:String x:Key="MainMenuLanguageTw">正體</sys:String>
<sys:String x:Key="MainMenuLanguageFr">法语</sys:String>
<sys:String x:Key="MainMenuLanguageFr">فارسی</sys:String>
<sys:String x:Key="MainMenuHelper">帮助</sys:String>
<sys:String x:Key="MainMenuHelperGithub">Github</sys:String>
@ -56,6 +56,7 @@
<sys:String x:Key="HostUploadSecretKey">上传Key</sys:String>
<sys:String x:Key="HostSertTypePassword">密码</sys:String>
<sys:String x:Key="HostSertTypePrivateKey">私钥</sys:String>
<sys:String x:Key="HostSertTypePrivateKeyPassPhrase">私钥密码</sys:String>
<sys:String x:Key="ProxyGroupName">代理</sys:String>
<sys:String x:Key="ProxyAddress">IP/地址</sys:String>
@ -120,6 +121,7 @@
<sys:String x:Key="V2rayPort">V2ray端口</sys:String>
<sys:String x:Key="XrayPort">XRAY端口</sys:String>
<sys:String x:Key="XrayPortDefault">默认端口443不建议修改</sys:String>
<sys:String x:Key="MoreParameters">更多参数</sys:String>
<!--xray installer-->
<sys:String x:Key="XrayInstallerInstall">一键安装</sys:String>

View file

@ -11,7 +11,7 @@
BorderBrush="#eee"
Icon="/Resources/ProxySU.ico"
WindowStartupLocation="CenterScreen"
Title="BrookEditorView" Height="600" Width="1000">
Title="BrookEditorView" Height="640" Width="1000">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="310" />

View file

@ -87,7 +87,10 @@
</DataGridTextColumn.Header>
</DataGridTextColumn>
<DataGridTemplateColumn Header="{DynamicResource MainDataGridColumnAction}" Width="400">
<DataGridTemplateColumn Width="400">
<DataGridTemplateColumn.Header>
<TextBlock Text="{DynamicResource MainDataGridColumnAction}" />
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<ItemContainerTemplate>
<StackPanel Orientation="Horizontal">

View file

@ -11,7 +11,7 @@
BorderBrush="#eee"
Icon="/Resources/ProxySU.ico"
WindowStartupLocation="CenterScreen"
Title="Hysteria编辑配置" Height="600" Width="1000">
Title="Hysteria编辑配置" Height="640" Width="1000">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="310" />

View file

@ -11,7 +11,7 @@
BorderBrush="#eee"
Icon="/Resources/ProxySU.ico"
WindowStartupLocation="CenterScreen"
Title="MTProto-Go编辑配置" Height="600" Width="1000">
Title="MTProto-Go编辑配置" Height="640" Width="1000">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="310" />

View file

@ -11,7 +11,7 @@
BorderBrush="#eee"
Icon="/Resources/ProxySU.ico"
WindowStartupLocation="CenterScreen"
Title="NaiveProxy编辑配置" Height="600" Width="1000">
Title="NaiveProxy编辑配置" Height="640" Width="1000">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="310" />

View file

@ -11,7 +11,7 @@
BorderBrush="#eee"
Icon="/Resources/ProxySU.ico"
WindowStartupLocation="CenterScreen"
Title="Trojan-Go编辑配置" Height="600" Width="1000">
Title="Trojan-Go编辑配置" Height="640" Width="1000">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="310" />

View file

@ -58,7 +58,14 @@ ProxySU调用[SSH.NET](https://github.com/sshnet/SSH.NET)库登录远程主机
* RSA in OpenSSL PEM and ssh.com format
* DSA in OpenSSL PEM and ssh.com format
* ECDSA 256/384/521 in OpenSSL PEM format
* ED25519 in OpenSSH key format
* ECDSA 256/384/521, ED25519 and RSA in OpenSSH key format
可以使用以下密码方法之一对私钥进行加密:
* DES-EDE3-CBC
* DES-EDE3-CFB
* DES-CBC
* AES-128-CBC
* AES-192-CBC
* AES-256-CBC
见官方说明:
https://github.com/sshnet/SSH.NET#public-key-authentication
如果当前拥有的密钥格式不是以上几种,可以下载[puttygen](https://www.puttygen.com/)工具,将其转换成上面的格式。
@ -108,7 +115,7 @@ Microsoft [.NET Framework 4.8](https://dotnet.microsoft.com/download/dotnet-fram
在使用遇到问题时,请先看一下[常见问题集锦](https://github.com/proxysu/windows/wiki/CommonError),如果还不能解决,可以到以上平台询问,个人精力有限,尽力解答。
下版本添加 【Hysteria】