mirror of
https://github.com/proxysu/ProxySU.git
synced 2024-11-22 13:16:09 +03:00
review
This commit is contained in:
parent
5957f49537
commit
95380c5e47
@ -37,6 +37,8 @@ namespace ProxySU_Core.Models.Developers
|
|||||||
public static int Trojan_TCP_Port = 1310;
|
public static int Trojan_TCP_Port = 1310;
|
||||||
public static int Trojan_WS_Port = 1311;
|
public static int Trojan_WS_Port = 1311;
|
||||||
|
|
||||||
|
public static int FullbackPort = 8080;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static dynamic LoadXrayConfig()
|
public static dynamic LoadXrayConfig()
|
||||||
@ -71,15 +73,7 @@ namespace ProxySU_Core.Models.Developers
|
|||||||
{
|
{
|
||||||
var caddyStr = File.ReadAllText(Path.Combine(CaddyFileDir, "base.caddyfile"));
|
var caddyStr = File.ReadAllText(Path.Combine(CaddyFileDir, "base.caddyfile"));
|
||||||
caddyStr = caddyStr.Replace("##domain##", parameters.Domain);
|
caddyStr = caddyStr.Replace("##domain##", parameters.Domain);
|
||||||
|
caddyStr = caddyStr.Replace("##port##", FullbackPort.ToString());
|
||||||
if (parameters.Port != 443)
|
|
||||||
{
|
|
||||||
caddyStr = caddyStr.Replace(":##port##", "");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
caddyStr = caddyStr.Replace("##port##", 80.ToString());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!useCustomWeb && !string.IsNullOrEmpty(parameters.MaskDomain))
|
if (!useCustomWeb && !string.IsNullOrEmpty(parameters.MaskDomain))
|
||||||
{
|
{
|
||||||
@ -109,7 +103,7 @@ namespace ProxySU_Core.Models.Developers
|
|||||||
baseBound.port = parameters.Port;
|
baseBound.port = parameters.Port;
|
||||||
baseBound.settings.fallbacks.Add(JToken.FromObject(new
|
baseBound.settings.fallbacks.Add(JToken.FromObject(new
|
||||||
{
|
{
|
||||||
dest = 80
|
dest = FullbackPort
|
||||||
}));
|
}));
|
||||||
xrayConfig.inbounds.Add(baseBound);
|
xrayConfig.inbounds.Add(baseBound);
|
||||||
baseBound.settings.clients[0].id = parameters.UUID;
|
baseBound.settings.clients[0].id = parameters.UUID;
|
||||||
@ -129,7 +123,7 @@ namespace ProxySU_Core.Models.Developers
|
|||||||
xrayConfig.inbounds.Add(JToken.FromObject(wsInbound));
|
xrayConfig.inbounds.Add(JToken.FromObject(wsInbound));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(parameters.Types.Contains(XrayType.VLESS_gRPC))
|
if (parameters.Types.Contains(XrayType.VLESS_gRPC))
|
||||||
{
|
{
|
||||||
var gRPCInBound = GetBound("VLESS_gRPC.json");
|
var gRPCInBound = GetBound("VLESS_gRPC.json");
|
||||||
gRPCInBound.port = parameters.VLESS_gRPC_Port;
|
gRPCInBound.port = parameters.VLESS_gRPC_Port;
|
||||||
@ -138,7 +132,7 @@ namespace ProxySU_Core.Models.Developers
|
|||||||
xrayConfig.inbounds.Add(JToken.FromObject(gRPCInBound));
|
xrayConfig.inbounds.Add(JToken.FromObject(gRPCInBound));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(parameters.Types.Contains(XrayType.VLESS_KCP))
|
if (parameters.Types.Contains(XrayType.VLESS_KCP))
|
||||||
{
|
{
|
||||||
var kcpBound = GetBound("VLESS_KCP.json");
|
var kcpBound = GetBound("VLESS_KCP.json");
|
||||||
kcpBound.port = parameters.VLESS_KCP_Port;
|
kcpBound.port = parameters.VLESS_KCP_Port;
|
||||||
@ -193,6 +187,7 @@ namespace ProxySU_Core.Models.Developers
|
|||||||
var trojanTcpBound = GetBound("Trojan_TCP.json");
|
var trojanTcpBound = GetBound("Trojan_TCP.json");
|
||||||
trojanTcpBound.port = Trojan_TCP_Port;
|
trojanTcpBound.port = Trojan_TCP_Port;
|
||||||
trojanTcpBound.settings.clients[0].password = parameters.TrojanPassword;
|
trojanTcpBound.settings.clients[0].password = parameters.TrojanPassword;
|
||||||
|
trojanTcpBound.settings.fallbacks[0].dest = FullbackPort;
|
||||||
baseBound.settings.fallbacks[0] = JToken.FromObject(new
|
baseBound.settings.fallbacks[0] = JToken.FromObject(new
|
||||||
{
|
{
|
||||||
dest = Trojan_TCP_Port,
|
dest = Trojan_TCP_Port,
|
||||||
|
@ -101,7 +101,7 @@ namespace ProxySU_Core.Models.Developers
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Uninstall()
|
public void UninstallProxy()
|
||||||
{
|
{
|
||||||
EnsureRootAuth();
|
EnsureRootAuth();
|
||||||
WriteOutput("卸载Caddy");
|
WriteOutput("卸载Caddy");
|
||||||
@ -149,13 +149,11 @@ namespace ProxySU_Core.Models.Developers
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 重装Caddy
|
/// 重装Caddy
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void ReinstallCaddy()
|
public void DoUninstallCaddy()
|
||||||
{
|
{
|
||||||
EnsureRootAuth();
|
EnsureRootAuth();
|
||||||
EnsureSystemEnv();
|
UninstallCaddy();
|
||||||
InstallCaddy();
|
WriteOutput("************ 卸载Caddy完成 ************");
|
||||||
UploadCaddyFile();
|
|
||||||
WriteOutput("************ 重装Caddy完成 ************");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -204,29 +204,4 @@ namespace ProxySU_Core.Models
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public enum XrayType
|
|
||||||
{
|
|
||||||
// 入口
|
|
||||||
VLESS_TCP_XTLS = 100,
|
|
||||||
|
|
||||||
// VLESS 101开头
|
|
||||||
VLESS_TCP = 101,
|
|
||||||
VLESS_WS = 102,
|
|
||||||
VLESS_H2 = 103,
|
|
||||||
VLESS_KCP = 104,
|
|
||||||
VLESS_gRPC = 110,
|
|
||||||
|
|
||||||
// VMESS 201开头
|
|
||||||
VMESS_TCP = 201,
|
|
||||||
VMESS_WS = 202,
|
|
||||||
VMESS_H2 = 203,
|
|
||||||
VMESS_KCP = 204,
|
|
||||||
|
|
||||||
// Trojan 301开头
|
|
||||||
Trojan_TCP = 301,
|
|
||||||
Trojan_WS = 302,
|
|
||||||
|
|
||||||
// SS
|
|
||||||
ShadowsocksAEAD = 401
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
34
ProxySU_Core/Models/XrayType.cs
Normal file
34
ProxySU_Core/Models/XrayType.cs
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace ProxySU_Core.Models
|
||||||
|
{
|
||||||
|
public enum XrayType
|
||||||
|
{
|
||||||
|
// 入口
|
||||||
|
VLESS_TCP_XTLS = 100,
|
||||||
|
|
||||||
|
// VLESS 101开头
|
||||||
|
VLESS_TCP = 101,
|
||||||
|
VLESS_WS = 102,
|
||||||
|
VLESS_H2 = 103,
|
||||||
|
VLESS_KCP = 104,
|
||||||
|
VLESS_gRPC = 110,
|
||||||
|
|
||||||
|
// VMESS 201开头
|
||||||
|
VMESS_TCP = 201,
|
||||||
|
VMESS_WS = 202,
|
||||||
|
VMESS_H2 = 203,
|
||||||
|
VMESS_KCP = 204,
|
||||||
|
|
||||||
|
// Trojan 301开头
|
||||||
|
Trojan_TCP = 301,
|
||||||
|
Trojan_WS = 302,
|
||||||
|
|
||||||
|
// SS
|
||||||
|
ShadowsocksAEAD = 401
|
||||||
|
}
|
||||||
|
}
|
@ -89,6 +89,9 @@
|
|||||||
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="QRCoder, Version=1.4.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\QRCoder.1.4.1\lib\net40\QRCoder.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="Renci.SshNet, Version=2020.0.1.0, Culture=neutral, PublicKeyToken=1cee9f8bde3db106, processorArchitecture=MSIL">
|
<Reference Include="Renci.SshNet, Version=2020.0.1.0, Culture=neutral, PublicKeyToken=1cee9f8bde3db106, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\SSH.NET.2020.0.1\lib\net40\Renci.SshNet.dll</HintPath>
|
<HintPath>..\packages\SSH.NET.2020.0.1\lib\net40\Renci.SshNet.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
@ -96,6 +99,7 @@
|
|||||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||||
<Reference Include="System.Configuration" />
|
<Reference Include="System.Configuration" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Drawing" />
|
||||||
<Reference Include="System.Web" />
|
<Reference Include="System.Web" />
|
||||||
<Reference Include="System.Web.Extensions" />
|
<Reference Include="System.Web.Extensions" />
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
@ -126,6 +130,7 @@
|
|||||||
<Compile Include="Models\Host.cs" />
|
<Compile Include="Models\Host.cs" />
|
||||||
<Compile Include="Models\ShareLink.cs" />
|
<Compile Include="Models\ShareLink.cs" />
|
||||||
<Compile Include="Models\XraySettings.cs" />
|
<Compile Include="Models\XraySettings.cs" />
|
||||||
|
<Compile Include="Models\XrayType.cs" />
|
||||||
<Compile Include="Tools\DateTimeUtils.cs" />
|
<Compile Include="Tools\DateTimeUtils.cs" />
|
||||||
<Compile Include="Tools\Extensions.cs" />
|
<Compile Include="Tools\Extensions.cs" />
|
||||||
<Compile Include="ViewModels\BaseCommand.cs" />
|
<Compile Include="ViewModels\BaseCommand.cs" />
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
##domain##:##port## {
|
:##port## {
|
||||||
root * /usr/share/caddy
|
root * /usr/share/caddy
|
||||||
file_server
|
file_server
|
||||||
##reverse_proxy##
|
##reverse_proxy##
|
||||||
}
|
}
|
||||||
|
|
||||||
|
##domain##:80 {
|
||||||
|
redir https://##domain##{uri}
|
||||||
|
}
|
@ -10,7 +10,7 @@
|
|||||||
],
|
],
|
||||||
"fallbacks": [
|
"fallbacks": [
|
||||||
{
|
{
|
||||||
"dest": 80
|
"dest": 8080
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"port": 2002,
|
"port": 2002,
|
||||||
|
"listen": "127.0.0.1",
|
||||||
"protocol": "vless",
|
"protocol": "vless",
|
||||||
"settings": {
|
"settings": {
|
||||||
"clients": [
|
"clients": [
|
||||||
|
@ -6,18 +6,26 @@
|
|||||||
xmlns:metro="http://metro.mahapps.com/winfx/xaml/controls"
|
xmlns:metro="http://metro.mahapps.com/winfx/xaml/controls"
|
||||||
xmlns:local="clr-namespace:ProxySU_Core.Views.ClientInfo"
|
xmlns:local="clr-namespace:ProxySU_Core.Views.ClientInfo"
|
||||||
xmlns:dev="clr-namespace:ProxySU_Core.Models.Developers"
|
xmlns:dev="clr-namespace:ProxySU_Core.Models.Developers"
|
||||||
|
xmlns:models="clr-namespace:ProxySU_Core.Models"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="查看配置" Height="500" Width="800">
|
Title="查看配置" Height="500" Width="800">
|
||||||
|
|
||||||
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<TabControl BorderThickness="0,1,0,0" BorderBrush="#DDD">
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
<ColumnDefinition Width="200" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<TabControl Grid.Column="0" BorderThickness="0,1,0,0" BorderBrush="#DDD">
|
||||||
<TabItem metro:HeaderedControlHelper.HeaderFontSize="20" Padding="10,5,10,5" Header="VLESS">
|
<TabItem metro:HeaderedControlHelper.HeaderFontSize="20" Padding="10,5,10,5" Header="VLESS">
|
||||||
<TabControl
|
<TabControl
|
||||||
Background="#fff"
|
Background="#fff"
|
||||||
|
SelectionChanged="BuildQrCode"
|
||||||
Style="{StaticResource MaterialDesignNavigatilRailTabControl}"
|
Style="{StaticResource MaterialDesignNavigatilRailTabControl}"
|
||||||
Padding="10">
|
Padding="10">
|
||||||
<TabItem Width="200"
|
<TabItem Width="200"
|
||||||
|
Tag="{x:Static models:XrayType.VLESS_TCP_XTLS}"
|
||||||
IsEnabled="{Binding Settings.Checked_VLESS_TCP_XTLS}"
|
IsEnabled="{Binding Settings.Checked_VLESS_TCP_XTLS}"
|
||||||
Style="{StaticResource MaterialDesignNavigationRailTabItem}"
|
Style="{StaticResource MaterialDesignNavigationRailTabItem}"
|
||||||
Header="VLESS-TCP-XTLS">
|
Header="VLESS-TCP-XTLS">
|
||||||
@ -25,6 +33,7 @@
|
|||||||
</TabItem>
|
</TabItem>
|
||||||
|
|
||||||
<TabItem Width="200"
|
<TabItem Width="200"
|
||||||
|
Tag="{x:Static models:XrayType.VLESS_TCP}"
|
||||||
IsEnabled="{Binding Settings.Checked_VLESS_TCP}"
|
IsEnabled="{Binding Settings.Checked_VLESS_TCP}"
|
||||||
Style="{StaticResource MaterialDesignNavigationRailTabItem}"
|
Style="{StaticResource MaterialDesignNavigationRailTabItem}"
|
||||||
Header="VLESS-TCP-TLS">
|
Header="VLESS-TCP-TLS">
|
||||||
@ -32,6 +41,7 @@
|
|||||||
</TabItem>
|
</TabItem>
|
||||||
|
|
||||||
<TabItem Width="200"
|
<TabItem Width="200"
|
||||||
|
Tag="{x:Static models:XrayType.VLESS_WS}"
|
||||||
IsEnabled="{Binding Settings.Checked_VLESS_WS}"
|
IsEnabled="{Binding Settings.Checked_VLESS_WS}"
|
||||||
Style="{StaticResource MaterialDesignNavigationRailTabItem}"
|
Style="{StaticResource MaterialDesignNavigationRailTabItem}"
|
||||||
Header="VLESS-WebSocket-TLS">
|
Header="VLESS-WebSocket-TLS">
|
||||||
@ -39,38 +49,43 @@
|
|||||||
</TabItem>
|
</TabItem>
|
||||||
|
|
||||||
<TabItem Width="200"
|
<TabItem Width="200"
|
||||||
|
Tag="{x:Static models:XrayType.VLESS_KCP}"
|
||||||
IsEnabled="{Binding Settings.Checked_VLESS_KCP}"
|
IsEnabled="{Binding Settings.Checked_VLESS_KCP}"
|
||||||
Style="{StaticResource MaterialDesignNavigationRailTabItem}"
|
Style="{StaticResource MaterialDesignNavigationRailTabItem}"
|
||||||
Header="VLESS-mKCP">
|
Header="VLESS-mKCP">
|
||||||
<local:VLESS_KCP_Control />
|
<local:VLESS_KCP_Control />
|
||||||
</TabItem>
|
</TabItem>
|
||||||
|
|
||||||
<TabItem Width="200"
|
<!--<TabItem Width="200"
|
||||||
IsEnabled="{Binding Settings.Checked_VLESS_gRPC}"
|
IsEnabled="{Binding Settings.Checked_VLESS_gRPC}"
|
||||||
Style="{StaticResource MaterialDesignNavigationRailTabItem}"
|
Style="{StaticResource MaterialDesignNavigationRailTabItem}"
|
||||||
Header="VLESS-gRPC">
|
Header="VLESS-gRPC">
|
||||||
<local:VLESS_gRPC_Control />
|
<local:VLESS_gRPC_Control />
|
||||||
</TabItem>
|
</TabItem>-->
|
||||||
</TabControl>
|
</TabControl>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
|
|
||||||
<TabItem metro:HeaderedControlHelper.HeaderFontSize="20" Padding="10,5,10,5" Header="VMESS">
|
<TabItem metro:HeaderedControlHelper.HeaderFontSize="20" Padding="10,5,10,5" Header="VMESS">
|
||||||
<TabControl
|
<TabControl
|
||||||
|
SelectionChanged="BuildQrCode"
|
||||||
Padding="10"
|
Padding="10"
|
||||||
Style="{StaticResource MaterialDesignNavigatilRailTabControl}">
|
Style="{StaticResource MaterialDesignNavigatilRailTabControl}">
|
||||||
<TabItem Width="200"
|
<TabItem Width="200"
|
||||||
|
Tag="{x:Static models:XrayType.VMESS_TCP}"
|
||||||
IsEnabled="{Binding Settings.Checked_VMESS_TCP}"
|
IsEnabled="{Binding Settings.Checked_VMESS_TCP}"
|
||||||
Style="{StaticResource MaterialDesignNavigationRailTabItem}"
|
Style="{StaticResource MaterialDesignNavigationRailTabItem}"
|
||||||
Header="VMESS-TCP-TLS">
|
Header="VMESS-TCP-TLS">
|
||||||
<local:VMESS_TCP_TLS_Control />
|
<local:VMESS_TCP_TLS_Control />
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Width="200"
|
<TabItem Width="200"
|
||||||
|
Tag="{x:Static models:XrayType.VMESS_WS}"
|
||||||
IsEnabled="{Binding Settings.Checked_VMESS_WS}"
|
IsEnabled="{Binding Settings.Checked_VMESS_WS}"
|
||||||
Style="{StaticResource MaterialDesignNavigationRailTabItem}"
|
Style="{StaticResource MaterialDesignNavigationRailTabItem}"
|
||||||
Header="VMESS-WebSocket-TLS">
|
Header="VMESS-WebSocket-TLS">
|
||||||
<local:VMESS_WS_TLS_Control />
|
<local:VMESS_WS_TLS_Control />
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Width="200"
|
<TabItem Width="200"
|
||||||
|
Tag="{x:Static models:XrayType.VMESS_KCP}"
|
||||||
IsEnabled="{Binding Settings.Checked_VMESS_KCP}"
|
IsEnabled="{Binding Settings.Checked_VMESS_KCP}"
|
||||||
Style="{StaticResource MaterialDesignNavigationRailTabItem}"
|
Style="{StaticResource MaterialDesignNavigationRailTabItem}"
|
||||||
Header="VMESS-mKCP">
|
Header="VMESS-mKCP">
|
||||||
@ -81,9 +96,11 @@
|
|||||||
|
|
||||||
<TabItem metro:HeaderedControlHelper.HeaderFontSize="20" Padding="10,5,10,5" Header="Trojan">
|
<TabItem metro:HeaderedControlHelper.HeaderFontSize="20" Padding="10,5,10,5" Header="Trojan">
|
||||||
<TabControl
|
<TabControl
|
||||||
|
SelectionChanged="BuildQrCode"
|
||||||
Padding="10"
|
Padding="10"
|
||||||
Style="{StaticResource MaterialDesignNavigatilRailTabControl}">
|
Style="{StaticResource MaterialDesignNavigatilRailTabControl}">
|
||||||
<TabItem Width="200"
|
<TabItem Width="200"
|
||||||
|
Tag="{x:Static models:XrayType.Trojan_TCP}"
|
||||||
IsEnabled="{Binding Settings.Checked_Trojan_TCP}"
|
IsEnabled="{Binding Settings.Checked_Trojan_TCP}"
|
||||||
Style="{StaticResource MaterialDesignNavigationRailTabItem}"
|
Style="{StaticResource MaterialDesignNavigationRailTabItem}"
|
||||||
Header="Trojan-TCP">
|
Header="Trojan-TCP">
|
||||||
@ -94,9 +111,11 @@
|
|||||||
|
|
||||||
<TabItem metro:HeaderedControlHelper.HeaderFontSize="20" Padding="10,5,10,5" Header="ShadowSocks">
|
<TabItem metro:HeaderedControlHelper.HeaderFontSize="20" Padding="10,5,10,5" Header="ShadowSocks">
|
||||||
<TabControl
|
<TabControl
|
||||||
|
SelectionChanged="BuildQrCode"
|
||||||
Padding="10"
|
Padding="10"
|
||||||
Style="{StaticResource MaterialDesignNavigatilRailTabControl}">
|
Style="{StaticResource MaterialDesignNavigatilRailTabControl}">
|
||||||
<TabItem Width="200"
|
<TabItem Width="200"
|
||||||
|
Tag="{x:Static models:XrayType.ShadowsocksAEAD}"
|
||||||
IsEnabled="{Binding Settings.CheckedShadowSocks}"
|
IsEnabled="{Binding Settings.CheckedShadowSocks}"
|
||||||
Style="{StaticResource MaterialDesignNavigationRailTabItem}"
|
Style="{StaticResource MaterialDesignNavigationRailTabItem}"
|
||||||
Header="ShadowSocks">
|
Header="ShadowSocks">
|
||||||
@ -105,5 +124,7 @@
|
|||||||
</TabControl>
|
</TabControl>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
</TabControl>
|
</TabControl>
|
||||||
|
|
||||||
|
<Image Grid.Column="1" Width="150" Height="150" x:Name="QrImage" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</metro:MetroWindow>
|
</metro:MetroWindow>
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
using ProxySU_Core.Models;
|
using ProxySU_Core.Models;
|
||||||
using ProxySU_Core.ViewModels;
|
using ProxySU_Core.ViewModels;
|
||||||
|
using QRCoder;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@ -32,5 +35,71 @@ namespace ProxySU_Core.Views.ClientInfo
|
|||||||
Settings = new XraySettingsViewModel(record.Settings);
|
Settings = new XraySettingsViewModel(record.Settings);
|
||||||
DataContext = this;
|
DataContext = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void BuildQrCode(object sender, SelectionChangedEventArgs e)
|
||||||
|
{
|
||||||
|
var tabControl = e.Source as TabControl;
|
||||||
|
var item = (tabControl.SelectedItem as TabItem);
|
||||||
|
var type = (XrayType)item.Tag;
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
xmlns:metro="http://metro.mahapps.com/winfx/xaml/controls"
|
xmlns:metro="http://metro.mahapps.com/winfx/xaml/controls"
|
||||||
xmlns:mah="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
|
xmlns:mah="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
|
||||||
TextElement.FontSize="14"
|
TextElement.FontSize="14"
|
||||||
Title="ProxySU Core" Height="800" Width="1200">
|
Title="ProxySU Core" Height="670" Width="1050">
|
||||||
|
|
||||||
<mah:MetroWindow.LeftWindowCommands>
|
<mah:MetroWindow.LeftWindowCommands>
|
||||||
<mah:WindowCommands>
|
<mah:WindowCommands>
|
||||||
@ -44,16 +44,18 @@
|
|||||||
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<TabControl
|
<TabControl
|
||||||
|
BorderThickness="0,1,0,0"
|
||||||
|
BorderBrush="#DDD"
|
||||||
|
|
||||||
Background="#fff"
|
Background="#fff"
|
||||||
Style="{StaticResource MaterialDesignNavigatilRailTabControl}"
|
Padding="20">
|
||||||
Padding="10">
|
|
||||||
<TabItem
|
<TabItem
|
||||||
Width="160"
|
Width="160"
|
||||||
|
Height="40"
|
||||||
Style="{StaticResource MaterialDesignNavigationRailTabItem}"
|
Style="{StaticResource MaterialDesignNavigationRailTabItem}"
|
||||||
Header="{DynamicResource TabItemHeaderAppDeployment}">
|
Header="{DynamicResource TabItemHeaderAppDeployment}">
|
||||||
<StackPanel Orientation="Vertical">
|
<StackPanel Orientation="Vertical">
|
||||||
|
<StackPanel HorizontalAlignment="Left" Orientation="Horizontal" Margin="5,0,0,0">
|
||||||
<StackPanel HorizontalAlignment="Left" Orientation="Horizontal">
|
|
||||||
<Button
|
<Button
|
||||||
Content="{DynamicResource AddHost}"
|
Content="{DynamicResource AddHost}"
|
||||||
Click="AddHost"
|
Click="AddHost"
|
||||||
@ -73,7 +75,7 @@
|
|||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<DataGrid ItemsSource="{Binding Records}"
|
<DataGrid ItemsSource="{Binding Records}"
|
||||||
Margin="0,20,0,0"
|
Margin="0,10,0,0"
|
||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
x:Name="DataGrid"
|
x:Name="DataGrid"
|
||||||
CellStyle="{StaticResource DataGridCell}"
|
CellStyle="{StaticResource DataGridCell}"
|
||||||
@ -83,7 +85,9 @@
|
|||||||
BorderBrush="#eee"
|
BorderBrush="#eee"
|
||||||
BorderThickness="1"
|
BorderThickness="1"
|
||||||
VerticalScrollBarVisibility="Auto"
|
VerticalScrollBarVisibility="Auto"
|
||||||
|
HorizontalScrollBarVisibility="Auto"
|
||||||
Height="500"
|
Height="500"
|
||||||
|
Width="1000"
|
||||||
AutoGenerateColumns="False">
|
AutoGenerateColumns="False">
|
||||||
<DataGrid.Columns>
|
<DataGrid.Columns>
|
||||||
<DataGridCheckBoxColumn Header="选择"
|
<DataGridCheckBoxColumn Header="选择"
|
||||||
@ -92,10 +96,10 @@
|
|||||||
Width="80"/>
|
Width="80"/>
|
||||||
<DataGridTextColumn Header="{DynamicResource HostTag}"
|
<DataGridTextColumn Header="{DynamicResource HostTag}"
|
||||||
Binding="{Binding Path=Host.Tag}"
|
Binding="{Binding Path=Host.Tag}"
|
||||||
Width="150"/>
|
Width="180"/>
|
||||||
<DataGridTextColumn Header="{DynamicResource HostAddress}"
|
<DataGridTextColumn Header="{DynamicResource HostAddress}"
|
||||||
Binding="{Binding Path=Host.Address}"
|
Binding="{Binding Path=Host.Address}"
|
||||||
Width="200"/>
|
Width="180"/>
|
||||||
<DataGridTextColumn Header="{DynamicResource HostPort}"
|
<DataGridTextColumn Header="{DynamicResource HostPort}"
|
||||||
Binding="{Binding Path=Host.Port}"
|
Binding="{Binding Path=Host.Port}"
|
||||||
Width="100"/>
|
Width="100"/>
|
||||||
@ -126,17 +130,19 @@
|
|||||||
|
|
||||||
<TabItem
|
<TabItem
|
||||||
Width="160"
|
Width="160"
|
||||||
|
Height="40"
|
||||||
|
FontSize="15"
|
||||||
Style="{StaticResource MaterialDesignNavigationRailTabItem}"
|
Style="{StaticResource MaterialDesignNavigationRailTabItem}"
|
||||||
Header="说明文档">
|
Header="说明文档">
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<StackPanel Margin="0,10,0,0">
|
<StackPanel Margin="0,0,0,0">
|
||||||
<TextBlock Text="新书指引:" FontWeight="Black" />
|
<TextBlock Margin="0,0,0,5" Text="新书指引:" FontWeight="Black" />
|
||||||
<TextBlock Text="1. 【添加主机】,填写主机信息及节点配置信息,保存。" />
|
<TextBlock Text="1. 【添加主机】,填写主机信息及节点配置信息,保存。" />
|
||||||
<TextBlock Text="2. 点【控制台】,自动连接主机,连接成功后,点【一键安装】,待输出 “请尽情享用吧” 代表安装完成。" />
|
<TextBlock Text="2. 点【控制台】,自动连接主机,连接成功后,点【一键安装】,待输出 “请尽情享用吧” 代表安装完成。" />
|
||||||
<TextBlock Text="3. 在【查看配置】中可以查看节点配置信息,选中【导出配置】可以复制所有节点的分享拦截。" />
|
<TextBlock Text="3. 在【查看配置】中可以查看节点配置信息,选中【导出配置】可以复制所有节点的分享拦截。" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel Margin="0,10,0,0">
|
<StackPanel Margin="0,20,0,0">
|
||||||
<TextBlock Text="自定义功能" FontWeight="Black" />
|
<TextBlock Margin="0,0,0,5" Text="自定义功能" FontWeight="Black" />
|
||||||
<TextBlock Text="【更新配置】:用户想修改节点的信息,比如增加一个websocket或修改用户id,在【编辑】中修改保存后,不需要重新安装了,这个功能就可以更新配置。" />
|
<TextBlock Text="【更新配置】:用户想修改节点的信息,比如增加一个websocket或修改用户id,在【编辑】中修改保存后,不需要重新安装了,这个功能就可以更新配置。" />
|
||||||
<TextBlock Text="【更新内核】:更新官方xray-core的最新版本。" />
|
<TextBlock Text="【更新内核】:更新官方xray-core的最新版本。" />
|
||||||
<TextBlock Text="【卸载代理】:卸载 域名证书、caddy服务、xray内核,一些安装过程中的基础功能,不影响不卸载,会影响到您的系统,请自行处理。" />
|
<TextBlock Text="【卸载代理】:卸载 域名证书、caddy服务、xray内核,一些安装过程中的基础功能,不影响不卸载,会影响到您的系统,请自行处理。" />
|
||||||
@ -144,8 +150,8 @@
|
|||||||
<TextBlock Text="【上传证书】:上传自有证书,将您的证书 crt 和 key 文件打包zip上传即可。" />
|
<TextBlock Text="【上传证书】:上传自有证书,将您的证书 crt 和 key 文件打包zip上传即可。" />
|
||||||
<TextBlock Text="【上传网站】:上传伪装静态网站,静态网站必须根目录有一个index.html文件,请自行检查。" />
|
<TextBlock Text="【上传网站】:上传伪装静态网站,静态网站必须根目录有一个index.html文件,请自行检查。" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel Margin="0,10,0,0">
|
<StackPanel Margin="0,20,0,0">
|
||||||
<TextBlock Text="关于v3版本:" FontWeight="Black" />
|
<TextBlock Margin="0,0,0,5" Text="关于v3版本:" FontWeight="Black" />
|
||||||
<TextBlock Text="初步以xray为基础,方便自动安装、修改、卸载,看建议再考虑其他方式,如有需要请先用v2的版本。" />
|
<TextBlock Text="初步以xray为基础,方便自动安装、修改、卸载,看建议再考虑其他方式,如有需要请先用v2的版本。" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
@ -166,6 +166,19 @@ namespace ProxySU_Core
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void DeleteHost(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (DataGrid.SelectedItem is RecordViewModel project)
|
||||||
|
{
|
||||||
|
var result = MessageBox.Show($"您确认删除主机{project.Host.Tag}吗?", "提示", MessageBoxButton.OKCancel);
|
||||||
|
if (result == MessageBoxResult.OK)
|
||||||
|
{
|
||||||
|
Records.Remove(project);
|
||||||
|
SaveRecord();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void ShowClientInfo(object sender, RoutedEventArgs e)
|
private void ShowClientInfo(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
if (DataGrid.SelectedItem is RecordViewModel project)
|
if (DataGrid.SelectedItem is RecordViewModel project)
|
||||||
@ -176,19 +189,6 @@ namespace ProxySU_Core
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void DeleteHost(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
if (DataGrid.SelectedItem is RecordViewModel project)
|
|
||||||
{
|
|
||||||
var result = MessageBox.Show($"您确认删除主机{project.Host.Tag}吗?", "提示", MessageBoxButton.OKCancel);
|
|
||||||
if (result == MessageBoxResult.OK)
|
|
||||||
{
|
|
||||||
Records.Remove(project);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Connect(object sender, RoutedEventArgs e)
|
private void Connect(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
var project = DataGrid.SelectedItem as RecordViewModel;
|
var project = DataGrid.SelectedItem as RecordViewModel;
|
||||||
|
@ -52,185 +52,11 @@
|
|||||||
</TabItem>
|
</TabItem>
|
||||||
</TabControl>
|
</TabControl>
|
||||||
|
|
||||||
<!--<StackPanel Grid.Row="0" Orientation="Horizontal">
|
|
||||||
<StackPanel Margin="0,0,0,0" Orientation="Horizontal">
|
|
||||||
<Label Content="xray" VerticalAlignment="Center" />
|
|
||||||
<TextBox Text="{Binding Path=Settings.Port}" Width="50" VerticalAlignment="Center" />
|
|
||||||
<Label Content="ss" Margin="10,0,0,0" VerticalAlignment="Center" />
|
|
||||||
<TextBox Text="{Binding Path=Settings.ShadowSocksPort}" Width="50" VerticalAlignment="Center" />
|
|
||||||
<Label Content="mkcp" Margin="10,0,0,0" VerticalAlignment="Center" />
|
|
||||||
<TextBox Text="{Binding Path=Settings.VMESS_KCP_Port}" Width="50" VerticalAlignment="Center" />
|
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
<TabControl>
|
|
||||||
<TabItem metro:HeaderedControlHelper.HeaderFontSize="16" Padding="10,5,10,5">
|
|
||||||
|
|
||||||
</TabItem>
|
|
||||||
</TabControl>
|
|
||||||
|
|
||||||
<StackPanel>
|
|
||||||
|
|
||||||
<CheckBox Content="VMess over TCP with TLS"
|
|
||||||
Style="{StaticResource MahApps.Styles.CheckBox}"
|
|
||||||
IsChecked="{Binding Path=Settings.Checked_VMESS_TCP}"
|
|
||||||
Margin="0,10,0,0" />
|
|
||||||
<Label Content="不推荐" Margin="20,0,0,0" Foreground="Red" />
|
|
||||||
|
|
||||||
<CheckBox Content="VMess over WS with TLS"
|
|
||||||
Style="{StaticResource MahApps.Styles.CheckBox}"
|
|
||||||
IsChecked="{Binding Path=Settings.Checked_VMESS_WS}"
|
|
||||||
Margin="0,10,0,0" />
|
|
||||||
<Label Content="常规,支持CDN" Margin="20,0,0,0" />
|
|
||||||
|
|
||||||
<CheckBox Content="VMess mKCP"
|
|
||||||
Style="{StaticResource MahApps.Styles.CheckBox}"
|
|
||||||
IsChecked="{Binding Path=Settings.Checked_VMESS_KCP}"
|
|
||||||
Margin="0,10,0,0" />
|
|
||||||
<Label Content="低延迟,适用于游戏" Margin="20,0,0,0" />
|
|
||||||
|
|
||||||
<CheckBox Content="Trojan over TCP with TLS"
|
|
||||||
Style="{StaticResource MahApps.Styles.CheckBox}"
|
|
||||||
IsChecked="{Binding Path=Settings.Checked_Trojan_TCP}"
|
|
||||||
Margin="0,10,0,0" />
|
|
||||||
<Label Content="Torjan协议,不支持CDN" Margin="20,0,0,0" />
|
|
||||||
|
|
||||||
<CheckBox Content="ShadowSocksAEAD"
|
|
||||||
Style="{StaticResource MahApps.Styles.CheckBox}"
|
|
||||||
IsChecked="{Binding Path=Settings.CheckedShadowSocks}"
|
|
||||||
Margin="0,10,0,0" />
|
|
||||||
<Label Content="俗称SS" Margin="20,0,0,0" />
|
|
||||||
|
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
<StackPanel Margin="60,0,0,0">
|
|
||||||
|
|
||||||
<StackPanel Margin="0,0,0,0" Orientation="Horizontal">
|
|
||||||
<Label Content="xray" VerticalAlignment="Center" />
|
|
||||||
<TextBox Text="{Binding Path=Settings.Port}" Width="50" VerticalAlignment="Center" />
|
|
||||||
<Label Content="ss" Margin="10,0,0,0" VerticalAlignment="Center" />
|
|
||||||
<TextBox Text="{Binding Path=Settings.ShadowSocksPort}" Width="50" VerticalAlignment="Center" />
|
|
||||||
<Label Content="mkcp" Margin="10,0,0,0" VerticalAlignment="Center" />
|
|
||||||
<TextBox Text="{Binding Path=Settings.VMESS_KCP_Port}" Width="50" VerticalAlignment="Center" />
|
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
<StackPanel Margin="0,10,0,0" Orientation="Horizontal">
|
|
||||||
<Label Content="UUID" Width="80" VerticalAlignment="Center" />
|
|
||||||
<TextBox Text="{Binding Path=Settings.UUID}" Width="200" />
|
|
||||||
<Button Style="{StaticResource MahApps.Styles.Button.Flat}"
|
|
||||||
Margin="5,0,0,0"
|
|
||||||
Click="RandomUuid"
|
|
||||||
Content="随机" />
|
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
<StackPanel Margin="0,10,0,0" Orientation="Horizontal">
|
|
||||||
<Label Content="域名" Width="80" VerticalAlignment="Center" />
|
|
||||||
<TextBox Text="{Binding Path=Settings.Domain}" Width="200" />
|
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
<StackPanel Margin="0,10,0,0" Orientation="Horizontal">
|
|
||||||
<Label Content="伪装域名" Width="80" VerticalAlignment="Center" />
|
|
||||||
<TextBox Text="{Binding Path=Settings.MaskDomain}" Width="200" />
|
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
<StackPanel Margin="0,10,0,0"
|
|
||||||
Orientation="Horizontal"
|
|
||||||
Visibility="{
|
|
||||||
Binding Path=Settings.Checked_VLESS_WS,
|
|
||||||
Converter={StaticResource VisibleConverter}
|
|
||||||
}">
|
|
||||||
<Label Content="VLESS-WS" Width="80" VerticalAlignment="Center" />
|
|
||||||
<TextBox Text="{Binding Path=Settings.VLESS_WS_Path}"
|
|
||||||
Width="200" />
|
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
<StackPanel Margin="0,10,0,0"
|
|
||||||
Orientation="Horizontal"
|
|
||||||
Visibility="{
|
|
||||||
Binding Path=Settings.Checked_VMESS_TCP,
|
|
||||||
Converter={StaticResource VisibleConverter}
|
|
||||||
}">
|
|
||||||
<Label Content="VMESS-TCP" Width="80" VerticalAlignment="Center" />
|
|
||||||
<TextBox Text="{Binding Path=Settings.VMESS_TCP_Path}"
|
|
||||||
Width="200" />
|
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
<StackPanel Margin="0,10,0,0"
|
|
||||||
Orientation="Horizontal"
|
|
||||||
Visibility="{
|
|
||||||
Binding Path=Settings.Checked_VMESS_WS,
|
|
||||||
Converter={StaticResource VisibleConverter}
|
|
||||||
}">
|
|
||||||
<Label Content="VMESS-WS" Width="80" VerticalAlignment="Center" />
|
|
||||||
<TextBox Text="{Binding Path=Settings.VMESS_WS_Path}"
|
|
||||||
Width="200" />
|
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
<StackPanel Margin="0,10,0,0"
|
|
||||||
Orientation="Horizontal"
|
|
||||||
Visibility="{
|
|
||||||
Binding Path=Settings.Checked_Trojan_TCP,
|
|
||||||
Converter={StaticResource VisibleConverter}
|
|
||||||
}">
|
|
||||||
<Label Content="Trojan密码" Width="80" VerticalAlignment="Center" />
|
|
||||||
<TextBox Text="{Binding Path=Settings.TrojanPassword}"
|
|
||||||
Width="200" />
|
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
<StackPanel Margin="0,10,0,0"
|
|
||||||
Orientation="Horizontal"
|
|
||||||
Visibility="{
|
|
||||||
Binding Path=Settings.Checked_VMESS_KCP,
|
|
||||||
Converter={StaticResource VisibleConverter}
|
|
||||||
}">
|
|
||||||
<Label Content="KCP伪装" Width="80" VerticalAlignment="Center"/>
|
|
||||||
<ComboBox Width="200"
|
|
||||||
ItemsSource="{Binding Path=Settings.KcpTypes}"
|
|
||||||
SelectedValue="{Binding Settings.VMESS_KCP_Type,Mode=TwoWay}">
|
|
||||||
</ComboBox>
|
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
<StackPanel Margin="0,10,0,0"
|
|
||||||
Orientation="Horizontal"
|
|
||||||
Visibility="{
|
|
||||||
Binding Path=Settings.Checked_VMESS_KCP,
|
|
||||||
Converter={StaticResource VisibleConverter}
|
|
||||||
}">
|
|
||||||
<Label Content="KCP Seed" Width="80" VerticalAlignment="Center" />
|
|
||||||
<TextBox Text="{Binding Path=Settings.VMESS_KCP_Seed}"
|
|
||||||
Width="200"/>
|
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
|
|
||||||
<StackPanel Margin="0,10,0,0"
|
|
||||||
Orientation="Horizontal"
|
|
||||||
Visibility="{
|
|
||||||
Binding Path=Settings.CheckedShadowSocks,
|
|
||||||
Converter={StaticResource VisibleConverter}
|
|
||||||
}">
|
|
||||||
<Label Content="SS 密码" Width="80" VerticalAlignment="Center" />
|
|
||||||
<TextBox Text="{Binding Path=Settings.ShadowSocksPassword}"
|
|
||||||
Width="200"/>
|
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
<StackPanel Margin="0,10,0,0"
|
|
||||||
Orientation="Horizontal"
|
|
||||||
Visibility="{
|
|
||||||
Binding Path=Settings.CheckedShadowSocks,
|
|
||||||
Converter={StaticResource VisibleConverter}
|
|
||||||
}">
|
|
||||||
<Label Content="SS 加密方式" Width="80" VerticalAlignment="Center" />
|
|
||||||
<ComboBox Width="200"
|
|
||||||
ItemsSource="{Binding Settings.ShadowSocksMethods}"
|
|
||||||
SelectedValue="{Binding Settings.ShadowSocksMethod}">
|
|
||||||
</ComboBox>
|
|
||||||
</StackPanel>
|
|
||||||
</StackPanel>
|
|
||||||
</StackPanel>-->
|
|
||||||
|
|
||||||
<Button Content="保存"
|
<Button Content="保存"
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
Margin="0,0,20,0"
|
Margin="0,0,20,0"
|
||||||
HorizontalAlignment="Right"
|
HorizontalAlignment="Right"
|
||||||
|
VerticalAlignment="Bottom"
|
||||||
Width="120"
|
Width="120"
|
||||||
Height="32"
|
Height="32"
|
||||||
Click="Save" />
|
Click="Save" />
|
||||||
|
@ -17,47 +17,46 @@
|
|||||||
<ColumnDefinition Width="*" />
|
<ColumnDefinition Width="*" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Grid.RowDefinitions>
|
<StackPanel Margin="0,10,0,0" Grid.Column="0">
|
||||||
<RowDefinition Height="50" />
|
<CheckBox Content="ShadowSocks
SS,支持udp。"
|
||||||
<RowDefinition Height="50" />
|
|
||||||
<RowDefinition Height="50" />
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
|
|
||||||
<CheckBox Content="ShadowSocksAEAD
SS,支持udp。"
|
|
||||||
Grid.Column="0"
|
|
||||||
Grid.Row="0"
|
|
||||||
FontSize="13"
|
FontSize="13"
|
||||||
Style="{StaticResource MahApps.Styles.CheckBox}"
|
Style="{StaticResource MahApps.Styles.CheckBox}"
|
||||||
IsChecked="{Binding Path=Settings.CheckedShadowSocks}" />
|
IsChecked="{Binding Path=Settings.CheckedShadowSocks}" />
|
||||||
|
|
||||||
<StackPanel Margin="50,0,0,10"
|
|
||||||
Grid.Column="1"
|
|
||||||
Grid.Row="0"
|
|
||||||
Orientation="Horizontal"
|
|
||||||
Visibility="{
|
|
||||||
Binding Path=Settings.CheckedShadowSocks,
|
|
||||||
Converter={StaticResource VisibleConverter}
|
|
||||||
}">
|
|
||||||
<Label Content="SS 密码" Width="80" VerticalAlignment="Bottom" />
|
|
||||||
<TextBox Text="{Binding Path=Settings.ShadowSocksPassword}"
|
|
||||||
VerticalAlignment="Bottom"
|
|
||||||
Width="200"/>
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<StackPanel Margin="50,0,0,10"
|
<StackPanel Grid.Column="1">
|
||||||
Grid.Column="1"
|
<!--域名-->
|
||||||
Grid.Row="1"
|
<StackPanel Margin="40,10,0,0"
|
||||||
|
Orientation="Horizontal">
|
||||||
|
<Label Content="域名" Width="70" />
|
||||||
|
<TextBox Text="{Binding Path=Settings.Domain}" Width="260" />
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<!--ss密码-->
|
||||||
|
<StackPanel Margin="40,10,0,0"
|
||||||
Orientation="Horizontal"
|
Orientation="Horizontal"
|
||||||
Visibility="{
|
Visibility="{
|
||||||
Binding Path=Settings.CheckedShadowSocks,
|
Binding Path=Settings.CheckedShadowSocks,
|
||||||
Converter={StaticResource VisibleConverter}
|
Converter={StaticResource VisibleConverter}
|
||||||
}">
|
}">
|
||||||
<Label Content="SS 加密方式" Width="80" VerticalAlignment="Bottom" />
|
<Label Content="密码" Width="70" />
|
||||||
<ComboBox Width="200"
|
<TextBox Text="{Binding Path=Settings.ShadowSocksPassword}"
|
||||||
VerticalAlignment="Bottom"
|
Width="260"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<!--ss加密方式-->
|
||||||
|
<StackPanel Margin="40,15,0,0"
|
||||||
|
Orientation="Horizontal"
|
||||||
|
Visibility="{
|
||||||
|
Binding Path=Settings.CheckedShadowSocks,
|
||||||
|
Converter={StaticResource VisibleConverter}
|
||||||
|
}">
|
||||||
|
<Label Content="加密方式" Width="70" />
|
||||||
|
<ComboBox Width="260"
|
||||||
ItemsSource="{Binding Settings.ShadowSocksMethods}"
|
ItemsSource="{Binding Settings.ShadowSocksMethods}"
|
||||||
SelectedValue="{Binding Settings.ShadowSocksMethod}">
|
SelectedValue="{Binding Settings.ShadowSocksMethod}">
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
@ -17,29 +17,33 @@
|
|||||||
<ColumnDefinition Width="*" />
|
<ColumnDefinition Width="*" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Grid.RowDefinitions>
|
<StackPanel Grid.Column="0">
|
||||||
<RowDefinition Height="50" />
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
|
|
||||||
<CheckBox Content="Trojan over TCP with TLS
Trojan"
|
<CheckBox Content="Trojan over TCP with TLS
Trojan"
|
||||||
Grid.Column="0"
|
|
||||||
Grid.Row="0"
|
|
||||||
FontSize="13"
|
FontSize="13"
|
||||||
|
Margin="0,10,0,0"
|
||||||
Style="{StaticResource MahApps.Styles.CheckBox}"
|
Style="{StaticResource MahApps.Styles.CheckBox}"
|
||||||
IsChecked="{Binding Path=Settings.Checked_Trojan_TCP}" />
|
IsChecked="{Binding Path=Settings.Checked_Trojan_TCP}" />
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
<StackPanel Margin="50,0,0,10"
|
<StackPanel Grid.Column="1">
|
||||||
Grid.Column="1"
|
<!--域名-->
|
||||||
Grid.Row="0"
|
<StackPanel Margin="40,10,0,0"
|
||||||
|
Orientation="Horizontal">
|
||||||
|
<Label Content="域名" Width="70" />
|
||||||
|
<TextBox Text="{Binding Path=Settings.Domain}" Width="260" />
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<!--密码-->
|
||||||
|
<StackPanel Margin="40,15,0,0"
|
||||||
Orientation="Horizontal"
|
Orientation="Horizontal"
|
||||||
Visibility="{
|
Visibility="{
|
||||||
Binding Path=Settings.Checked_Trojan_TCP,
|
Binding Path=Settings.Checked_Trojan_TCP,
|
||||||
Converter={StaticResource VisibleConverter}
|
Converter={StaticResource VisibleConverter}
|
||||||
}">
|
}">
|
||||||
<Label Content="Trojan密码" Width="70" VerticalAlignment="Bottom" />
|
<Label Content="密码" Width="70" />
|
||||||
<TextBox Text="{Binding Path=Settings.TrojanPassword}"
|
<TextBox Text="{Binding Path=Settings.TrojanPassword}"
|
||||||
VerticalAlignment="Bottom"
|
|
||||||
Width="260" />
|
Width="260" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
@ -17,181 +17,143 @@
|
|||||||
<ColumnDefinition Width="*" />
|
<ColumnDefinition Width="*" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Grid.RowDefinitions>
|
<StackPanel Grid.Column="0">
|
||||||
<RowDefinition Height="50" />
|
|
||||||
<RowDefinition Height="50" />
|
|
||||||
<RowDefinition Height="50" />
|
|
||||||
<RowDefinition Height="50" />
|
|
||||||
<RowDefinition Height="50" />
|
|
||||||
<RowDefinition Height="50" />
|
|
||||||
<RowDefinition Height="50" />
|
|
||||||
<RowDefinition Height="50" />
|
|
||||||
<RowDefinition Height="50" />
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
|
|
||||||
<!--XTLS-->
|
<!--XTLS-->
|
||||||
<CheckBox Content="VLESS Over TCP With XTLS
性能数倍,首选方式。"
|
<CheckBox Content="VLESS Over TCP With XTLS
性能数倍,首选方式。"
|
||||||
|
Margin="0,10,0,0"
|
||||||
FontSize="13"
|
FontSize="13"
|
||||||
Grid.Row="0"
|
|
||||||
Grid.Column="0"
|
|
||||||
Style="{StaticResource MahApps.Styles.CheckBox}"
|
Style="{StaticResource MahApps.Styles.CheckBox}"
|
||||||
IsChecked="{Binding Path=Settings.Checked_VLESS_TCP_XTLS}"/>
|
IsChecked="{Binding Path=Settings.Checked_VLESS_TCP_XTLS}"/>
|
||||||
|
|
||||||
<!--TCP-->
|
<!--TCP-->
|
||||||
<CheckBox Content="VLESS over TCP with TLS
仍推荐XTLS"
|
<CheckBox Content="VLESS over TCP with TLS
仍推荐XTLS"
|
||||||
Grid.Row="1"
|
Margin="0,15,0,0"
|
||||||
Grid.Column="0"
|
|
||||||
FontSize="13"
|
FontSize="13"
|
||||||
Style="{StaticResource MahApps.Styles.CheckBox}"
|
Style="{StaticResource MahApps.Styles.CheckBox}"
|
||||||
IsChecked="{Binding Path=Settings.Checked_VLESS_TCP}" />
|
IsChecked="{Binding Path=Settings.Checked_VLESS_TCP}" />
|
||||||
|
|
||||||
<!--WebSocket-->
|
<!--WebSocket-->
|
||||||
<CheckBox Content="VLESS over WS with TLS
推荐,支持CDN。"
|
<CheckBox Content="VLESS over WS with TLS
推荐,支持CDN。"
|
||||||
Grid.Row="2"
|
Margin="0,15,0,0"
|
||||||
Grid.Column="0"
|
|
||||||
Style="{StaticResource MahApps.Styles.CheckBox}"
|
Style="{StaticResource MahApps.Styles.CheckBox}"
|
||||||
IsChecked="{Binding Path=Settings.Checked_VLESS_WS}" />
|
IsChecked="{Binding Path=Settings.Checked_VLESS_WS}" />
|
||||||
|
|
||||||
<!--mKCP-->
|
<!--mKCP-->
|
||||||
<CheckBox Content="VLESS mKCP
游戏推荐,延迟低。"
|
<CheckBox Content="VLESS mKCP
游戏推荐,延迟低。"
|
||||||
Grid.Row="3"
|
Margin="0,15,0,0"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Style="{StaticResource MahApps.Styles.CheckBox}"
|
Style="{StaticResource MahApps.Styles.CheckBox}"
|
||||||
IsChecked="{Binding Path=Settings.Checked_VLESS_KCP}" />
|
IsChecked="{Binding Path=Settings.Checked_VLESS_KCP}" />
|
||||||
|
|
||||||
<!--gRPC-->
|
<!--gRPC-->
|
||||||
<CheckBox Content="VLESS gRPC
基于http2,多路复用。"
|
<!--<CheckBox Content="VLESS gRPC
基于http2,多路复用。"
|
||||||
Grid.Row="4"
|
Margin="0,15,0,0"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Style="{StaticResource MahApps.Styles.CheckBox}"
|
Style="{StaticResource MahApps.Styles.CheckBox}"
|
||||||
IsChecked="{Binding Path=Settings.Checked_VLESS_gRPC}"/>
|
IsChecked="{Binding Path=Settings.Checked_VLESS_gRPC}"/>-->
|
||||||
|
|
||||||
|
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
<!--************************** 参数 **************************-->
|
<!--************************** 参数 **************************-->
|
||||||
|
|
||||||
|
<StackPanel Grid.Column="1">
|
||||||
<!--UUID-->
|
<!--UUID-->
|
||||||
<StackPanel Margin="40,0,0,10"
|
<StackPanel Margin="40,10,0,0"
|
||||||
Grid.Row="0"
|
|
||||||
Grid.Column="1"
|
|
||||||
Orientation="Horizontal">
|
Orientation="Horizontal">
|
||||||
<Label Content="UUID" Width="70" VerticalAlignment="Bottom" />
|
<Label Content="UUID" Width="70" />
|
||||||
|
|
||||||
<TextBox Text="{Binding Path=Settings.UUID}"
|
<TextBox Text="{Binding Path=Settings.UUID}"
|
||||||
VerticalAlignment="Bottom"
|
|
||||||
Width="260" />
|
Width="260" />
|
||||||
|
|
||||||
<Button Style="{StaticResource MahApps.Styles.Button.Flat}"
|
<Button Style="{StaticResource MahApps.Styles.Button.Flat}"
|
||||||
Margin="5,0,0,0"
|
Margin="5,0,0,0"
|
||||||
Height="30"
|
FontSize="12"
|
||||||
VerticalAlignment="Bottom"
|
|
||||||
Command="{Binding Path=Settings.RandomUuid}"
|
Command="{Binding Path=Settings.RandomUuid}"
|
||||||
Content="随机" />
|
Content="随机" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<!--Domain-->
|
<!--Domain-->
|
||||||
<StackPanel Margin="40,0,0,10"
|
<StackPanel Margin="40,15,0,0"
|
||||||
Grid.Row="1"
|
|
||||||
Grid.Column="1"
|
|
||||||
Orientation="Horizontal">
|
Orientation="Horizontal">
|
||||||
<Label Content="域名" Width="70" VerticalAlignment="Bottom" />
|
<Label Content="域名" Width="70" />
|
||||||
<TextBox Text="{Binding Path=Settings.Domain}" Width="260" VerticalAlignment="Bottom" />
|
<TextBox Text="{Binding Path=Settings.Domain}" Width="260" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<!--Mask Domain-->
|
<!--Mask Domain-->
|
||||||
<StackPanel Margin="40,0,0,10"
|
<StackPanel Margin="40,15,0,0"
|
||||||
Grid.Row="2"
|
|
||||||
Grid.Column="1"
|
|
||||||
Orientation="Horizontal">
|
Orientation="Horizontal">
|
||||||
<Label Content="伪装域名" Width="70" VerticalAlignment="Bottom" />
|
<Label Content="伪装域名" Width="70" />
|
||||||
<TextBox Text="{Binding Path=Settings.MaskDomain}" Width="260" VerticalAlignment="Bottom" />
|
<TextBox Text="{Binding Path=Settings.MaskDomain}" Width="260" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<!--WebSocket Path-->
|
<!--WebSocket Path-->
|
||||||
<StackPanel Margin="40,0,0,10"
|
<StackPanel Margin="40,15,0,0"
|
||||||
Grid.Row="3"
|
|
||||||
Grid.Column="1"
|
|
||||||
Orientation="Horizontal"
|
Orientation="Horizontal"
|
||||||
Visibility="{
|
Visibility="{
|
||||||
Binding Path=Settings.Checked_VLESS_WS,
|
Binding Path=Settings.Checked_VLESS_WS,
|
||||||
Converter={StaticResource VisibleConverter}
|
Converter={StaticResource VisibleConverter}
|
||||||
}">
|
}">
|
||||||
<Label Content="WS路径" Width="70" VerticalAlignment="Bottom" />
|
<Label Content="WS路径" Width="70" />
|
||||||
<TextBox Text="{Binding Path=Settings.VLESS_WS_Path}"
|
<TextBox Text="{Binding Path=Settings.VLESS_WS_Path}"
|
||||||
VerticalAlignment="Bottom"
|
|
||||||
Width="260" />
|
Width="260" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<!--seed-->
|
<!--seed-->
|
||||||
<StackPanel Margin="40,0,0,10"
|
<StackPanel Margin="40,15,0,0"
|
||||||
Grid.Row="4"
|
|
||||||
Grid.Column="1"
|
|
||||||
Orientation="Horizontal"
|
Orientation="Horizontal"
|
||||||
Visibility="{
|
Visibility="{
|
||||||
Binding Path=Settings.Checked_VLESS_KCP,
|
Binding Path=Settings.Checked_VLESS_KCP,
|
||||||
Converter={StaticResource VisibleConverter}
|
Converter={StaticResource VisibleConverter}
|
||||||
}">
|
}">
|
||||||
<Label Content="KCP Seed" Width="70" VerticalAlignment="Bottom" />
|
<Label Content="KCP Seed" Width="70" />
|
||||||
<TextBox Text="{Binding Path=Settings.VLESS_KCP_Seed}" Width="260" VerticalAlignment="Bottom" />
|
<TextBox Text="{Binding Path=Settings.VLESS_KCP_Seed}" Width="260" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<StackPanel Margin="40,0,0,10"
|
<!--kcp type and kcp port-->
|
||||||
Grid.Row="5"
|
<StackPanel Margin="40,15,0,0"
|
||||||
Grid.Column="1"
|
|
||||||
Orientation="Horizontal">
|
|
||||||
<!--kcp type-->
|
|
||||||
<StackPanel Margin="0,0,0,0"
|
|
||||||
Orientation="Horizontal"
|
|
||||||
Visibility="{
|
Visibility="{
|
||||||
Binding Path=Settings.Checked_VLESS_KCP,
|
Binding Path=Settings.Checked_VLESS_KCP,
|
||||||
Converter={StaticResource VisibleConverter}
|
Converter={StaticResource VisibleConverter}
|
||||||
}">
|
}"
|
||||||
<Label Content="KCP伪装" Width="70" VerticalAlignment="Bottom"/>
|
Orientation="Horizontal">
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
|
||||||
|
<Label Content="KCP伪装" Width="70" />
|
||||||
<ComboBox Width="100"
|
<ComboBox Width="100"
|
||||||
VerticalAlignment="Bottom"
|
|
||||||
ItemsSource="{Binding Path=Settings.KcpTypes}"
|
ItemsSource="{Binding Path=Settings.KcpTypes}"
|
||||||
SelectedValue="{Binding Settings.VLESS_KCP_Type,Mode=TwoWay}">
|
SelectedValue="{Binding Settings.VLESS_KCP_Type,Mode=TwoWay}">
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<!--kcp port-->
|
|
||||||
<StackPanel Margin="10,0,0,0"
|
<StackPanel Margin="10,0,0,0"
|
||||||
Orientation="Horizontal"
|
Orientation="Horizontal">
|
||||||
Visibility="{
|
<Label Content="KCP端口" Width="70" />
|
||||||
Binding Path=Settings.Checked_VLESS_KCP,
|
<TextBox Text="{Binding Path=Settings.VLESS_KCP_Port}" Width="100" />
|
||||||
Converter={StaticResource VisibleConverter}
|
|
||||||
}">
|
|
||||||
<Label Content="KCP端口" Width="70" VerticalAlignment="Bottom" />
|
|
||||||
<TextBox Text="{Binding Path=Settings.VLESS_KCP_Port}" Width="100" VerticalAlignment="Bottom" />
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<!--gRPC Port-->
|
<!--gRPC Port-->
|
||||||
<StackPanel Margin="40,0,0,10"
|
<StackPanel Margin="40,15,0,0"
|
||||||
Grid.Row="6"
|
|
||||||
Grid.Column="1"
|
|
||||||
Orientation="Horizontal"
|
Orientation="Horizontal"
|
||||||
Visibility="{
|
Visibility="{
|
||||||
Binding Path=Settings.Checked_VLESS_gRPC,
|
Binding Path=Settings.Checked_VLESS_gRPC,
|
||||||
Converter={StaticResource VisibleConverter}
|
Converter={StaticResource VisibleConverter}
|
||||||
}">
|
}">
|
||||||
<Label Content="gRPC端口" Width="70" VerticalAlignment="Bottom" />
|
<Label Content="gRPC端口" Width="70" />
|
||||||
<TextBox Text="{Binding Path=Settings.VLESS_gRPC_Port}" Width="100" VerticalAlignment="Bottom" />
|
<TextBox Text="{Binding Path=Settings.VLESS_gRPC_Port}" Width="100" />
|
||||||
|
|
||||||
<Label Content="服务器" Width="70" VerticalAlignment="Bottom" Margin="10,0,0,0" />
|
<Label Content="服务器" Width="70" Margin="10,0,0,0" />
|
||||||
<TextBox Text="{Binding Path=Settings.VLESS_gRPC_ServiceName}" Width="100" VerticalAlignment="Bottom" />
|
<TextBox Text="{Binding Path=Settings.VLESS_gRPC_ServiceName}" Width="100" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
|
|
||||||
<!--xray prot-->
|
<!--xray prot-->
|
||||||
<StackPanel Margin="40,0,0,10"
|
<StackPanel Margin="40,15,0,0"
|
||||||
Grid.Row="7"
|
|
||||||
Grid.Column="1"
|
|
||||||
Orientation="Horizontal">
|
Orientation="Horizontal">
|
||||||
<Label Content="Xray端口" Width="70" VerticalAlignment="Bottom" />
|
<Label Content="Xray端口" Width="70" />
|
||||||
<TextBox Text="{Binding Path=Settings.Port}" Width="100" VerticalAlignment="Bottom" />
|
<TextBox Text="{Binding Path=Settings.Port}" Width="100" />
|
||||||
<Label Content="默认端口443,不建议修改" VerticalAlignment="Bottom" Foreground="Red" />
|
<Label Content="默认端口443,不建议修改" Foreground="Red" />
|
||||||
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
@ -17,90 +17,68 @@
|
|||||||
<ColumnDefinition Width="*" />
|
<ColumnDefinition Width="*" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Grid.RowDefinitions>
|
<StackPanel Grid.Column="0">
|
||||||
<RowDefinition Height="50" />
|
|
||||||
<RowDefinition Height="50" />
|
|
||||||
<RowDefinition Height="50" />
|
|
||||||
<RowDefinition Height="50" />
|
|
||||||
<RowDefinition Height="50" />
|
|
||||||
<RowDefinition Height="50" />
|
|
||||||
<RowDefinition Height="50" />
|
|
||||||
<RowDefinition Height="50" />
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
|
|
||||||
<!--TCP-->
|
<!--TCP-->
|
||||||
<CheckBox Content="VMESS over TCP with TLS
不推荐"
|
<CheckBox Content="VMESS over TCP with TLS
不推荐"
|
||||||
Grid.Row="0"
|
Margin="0,10,0,0"
|
||||||
Grid.Column="0"
|
|
||||||
FontSize="13"
|
FontSize="13"
|
||||||
Style="{StaticResource MahApps.Styles.CheckBox}"
|
Style="{StaticResource MahApps.Styles.CheckBox}"
|
||||||
IsChecked="{Binding Path=Settings.Checked_VMESS_TCP}" />
|
IsChecked="{Binding Path=Settings.Checked_VMESS_TCP}" />
|
||||||
|
|
||||||
<!--WebSocket-->
|
<!--WebSocket-->
|
||||||
<CheckBox Content="VMESS over WS with TLS
推荐,支持CDN。"
|
<CheckBox Content="VMESS over WS with TLS
推荐,支持CDN。"
|
||||||
Grid.Row="1"
|
Margin="0,15,0,0"
|
||||||
Grid.Column="0"
|
|
||||||
Style="{StaticResource MahApps.Styles.CheckBox}"
|
Style="{StaticResource MahApps.Styles.CheckBox}"
|
||||||
IsChecked="{Binding Path=Settings.Checked_VMESS_WS}" />
|
IsChecked="{Binding Path=Settings.Checked_VMESS_WS}" />
|
||||||
|
|
||||||
<!--mKCP-->
|
<!--mKCP-->
|
||||||
<CheckBox Content="VMESS mKCP
游戏推荐,延迟低。"
|
<CheckBox Content="VMESS mKCP
游戏推荐,延迟低。"
|
||||||
Grid.Row="2"
|
Margin="0,15,0,0"
|
||||||
Grid.Column="0"
|
|
||||||
Style="{StaticResource MahApps.Styles.CheckBox}"
|
Style="{StaticResource MahApps.Styles.CheckBox}"
|
||||||
IsChecked="{Binding Path=Settings.Checked_VMESS_KCP}" />
|
IsChecked="{Binding Path=Settings.Checked_VMESS_KCP}" />
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
|
||||||
<!--************************** 参数 **************************-->
|
<!--************************** 参数 **************************-->
|
||||||
|
|
||||||
|
<StackPanel Grid.Column="1">
|
||||||
<!--UUID-->
|
<!--UUID-->
|
||||||
<StackPanel Margin="40,0,0,10"
|
<StackPanel Margin="40,10,0,0"
|
||||||
Grid.Row="0"
|
|
||||||
Grid.Column="1"
|
|
||||||
Orientation="Horizontal">
|
Orientation="Horizontal">
|
||||||
<Label Content="UUID" Width="70" VerticalAlignment="Bottom" />
|
<Label Content="UUID" Width="70" />
|
||||||
|
|
||||||
<TextBox Text="{Binding Path=Settings.UUID}"
|
<TextBox Text="{Binding Path=Settings.UUID}"
|
||||||
VerticalAlignment="Bottom"
|
|
||||||
Width="260" />
|
Width="260" />
|
||||||
|
|
||||||
<Button Style="{StaticResource MahApps.Styles.Button.Flat}"
|
<Button Style="{StaticResource MahApps.Styles.Button.Flat}"
|
||||||
Margin="5,0,0,0"
|
Margin="5,0,0,0"
|
||||||
Height="30"
|
FontSize="12"
|
||||||
VerticalAlignment="Bottom"
|
|
||||||
Command="{Binding Path=Settings.RandomUuid}"
|
Command="{Binding Path=Settings.RandomUuid}"
|
||||||
Content="随机" />
|
Content="随机" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<!--Domain-->
|
<!--Domain-->
|
||||||
<StackPanel Margin="40,0,0,10"
|
<StackPanel Margin="40,15,0,0"
|
||||||
Grid.Row="1"
|
|
||||||
Grid.Column="1"
|
|
||||||
Orientation="Horizontal">
|
Orientation="Horizontal">
|
||||||
<Label Content="域名" Width="70" VerticalAlignment="Bottom" />
|
<Label Content="域名" Width="70" />
|
||||||
<TextBox Text="{Binding Path=Settings.Domain}" Width="260" VerticalAlignment="Bottom" />
|
<TextBox Text="{Binding Path=Settings.Domain}" Width="260" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<!--Mask Domain-->
|
<!--Mask Domain-->
|
||||||
<StackPanel Margin="40,0,0,10"
|
<StackPanel Margin="40,15,0,0"
|
||||||
Grid.Row="2"
|
|
||||||
Grid.Column="1"
|
|
||||||
Orientation="Horizontal">
|
Orientation="Horizontal">
|
||||||
<Label Content="伪装域名" Width="70" VerticalAlignment="Bottom" />
|
<Label Content="伪装域名" Width="70" />
|
||||||
<TextBox Text="{Binding Path=Settings.MaskDomain}" Width="260" VerticalAlignment="Bottom" />
|
<TextBox Text="{Binding Path=Settings.MaskDomain}" Width="260" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<!--WebSocket Path-->
|
<!--WebSocket Path-->
|
||||||
<StackPanel Margin="40,0,0,10"
|
<StackPanel Margin="40,15,0,0"
|
||||||
Grid.Row="3"
|
|
||||||
Grid.Column="1"
|
|
||||||
Orientation="Horizontal"
|
Orientation="Horizontal"
|
||||||
Visibility="{
|
Visibility="{
|
||||||
Binding Path=Settings.Checked_VMESS_WS,
|
Binding Path=Settings.Checked_VMESS_WS,
|
||||||
Converter={StaticResource VisibleConverter}
|
Converter={StaticResource VisibleConverter}
|
||||||
}">
|
}">
|
||||||
<Label Content="WS路径" Width="70" VerticalAlignment="Bottom" />
|
<Label Content="WS路径" Width="70" />
|
||||||
<TextBox Text="{Binding Path=Settings.VMESS_WS_Path}"
|
<TextBox Text="{Binding Path=Settings.VMESS_WS_Path}"
|
||||||
VerticalAlignment="Bottom"
|
VerticalAlignment="Bottom"
|
||||||
Width="260" />
|
Width="260" />
|
||||||
@ -109,21 +87,17 @@
|
|||||||
|
|
||||||
|
|
||||||
<!--seed-->
|
<!--seed-->
|
||||||
<StackPanel Margin="40,0,0,10"
|
<StackPanel Margin="40,15,0,0"
|
||||||
Grid.Row="4"
|
|
||||||
Grid.Column="1"
|
|
||||||
Orientation="Horizontal"
|
Orientation="Horizontal"
|
||||||
Visibility="{
|
Visibility="{
|
||||||
Binding Path=Settings.Checked_VMESS_KCP,
|
Binding Path=Settings.Checked_VMESS_KCP,
|
||||||
Converter={StaticResource VisibleConverter}
|
Converter={StaticResource VisibleConverter}
|
||||||
}">
|
}">
|
||||||
<Label Content="KCP Seed" Width="70" VerticalAlignment="Bottom" />
|
<Label Content="KCP Seed" Width="70" />
|
||||||
<TextBox Text="{Binding Path=Settings.VMESS_KCP_Seed}" Width="260" VerticalAlignment="Bottom" />
|
<TextBox Text="{Binding Path=Settings.VMESS_KCP_Seed}" Width="260" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<StackPanel Margin="40,0,0,10"
|
<StackPanel Margin="40,15,0,0"
|
||||||
Grid.Row="5"
|
|
||||||
Grid.Column="1"
|
|
||||||
Orientation="Horizontal">
|
Orientation="Horizontal">
|
||||||
<!--kcp type-->
|
<!--kcp type-->
|
||||||
<StackPanel Margin="0,0,0,0"
|
<StackPanel Margin="0,0,0,0"
|
||||||
@ -147,22 +121,20 @@
|
|||||||
Binding Path=Settings.Checked_VMESS_KCP,
|
Binding Path=Settings.Checked_VMESS_KCP,
|
||||||
Converter={StaticResource VisibleConverter}
|
Converter={StaticResource VisibleConverter}
|
||||||
}">
|
}">
|
||||||
<Label Content="KCP端口" Width="70" VerticalAlignment="Bottom" />
|
<Label Content="KCP端口" Width="70" />
|
||||||
<TextBox Text="{Binding Path=Settings.VMESS_KCP_Port}" Width="100" VerticalAlignment="Bottom" />
|
<TextBox Text="{Binding Path=Settings.VMESS_KCP_Port}" Width="100" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!--xray prot-->
|
<!--xray prot-->
|
||||||
<StackPanel Margin="40,0,0,10"
|
<StackPanel Margin="40,15,0,0"
|
||||||
Grid.Row="6"
|
|
||||||
Grid.Column="1"
|
|
||||||
Orientation="Horizontal">
|
Orientation="Horizontal">
|
||||||
<Label Content="Xray端口" Width="70" VerticalAlignment="Bottom" />
|
<Label Content="Xray端口" Width="70" />
|
||||||
<TextBox Text="{Binding Path=Settings.Port}" Width="100" VerticalAlignment="Bottom" />
|
<TextBox Text="{Binding Path=Settings.Port}" Width="100" />
|
||||||
<Label Content="默认端口443,不建议修改" VerticalAlignment="Bottom" Foreground="Red" />
|
<Label Content="默认端口443,不建议修改" Foreground="Red" />
|
||||||
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
xmlns:local="clr-namespace:ProxySU_Core"
|
xmlns:local="clr-namespace:ProxySU_Core"
|
||||||
xmlns:metro="http://metro.mahapps.com/winfx/xaml/controls"
|
xmlns:metro="http://metro.mahapps.com/winfx/xaml/controls"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
|
FontSize="15"
|
||||||
Title="主机控制台" Height="600" Width="800">
|
Title="主机控制台" Height="600" Width="800">
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<TextBox IsReadOnly="True"
|
<TextBox IsReadOnly="True"
|
||||||
@ -82,9 +83,9 @@
|
|||||||
IsEnabled="{Binding HasConnected}"
|
IsEnabled="{Binding HasConnected}"
|
||||||
Click="UploadWeb"/>
|
Click="UploadWeb"/>
|
||||||
|
|
||||||
<Button Content="重装Caddy"
|
<Button Content="卸载Caddy"
|
||||||
Margin="10,0,0,0"
|
Margin="10,0,0,0"
|
||||||
Click="ReinstallCaddy"
|
Click="UninstallCaddy"
|
||||||
Height="26"
|
Height="26"
|
||||||
IsEnabled="{Binding HasConnected}"
|
IsEnabled="{Binding HasConnected}"
|
||||||
Width="120"/>
|
Width="120"/>
|
||||||
@ -100,19 +101,22 @@
|
|||||||
<Label Content="续签证书: 证书默认是自动续签,但不保证都能续签成功,如果失败请用[续签证书]手动续签" />
|
<Label Content="续签证书: 证书默认是自动续签,但不保证都能续签成功,如果失败请用[续签证书]手动续签" />
|
||||||
<Label Content="上传网站: 伪装网站,正确的静态网页要有index.html文件(请检查),然后将网站压缩包上传。" />
|
<Label Content="上传网站: 伪装网站,正确的静态网页要有index.html文件(请检查),然后将网站压缩包上传。" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<Label Content="如下是网友提供的静态网页连接,请自行检查是否有index.html文件" />
|
|
||||||
<TextBlock>
|
<Label Margin="0,10,0,0" Content="如下是网友提供的静态网页连接,请自行检查是否有index.html文件" />
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<TextBlock Margin="10,0,0,0">
|
||||||
<Hyperlink NavigateUri="https://www.themezy.com" Click="OpenLink">Themezy</Hyperlink>
|
<Hyperlink NavigateUri="https://www.themezy.com" Click="OpenLink">Themezy</Hyperlink>
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
<TextBlock>
|
<TextBlock Margin="20,0,0,0">
|
||||||
<Hyperlink NavigateUri="https://onepagelove.com/templates/free-templates" Click="OpenLink">One Page Love</Hyperlink>
|
<Hyperlink NavigateUri="https://onepagelove.com/templates/free-templates" Click="OpenLink">One Page Love</Hyperlink>
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
<TextBlock>
|
<TextBlock Margin="20,0,0,0">
|
||||||
<Hyperlink NavigateUri="https://html5up.net/" Click="OpenLink">HTML5 UP</Hyperlink>
|
<Hyperlink NavigateUri="https://html5up.net/" Click="OpenLink">HTML5 UP</Hyperlink>
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
<TextBlock>
|
<TextBlock Margin="20,0,0,0">
|
||||||
<Hyperlink NavigateUri="https://templatemo.com/" Click="OpenLink">template mo</Hyperlink>
|
<Hyperlink NavigateUri="https://templatemo.com/" Click="OpenLink">template mo</Hyperlink>
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
</StackPanel>
|
||||||
</metro:MetroWindow>
|
</metro:MetroWindow>
|
||||||
|
@ -173,7 +173,7 @@ namespace ProxySU_Core
|
|||||||
{
|
{
|
||||||
Task.Factory.StartNew(() =>
|
Task.Factory.StartNew(() =>
|
||||||
{
|
{
|
||||||
project.Uninstall();
|
project.UninstallProxy();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -193,11 +193,11 @@ namespace ProxySU_Core
|
|||||||
fileDialog.ShowDialog();
|
fileDialog.ShowDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ReinstallCaddy(object sender, RoutedEventArgs e)
|
private void UninstallCaddy(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
Task.Factory.StartNew(() =>
|
Task.Factory.StartNew(() =>
|
||||||
{
|
{
|
||||||
project.ReinstallCaddy();
|
project.DoUninstallCaddy();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,5 +7,6 @@
|
|||||||
<package id="MaterialDesignThemes.MahApps" version="0.1.6" targetFramework="net461" />
|
<package id="MaterialDesignThemes.MahApps" version="0.1.6" targetFramework="net461" />
|
||||||
<package id="Microsoft.Xaml.Behaviors.Wpf" version="1.1.31" targetFramework="net461" />
|
<package id="Microsoft.Xaml.Behaviors.Wpf" version="1.1.31" targetFramework="net461" />
|
||||||
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net461" />
|
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net461" />
|
||||||
|
<package id="QRCoder" version="1.4.1" targetFramework="net461" />
|
||||||
<package id="SSH.NET" version="2020.0.1" targetFramework="net461" />
|
<package id="SSH.NET" version="2020.0.1" targetFramework="net461" />
|
||||||
</packages>
|
</packages>
|
Loading…
Reference in New Issue
Block a user