1
0
mirror of https://github.com/proxysu/ProxySU.git synced 2024-11-25 22:56:09 +03:00

review code.

This commit is contained in:
next-autumn 2021-04-17 11:50:31 +08:00
parent b1bc74104d
commit 5948ca6efd
37 changed files with 1662 additions and 883 deletions

View File

@ -175,7 +175,7 @@ namespace ProxySU_Core.Models.Developers
if (parameters.Types.Contains(XrayType.VMESS_KCP)) if (parameters.Types.Contains(XrayType.VMESS_KCP))
{ {
var kcpBound = GetBound("VMESS_KCP.json"); var kcpBound = GetBound("VMESS_KCP.json");
kcpBound.port = parameters.KcpPort; kcpBound.port = parameters.VMESS_KCP_Port;
kcpBound.settings.clients[0].id = parameters.UUID; kcpBound.settings.clients[0].id = parameters.UUID;
kcpBound.streamSettings.kcpSettings.header.type = parameters.VMESS_KCP_Type; kcpBound.streamSettings.kcpSettings.header.type = parameters.VMESS_KCP_Type;
kcpBound.streamSettings.kcpSettings.seed = parameters.VMESS_KCP_Seed; kcpBound.streamSettings.kcpSettings.seed = parameters.VMESS_KCP_Seed;

View File

@ -8,7 +8,7 @@ namespace ProxySU_Core.Models.Developers
{ {
int Port { get; set; } int Port { get; set; }
int KcpPort { get; set; } int VMESS_KCP_Port { get; set; }
int ShadowSocksPort { get; set; } int ShadowSocksPort { get; set; }

View File

@ -313,7 +313,7 @@ namespace ProxySU_Core.Models.Developers
if (Parameters.Types.Contains(XrayType.VMESS_KCP)) if (Parameters.Types.Contains(XrayType.VMESS_KCP))
{ {
portList.Add(Parameters.KcpPort); portList.Add(Parameters.VMESS_KCP_Port);
} }
OpenPort(portList.ToArray()); OpenPort(portList.ToArray());
@ -481,7 +481,7 @@ namespace ProxySU_Core.Models.Developers
SetPortFree(80); SetPortFree(80);
SetPortFree(443); SetPortFree(443);
SetPortFree(Parameters.Port); SetPortFree(Parameters.Port);
SetPortFree(Parameters.KcpPort); SetPortFree(Parameters.VMESS_KCP_Port);
SetPortFree(Parameters.ShadowSocksPort); SetPortFree(Parameters.ShadowSocksPort);
} }
} }

View File

@ -111,7 +111,7 @@ namespace ProxySU_Core.Models.Developers
WriteOutput("卸载证书"); WriteOutput("卸载证书");
UninstallAcme(); UninstallAcme();
WriteOutput("关闭端口"); WriteOutput("关闭端口");
ClosePort(Parameters.ShadowSocksPort, Parameters.KcpPort); ClosePort(Parameters.ShadowSocksPort, Parameters.VMESS_KCP_Port);
WriteOutput("************ 卸载完成 ************"); WriteOutput("************ 卸载完成 ************");
} }

View File

@ -20,6 +20,7 @@ namespace ProxySU_Core.Models
case XrayType.VLESS_TCP: case XrayType.VLESS_TCP:
case XrayType.VLESS_TCP_XTLS: case XrayType.VLESS_TCP_XTLS:
case XrayType.VLESS_WS: case XrayType.VLESS_WS:
case XrayType.VLESS_KCP:
case XrayType.Trojan_TCP: case XrayType.Trojan_TCP:
return BuildVlessShareLink(xrayType, settings); return BuildVlessShareLink(xrayType, settings);
case XrayType.VMESS_TCP: case XrayType.VMESS_TCP:
@ -77,7 +78,7 @@ namespace ProxySU_Core.Models
break; break;
case XrayType.VMESS_KCP: case XrayType.VMESS_KCP:
vmess.ps = "vmess-mKCP"; vmess.ps = "vmess-mKCP";
vmess.port = settings.KcpPort.ToString(); vmess.port = settings.VMESS_KCP_Port.ToString();
vmess.net = "kcp"; vmess.net = "kcp";
vmess.type = settings.VMESS_KCP_Type; vmess.type = settings.VMESS_KCP_Type;
vmess.path = settings.VMESS_KCP_Seed; vmess.path = settings.VMESS_KCP_Seed;
@ -103,6 +104,8 @@ namespace ProxySU_Core.Models
var _path = "/"; var _path = "/";
var _host = settings.Domain; var _host = settings.Domain;
var _descriptiveText = string.Empty; var _descriptiveText = string.Empty;
var _headerType = "none";
var _seed = string.Empty;
switch (xrayType) switch (xrayType)
{ {
@ -126,19 +129,12 @@ namespace ProxySU_Core.Models
_encryption = "none"; _encryption = "none";
_descriptiveText = "vless-ws-tls"; _descriptiveText = "vless-ws-tls";
break; break;
case XrayType.VMESS_TCP: case XrayType.VLESS_KCP:
_protocol = "vmess"; _protocol = "vless";
_type = "tcp"; _type = "kcp";
_path = settings.VMESS_TCP_Path; _headerType = settings.VLESS_KCP_Type;
_encryption = "auto"; _seed = settings.VLESS_KCP_Seed;
_descriptiveText = "vmess-tcp-tls"; _port = settings.VLESS_KCP_Port;
break;
case XrayType.VMESS_WS:
_protocol = "vmess";
_type = "ws";
_path = settings.VMESS_WS_Path;
_encryption = "auto";
_descriptiveText = "vmess-ws-tls";
break; break;
case XrayType.Trojan_TCP: case XrayType.Trojan_TCP:
_protocol = "trojan"; _protocol = "trojan";
@ -154,11 +150,13 @@ namespace ProxySU_Core.Models
if (xrayType != XrayType.Trojan_TCP) if (xrayType != XrayType.Trojan_TCP)
{ {
// 4.3 传输层相关段 // 4.3 传输层相关段
parametersURL = $"?type={_type}&encryption={_encryption}&security={_security}&host={_host}&path={HttpUtility.UrlEncode(_path)}"; parametersURL = $"?type={_type}&encryption={_encryption}&security={_security}&host={_host}&path={HttpUtility.UrlEncode(_path)}&headerType={_headerType}";
// kcp
// if mKCP if (xrayType == XrayType.VLESS_KCP)
// if QUIC {
parametersURL += $"&seed={_seed}";
}
// 4.4 TLS 相关段 // 4.4 TLS 相关段
if (xrayType == XrayType.VLESS_TCP_XTLS) if (xrayType == XrayType.VLESS_TCP_XTLS)

View File

@ -17,7 +17,8 @@ namespace ProxySU_Core.Models
{ {
var guid = Guid.NewGuid().ToString(); var guid = Guid.NewGuid().ToString();
Port = 443; Port = 443;
KcpPort = 10443; VLESS_KCP_Port = 10445;
VMESS_KCP_Port = 10443;
ShadowSocksPort = 11443; ShadowSocksPort = 11443;
UUID = guid; UUID = guid;
@ -45,9 +46,14 @@ namespace ProxySU_Core.Models
public int Port { get; set; } public int Port { get; set; }
/// <summary> /// <summary>
/// kcp端口 /// vless kcp端口
/// </summary> /// </summary>
public int KcpPort { get; set; } public int VLESS_KCP_Port { get; set; }
/// <summary>
/// vmess kcp端口
/// </summary>
public int VMESS_KCP_Port { get; set; }
// ss端口 // ss端口
public int ShadowSocksPort { get; set; } public int ShadowSocksPort { get; set; }
@ -67,6 +73,16 @@ namespace ProxySU_Core.Models
/// vless http2 path /// vless http2 path
/// </summary> /// </summary>
public string VLESS_H2_Path { get; set; } public string VLESS_H2_Path { get; set; }
/// <summary>
/// vless kcp seed
/// </summary>
public string VLESS_KCP_Seed { get; set; }
/// <summary>
/// vless kcp type
/// </summary>
public string VLESS_KCP_Type { get; set; }
#endregion #endregion
#region vmess #region vmess

View File

@ -144,15 +144,48 @@
<Compile Include="ViewModels\RecordViewModel.cs" /> <Compile Include="ViewModels\RecordViewModel.cs" />
<Compile Include="ViewModels\Terminal.cs" /> <Compile Include="ViewModels\Terminal.cs" />
<Compile Include="ViewModels\XraySettingsViewModel.cs" /> <Compile Include="ViewModels\XraySettingsViewModel.cs" />
<Compile Include="Views\ClientInfoWindow.xaml.cs"> <Compile Include="Views\ClientInfo\ClientInfoWindow.xaml.cs">
<DependentUpon>ClientInfoWindow.xaml</DependentUpon> <DependentUpon>ClientInfoWindow.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="Views\ClientInfo\ShadowSocksControl.xaml.cs">
<DependentUpon>ShadowSocksControl.xaml</DependentUpon>
</Compile>
<Compile Include="Views\ClientInfo\Trojan_TCP_Control.xaml.cs">
<DependentUpon>Trojan_TCP_Control.xaml</DependentUpon>
</Compile>
<Compile Include="Views\ClientInfo\VLESS_KCP_Control.xaml.cs">
<DependentUpon>VLESS_KCP_Control.xaml</DependentUpon>
</Compile>
<Compile Include="Views\ClientInfo\VLESS_TCP_TLS_Control.xaml.cs">
<DependentUpon>VLESS_TCP_TLS_Control.xaml</DependentUpon>
</Compile>
<Compile Include="Views\ClientInfo\VLESS_WS_TLS_Control.xaml.cs">
<DependentUpon>VLESS_WS_TLS_Control.xaml</DependentUpon>
</Compile>
<Compile Include="Views\ClientInfo\VLESS_XTLS_Control.xaml.cs">
<DependentUpon>VLESS_XTLS_Control.xaml</DependentUpon>
</Compile>
<Compile Include="Views\ClientInfo\VMESS_KCP_Control.xaml.cs">
<DependentUpon>VMESS_KCP_Control.xaml</DependentUpon>
</Compile>
<Compile Include="Views\ClientInfo\VMESS_TCP_TLS_Control.xaml.cs">
<DependentUpon>VMESS_TCP_TLS_Control.xaml</DependentUpon>
</Compile>
<Compile Include="Views\ClientInfo\VMESS_WS_TLS_Control.xaml.cs">
<DependentUpon>VMESS_WS_TLS_Control.xaml</DependentUpon>
</Compile>
<Compile Include="Views\MainWindow.xaml.cs"> <Compile Include="Views\MainWindow.xaml.cs">
<DependentUpon>MainWindow.xaml</DependentUpon> <DependentUpon>MainWindow.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="Views\RecordEditorWindow.xaml.cs"> <Compile Include="Views\RecordEditor\RecordEditorWindow.xaml.cs">
<DependentUpon>RecordEditorWindow.xaml</DependentUpon> <DependentUpon>RecordEditorWindow.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="Views\RecordEditor\ServerInfoControl.xaml.cs">
<DependentUpon>ServerInfoControl.xaml</DependentUpon>
</Compile>
<Compile Include="Views\RecordEditor\VlessEditorControl.xaml.cs">
<DependentUpon>VlessEditorControl.xaml</DependentUpon>
</Compile>
<Compile Include="Views\TerminalWindow.xaml.cs"> <Compile Include="Views\TerminalWindow.xaml.cs">
<DependentUpon>TerminalWindow.xaml</DependentUpon> <DependentUpon>TerminalWindow.xaml</DependentUpon>
</Compile> </Compile>
@ -306,7 +339,43 @@
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
</Page> </Page>
<Page Include="Views\ClientInfoWindow.xaml"> <Page Include="Views\ClientInfo\ClientInfoWindow.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Views\ClientInfo\ShadowSocksControl.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Views\ClientInfo\Trojan_TCP_Control.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Views\ClientInfo\VLESS_KCP_Control.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Views\ClientInfo\VLESS_TCP_TLS_Control.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Views\ClientInfo\VLESS_WS_TLS_Control.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Views\ClientInfo\VLESS_XTLS_Control.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Views\ClientInfo\VMESS_KCP_Control.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Views\ClientInfo\VMESS_TCP_TLS_Control.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Views\ClientInfo\VMESS_WS_TLS_Control.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</Page> </Page>
@ -314,7 +383,15 @@
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
</Page> </Page>
<Page Include="Views\RecordEditorWindow.xaml"> <Page Include="Views\RecordEditor\RecordEditorWindow.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Views\RecordEditor\ServerInfoControl.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Views\RecordEditor\VlessEditorControl.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</Page> </Page>

View File

@ -10,19 +10,31 @@ using System.Threading.Tasks;
using System.Web; using System.Web;
using System.Windows; using System.Windows;
using System.Windows.Controls; using System.Windows.Controls;
using System.Windows.Input;
namespace ProxySU_Core.ViewModels namespace ProxySU_Core.ViewModels
{ {
public partial class XraySettingsViewModel : BaseViewModel public partial class XraySettingsViewModel : BaseViewModel
{ {
public XraySettings settings; public XraySettings settings;
private readonly ICommand _randomUuid;
public XraySettingsViewModel(XraySettings parameters) public XraySettingsViewModel(XraySettings parameters)
{ {
_randomUuid = new BaseCommand((obj) => GetUuid());
this.settings = parameters; this.settings = parameters;
Notify("VMESS_KCP_Type"); Notify("VMESS_KCP_Type");
} }
public ICommand RandomUuid
{
get
{
return _randomUuid;
}
}
public int Port public int Port
{ {
get => settings.Port; get => settings.Port;
@ -33,13 +45,23 @@ namespace ProxySU_Core.ViewModels
} }
} }
public int KcpPort public int VLESS_KCP_Port
{ {
get => settings.KcpPort; get => settings.VLESS_KCP_Port;
set set
{ {
settings.KcpPort = value; settings.VLESS_KCP_Port = value;
Notify("KcpPort"); Notify("VLESS_KCP_Port");
}
}
public int VMESS_KCP_Port
{
get => settings.VMESS_KCP_Port;
set
{
settings.VMESS_KCP_Port = value;
Notify("VMESS_KCP_Port");
} }
} }
@ -48,7 +70,7 @@ namespace ProxySU_Core.ViewModels
get => settings.ShadowSocksPort; get => settings.ShadowSocksPort;
set set
{ {
settings.KcpPort = value; settings.VMESS_KCP_Port = value;
Notify("ShadowSocksPort"); Notify("ShadowSocksPort");
} }
} }
@ -156,6 +178,14 @@ namespace ProxySU_Core.ViewModels
} }
} }
private void GetUuid()
{
UUID = Guid.NewGuid().ToString();
Notify("UUID");
}
} }
public partial class XraySettingsViewModel public partial class XraySettingsViewModel
@ -256,7 +286,6 @@ namespace ProxySU_Core.ViewModels
get => ShareLink.Build(XrayType.VLESS_TCP_XTLS, settings); get => ShareLink.Build(XrayType.VLESS_TCP_XTLS, settings);
} }
// vless tcp // vless tcp
public bool Checked_VLESS_TCP public bool Checked_VLESS_TCP
{ {
@ -296,6 +325,37 @@ namespace ProxySU_Core.ViewModels
get => ShareLink.Build(XrayType.VLESS_WS, settings); get => ShareLink.Build(XrayType.VLESS_WS, settings);
} }
// vless kcp
public string VLESS_KCP_Seed
{
get => settings.VLESS_KCP_Seed;
set => settings.VLESS_KCP_Seed = value;
}
public string VLESS_KCP_Type
{
get => settings.VLESS_KCP_Type;
set
{
var namespaceStr = typeof(ComboBoxItem).FullName + ":";
var trimValue = value.Replace(namespaceStr, "");
trimValue = trimValue.Trim();
settings.VLESS_KCP_Type = trimValue;
Notify("VLESS_KCP_Type");
}
}
public bool Checked_VLESS_KCP
{
get => settings.Types.Contains(XrayType.VMESS_KCP);
set
{
CheckBoxChanged(value, XrayType.VMESS_KCP);
Notify("Checked_VLESS_KCP");
}
}
public string VLESS_KCP_ShareLink
{
get => ShareLink.Build(XrayType.VLESS_KCP, settings);
}
} }
} }

View File

@ -0,0 +1,94 @@
<metro:MetroWindow x:Class="ProxySU_Core.Views.ClientInfo.ClientInfoWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:metro="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:local="clr-namespace:ProxySU_Core.Views.ClientInfo"
xmlns:dev="clr-namespace:ProxySU_Core.Models.Developers"
mc:Ignorable="d"
Title="查看配置" Height="500" Width="800">
<Grid>
<TabControl BorderThickness="0,1,0,0" BorderBrush="#DDD">
<TabItem metro:HeaderedControlHelper.HeaderFontSize="20" Padding="10,5,10,5" Header="VLESS">
<TabControl
Background="#fff"
Style="{StaticResource MaterialDesignNavigatilRailTabControl}"
Padding="10">
<TabItem Width="200"
IsEnabled="{Binding Settings.Checked_VLESS_XTLS}"
Style="{StaticResource MaterialDesignNavigationRailTabItem}"
Header="VLESS-TCP-XTLS">
<local:VLESS_XTLS_Control />
</TabItem>
<TabItem Width="200"
IsEnabled="{Binding Settings.Checked_VLESS_TCP}"
Style="{StaticResource MaterialDesignNavigationRailTabItem}"
Header="VLESS-TCP-TLS">
<local:VLESS_TCP_TLS_Control />
</TabItem>
<TabItem Width="200"
IsEnabled="{Binding Settings.Checked_VLESS_WS}"
Style="{StaticResource MaterialDesignNavigationRailTabItem}"
Header="VLESS-WebSocket-TLS">
<local:VLESS_WS_TLS_Control />
</TabItem>
</TabControl>
</TabItem>
<TabItem metro:HeaderedControlHelper.HeaderFontSize="20" Padding="10,5,10,5" Header="VMESS">
<TabControl
Padding="10"
Style="{StaticResource MaterialDesignNavigatilRailTabControl}">
<TabItem Width="200"
IsEnabled="{Binding Settings.Checked_VMESS_TCP}"
Style="{StaticResource MaterialDesignNavigationRailTabItem}"
Header="VMESS-TCP-TLS">
<local:VMESS_TCP_TLS_Control />
</TabItem>
<TabItem Width="200"
IsEnabled="{Binding Settings.Checked_VMESS_WS}"
Style="{StaticResource MaterialDesignNavigationRailTabItem}"
Header="VMESS-WebSocket-TLS">
<local:VMESS_WS_TLS_Control />
</TabItem>
<TabItem Width="200"
IsEnabled="{Binding Settings.Checked_VMESS_KCP}"
Style="{StaticResource MaterialDesignNavigationRailTabItem}"
Header="VMESS-mKCP">
<local:VMESS_KCP_Control />
</TabItem>
</TabControl>
</TabItem>
<TabItem metro:HeaderedControlHelper.HeaderFontSize="20" Padding="10,5,10,5" Header="Trojan">
<TabControl
Padding="10"
Style="{StaticResource MaterialDesignNavigatilRailTabControl}">
<TabItem Width="200"
IsEnabled="{Binding Settings.Checked_Trojan_TCP}"
Style="{StaticResource MaterialDesignNavigationRailTabItem}"
Header="VLESS-TCP-Trojan">
<local:Trojan_TCP_Control />
</TabItem>
</TabControl>
</TabItem>
<TabItem metro:HeaderedControlHelper.HeaderFontSize="20" Padding="10,5,10,5" Header="ShadowSocks">
<TabControl
Padding="10"
Style="{StaticResource MaterialDesignNavigatilRailTabControl}">
<TabItem Width="200"
IsEnabled="{Binding Settings.CheckedShadowSocks}"
Style="{StaticResource MaterialDesignNavigationRailTabItem}"
Header="ShadowSocks">
<local:ShadowSocksControl />
</TabItem>
</TabControl>
</TabItem>
</TabControl>
</Grid>
</metro:MetroWindow>

View File

@ -14,7 +14,7 @@ using System.Windows.Media;
using System.Windows.Media.Imaging; using System.Windows.Media.Imaging;
using System.Windows.Shapes; using System.Windows.Shapes;
namespace ProxySU_Core.Views namespace ProxySU_Core.Views.ClientInfo
{ {
/// <summary> /// <summary>
/// ClientInfoWindow.xaml 的交互逻辑 /// ClientInfoWindow.xaml 的交互逻辑

View File

@ -0,0 +1,34 @@
<UserControl x:Class="ProxySU_Core.Views.ClientInfo.ShadowSocksControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:ProxySU_Core.Views.ClientInfo"
mc:Ignorable="d">
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<Label Content="服务器地址" Width="120" />
<TextBox Text="{Binding Settings.Domain}" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="服务器端口" Width="120" />
<TextBox Text="{Binding Path=Settings.ShadowSocksPort,Mode=OneTime}" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="密码" Width="120" />
<TextBox Text="{Binding Settings.ShadowSocksPassword}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="加密方式" Width="120" />
<TextBox Text="{Binding Settings.ShadowSocksMethod}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="分享链接" Width="120" />
<TextBox Text="{Binding Settings.ShadowSocksShareLink,Mode=OneTime}" Width="300" IsReadOnly="True" />
</StackPanel>
</StackPanel>
</UserControl>

View File

@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace ProxySU_Core.Views.ClientInfo
{
/// <summary>
/// ShadowSocksClientInfoControl.xaml 的交互逻辑
/// </summary>
public partial class ShadowSocksControl : UserControl
{
public ShadowSocksControl()
{
InitializeComponent();
}
}
}

View File

@ -0,0 +1,29 @@
<UserControl x:Class="ProxySU_Core.Views.ClientInfo.Trojan_TCP_Control"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:ProxySU_Core.Views.ClientInfo"
mc:Ignorable="d">
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<Label Content="服务器地址" Width="120" />
<TextBox Text="{Binding Settings.Domain}" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="服务器端口" Width="120" />
<TextBox Text="443" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="密码" Width="120" />
<TextBox Text="{Binding Settings.TrojanPassword}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="分享链接" Width="120" />
<TextBox Text="{Binding Settings.Trojan_TCP_ShareLink,Mode=OneTime}" Width="300" IsReadOnly="True" />
</StackPanel>
</StackPanel>
</UserControl>

View File

@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace ProxySU_Core.Views.ClientInfo
{
/// <summary>
/// Trojan_TCP_Control.xaml 的交互逻辑
/// </summary>
public partial class Trojan_TCP_Control : UserControl
{
public Trojan_TCP_Control()
{
InitializeComponent();
}
}
}

View File

@ -0,0 +1,59 @@
<UserControl x:Class="ProxySU_Core.Views.ClientInfo.VLESS_KCP_Control"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:ProxySU_Core.Views.ClientInfo"
mc:Ignorable="d">
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<Label Content="地址(address)" Width="120" />
<TextBox Text="{Binding Settings.Domain}" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="端口(port)" Width="120" />
<TextBox Text="{Binding Path=Settings.VLESS_KCP_Port,Mode=OneTime}" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="用户ID(id)" Width="120" />
<TextBox Text="{Binding Settings.UUID}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="加密(security)" Width="120" />
<TextBox Text="none" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="传输协议(network)" Width="120" />
<TextBox Text="kcp" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="伪装类型(type)" Width="120" />
<TextBox Text="{Binding Settings.VMESS_KCP_Type}" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="伪装域名(host)" Width="120" />
<TextBox Text="{Binding Settings.Domain}" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="路径(path)" Width="120" />
<TextBox Text="{Binding Settings.VMESS_KCP_Seed}" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="传输安全(tls)" Width="120" />
<TextBox Text="" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="分享链接" Width="120" />
<TextBox Text="{Binding Settings.VMESS_KCP_ShareLink,Mode=OneTime}" Width="300" IsReadOnly="True" />
</StackPanel>
</StackPanel>
</UserControl>

View File

@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace ProxySU_Core.Views.ClientInfo
{
/// <summary>
/// VLESS_KCP_Control.xaml 的交互逻辑
/// </summary>
public partial class VLESS_KCP_Control : UserControl
{
public VLESS_KCP_Control()
{
InitializeComponent();
}
}
}

View File

@ -0,0 +1,64 @@
<UserControl x:Class="ProxySU_Core.Views.ClientInfo.VLESS_TCP_TLS_Control"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:ProxySU_Core.Views.ClientInfo"
mc:Ignorable="d">
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<Label Content="地址(address)" Width="120" />
<TextBox Text="{Binding Settings.Domain}" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="端口(port)" Width="120" />
<TextBox Text="443" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="用户ID(id)" Width="120" />
<TextBox Text="{Binding Settings.UUID}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="流控(flow)" Width="120" />
<TextBox Text="" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="加密(encryption)" Width="120" />
<TextBox Text="none" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="传输协议(network)" Width="120" />
<TextBox Text="tcp" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="伪装类型(type)" Width="120" />
<TextBox Text="none" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="伪装域名(host)" Width="120" />
<TextBox Text="{Binding Settings.Domain}" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="路径(path)" Width="120" />
<TextBox Text="{Binding Settings.VLESS_TCP_Path}" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="传输安全(tls)" Width="120" />
<TextBox Text="tls" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="分享链接" Width="120" />
<TextBox Text="{Binding Settings.VLESS_TCP_ShareLink,Mode=OneTime}" Width="300" IsReadOnly="True" />
</StackPanel>
</StackPanel>
</UserControl>

View File

@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace ProxySU_Core.Views.ClientInfo
{
/// <summary>
/// VLESS_TCP_TLS_Control.xaml 的交互逻辑
/// </summary>
public partial class VLESS_TCP_TLS_Control : UserControl
{
public VLESS_TCP_TLS_Control()
{
InitializeComponent();
}
}
}

View File

@ -0,0 +1,64 @@
<UserControl x:Class="ProxySU_Core.Views.ClientInfo.VLESS_WS_TLS_Control"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:ProxySU_Core.Views.ClientInfo"
mc:Ignorable="d">
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<Label Content="地址(address)" Width="120" />
<TextBox Text="{Binding Settings.Domain}" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="端口(port)" Width="120" />
<TextBox Text="443" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="用户ID(id)" Width="120" />
<TextBox Text="{Binding Settings.UUID}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="流控(flow)" Width="120" />
<TextBox Text="" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="加密(encryption)" Width="120" />
<TextBox Text="none" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="传输协议(network)" Width="120" />
<TextBox Text="ws" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="伪装类型(type)" Width="120" />
<TextBox Text="none" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="伪装域名(host)" Width="120" />
<TextBox Text="{Binding Settings.Domain}" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="路径(path)" Width="120" />
<TextBox Text="{Binding Settings.VLESS_WS_Path}" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="传输安全(tls)" Width="120" />
<TextBox Text="tls" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="分享链接" Width="120" />
<TextBox Text="{Binding Settings.VLESS_WS_ShareLink,Mode=OneTime}" Width="300" IsReadOnly="True" />
</StackPanel>
</StackPanel>
</UserControl>

View File

@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace ProxySU_Core.Views.ClientInfo
{
/// <summary>
/// VLESS_WS_TLS_Control.xaml 的交互逻辑
/// </summary>
public partial class VLESS_WS_TLS_Control : UserControl
{
public VLESS_WS_TLS_Control()
{
InitializeComponent();
}
}
}

View File

@ -0,0 +1,64 @@
<UserControl x:Class="ProxySU_Core.Views.ClientInfo.VLESS_XTLS_Control"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:ProxySU_Core.Views.ClientInfo"
mc:Ignorable="d">
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<Label Content="地址(address)" Width="120" />
<TextBox Text="{Binding Settings.Domain}" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="端口(port)" Width="120" />
<TextBox Text="443" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="用户ID(id)" Width="120" />
<TextBox Text="{Binding Settings.UUID}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="流控(flow)" Width="120" />
<TextBox Text="xtls-rprx-direct" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="加密(encryption)" Width="120" />
<TextBox Text="none" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="传输协议(network)" Width="120" />
<TextBox Text="tcp" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="伪装类型(type)" Width="120" />
<TextBox Text="none" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="伪装域名(host)" Width="120" />
<TextBox Text="{Binding Settings.Domain}" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="路径(path)" Width="120" />
<TextBox Text="" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="传输安全(tls)" Width="120" />
<TextBox Text="xtls" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="分享链接" Width="120" />
<TextBox Text="{Binding Settings.VLESS_TCP_XTLS_ShareLink,Mode=OneTime}" Width="300" IsReadOnly="True" />
</StackPanel>
</StackPanel>
</UserControl>

View File

@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace ProxySU_Core.Views.ClientInfo
{
/// <summary>
/// VLESS_XTLS_Control.xaml 的交互逻辑
/// </summary>
public partial class VLESS_XTLS_Control : UserControl
{
public VLESS_XTLS_Control()
{
InitializeComponent();
}
}
}

View File

@ -0,0 +1,59 @@
<UserControl x:Class="ProxySU_Core.Views.ClientInfo.VMESS_KCP_Control"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:ProxySU_Core.Views.ClientInfo"
mc:Ignorable="d">
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<Label Content="地址(address)" Width="120" />
<TextBox Text="{Binding Settings.Domain}" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="端口(port)" Width="120" />
<TextBox Text="{Binding Path=Settings.VMESS_KCP_Port,Mode=OneTime}" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="用户ID(id)" Width="120" />
<TextBox Text="{Binding Settings.UUID}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="加密(security)" Width="120" />
<TextBox Text="none" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="传输协议(network)" Width="120" />
<TextBox Text="kcp" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="伪装类型(type)" Width="120" />
<TextBox Text="{Binding Settings.VMESS_KCP_Type}" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="伪装域名(host)" Width="120" />
<TextBox Text="{Binding Settings.Domain}" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="路径(path)" Width="120" />
<TextBox Text="{Binding Settings.VMESS_KCP_Seed}" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="传输安全(tls)" Width="120" />
<TextBox Text="" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="分享链接" Width="120" />
<TextBox Text="{Binding Settings.VMESS_KCP_ShareLink,Mode=OneTime}" Width="300" IsReadOnly="True" />
</StackPanel>
</StackPanel>
</UserControl>

View File

@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace ProxySU_Core.Views.ClientInfo
{
/// <summary>
/// VMESS_KCP_Control.xaml 的交互逻辑
/// </summary>
public partial class VMESS_KCP_Control : UserControl
{
public VMESS_KCP_Control()
{
InitializeComponent();
}
}
}

View File

@ -0,0 +1,59 @@
<UserControl x:Class="ProxySU_Core.Views.ClientInfo.VMESS_TCP_TLS_Control"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:ProxySU_Core.Views.ClientInfo"
mc:Ignorable="d">
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<Label Content="地址(address)" Width="120" />
<TextBox Text="{Binding Settings.Domain}" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="端口(port)" Width="120" />
<TextBox Text="443" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="用户ID(id)" Width="120" />
<TextBox Text="{Binding Settings.UUID}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="加密(security)" Width="120" />
<TextBox Text="none" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="传输协议(network)" Width="120" />
<TextBox Text="tcp" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="伪装类型(type)" Width="120" />
<TextBox Text="http" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="伪装域名(host)" Width="120" />
<TextBox Text="{Binding Settings.Domain}" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="路径(path)" Width="120" />
<TextBox Text="{Binding Settings.VMESS_TCP_Path}" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="传输安全(tls)" Width="120" />
<TextBox Text="tls" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="分享链接" Width="120" />
<TextBox Text="{Binding Settings.VMESS_TCP_ShareLink,Mode=OneTime}" Width="300" IsReadOnly="True" />
</StackPanel>
</StackPanel>
</UserControl>

View File

@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace ProxySU_Core.Views.ClientInfo
{
/// <summary>
/// VMESS_TCP_TLS_Control.xaml 的交互逻辑
/// </summary>
public partial class VMESS_TCP_TLS_Control : UserControl
{
public VMESS_TCP_TLS_Control()
{
InitializeComponent();
}
}
}

View File

@ -0,0 +1,59 @@
<UserControl x:Class="ProxySU_Core.Views.ClientInfo.VMESS_WS_TLS_Control"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:ProxySU_Core.Views.ClientInfo"
mc:Ignorable="d">
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<Label Content="地址(address)" Width="120" />
<TextBox Text="{Binding Settings.Domain}" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="端口(port)" Width="120" />
<TextBox Text="443" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="用户ID(id)" Width="120" />
<TextBox Text="{Binding Settings.UUID}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="加密(security)" Width="120" />
<TextBox Text="none" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="传输协议(network)" Width="120" />
<TextBox Text="ws" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="伪装类型(type)" Width="120" />
<TextBox Text="none" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="伪装域名(host)" Width="120" />
<TextBox Text="{Binding Settings.Domain}" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="路径(path)" Width="120" />
<TextBox Text="{Binding Settings.VMESS_WS_Path}" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="传输安全(tls)" Width="120" />
<TextBox Text="tls" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="分享链接" Width="120" />
<TextBox Text="{Binding Settings.VMESS_WS_ShareLink,Mode=OneTime}" Width="300" IsReadOnly="True" />
</StackPanel>
</StackPanel>
</UserControl>

View File

@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace ProxySU_Core.Views.ClientInfo
{
/// <summary>
/// VMESS_WS_TLS_Control.xaml 的交互逻辑
/// </summary>
public partial class VMESS_WS_TLS_Control : UserControl
{
public VMESS_WS_TLS_Control()
{
InitializeComponent();
}
}
}

View File

@ -1,428 +0,0 @@
<metro:MetroWindow x:Class="ProxySU_Core.Views.ClientInfoWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:metro="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:local="clr-namespace:ProxySU_Core.Views"
xmlns:dev="clr-namespace:ProxySU_Core.Models.Developers"
mc:Ignorable="d"
Title="查看配置" Height="500" Width="800">
<Grid>
<TabControl
Background="#fff"
Style="{StaticResource MaterialDesignNavigatilRailTabControl}"
Padding="10">
<TabItem Width="200"
IsEnabled="{Binding Settings.Checked_VLESS_XTLS}"
Style="{StaticResource MaterialDesignNavigationRailTabItem}"
Header="VLESS-TCP-XTLS">
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<Label Content="地址(address)" Width="120" />
<TextBox Text="{Binding Settings.Domain}" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="端口(port)" Width="120" />
<TextBox Text="443" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="用户ID(id)" Width="120" />
<TextBox Text="{Binding Settings.UUID}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="流控(flow)" Width="120" />
<TextBox Text="xtls-rprx-splice" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="加密(encryption)" Width="120" />
<TextBox Text="none" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="传输协议(network)" Width="120" />
<TextBox Text="tcp" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="伪装类型(type)" Width="120" />
<TextBox Text="none" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="伪装域名(host)" Width="120" />
<TextBox Text="{Binding Settings.Domain}" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="路径(path)" Width="120" />
<TextBox Text="" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="传输安全(tls)" Width="120" />
<TextBox Text="xtls" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="分享链接" Width="120" />
<TextBox Text="{Binding Settings.VLESS_TCP_XTLS_ShareLink,Mode=OneTime}" Width="300" IsReadOnly="True" />
</StackPanel>
</StackPanel>
</TabItem>
<TabItem Width="200"
IsEnabled="{Binding Settings.Checked_VLESS_TCP}"
Style="{StaticResource MaterialDesignNavigationRailTabItem}"
Header="VLESS-TCP-TLS">
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<Label Content="地址(address)" Width="120" />
<TextBox Text="{Binding Settings.Domain}" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="端口(port)" Width="120" />
<TextBox Text="443" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="用户ID(id)" Width="120" />
<TextBox Text="{Binding Settings.UUID}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="流控(flow)" Width="120" />
<TextBox Text="" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="加密(encryption)" Width="120" />
<TextBox Text="none" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="传输协议(network)" Width="120" />
<TextBox Text="tcp" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="伪装类型(type)" Width="120" />
<TextBox Text="none" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="伪装域名(host)" Width="120" />
<TextBox Text="{Binding Settings.Domain}" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="路径(path)" Width="120" />
<TextBox Text="{Binding Settings.VLESS_TCP_Path}" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="传输安全(tls)" Width="120" />
<TextBox Text="tls" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="分享链接" Width="120" />
<TextBox Text="{Binding Settings.VLESS_TCP_ShareLink,Mode=OneTime}" Width="300" IsReadOnly="True" />
</StackPanel>
</StackPanel>
</TabItem>
<TabItem Width="200"
IsEnabled="{Binding Settings.Checked_VLESS_WS}"
Style="{StaticResource MaterialDesignNavigationRailTabItem}"
Header="VLESS-WebSocket-TLS">
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<Label Content="地址(address)" Width="120" />
<TextBox Text="{Binding Settings.Domain}" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="端口(port)" Width="120" />
<TextBox Text="443" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="用户ID(id)" Width="120" />
<TextBox Text="{Binding Settings.UUID}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="流控(flow)" Width="120" />
<TextBox Text="" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="加密(encryption)" Width="120" />
<TextBox Text="none" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="传输协议(network)" Width="120" />
<TextBox Text="ws" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="伪装类型(type)" Width="120" />
<TextBox Text="none" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="伪装域名(host)" Width="120" />
<TextBox Text="{Binding Settings.Domain}" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="路径(path)" Width="120" />
<TextBox Text="{Binding Settings.VLESS_WS_Path}" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="传输安全(tls)" Width="120" />
<TextBox Text="tls" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="分享链接" Width="120" />
<TextBox Text="{Binding Settings.VLESS_WS_ShareLink,Mode=OneTime}" Width="300" IsReadOnly="True" />
</StackPanel>
</StackPanel>
</TabItem>
<TabItem Width="200"
IsEnabled="{Binding Settings.Checked_VMESS_TCP}"
Style="{StaticResource MaterialDesignNavigationRailTabItem}"
Header="VMESS-TCP-TLS">
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<Label Content="地址(address)" Width="120" />
<TextBox Text="{Binding Settings.Domain}" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="端口(port)" Width="120" />
<TextBox Text="443" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="用户ID(id)" Width="120" />
<TextBox Text="{Binding Settings.UUID}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="加密(security)" Width="120" />
<TextBox Text="none" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="传输协议(network)" Width="120" />
<TextBox Text="tcp" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="伪装类型(type)" Width="120" />
<TextBox Text="http" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="伪装域名(host)" Width="120" />
<TextBox Text="{Binding Settings.Domain}" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="路径(path)" Width="120" />
<TextBox Text="{Binding Settings.VMESS_TCP_Path}" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="传输安全(tls)" Width="120" />
<TextBox Text="tls" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="分享链接" Width="120" />
<TextBox Text="{Binding Settings.VMESS_TCP_ShareLink,Mode=OneTime}" Width="300" IsReadOnly="True" />
</StackPanel>
</StackPanel>
</TabItem>
<TabItem Width="200"
IsEnabled="{Binding Settings.Checked_VMESS_WS}"
Style="{StaticResource MaterialDesignNavigationRailTabItem}"
Header="VMESS-WebSocket-TLS">
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<Label Content="地址(address)" Width="120" />
<TextBox Text="{Binding Settings.Domain}" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="端口(port)" Width="120" />
<TextBox Text="443" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="用户ID(id)" Width="120" />
<TextBox Text="{Binding Settings.UUID}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="加密(security)" Width="120" />
<TextBox Text="none" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="传输协议(network)" Width="120" />
<TextBox Text="ws" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="伪装类型(type)" Width="120" />
<TextBox Text="none" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="伪装域名(host)" Width="120" />
<TextBox Text="{Binding Settings.Domain}" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="路径(path)" Width="120" />
<TextBox Text="{Binding Settings.VMESS_WS_Path}" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="传输安全(tls)" Width="120" />
<TextBox Text="tls" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="分享链接" Width="120" />
<TextBox Text="{Binding Settings.VMESS_WS_ShareLink,Mode=OneTime}" Width="300" IsReadOnly="True" />
</StackPanel>
</StackPanel>
</TabItem>
<TabItem Width="200"
IsEnabled="{Binding Settings.Checked_VMESS_WS}"
Style="{StaticResource MaterialDesignNavigationRailTabItem}"
Header="VMESS-mKCP">
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<Label Content="地址(address)" Width="120" />
<TextBox Text="{Binding Settings.Domain}" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="端口(port)" Width="120" />
<TextBox Text="{Binding Path=Settings.KcpPort,Mode=OneTime}" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="用户ID(id)" Width="120" />
<TextBox Text="{Binding Settings.UUID}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="加密(security)" Width="120" />
<TextBox Text="none" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="传输协议(network)" Width="120" />
<TextBox Text="kcp" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="伪装类型(type)" Width="120" />
<TextBox Text="{Binding Settings.VMESS_KCP_Type}" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="伪装域名(host)" Width="120" />
<TextBox Text="{Binding Settings.Domain}" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="路径(path)" Width="120" />
<TextBox Text="{Binding Settings.VMESS_KCP_Seed}" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="传输安全(tls)" Width="120" />
<TextBox Text="" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="分享链接" Width="120" />
<TextBox Text="{Binding Settings.VMESS_KCP_ShareLink,Mode=OneTime}" Width="300" IsReadOnly="True" />
</StackPanel>
</StackPanel>
</TabItem>
<TabItem Width="200"
IsEnabled="{Binding Settings.Checked_Trojan_TCP}"
Style="{StaticResource MaterialDesignNavigationRailTabItem}"
Header="VLESS-TCP-Trojan">
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<Label Content="服务器地址" Width="120" />
<TextBox Text="{Binding Settings.Domain}" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="服务器端口" Width="120" />
<TextBox Text="443" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="密码" Width="120" />
<TextBox Text="{Binding Settings.TrojanPassword}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="分享链接" Width="120" />
<TextBox Text="{Binding Settings.Trojan_TCP_ShareLink,Mode=OneTime}" Width="300" IsReadOnly="True" />
</StackPanel>
</StackPanel>
</TabItem>
<TabItem Width="200"
IsEnabled="{Binding Settings.CheckedShadowSocks}"
Style="{StaticResource MaterialDesignNavigationRailTabItem}"
Header="ShadowSocks">
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<Label Content="服务器地址" Width="120" />
<TextBox Text="{Binding Settings.Domain}" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="服务器端口" Width="120" />
<TextBox Text="{Binding Path=ShadowSocksPort,Mode=OneTime}" IsReadOnly="True" Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="密码" Width="120" />
<TextBox Text="{Binding Settings.ShadowSocksPassword}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="加密方式" Width="120" />
<TextBox Text="{Binding Settings.ShadowSocksMethod}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="分享链接" Width="120" />
<TextBox Text="{Binding Settings.ShadowSocksShareLink,Mode=OneTime}" Width="300" IsReadOnly="True" />
</StackPanel>
</StackPanel>
</TabItem>
</TabControl>
</Grid>
</metro:MetroWindow>

View File

@ -5,6 +5,8 @@ using ProxySU_Core.Common;
using ProxySU_Core.Models; using ProxySU_Core.Models;
using ProxySU_Core.ViewModels; using ProxySU_Core.ViewModels;
using ProxySU_Core.Views; using ProxySU_Core.Views;
using ProxySU_Core.Views.ClientInfo;
using ProxySU_Core.Views.RecordEditor;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;

View File

@ -0,0 +1,241 @@
<metro:MetroWindow x:Class="ProxySU_Core.Views.RecordEditor.RecordEditorWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:metro="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:models="clr-namespace:ProxySU_Core.Models"
xmlns:local="clr-namespace:ProxySU_Core.Views.RecordEditor"
xmlns:converters="clr-namespace:ProxySU_Core.Converters"
mc:Ignorable="d"
Title="编辑主机信息" Height="600" Width="1000">
<Window.Resources>
<converters:VisibleConverter x:Key="VisibleConverter" />
</Window.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="320" />
<ColumnDefinition Width="10" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="0" />
</Grid.RowDefinitions>
<local:ServerInfoControl Grid.Column="0" Grid.Row="0" Margin="10" />
<GridSplitter IsEnabled="False" Grid.Column="1" Grid.Row="0" HorizontalAlignment="Stretch" />
<StackPanel Orientation="Vertical" Grid.Column="2" Grid.Row="0">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="40" />
</Grid.RowDefinitions>
<TabControl BorderThickness="0,1,0,0" BorderBrush="#DDD" Padding="10">
<TabItem metro:HeaderedControlHelper.HeaderFontSize="20" Padding="10,5,10,5" Header="VLESS">
<local:VlessEditorControl />
</TabItem>
<TabItem metro:HeaderedControlHelper.HeaderFontSize="20" Padding="10,5,10,5" Header="VMESS">
</TabItem>
<TabItem metro:HeaderedControlHelper.HeaderFontSize="20" Padding="10,5,10,5" Header="Trojan">
</TabItem>
<TabItem metro:HeaderedControlHelper.HeaderFontSize="20" Padding="10,5,10,5" Header="ShadowSocks">
</TabItem>
</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="保存"
Grid.Row="1"
Margin="0,0,20,0"
HorizontalAlignment="Right"
Width="120"
Height="32"
Click="Save" />
</Grid>
</StackPanel>
</Grid>
</metro:MetroWindow>

View File

@ -14,7 +14,7 @@ using System.Windows.Media;
using System.Windows.Media.Imaging; using System.Windows.Media.Imaging;
using System.Windows.Shapes; using System.Windows.Shapes;
namespace ProxySU_Core.Views namespace ProxySU_Core.Views.RecordEditor
{ {
/// <summary> /// <summary>
/// RecordEditorWindow.xaml 的交互逻辑 /// RecordEditorWindow.xaml 的交互逻辑
@ -49,10 +49,5 @@ namespace ProxySU_Core.Views
Close(); Close();
} }
public void RandomUuid(object sender, RoutedEventArgs e)
{
Settings.UUID = Guid.NewGuid().ToString();
}
} }
} }

View File

@ -0,0 +1,198 @@
<UserControl x:Class="ProxySU_Core.Views.RecordEditor.ServerInfoControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:ProxySU_Core.Views.RecordEditor"
xmlns:converters="clr-namespace:ProxySU_Core.Converters"
xmlns:models="clr-namespace:ProxySU_Core.Models"
mc:Ignorable="d">
<UserControl.Resources>
<converters:ProxyTypeConverter x:Key="ProxyTypeConverter" />
<converters:LoginSecretTypeConverter x:Key="LoginSecretTypeConverter" />
</UserControl.Resources>
<StackPanel>
<GroupBox
Style="{StaticResource MaterialDesignHeaderedContentControl}"
Header="{StaticResource ConnectionGroupName}">
<StackPanel Margin="10">
<StackPanel Orientation="Horizontal" Margin="0,0,0,0">
<TextBlock
Width="100"
Text="{DynamicResource HostTag}"
VerticalAlignment="Center"/>
<TextBox
Text="{Binding Path=Host.Tag}"
Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<TextBlock
Width="100"
Text="{DynamicResource HostAddress}"
VerticalAlignment="Center"/>
<TextBox
Text="{Binding Path=Host.Address}"
Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<TextBlock
Width="100"
Text="{DynamicResource HostPort}"
VerticalAlignment="Center" />
<TextBox
Text="{Binding Path=Host.Port}"
Width="200"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<TextBlock
Width="100"
Text="{DynamicResource HostUserName}"
VerticalAlignment="Center" />
<TextBox
Text="{Binding Path=Host.UserName}"
Width="200"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<TextBlock
Width="100"
Text="{DynamicResource HostLoginType}"
VerticalAlignment="Center" />
<RadioButton
GroupName="LoginType"
IsChecked="{
Binding Path=Host.SecretType,
Converter={StaticResource LoginSecretTypeConverter},
ConverterParameter={x:Static models:LoginSecretType.Password}
}"
Content="{DynamicResource PasswordLogin}" />
<RadioButton
Margin="10,0,0,0"
GroupName="LoginType"
IsChecked="{
Binding Path=Host.SecretType,
Converter={StaticResource LoginSecretTypeConverter},
ConverterParameter={x:Static models:LoginSecretType.PrivateKey}
}"
Content="{DynamicResource KeyLogin}" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0" Visibility="{Binding Host.PasswordVisiblity}">
<TextBlock
Width="100"
Text="{DynamicResource HostPassword}"
VerticalAlignment="Center" />
<TextBox
IsEnabled="{
Binding Path=Host.SecretType,
Converter={StaticResource LoginSecretTypeConverter},
ConverterParameter={x:Static models:LoginSecretType.Password}
}"
Text="{Binding Path=Host.Password}"
Width="200"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0" Visibility="{Binding Path=Host.KeyUploaderVisiblity}">
<TextBlock
Width="100"
Text="{DynamicResource KeyLoginField}"
VerticalAlignment="Center" />
<Button
IsEnabled="{
Binding Path=Host.SecretType,
Converter={StaticResource LoginSecretTypeConverter},
ConverterParameter={x:Static models:LoginSecretType.PrivateKey}
}"
Command="{Binding Path=Host.SelectKeyCommand}"
Content="{DynamicResource KeyUpload}" />
</StackPanel>
</StackPanel>
</GroupBox>
<GroupBox
Margin="0,10,0,0"
Header="{DynamicResource ProxyGroupName}"
Style="{StaticResource MaterialDesignHeaderedContentControl}">
<StackPanel Margin="10">
<StackPanel Orientation="Horizontal" Margin="0,0,0,0">
<TextBlock
Width="100"
Text="{DynamicResource ProxyType}" />
<RadioButton
GroupName="ProxyType"
Content="{StaticResource ProxyTypeNone}"
IsChecked="{
Binding Path=Host.Proxy.Type,
Converter={StaticResource ProxyTypeConverter},
ConverterParameter={x:Static models:LocalProxyType.None}
}"/>
<RadioButton
Margin="10,0,0,0"
GroupName="ProxyType"
Content="{DynamicResource ProxyTypeHttp}"
IsChecked="{
Binding Path=Host.Proxy.Type,
Converter={StaticResource ProxyTypeConverter},
ConverterParameter={x:Static models:LocalProxyType.Http}
}"/>
<RadioButton
Margin="10,0,0,0"
GroupName="ProxyType"
Content="{DynamicResource ProxyTypeSocks5}"
IsChecked="{
Binding Path=Host.Proxy.Type,
Converter={StaticResource ProxyTypeConverter},
ConverterParameter={x:Static models:LocalProxyType.Socks5}
}"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<TextBlock
Width="100"
Text="{DynamicResource ProxyHostName}"
VerticalAlignment="Center" />
<TextBox
Width="200"
Text="{Binding Path=Host.Proxy.Address}" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<TextBlock
Width="100"
Text="{DynamicResource ProxyHostPort}"
VerticalAlignment="Center"/>
<TextBox
Width="200"
Text="{Binding Path=Host.Proxy.Port}" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<TextBlock
Width="100"
Text="{DynamicResource ProxyUserName}"
VerticalAlignment="Center"/>
<TextBox
Width="200"
Text="{Binding Path=Host.Proxy.UserName}"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<TextBlock
Width="100"
Text="{DynamicResource ProxyPassword}"
VerticalAlignment="Center"/>
<TextBox
Width="200"
Text="{Binding Path=Host.Proxy.Password}"/>
</StackPanel>
</StackPanel>
</GroupBox>
</StackPanel>
</UserControl>

View File

@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace ProxySU_Core.Views.RecordEditor
{
/// <summary>
/// ServerInfoControl.xaml 的交互逻辑
/// </summary>
public partial class ServerInfoControl : UserControl
{
public ServerInfoControl()
{
InitializeComponent();
}
}
}

View File

@ -0,0 +1,139 @@
<UserControl x:Class="ProxySU_Core.Views.RecordEditor.VlessEditorControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:ProxySU_Core.Views.RecordEditor"
xmlns:converters="clr-namespace:ProxySU_Core.Converters"
mc:Ignorable="d">
<UserControl.Resources>
<converters:VisibleConverter x:Key="VisibleConverter" />
</UserControl.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="220"/>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="50" />
<RowDefinition Height="50" />
<RowDefinition Height="50" />
<RowDefinition Height="50" />
<RowDefinition Height="50" />
<RowDefinition Height="50" />
</Grid.RowDefinitions>
<!--XTLS-->
<CheckBox Content="VLESS Over TCP With XTLS&#x0a;性能数倍,首选方式。"
FontSize="13"
Grid.Row="0"
Grid.Column="0"
Style="{StaticResource MahApps.Styles.CheckBox}"
IsChecked="{Binding Path=Settings.Checked_VLESS_TCP_XTLS}"/>
<!--TCP-->
<CheckBox Content="VLESS over TCP with TLS&#x0a;仍推荐XTLS"
Grid.Row="1"
Grid.Column="0"
FontSize="13"
Style="{StaticResource MahApps.Styles.CheckBox}"
IsChecked="{Binding Path=Settings.Checked_VLESS_TCP}" />
<!--WebSocket-->
<CheckBox Content="VLESS over WS with TLS&#x0a;推荐支持CDN。"
Grid.Row="2"
Grid.Column="0"
Style="{StaticResource MahApps.Styles.CheckBox}"
IsChecked="{Binding Path=Settings.Checked_VLESS_WS}" />
<CheckBox Content="VLESS mKCP&#x0a;游戏推荐,延迟低。"
Grid.Row="3"
Grid.Column="0"
Style="{StaticResource MahApps.Styles.CheckBox}"
IsChecked="{Binding Path=Settings.Checked_VLESS_KCP}" />
<!--************************** 参数 **************************-->
<!--UUID-->
<StackPanel Margin="40,0,0,10"
Grid.Row="0"
Grid.Column="1"
Orientation="Horizontal">
<Label Content="UUID" Width="70" VerticalAlignment="Bottom" />
<TextBox Text="{Binding Path=Settings.UUID}"
VerticalAlignment="Bottom"
Width="260" />
<Button Style="{StaticResource MahApps.Styles.Button.Flat}"
Margin="5,0,0,0"
Height="30"
VerticalAlignment="Bottom"
Command="{Binding Path=Settings.RandomUuid}"
Content="随机" />
</StackPanel>
<!--Domain-->
<StackPanel Margin="40,0,0,10"
Grid.Row="1"
Grid.Column="1"
Orientation="Horizontal">
<Label Content="域名" Width="70" VerticalAlignment="Bottom" />
<TextBox Text="{Binding Path=Settings.Domain}" Width="260" VerticalAlignment="Bottom" />
</StackPanel>
<!--Mask Domain-->
<StackPanel Margin="40,0,0,10"
Grid.Row="2"
Grid.Column="1"
Orientation="Horizontal">
<Label Content="伪装域名" Width="70" VerticalAlignment="Bottom" />
<TextBox Text="{Binding Path=Settings.MaskDomain}" Width="260" VerticalAlignment="Bottom" />
</StackPanel>
<!--WebSocket Path-->
<StackPanel Margin="40,0,0,10"
Grid.Row="3"
Grid.Column="1"
Orientation="Horizontal"
Visibility="{
Binding Path=Settings.Checked_VLESS_WS,
Converter={StaticResource VisibleConverter}
}">
<Label Content="WS路径" Width="70" VerticalAlignment="Bottom" />
<TextBox Text="{Binding Path=Settings.VLESS_WS_Path}"
VerticalAlignment="Bottom"
Width="260" />
</StackPanel>
<!--kcp port-->
<StackPanel Margin="40,0,0,10"
Grid.Row="4"
Grid.Column="1"
Orientation="Horizontal"
Visibility="{
Binding Path=Settings.Checked_VLESS_KCP,
Converter={StaticResource VisibleConverter}
}">
<Label Content="KCP端口" Width="70" VerticalAlignment="Bottom" />
<TextBox Text="{Binding Path=Settings.VLESS_KCP_Port}" Width="100" VerticalAlignment="Bottom" />
</StackPanel>
<!--xray prot-->
<StackPanel Margin="40,0,0,10"
Grid.Row="5"
Grid.Column="1"
Orientation="Horizontal">
<Label Content="Xray端口" Width="70" VerticalAlignment="Bottom" />
<TextBox Text="{Binding Path=Settings.Port}" Width="100" VerticalAlignment="Bottom" />
<Label Content="默认端口443不建议修改" VerticalAlignment="Bottom" Foreground="Red" />
</StackPanel>
</Grid>
</UserControl>

View File

@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace ProxySU_Core.Views.RecordEditor
{
/// <summary>
/// VlessEditorControl.xaml 的交互逻辑
/// </summary>
public partial class VlessEditorControl : UserControl
{
public VlessEditorControl()
{
InitializeComponent();
}
}
}

View File

@ -1,412 +0,0 @@
<metro:MetroWindow x:Class="ProxySU_Core.Views.RecordEditorWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:metro="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:models="clr-namespace:ProxySU_Core.Models"
xmlns:local="clr-namespace:ProxySU_Core.Views"
xmlns:converters="clr-namespace:ProxySU_Core.Converters"
mc:Ignorable="d"
Title="编辑主机信息" Height="600" Width="980">
<Window.Resources>
<converters:LoginSecretTypeConverter x:Key="LoginSecretTypeConverter" />
<converters:ProxyTypeConverter x:Key="ProxyTypeConverter" />
<converters:VisibleConverter x:Key="VisibleConverter" />
</Window.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="320" />
<ColumnDefinition Width="10" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="0" />
</Grid.RowDefinitions>
<StackPanel Grid.Column="0" Grid.Row="0" Margin="10">
<GroupBox
Style="{StaticResource MaterialDesignHeaderedContentControl}"
Header="{StaticResource ConnectionGroupName}">
<StackPanel Margin="10">
<StackPanel Orientation="Horizontal" Margin="0,0,0,0">
<TextBlock
Width="100"
Text="{DynamicResource HostTag}"
VerticalAlignment="Center"/>
<TextBox
Text="{Binding Path=Host.Tag}"
Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<TextBlock
Width="100"
Text="{DynamicResource HostAddress}"
VerticalAlignment="Center"/>
<TextBox
Text="{Binding Path=Host.Address}"
Width="200" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<TextBlock
Width="100"
Text="{DynamicResource HostPort}"
VerticalAlignment="Center" />
<TextBox
Text="{Binding Path=Host.Port}"
Width="200"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<TextBlock
Width="100"
Text="{DynamicResource HostUserName}"
VerticalAlignment="Center" />
<TextBox
Text="{Binding Path=Host.UserName}"
Width="200"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<TextBlock
Width="100"
Text="{DynamicResource HostLoginType}"
VerticalAlignment="Center" />
<RadioButton
GroupName="LoginType"
IsChecked="{
Binding Path=Host.SecretType,
Converter={StaticResource LoginSecretTypeConverter},
ConverterParameter={x:Static models:LoginSecretType.Password}
}"
Content="{DynamicResource PasswordLogin}" />
<RadioButton
Margin="10,0,0,0"
GroupName="LoginType"
IsChecked="{
Binding Path=Host.SecretType,
Converter={StaticResource LoginSecretTypeConverter},
ConverterParameter={x:Static models:LoginSecretType.PrivateKey}
}"
Content="{DynamicResource KeyLogin}" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0" Visibility="{Binding Host.PasswordVisiblity}">
<TextBlock
Width="100"
Text="{DynamicResource HostPassword}"
VerticalAlignment="Center" />
<TextBox
IsEnabled="{
Binding Path=Host.SecretType,
Converter={StaticResource LoginSecretTypeConverter},
ConverterParameter={x:Static models:LoginSecretType.Password}
}"
Text="{Binding Path=Host.Password}"
Width="200"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0" Visibility="{Binding Path=Host.KeyUploaderVisiblity}">
<TextBlock
Width="100"
Text="{DynamicResource KeyLoginField}"
VerticalAlignment="Center" />
<Button
IsEnabled="{
Binding Path=Host.SecretType,
Converter={StaticResource LoginSecretTypeConverter},
ConverterParameter={x:Static models:LoginSecretType.PrivateKey}
}"
Command="{Binding Path=Host.SelectKeyCommand}"
Content="{DynamicResource KeyUpload}" />
</StackPanel>
</StackPanel>
</GroupBox>
<GroupBox
Margin="0,10,0,0"
Header="{DynamicResource ProxyGroupName}"
Style="{StaticResource MaterialDesignHeaderedContentControl}">
<StackPanel Margin="10">
<StackPanel Orientation="Horizontal" Margin="0,0,0,0">
<TextBlock
Width="100"
Text="{DynamicResource ProxyType}" />
<RadioButton
GroupName="ProxyType"
Content="{StaticResource ProxyTypeNone}"
IsChecked="{
Binding Path=Host.Proxy.Type,
Converter={StaticResource ProxyTypeConverter},
ConverterParameter={x:Static models:LocalProxyType.None}
}"/>
<RadioButton
Margin="10,0,0,0"
GroupName="ProxyType"
Content="{DynamicResource ProxyTypeHttp}"
IsChecked="{
Binding Path=Host.Proxy.Type,
Converter={StaticResource ProxyTypeConverter},
ConverterParameter={x:Static models:LocalProxyType.Http}
}"/>
<RadioButton
Margin="10,0,0,0"
GroupName="ProxyType"
Content="{DynamicResource ProxyTypeSocks5}"
IsChecked="{
Binding Path=Host.Proxy.Type,
Converter={StaticResource ProxyTypeConverter},
ConverterParameter={x:Static models:LocalProxyType.Socks5}
}"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<TextBlock
Width="100"
Text="{DynamicResource ProxyHostName}"
VerticalAlignment="Center" />
<TextBox
Width="200"
Text="{Binding Path=Host.Proxy.Address}" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<TextBlock
Width="100"
Text="{DynamicResource ProxyHostPort}"
VerticalAlignment="Center"/>
<TextBox
Width="200"
Text="{Binding Path=Host.Proxy.Port}" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<TextBlock
Width="100"
Text="{DynamicResource ProxyUserName}"
VerticalAlignment="Center"/>
<TextBox
Width="200"
Text="{Binding Path=Host.Proxy.UserName}"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<TextBlock
Width="100"
Text="{DynamicResource ProxyPassword}"
VerticalAlignment="Center"/>
<TextBox
Width="200"
Text="{Binding Path=Host.Proxy.Password}"/>
</StackPanel>
</StackPanel>
</GroupBox>
</StackPanel>
<GridSplitter Grid.Column="1" Grid.Row="0" HorizontalAlignment="Stretch" />
<StackPanel Orientation="Horizontal" Grid.Column="2" Grid.Row="0" Margin="10">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="40" />
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Orientation="Horizontal">
<StackPanel>
<Label Content="默认端口请避开1000-1999回落端口" />
<CheckBox Content="VLESS OVER TCP with XTLS"
Style="{StaticResource MahApps.Styles.CheckBox}"
IsChecked="{Binding Path=Settings.Checked_VLESS_TCP_XTLS}"
Margin="0,10,0,0" />
<Label Content="数倍性能首选方式不支持CDN" Margin="20,0,0,0" />
<CheckBox Content="VLESS over TCP with TLS"
Style="{StaticResource MahApps.Styles.CheckBox}"
IsChecked="{Binding Path=Settings.Checked_VLESS_TCP}"
Margin="0,10,0,0" />
<Label Content="不支持CDN" Margin="20,0,0,0" />
<CheckBox Content="VLESS over WS with TLS"
Style="{StaticResource MahApps.Styles.CheckBox}"
IsChecked="{Binding Path=Settings.Checked_VLESS_WS}"
Margin="0,10,0,0" />
<Label Content="推荐支持CDN" Margin="20,0,0,0" />
<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.KcpPort}" 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="保存"
Grid.Row="1"
HorizontalAlignment="Right"
Width="120"
Height="32"
Click="Save" />
</Grid>
</StackPanel>
</Grid>
</metro:MetroWindow>