mirror of
https://github.com/proxysu/ProxySU.git
synced 2024-11-25 06:36:08 +03:00
v2.5.1
This commit is contained in:
parent
e79607be2e
commit
55c7abf01c
@ -5,7 +5,7 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:local="clr-namespace:ProxySU"
|
xmlns:local="clr-namespace:ProxySU"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="ProxySU - v2.5.1 Beta2" Height="675" Width="660">
|
Title="ProxySU - v2.5.1" Height="675" Width="660">
|
||||||
<!--以下样式参考自:https://yq.aliyun.com/articles/331878
|
<!--以下样式参考自:https://yq.aliyun.com/articles/331878
|
||||||
https://docs.microsoft.co/en-us/dotnet/desktop-wpf/fundamentals/styles-templates-overview-->
|
https://docs.microsoft.co/en-us/dotnet/desktop-wpf/fundamentals/styles-templates-overview-->
|
||||||
<Window.Resources>
|
<Window.Resources>
|
||||||
|
@ -1355,13 +1355,13 @@ namespace ProxySU
|
|||||||
//currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
|
//currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
|
||||||
|
|
||||||
//备份原来的文件
|
//备份原来的文件
|
||||||
//functionResult = FileCheckExists(client, @"/usr/local/etc/v2ray/config.json");
|
functionResult = FileCheckExists(client, @"/usr/local/etc/v2ray/config.json");
|
||||||
//if (functionResult == true)
|
if (functionResult == true)
|
||||||
//{
|
{
|
||||||
|
|
||||||
sshShellCommand = @"mv /usr/local/etc/v2ray/config.json /usr/local/etc/v2ray/config.json.1";
|
sshShellCommand = @"mv /usr/local/etc/v2ray/config.json /usr/local/etc/v2ray/config.json.1";
|
||||||
currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
|
currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
|
||||||
//}
|
}
|
||||||
//读取配置文件各个模块
|
//读取配置文件各个模块
|
||||||
string logConfigJson = $"{pwdir}" + @"TemplateConfg\v2ray\server\00_log\00_log.json";
|
string logConfigJson = $"{pwdir}" + @"TemplateConfg\v2ray\server\00_log\00_log.json";
|
||||||
string apiConfigJson = $"{pwdir}" + @"TemplateConfg\v2ray\server\01_api\01_api.json";
|
string apiConfigJson = $"{pwdir}" + @"TemplateConfg\v2ray\server\01_api\01_api.json";
|
||||||
@ -1959,29 +1959,29 @@ namespace ProxySU
|
|||||||
{
|
{
|
||||||
//复合方案所需要的配置文件
|
//复合方案所需要的配置文件
|
||||||
//VLESS over TCP with XTLS模式
|
//VLESS over TCP with XTLS模式
|
||||||
string outboundsConfigJsons = $"{pwdir}" + @"TemplateConfg\v2ray\client\06_outbounds\vless_tcp_xtls_client_config.json";
|
//string outboundsConfigJsons = $"{pwdir}" + @"TemplateConfg\v2ray\client\06_outbounds\vless_tcp_xtls_client_config.json";
|
||||||
using (StreamReader readerJson = File.OpenText(outboundsConfigJsons))
|
//using (StreamReader readerJson = File.OpenText(outboundsConfigJsons))
|
||||||
{
|
//{
|
||||||
JObject jObjectJson = (JObject)JToken.ReadFrom(new JsonTextReader(readerJson));
|
// JObject jObjectJson = (JObject)JToken.ReadFrom(new JsonTextReader(readerJson));
|
||||||
|
|
||||||
//设置客户端的地址/端口/id
|
// //设置客户端的地址/端口/id
|
||||||
jObjectJson["outbounds"][0]["settings"]["vnext"][0]["address"] = ReceiveConfigurationParameters[4];
|
// jObjectJson["outbounds"][0]["settings"]["vnext"][0]["address"] = ReceiveConfigurationParameters[4];
|
||||||
jObjectJson["outbounds"][0]["settings"]["vnext"][0]["port"] = int.Parse(ReceiveConfigurationParameters[1]);
|
// jObjectJson["outbounds"][0]["settings"]["vnext"][0]["port"] = int.Parse(ReceiveConfigurationParameters[1]);
|
||||||
jObjectJson["outbounds"][0]["settings"]["vnext"][0]["users"][0]["id"] = ReceiveConfigurationParameters[2];
|
// jObjectJson["outbounds"][0]["settings"]["vnext"][0]["users"][0]["id"] = ReceiveConfigurationParameters[2];
|
||||||
|
|
||||||
clientJson["outbounds"] = jObjectJson["outbounds"];
|
// clientJson["outbounds"] = jObjectJson["outbounds"];
|
||||||
if (!Directory.Exists(@"v2ray_config\vless_tcp_xtls_client_config"))//如果不存在就创建file文件夹
|
// if (!Directory.Exists(@"v2ray_config\vless_tcp_xtls_client_config"))//如果不存在就创建file文件夹
|
||||||
{
|
// {
|
||||||
Directory.CreateDirectory(@"v2ray_config\vless_tcp_xtls_client_config");//创建该文件夹
|
// Directory.CreateDirectory(@"v2ray_config\vless_tcp_xtls_client_config");//创建该文件夹
|
||||||
}
|
// }
|
||||||
using (StreamWriter sw = new StreamWriter(@"v2ray_config\vless_tcp_xtls_client_config\config.json"))
|
// using (StreamWriter sw = new StreamWriter(@"v2ray_config\vless_tcp_xtls_client_config\config.json"))
|
||||||
{
|
// {
|
||||||
sw.Write(clientJson.ToString());
|
// sw.Write(clientJson.ToString());
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|
||||||
//VLESS over TCP with TLS模式
|
//VLESS over TCP with TLS模式
|
||||||
outboundsConfigJsons = $"{pwdir}" + @"TemplateConfg\v2ray\client\06_outbounds\vless_tcp_tls_caddy_cilent_config.json";
|
string outboundsConfigJsons = $"{pwdir}" + @"TemplateConfg\v2ray\client\06_outbounds\vless_tcp_tls_caddy_cilent_config.json";
|
||||||
using (StreamReader readerJson = File.OpenText(outboundsConfigJsons))
|
using (StreamReader readerJson = File.OpenText(outboundsConfigJsons))
|
||||||
{
|
{
|
||||||
JObject jObjectJson = (JObject)JToken.ReadFrom(new JsonTextReader(readerJson));
|
JObject jObjectJson = (JObject)JToken.ReadFrom(new JsonTextReader(readerJson));
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
<RowDefinition Height="0.12*"></RowDefinition>
|
<RowDefinition Height="0.12*"></RowDefinition>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<!-- V2Ray客户端配置参数 -->
|
<!-- V2Ray客户端配置参数 -->
|
||||||
<GroupBox Header="{DynamicResource GroupBoxHeaderClientParameter}" x:Name="GroupBoxV2rayClient" Visibility="Collapsed" Grid.Row="0">
|
<GroupBox Header="{DynamicResource GroupBoxHeaderClientParameter}" x:Name="GroupBoxV2rayClient" Visibility="Visible" Grid.Row="0">
|
||||||
<Grid >
|
<Grid >
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="0.5*"></ColumnDefinition>
|
<ColumnDefinition Width="0.5*"></ColumnDefinition>
|
||||||
@ -108,7 +108,7 @@
|
|||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
|
||||||
<!-- Xray客户端配置参数 -->
|
<!-- Xray客户端配置参数 -->
|
||||||
<GroupBox Header="{DynamicResource GroupBoxHeaderClientParameter}" x:Name="GroupBoxXrayClient" Visibility="Visible" Grid.Row="0">
|
<GroupBox Header="{DynamicResource GroupBoxHeaderClientParameter}" x:Name="GroupBoxXrayClient" Visibility="Collapsed" Grid.Row="0">
|
||||||
<Grid >
|
<Grid >
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="0.5*"></ColumnDefinition>
|
<ColumnDefinition Width="0.5*"></ColumnDefinition>
|
||||||
|
@ -61,6 +61,7 @@ namespace ProxySU
|
|||||||
GroupBoxClientQRandURL.Visibility = Visibility.Visible;
|
GroupBoxClientQRandURL.Visibility = Visibility.Visible;
|
||||||
GroupBoxClientSSpc.Visibility = Visibility.Collapsed;
|
GroupBoxClientSSpc.Visibility = Visibility.Collapsed;
|
||||||
GroupBoxV2rayClient.Visibility = Visibility.Visible;
|
GroupBoxV2rayClient.Visibility = Visibility.Visible;
|
||||||
|
GroupBoxXrayClient.Visibility = Visibility.Collapsed;
|
||||||
GroupBoxTrojanGoClient.Visibility = Visibility.Collapsed;
|
GroupBoxTrojanGoClient.Visibility = Visibility.Collapsed;
|
||||||
GroupBoxTrojanClient.Visibility = Visibility.Collapsed;
|
GroupBoxTrojanClient.Visibility = Visibility.Collapsed;
|
||||||
GroupBoxNaiveProxyClient.Visibility = Visibility.Collapsed;
|
GroupBoxNaiveProxyClient.Visibility = Visibility.Collapsed;
|
||||||
@ -382,7 +383,7 @@ namespace ProxySU
|
|||||||
GenerateV2rayVmessWsTlsShareQRcodeAndBase64Url();
|
GenerateV2rayVmessWsTlsShareQRcodeAndBase64Url();
|
||||||
|
|
||||||
GenerateV2rayTrojanShareQRcodeAndBase64Url();
|
GenerateV2rayTrojanShareQRcodeAndBase64Url();
|
||||||
RadioButtonVlessTcpXtls.IsChecked = true;
|
RadioButtonVlessTcpTls.IsChecked = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -726,6 +727,7 @@ namespace ProxySU
|
|||||||
GroupBoxClientQRandURL.Visibility = Visibility.Visible;
|
GroupBoxClientQRandURL.Visibility = Visibility.Visible;
|
||||||
GroupBoxClientSSpc.Visibility = Visibility.Collapsed;
|
GroupBoxClientSSpc.Visibility = Visibility.Collapsed;
|
||||||
GroupBoxV2rayClient.Visibility = Visibility.Collapsed;
|
GroupBoxV2rayClient.Visibility = Visibility.Collapsed;
|
||||||
|
GroupBoxXrayClient.Visibility = Visibility.Collapsed;
|
||||||
GroupBoxTrojanGoClient.Visibility = Visibility.Visible;
|
GroupBoxTrojanGoClient.Visibility = Visibility.Visible;
|
||||||
GroupBoxTrojanClient.Visibility = Visibility.Collapsed;
|
GroupBoxTrojanClient.Visibility = Visibility.Collapsed;
|
||||||
GroupBoxNaiveProxyClient.Visibility = Visibility.Collapsed;
|
GroupBoxNaiveProxyClient.Visibility = Visibility.Collapsed;
|
||||||
@ -788,6 +790,7 @@ namespace ProxySU
|
|||||||
GroupBoxClientQRandURL.Visibility = Visibility.Visible;
|
GroupBoxClientQRandURL.Visibility = Visibility.Visible;
|
||||||
GroupBoxClientSSpc.Visibility = Visibility.Collapsed;
|
GroupBoxClientSSpc.Visibility = Visibility.Collapsed;
|
||||||
GroupBoxV2rayClient.Visibility = Visibility.Collapsed;
|
GroupBoxV2rayClient.Visibility = Visibility.Collapsed;
|
||||||
|
GroupBoxXrayClient.Visibility = Visibility.Collapsed;
|
||||||
GroupBoxTrojanGoClient.Visibility = Visibility.Collapsed;
|
GroupBoxTrojanGoClient.Visibility = Visibility.Collapsed;
|
||||||
GroupBoxTrojanClient.Visibility = Visibility.Visible;
|
GroupBoxTrojanClient.Visibility = Visibility.Visible;
|
||||||
GroupBoxNaiveProxyClient.Visibility = Visibility.Collapsed;
|
GroupBoxNaiveProxyClient.Visibility = Visibility.Collapsed;
|
||||||
@ -812,6 +815,7 @@ namespace ProxySU
|
|||||||
GroupBoxClientQRandURL.Visibility = Visibility.Visible;
|
GroupBoxClientQRandURL.Visibility = Visibility.Visible;
|
||||||
GroupBoxClientSSpc.Visibility = Visibility.Collapsed;
|
GroupBoxClientSSpc.Visibility = Visibility.Collapsed;
|
||||||
GroupBoxV2rayClient.Visibility = Visibility.Collapsed;
|
GroupBoxV2rayClient.Visibility = Visibility.Collapsed;
|
||||||
|
GroupBoxXrayClient.Visibility = Visibility.Collapsed;
|
||||||
GroupBoxTrojanGoClient.Visibility = Visibility.Collapsed;
|
GroupBoxTrojanGoClient.Visibility = Visibility.Collapsed;
|
||||||
GroupBoxTrojanClient.Visibility = Visibility.Collapsed;
|
GroupBoxTrojanClient.Visibility = Visibility.Collapsed;
|
||||||
GroupBoxNaiveProxyClient.Visibility = Visibility.Visible;
|
GroupBoxNaiveProxyClient.Visibility = Visibility.Visible;
|
||||||
@ -831,6 +835,7 @@ namespace ProxySU
|
|||||||
GroupBoxClientQRandURL.Visibility = Visibility.Visible;
|
GroupBoxClientQRandURL.Visibility = Visibility.Visible;
|
||||||
GroupBoxClientSSpc.Visibility = Visibility.Collapsed;
|
GroupBoxClientSSpc.Visibility = Visibility.Collapsed;
|
||||||
GroupBoxV2rayClient.Visibility = Visibility.Collapsed;
|
GroupBoxV2rayClient.Visibility = Visibility.Collapsed;
|
||||||
|
GroupBoxXrayClient.Visibility = Visibility.Collapsed;
|
||||||
GroupBoxTrojanGoClient.Visibility = Visibility.Collapsed;
|
GroupBoxTrojanGoClient.Visibility = Visibility.Collapsed;
|
||||||
GroupBoxTrojanClient.Visibility = Visibility.Collapsed;
|
GroupBoxTrojanClient.Visibility = Visibility.Collapsed;
|
||||||
GroupBoxNaiveProxyClient.Visibility = Visibility.Collapsed;
|
GroupBoxNaiveProxyClient.Visibility = Visibility.Collapsed;
|
||||||
@ -861,6 +866,7 @@ namespace ProxySU
|
|||||||
GroupBoxClientQRandURL.Visibility = Visibility.Visible;
|
GroupBoxClientQRandURL.Visibility = Visibility.Visible;
|
||||||
GroupBoxClientSSpc.Visibility = Visibility.Collapsed;
|
GroupBoxClientSSpc.Visibility = Visibility.Collapsed;
|
||||||
GroupBoxV2rayClient.Visibility = Visibility.Collapsed;
|
GroupBoxV2rayClient.Visibility = Visibility.Collapsed;
|
||||||
|
GroupBoxXrayClient.Visibility = Visibility.Collapsed;
|
||||||
GroupBoxTrojanGoClient.Visibility = Visibility.Collapsed;
|
GroupBoxTrojanGoClient.Visibility = Visibility.Collapsed;
|
||||||
GroupBoxTrojanClient.Visibility = Visibility.Collapsed;
|
GroupBoxTrojanClient.Visibility = Visibility.Collapsed;
|
||||||
GroupBoxNaiveProxyClient.Visibility = Visibility.Collapsed;
|
GroupBoxNaiveProxyClient.Visibility = Visibility.Collapsed;
|
||||||
@ -967,6 +973,7 @@ namespace ProxySU
|
|||||||
GroupBoxClientQRandURL.Visibility = Visibility.Collapsed;
|
GroupBoxClientQRandURL.Visibility = Visibility.Collapsed;
|
||||||
GroupBoxClientSSpc.Visibility = Visibility.Collapsed;
|
GroupBoxClientSSpc.Visibility = Visibility.Collapsed;
|
||||||
GroupBoxV2rayClient.Visibility = Visibility.Collapsed;
|
GroupBoxV2rayClient.Visibility = Visibility.Collapsed;
|
||||||
|
GroupBoxXrayClient.Visibility = Visibility.Collapsed;
|
||||||
GroupBoxTrojanGoClient.Visibility = Visibility.Collapsed;
|
GroupBoxTrojanGoClient.Visibility = Visibility.Collapsed;
|
||||||
GroupBoxTrojanClient.Visibility = Visibility.Collapsed;
|
GroupBoxTrojanClient.Visibility = Visibility.Collapsed;
|
||||||
GroupBoxNaiveProxyClient.Visibility = Visibility.Collapsed;
|
GroupBoxNaiveProxyClient.Visibility = Visibility.Collapsed;
|
||||||
@ -1736,7 +1743,7 @@ namespace ProxySU
|
|||||||
|
|
||||||
//}
|
//}
|
||||||
|
|
||||||
// ImageShareQRcodeDefault = CreateQRCode(TextBoxURLDefault, $"v2ray_config\\{saveFileFolder}\\QR.bmp");
|
// ImageShareQRcodeDefault = CreateQRCode(TextBoxURLDefault, $"v2ray_config\\{saveFileFolder}\\QR.bmp");
|
||||||
// ImageShareQRcode.Source = ImageShareQRcodeDefault;
|
// ImageShareQRcode.Source = ImageShareQRcodeDefault;
|
||||||
|
|
||||||
|
|
||||||
@ -4256,7 +4263,7 @@ namespace ProxySU
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region SSR相关
|
#region SSR 相关
|
||||||
//生成SSR客户端资料
|
//生成SSR客户端资料
|
||||||
private void GenerateSSRShareQRcodeAndBase64Url()
|
private void GenerateSSRShareQRcodeAndBase64Url()
|
||||||
{
|
{
|
||||||
@ -4629,7 +4636,6 @@ namespace ProxySU
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
#region MTProto 界面控制
|
#region MTProto 界面控制
|
||||||
private void RadioButtonMtgIpv4_Checked(object sender, RoutedEventArgs e)
|
private void RadioButtonMtgIpv4_Checked(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
|
Binary file not shown.
@ -6,8 +6,7 @@
|
|||||||
"settings": {
|
"settings": {
|
||||||
"clients": [
|
"clients": [
|
||||||
{
|
{
|
||||||
"id": null,
|
"id": null
|
||||||
"flow": "xtls-rprx-direct"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"decryption": "none",
|
"decryption": "none",
|
||||||
@ -35,7 +34,7 @@
|
|||||||
},
|
},
|
||||||
"streamSettings": {
|
"streamSettings": {
|
||||||
"network": "tcp",
|
"network": "tcp",
|
||||||
"security": "xtls",
|
"security": "tls",
|
||||||
"xtlsSettings": {
|
"xtlsSettings": {
|
||||||
"alpn": [
|
"alpn": [
|
||||||
"http/1.1"
|
"http/1.1"
|
||||||
|
Loading…
Reference in New Issue
Block a user