1
0
mirror of https://github.com/proxysu/ProxySU.git synced 2024-11-21 20:56:08 +03:00
This commit is contained in:
next-autumn 2021-05-22 11:12:26 +08:00
parent 4cd4509cb9
commit 5f209b7c1d
61 changed files with 1397 additions and 145 deletions

View File

@ -1,10 +1,10 @@
<metro:MetroWindow x:Class="ProxySU_Core.Views.ClientInfo.ClientInfoWindow"
<metro:MetroWindow x:Class="ProxySuper.WPF.Controls.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:local="clr-namespace:ProxySuper.WPF.Controls"
xmlns:dev="clr-namespace:ProxySU_Core.Models.Developers"
xmlns:models="clr-namespace:ProxySU_Core.Models"
mc:Ignorable="d"

View File

@ -18,7 +18,7 @@ using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
namespace ProxySU_Core.Views.ClientInfo
namespace ProxySuper.WPF.Controls
{
/// <summary>
/// ClientInfoWindow.xaml 的交互逻辑
@ -36,93 +36,5 @@ namespace ProxySU_Core.Views.ClientInfo
Settings = new XraySettingsViewModel(record.Settings);
DataContext = this;
}
private void BuildQrCode(object sender, SelectionChangedEventArgs e)
{
var tabControl = e.Source as TabControl;
var item = (tabControl.SelectedItem as TabItem);
if (item == null) return;
var type = (XrayType)item.Tag;
BuildQrCode(type);
}
private void SaveImage(object sender, RoutedEventArgs e)
{
SaveFileDialog sfd = new SaveFileDialog();
sfd.FileName += QrImage.Tag;
sfd.Filter = "Image Files (*.bmp, *.png, *.jpg)|*.bmp;*.png;*.jpg | All Files | *.*";
sfd.RestoreDirectory = true;//保存对话框是否记忆上次打开的目录
if (sfd.ShowDialog() == true)
{
var encoder = new PngBitmapEncoder();
encoder.Frames.Add(BitmapFrame.Create((BitmapSource)QrImage.Source));
using (FileStream stream = new FileStream(sfd.FileName, FileMode.Create))
encoder.Save(stream);
}
}
private void BuildQrCode(XrayType type)
{
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;
QrImage.Tag = type.ToString();
}
}
}

View File

@ -1,9 +1,9 @@
<UserControl x:Class="ProxySU_Core.Views.ClientInfo.ShadowSocksControl"
<UserControl x:Class="ProxySuper.WPF.Controls.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"
xmlns:local="clr-namespace:ProxySuper.WPF.Controls"
mc:Ignorable="d">
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">

View File

@ -13,7 +13,7 @@ using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace ProxySU_Core.Views.ClientInfo
namespace ProxySuper.WPF.Controls
{
/// <summary>
/// ShadowSocksClientInfoControl.xaml 的交互逻辑

View File

@ -1,9 +1,9 @@
<UserControl x:Class="ProxySU_Core.Views.ClientInfo.Trojan_TCP_Control"
<UserControl x:Class="ProxySuper.WPF.Controls.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"
xmlns:local="clr-namespace:ProxySuper.WPF.Controls"
mc:Ignorable="d">
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">

View File

@ -13,7 +13,7 @@ using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace ProxySU_Core.Views.ClientInfo
namespace ProxySuper.WPF.Controls
{
/// <summary>
/// Trojan_TCP_Control.xaml 的交互逻辑

View File

@ -1,9 +1,9 @@
<UserControl x:Class="ProxySU_Core.Views.ClientInfo.VLESS_KCP_Control"
<UserControl x:Class="ProxySuper.WPF.Controls.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"
xmlns:local="clr-namespace:ProxySuper.WPF.Controls"
mc:Ignorable="d">
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">

View File

@ -13,7 +13,7 @@ using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace ProxySU_Core.Views.ClientInfo
namespace ProxySuper.WPF.Controls
{
/// <summary>
/// VLESS_KCP_Control.xaml 的交互逻辑

View File

@ -1,9 +1,9 @@
<UserControl x:Class="ProxySU_Core.Views.ClientInfo.VLESS_TCP_TLS_Control"
<UserControl x:Class="ProxySuper.WPF.Controls.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"
xmlns:local="clr-namespace:ProxySuper.WPF.Controls"
mc:Ignorable="d">
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">

View File

@ -13,7 +13,7 @@ using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace ProxySU_Core.Views.ClientInfo
namespace ProxySuper.WPF.Controls
{
/// <summary>
/// VLESS_TCP_TLS_Control.xaml 的交互逻辑

View File

@ -1,9 +1,9 @@
<UserControl x:Class="ProxySU_Core.Views.ClientInfo.VLESS_WS_TLS_Control"
<UserControl x:Class="ProxySuper.WPF.Controls.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"
xmlns:local="clr-namespace:ProxySuper.WPF.Controls"
mc:Ignorable="d">
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">

View File

@ -13,7 +13,7 @@ using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace ProxySU_Core.Views.ClientInfo
namespace ProxySuper.WPF.Controls
{
/// <summary>
/// VLESS_WS_TLS_Control.xaml 的交互逻辑

View File

@ -1,9 +1,9 @@
<UserControl x:Class="ProxySU_Core.Views.ClientInfo.VLESS_XTLS_Control"
<UserControl x:Class="ProxySuper.WPF.Controls.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"
xmlns:local="clr-namespace:ProxySuper.WPF.Controls"
mc:Ignorable="d">
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">

View File

@ -13,7 +13,7 @@ using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace ProxySU_Core.Views.ClientInfo
namespace ProxySuper.WPF.Controls
{
/// <summary>
/// VLESS_XTLS_Control.xaml 的交互逻辑

View File

@ -1,9 +1,9 @@
<UserControl x:Class="ProxySU_Core.Views.ClientInfo.VLESS_gRPC_Control"
<UserControl x:Class="ProxySuper.WPF.Controls.VLESS_gRPC_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"
xmlns:local="clr-namespace:ProxySuper.WPF.Controls"
mc:Ignorable="d">
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">

View File

@ -13,7 +13,7 @@ using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace ProxySU_Core.Views.ClientInfo
namespace ProxySuper.WPF.Controls
{
/// <summary>
/// VLESS_gRPC_Control.xaml 的交互逻辑

View File

@ -1,9 +1,9 @@
<UserControl x:Class="ProxySU_Core.Views.ClientInfo.VMESS_KCP_Control"
<UserControl x:Class="ProxySuper.WPF.Controls.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"
xmlns:local="clr-namespace:ProxySuper.WPF.Controls"
mc:Ignorable="d">
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">

View File

@ -13,7 +13,7 @@ using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace ProxySU_Core.Views.ClientInfo
namespace ProxySuper.WPF.Controls
{
/// <summary>
/// VMESS_KCP_Control.xaml 的交互逻辑

View File

@ -1,9 +1,9 @@
<UserControl x:Class="ProxySU_Core.Views.ClientInfo.VMESS_TCP_TLS_Control"
<UserControl x:Class="ProxySuper.WPF.Controls.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"
xmlns:local="clr-namespace:ProxySuper.WPF.Controls"
mc:Ignorable="d">
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">

View File

@ -13,7 +13,7 @@ using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace ProxySU_Core.Views.ClientInfo
namespace ProxySuper.WPF.Controls
{
/// <summary>
/// VMESS_TCP_TLS_Control.xaml 的交互逻辑

View File

@ -1,9 +1,9 @@
<UserControl x:Class="ProxySU_Core.Views.ClientInfo.VMESS_WS_TLS_Control"
<UserControl x:Class="ProxySuper.WPF.Controls.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"
xmlns:local="clr-namespace:ProxySuper.WPF.Controls"
mc:Ignorable="d">
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">

View File

@ -13,7 +13,7 @@ using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace ProxySU_Core.Views.ClientInfo
namespace ProxySuper.WPF.Controls
{
/// <summary>
/// VMESS_WS_TLS_Control.xaml 的交互逻辑

View File

@ -5,7 +5,7 @@ using ProxySU_Core.Common;
using ProxySU_Core.Models;
using ProxySU_Core.ViewModels;
using ProxySU_Core.Views;
using ProxySU_Core.Views.ClientInfo;
using ProxySuper.WPF.Controls;
using ProxySU_Core.Views.RecordEditor;
using System;
using System.Collections.Generic;

View File

@ -1,4 +1,5 @@
using System;
using ProxySuper.Core.Services;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@ -22,5 +23,13 @@ namespace ProxySuper.Core.Models.Projects
/// ss port
/// </summary>
public int ShadowSocksPort { get; set; }
public string ShadowSocksShareLink
{
get
{
return ShareLink.Build(XrayType.ShadowsocksAEAD, this);
}
}
}
}

View File

@ -1,4 +1,5 @@
using System;
using ProxySuper.Core.Services;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@ -9,5 +10,13 @@ namespace ProxySuper.Core.Models.Projects
public partial class XraySettings
{
public string TrojanPassword { get; set; }
public string Trojan_TCP_ShareLink
{
get
{
return ShareLink.Build(XrayType.Trojan_TCP, this);
}
}
}
}

View File

@ -1,4 +1,5 @@
using System;
using ProxySuper.Core.Services;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@ -8,11 +9,44 @@ namespace ProxySuper.Core.Models.Projects
{
public partial class XraySettings
{
/// <summary>
/// vless xtls shareLink
/// </summary>
public string VLESS_TCP_XTLS_ShareLink
{
get
{
return ShareLink.Build(XrayType.VLESS_TCP_XTLS, this);
}
}
/// <summary>
/// vless tcp shareLink
/// </summary>
public string VLESS_TCP_ShareLink
{
get
{
return ShareLink.Build(XrayType.VLESS_TCP, this);
}
}
/// <summary>
/// websocket path
/// </summary>
public string VLESS_WS_Path { get; set; }
/// <summary>
/// VLESS WS ShareLink
/// </summary>
public string VLESS_WS_ShareLink
{
get
{
return ShareLink.Build(XrayType.VLESS_WS, this);
}
}
/// <summary>
/// kcp seed
/// </summary>
@ -28,6 +62,17 @@ namespace ProxySuper.Core.Models.Projects
/// </summary>
public int VLESS_KCP_Port { get; set; }
/// <summary>
/// VLESS KCP ShareLink
/// </summary>
public string VLESS_KCP_ShareLink
{
get
{
return ShareLink.Build(XrayType.VLESS_KCP, this);
}
}
/// <summary>
/// grpc port
/// </summary>
@ -37,5 +82,16 @@ namespace ProxySuper.Core.Models.Projects
/// grpc service name
/// </summary>
public string VLESS_gRPC_ServiceName { get; set; }
/// <summary>
/// vless grpc share link
/// </summary>
public string VLESS_gRPC_ShareLink
{
get
{
return ShareLink.Build(XrayType.VLESS_gRPC, this);
}
}
}
}

View File

@ -1,4 +1,5 @@
using System;
using ProxySuper.Core.Services;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@ -13,11 +14,33 @@ namespace ProxySuper.Core.Models.Projects
/// </summary>
public string VMESS_WS_Path { get; set; }
/// <summary>
/// vmess ws sharelink
/// </summary>
public string VMESS_WS_ShareLink
{
get
{
return ShareLink.Build(XrayType.VMESS_WS, this);
}
}
/// <summary>
/// mvess tcp path
/// </summary>
public string VMESS_TCP_Path { get; set; }
/// <summary>
/// vmess tcp ShareLink
/// </summary>
public string VMESS_TCP_ShareLink
{
get
{
return ShareLink.Build(XrayType.VMESS_TCP, this);
}
}
/// <summary>
/// vmess kcp seed
/// </summary>
@ -32,5 +55,16 @@ namespace ProxySuper.Core.Models.Projects
/// vmess kcp port
/// </summary>
public int VMESS_KCP_Port { get; set; }
/// <summary>
/// vmess kcp ShareLink
/// </summary>
public string VMESS_KCP_ShareLink
{
get
{
return ShareLink.Build(XrayType.VMESS_KCP, this);
}
}
}
}

View File

@ -63,6 +63,9 @@ namespace ProxySuper.Core.Models
[JsonIgnore]
public IMvxCommand NavToEditorCommand => new MvxAsyncCommand(NavigateToEditor);
[JsonIgnore]
public IMvxCommand NavToConfigCommand => new MvxAsyncCommand(NavigateToConfig);
public async Task NavigateToEditor()
{
if (Type == ProjectType.Xray)
@ -97,5 +100,17 @@ namespace ProxySuper.Core.Models
await NavigationService.Navigate<TrojanGoInstallerViewModel, Record>(this);
}
}
public async Task NavigateToConfig()
{
if (Type == ProjectType.Xray)
{
await NavigationService.Navigate<XrayConfigViewModel, XraySettings>(this.XraySettings);
}
if (Type == ProjectType.TrojanGo)
{
//await NavigationService.Navigate<TrojanGoInstallerViewModel, Record>(this);
}
}
}
}

View File

@ -40,6 +40,9 @@
</Reference>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<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">
<HintPath>..\packages\SSH.NET.2020.0.1\lib\net40\Renci.SshNet.dll</HintPath>
</Reference>
@ -89,6 +92,7 @@
<Compile Include="ViewModels\HomeViewModel.cs" />
<Compile Include="ViewModels\TrojanGoEditorViewModel.cs" />
<Compile Include="ViewModels\TrojanGoInstallerViewModel.cs" />
<Compile Include="ViewModels\XrayConfigViewModel.cs" />
<Compile Include="ViewModels\XrayEditorViewModel.cs" />
<Compile Include="ViewModels\XrayInstallerViewModel.cs" />
</ItemGroup>

View File

@ -0,0 +1,29 @@
using Microsoft.Win32;
using MvvmCross.ViewModels;
using ProxySuper.Core.Models.Projects;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media.Imaging;
using QRCoder;
namespace ProxySuper.Core.ViewModels
{
public class XrayConfigViewModel : MvxViewModel<XraySettings>
{
public XraySettings Settings { get; set; }
public override void Prepare(XraySettings parameter)
{
Settings = parameter;
}
}
}

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MvvmCross" version="7.1.2" targetFramework="net461" />
<package id="QRCoder" version="1.4.1" targetFramework="net461" />
<package id="SSH.NET" version="2020.0.1" targetFramework="net461" />
<package id="System.Console" version="4.3.1" targetFramework="net461" />
</packages>

View File

@ -0,0 +1,34 @@
<UserControl x:Class="ProxySuper.WPF.Controls.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:ProxySuper.WPF.Controls"
mc:Ignorable="d">
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<Label Content="地址(Address)" Width="140" />
<TextBox Text="{Binding Settings.Domain}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="端口(Port)" Width="140" />
<TextBox Text="{Binding Path=Settings.ShadowSocksPort,Mode=OneTime}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="密码(Password)" Width="140" />
<TextBox Text="{Binding Settings.ShadowSocksPassword}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="加密方式(Method)" Width="140" />
<TextBox Text="{Binding Settings.ShadowSocksMethod}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="分享链接(ShareLink)" Width="140" />
<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 ProxySuper.WPF.Controls
{
/// <summary>
/// ShadowSocksClientInfoControl.xaml 的交互逻辑
/// </summary>
public partial class ShadowSocksControl : UserControl
{
public ShadowSocksControl()
{
InitializeComponent();
}
}
}

View File

@ -0,0 +1,29 @@
<UserControl x:Class="ProxySuper.WPF.Controls.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:ProxySuper.WPF.Controls"
mc:Ignorable="d">
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<Label Content="服务器地址(Address)" Width="140" />
<TextBox Text="{Binding Settings.Domain}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="服务器端口(Port)" Width="140" />
<TextBox Text="443" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="密码(Pwd)" Width="140" />
<TextBox Text="{Binding Settings.TrojanPassword}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="分享链接(ShareLink)" Width="140" />
<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 ProxySuper.WPF.Controls
{
/// <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="ProxySuper.WPF.Controls.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:ProxySuper.WPF.Controls"
mc:Ignorable="d">
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<Label Content="地址(address)" Width="140" />
<TextBox Text="{Binding Settings.Domain}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="端口(port)" Width="140" />
<TextBox Text="{Binding Path=Settings.VLESS_KCP_Port,Mode=OneTime}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="用户ID(id)" Width="140" />
<TextBox Text="{Binding Settings.UUID}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="加密(security)" Width="140" />
<TextBox Text="none" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="传输协议(network)" Width="140" />
<TextBox Text="kcp" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="伪装类型(type)" Width="140" />
<TextBox Text="{Binding Settings.VLESS_KCP_Type}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="伪装域名(host)" Width="140" />
<TextBox Text="{Binding Settings.Domain}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="路径(path)" Width="140" />
<TextBox Text="{Binding Settings.VLESS_KCP_Seed}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="传输安全(tls)" Width="140" />
<TextBox Text="" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="分享链接(ShareLink)" Width="140" />
<TextBox Text="{Binding Settings.VLESS_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 ProxySuper.WPF.Controls
{
/// <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="ProxySuper.WPF.Controls.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:ProxySuper.WPF.Controls"
mc:Ignorable="d">
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<Label Content="地址(address)" Width="140" />
<TextBox Text="{Binding Settings.Domain}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="端口(port)" Width="140" />
<TextBox Text="443" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="用户ID(id)" Width="140" />
<TextBox Text="{Binding Settings.UUID}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="流控(flow)" Width="140" />
<TextBox Text="" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="加密(encryption)" Width="140" />
<TextBox Text="none" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="传输协议(network)" Width="140" />
<TextBox Text="tcp" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="伪装类型(type)" Width="140" />
<TextBox Text="none" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="伪装域名(host)" Width="140" />
<TextBox Text="{Binding Settings.Domain}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="路径(path)" Width="140" />
<TextBox Text="" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="传输安全(tls)" Width="140" />
<TextBox Text="tls" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="分享链接(ShareLink)" Width="140" />
<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 ProxySuper.WPF.Controls
{
/// <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="ProxySuper.WPF.Controls.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:ProxySuper.WPF.Controls"
mc:Ignorable="d">
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<Label Content="地址(address)" Width="140" />
<TextBox Text="{Binding Settings.Domain}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="端口(port)" Width="140" />
<TextBox Text="443" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="用户ID(id)" Width="140" />
<TextBox Text="{Binding Settings.UUID}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="流控(flow)" Width="140" />
<TextBox Text="" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="加密(encryption)" Width="140" />
<TextBox Text="none" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="传输协议(network)" Width="140" />
<TextBox Text="ws" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="伪装类型(type)" Width="140" />
<TextBox Text="none" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="伪装域名(host)" Width="140" />
<TextBox Text="{Binding Settings.Domain}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="路径(path)" Width="140" />
<TextBox Text="{Binding Settings.VLESS_WS_Path}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="传输安全(tls)" Width="140" />
<TextBox Text="tls" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="分享链接(ShareLink)" Width="140" />
<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 ProxySuper.WPF.Controls
{
/// <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="ProxySuper.WPF.Controls.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:ProxySuper.WPF.Controls"
mc:Ignorable="d">
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<Label Content="地址(address)" Width="140" />
<TextBox Text="{Binding Settings.Domain}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="端口(port)" Width="140" />
<TextBox Text="443" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="用户ID(id)" Width="140" />
<TextBox Text="{Binding Settings.UUID}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="流控(flow)" Width="140" />
<TextBox Text="xtls-rprx-direct" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="加密(encryption)" Width="140" />
<TextBox Text="none" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="传输协议(network)" Width="140" />
<TextBox Text="tcp" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="伪装类型(type)" Width="140" />
<TextBox Text="none" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="伪装域名(host)" Width="140" />
<TextBox Text="{Binding Settings.Domain}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="路径(path)" Width="140" />
<TextBox Text="" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="传输安全(tls)" Width="140" />
<TextBox Text="xtls" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="分享链接(ShareLink)" Width="140" />
<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 ProxySuper.WPF.Controls
{
/// <summary>
/// VLESS_XTLS_Control.xaml 的交互逻辑
/// </summary>
public partial class VLESS_XTLS_Control : UserControl
{
public VLESS_XTLS_Control()
{
InitializeComponent();
}
}
}

View File

@ -0,0 +1,64 @@
<UserControl x:Class="ProxySuper.WPF.Controls.VLESS_gRPC_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:ProxySuper.WPF.Controls"
mc:Ignorable="d">
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<Label Content="地址(address)" Width="140" />
<TextBox Text="{Binding Settings.Domain}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="端口(port)" Width="140" />
<TextBox Text="{Binding Settings.VLESS_gRPC_Port}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="用户ID(id)" Width="140" />
<TextBox Text="{Binding Settings.UUID}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="流控(flow)" Width="140" />
<TextBox Text="" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="加密(encryption)" Width="140" />
<TextBox Text="none" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="传输协议(network)" Width="140" />
<TextBox Text="grpc" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="伪装类型(type)" Width="140" />
<TextBox Text="none" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="伪装域名(host)" Width="140" />
<TextBox Text="" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="路径(path)" Width="140" />
<TextBox Text="{Binding Settings.VLESS_gRPC_ServiceName}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="传输安全(tls)" Width="140" />
<TextBox Text="tls" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="分享链接(ShareLink)" Width="140" />
<TextBox Text="{Binding Settings.VLESS_gRPC_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 ProxySuper.WPF.Controls
{
/// <summary>
/// VLESS_gRPC_Control.xaml 的交互逻辑
/// </summary>
public partial class VLESS_gRPC_Control : UserControl
{
public VLESS_gRPC_Control()
{
InitializeComponent();
}
}
}

View File

@ -0,0 +1,59 @@
<UserControl x:Class="ProxySuper.WPF.Controls.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:ProxySuper.WPF.Controls"
mc:Ignorable="d">
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<Label Content="地址(address)" Width="140" />
<TextBox Text="{Binding Settings.Domain}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="端口(port)" Width="140" />
<TextBox Text="{Binding Path=Settings.VMESS_KCP_Port,Mode=OneTime}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="用户ID(id)" Width="140" />
<TextBox Text="{Binding Settings.UUID}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="加密(security)" Width="140" />
<TextBox Text="none" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="传输协议(network)" Width="140" />
<TextBox Text="kcp" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="伪装类型(type)" Width="140" />
<TextBox Text="{Binding Settings.VMESS_KCP_Type}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="伪装域名(host)" Width="140" />
<TextBox Text="{Binding Settings.Domain}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="路径(path)" Width="140" />
<TextBox Text="{Binding Settings.VMESS_KCP_Seed}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="传输安全(tls)" Width="140" />
<TextBox Text="" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="分享链接(ShareLink)" Width="140" />
<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 ProxySuper.WPF.Controls
{
/// <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="ProxySuper.WPF.Controls.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:ProxySuper.WPF.Controls"
mc:Ignorable="d">
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<Label Content="地址(address)" Width="140" />
<TextBox Text="{Binding Settings.Domain}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="端口(port)" Width="140" />
<TextBox Text="443" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="用户ID(id)" Width="140" />
<TextBox Text="{Binding Settings.UUID}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="加密(security)" Width="140" />
<TextBox Text="none" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="传输协议(network)" Width="140" />
<TextBox Text="tcp" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="伪装类型(type)" Width="140" />
<TextBox Text="http" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="伪装域名(host)" Width="140" />
<TextBox Text="{Binding Settings.Domain}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="路径(path)" Width="140" />
<TextBox Text="{Binding Settings.VMESS_TCP_Path}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="传输安全(tls)" Width="140" />
<TextBox Text="tls" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="分享链接(ShareLink)" Width="140" />
<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 ProxySuper.WPF.Controls
{
/// <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="ProxySuper.WPF.Controls.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:ProxySuper.WPF.Controls"
mc:Ignorable="d">
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<Label Content="地址(address)" Width="140" />
<TextBox Text="{Binding Settings.Domain}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="端口(port)" Width="140" />
<TextBox Text="443" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="用户ID(id)" Width="140" />
<TextBox Text="{Binding Settings.UUID}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="加密(security)" Width="140" />
<TextBox Text="none" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="传输协议(network)" Width="140" />
<TextBox Text="ws" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="伪装类型(type)" Width="140" />
<TextBox Text="none" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="伪装域名(host)" Width="140" />
<TextBox Text="{Binding Settings.Domain}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="路径(path)" Width="140" />
<TextBox Text="{Binding Settings.VMESS_WS_Path}" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="传输安全(tls)" Width="140" />
<TextBox Text="tls" IsReadOnly="True" Width="300" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="分享链接(ShareLink)" Width="140" />
<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 ProxySuper.WPF.Controls
{
/// <summary>
/// VMESS_WS_TLS_Control.xaml 的交互逻辑
/// </summary>
public partial class VMESS_WS_TLS_Control : UserControl
{
public VMESS_WS_TLS_Control()
{
InitializeComponent();
}
}
}

View File

@ -43,6 +43,9 @@
<Reference Include="MvvmCross.Platforms.Wpf, Version=7.1.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmCross.Platforms.Wpf.7.1.2\lib\net461\MvvmCross.Platforms.Wpf.dll</HintPath>
</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">
<HintPath>..\packages\SSH.NET.2020.0.1\lib\net40\Renci.SshNet.dll</HintPath>
</Reference>
@ -53,6 +56,7 @@
<HintPath>..\packages\System.Console.4.3.1\lib\net46\System.Console.dll</HintPath>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll</HintPath>
</Reference>
@ -79,6 +83,36 @@
<Compile Include="Controls\HostControl.xaml.cs">
<DependentUpon>HostControl.xaml</DependentUpon>
</Compile>
<Compile Include="Controls\ShadowSocksControl.xaml.cs">
<DependentUpon>ShadowSocksControl.xaml</DependentUpon>
</Compile>
<Compile Include="Controls\Trojan_TCP_Control.xaml.cs">
<DependentUpon>Trojan_TCP_Control.xaml</DependentUpon>
</Compile>
<Compile Include="Controls\VLESS_gRPC_Control.xaml.cs">
<DependentUpon>VLESS_gRPC_Control.xaml</DependentUpon>
</Compile>
<Compile Include="Controls\VLESS_KCP_Control.xaml.cs">
<DependentUpon>VLESS_KCP_Control.xaml</DependentUpon>
</Compile>
<Compile Include="Controls\VLESS_TCP_TLS_Control.xaml.cs">
<DependentUpon>VLESS_TCP_TLS_Control.xaml</DependentUpon>
</Compile>
<Compile Include="Controls\VLESS_WS_TLS_Control.xaml.cs">
<DependentUpon>VLESS_WS_TLS_Control.xaml</DependentUpon>
</Compile>
<Compile Include="Controls\VLESS_XTLS_Control.xaml.cs">
<DependentUpon>VLESS_XTLS_Control.xaml</DependentUpon>
</Compile>
<Compile Include="Controls\VMESS_KCP_Control.xaml.cs">
<DependentUpon>VMESS_KCP_Control.xaml</DependentUpon>
</Compile>
<Compile Include="Controls\VMESS_TCP_TLS_Control.xaml.cs">
<DependentUpon>VMESS_TCP_TLS_Control.xaml</DependentUpon>
</Compile>
<Compile Include="Controls\VMESS_WS_TLS_Control.xaml.cs">
<DependentUpon>VMESS_WS_TLS_Control.xaml</DependentUpon>
</Compile>
<Compile Include="Controls\XraySettingsControl.xaml.cs">
<DependentUpon>XraySettingsControl.xaml</DependentUpon>
</Compile>
@ -97,6 +131,9 @@
<Compile Include="Views\XrayEditorView.xaml.cs">
<DependentUpon>XrayEditorView.xaml</DependentUpon>
</Compile>
<Compile Include="Views\XrayConfigView.xaml.cs">
<DependentUpon>XrayConfigView.xaml</DependentUpon>
</Compile>
<Compile Include="Views\XrayInstallerView.xaml.cs">
<DependentUpon>XrayInstallerView.xaml</DependentUpon>
</Compile>
@ -104,6 +141,46 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Controls\ShadowSocksControl.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Controls\Trojan_TCP_Control.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Controls\VLESS_gRPC_Control.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Controls\VLESS_KCP_Control.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Controls\VLESS_TCP_TLS_Control.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Controls\VLESS_WS_TLS_Control.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Controls\VLESS_XTLS_Control.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Controls\VMESS_KCP_Control.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Controls\VMESS_TCP_TLS_Control.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Controls\VMESS_WS_TLS_Control.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Controls\XraySettingsControl.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@ -147,6 +224,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Views\XrayConfigView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Views\XrayInstallerView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>

View File

@ -5,6 +5,9 @@
<!--common-->
<sys:String x:Key="Random">Random</sys:String>
<sys:String x:Key="Save">Save</sys:String>
<sys:String x:Key="SaveAs">SaveAs</sys:String>
<sys:String x:Key="Install">Install</sys:String>
<sys:String x:Key="Settings">Settings</sys:String>
<!--Main Menu-->
<sys:String x:Key="MainMenuAddHost">Add Host</sys:String>
@ -26,6 +29,7 @@
<sys:String x:Key="MainDataGridColumnAction">Action</sys:String>
<sys:String x:Key="MainDataGridColumnActionInstall">Install</sys:String>
<sys:String x:Key="MainDataGridColumnActionEdit">Edit</sys:String>
<sys:String x:Key="MainDataGridColumnActionViewConfig">ViewConfig</sys:String>
<sys:String x:Key="MainDataGridColumnActionDelete">Delete</sys:String>
@ -79,6 +83,15 @@
<sys:String x:Key="XrayPort">xray Port</sys:String>
<sys:String x:Key="XrayPortDefault">default port is 443</sys:String>
<!--xray installer-->
<sys:String x:Key="XrayInstallerInstall">Install</sys:String>
<sys:String x:Key="XrayInstallerUpdateSettings">UpdateSettings</sys:String>
<sys:String x:Key="XrayInstallerUpdateCore">UpdateCore</sys:String>
<sys:String x:Key="XrayInstallerUninstall">Uninstall</sys:String>
<sys:String x:Key="XrayInstallerInstallCert">InstallCert</sys:String>
<sys:String x:Key="XrayInstallerUploadWeb">UploadWeb</sys:String>
<sys:String x:Key="XrayInstallerUploadCert">UploadCert</sys:String>
<!--Trojan-GO-->
<sys:String x:Key="TrojanGoDomain">Address</sys:String>
<sys:String x:Key="TrojanGoPort">Port</sys:String>

View File

@ -5,6 +5,9 @@
<!--common-->
<sys:String x:Key="Random">随机</sys:String>
<sys:String x:Key="Save">保存</sys:String>
<sys:String x:Key="SaveAs">另存为</sys:String>
<sys:String x:Key="Install">安装</sys:String>
<sys:String x:Key="Settings">配置</sys:String>
<!--Main Menu-->
<sys:String x:Key="MainMenuAddHost">添加主机</sys:String>
@ -26,6 +29,7 @@
<sys:String x:Key="MainDataGridColumnAction">操作</sys:String>
<sys:String x:Key="MainDataGridColumnActionInstall">安装</sys:String>
<sys:String x:Key="MainDataGridColumnActionEdit">编辑</sys:String>
<sys:String x:Key="MainDataGridColumnActionViewConfig">查看配置</sys:String>
<sys:String x:Key="MainDataGridColumnActionDelete">删除</sys:String>
@ -79,6 +83,15 @@
<sys:String x:Key="XrayPort">xray端口</sys:String>
<sys:String x:Key="XrayPortDefault">默认端口443不建议修改</sys:String>
<!--xray installer-->
<sys:String x:Key="XrayInstallerInstall">一键安装</sys:String>
<sys:String x:Key="XrayInstallerUpdateSettings">更新配置</sys:String>
<sys:String x:Key="XrayInstallerUpdateCore">更新内核</sys:String>
<sys:String x:Key="XrayInstallerUninstall">卸载代理</sys:String>
<sys:String x:Key="XrayInstallerInstallCert">手动续签证书</sys:String>
<sys:String x:Key="XrayInstallerUploadWeb">上传伪装网站</sys:String>
<sys:String x:Key="XrayInstallerUploadCert">上传自有证书</sys:String>
<!--Trojan-GO-->
<sys:String x:Key="TrojanGoDomain">域名</sys:String>

View File

@ -76,7 +76,12 @@
Margin="5,0"
Padding="12,3"
Content="{DynamicResource MainDataGridColumnActionEdit}" />
<Button Command="{Binding NavToConfigCommand}"
Margin="5,0"
Padding="12,3"
Content="{DynamicResource MainDataGridColumnActionViewConfig}" />
<Button Click="NavToEditor"
Margin="5,0"
Padding="12,3"

View File

@ -50,11 +50,11 @@
<Label Content="{DynamicResource TrojanGoMaskDomain}" Grid.Row="3" Grid.Column="0" />
<TextBox Text="{Binding Settings.MaskDomain}" Grid.Row="3" Grid.Column="1" />
<Label Content="{DynamicResource TrojanGoWebSocketPath}" Grid.Row="4" Grid.Column="0" />
<!--<Label Content="{DynamicResource TrojanGoWebSocketPath}" Grid.Row="4" Grid.Column="0" />
<TextBox Text="{Binding Settings.WebSocketPath}" Grid.Row="4" Grid.Column="1" />
<Label Content="{DynamicResource TrojanGoWebSocketDomain}" Grid.Row="5" Grid.Column="0" />
<TextBox Text="{Binding Settings.WebSocketDomain}" Grid.Row="5" Grid.Column="1" />
<TextBox Text="{Binding Settings.WebSocketDomain}" Grid.Row="5" Grid.Column="1" />-->
</Grid>
<Border BorderBrush="#eee" BorderThickness="0,1,0,0">

View File

@ -25,15 +25,15 @@
/>
<StackPanel Margin="10" Orientation="Horizontal">
<Label Content="安装" />
<Button Height="24" Padding="10,0" Margin="10,0,0,0" IsEnabled="{Binding Connected}" Click="Install">一键安装</Button>
<Button Height="24" Padding="10,0" Margin="10,0,0,0" IsEnabled="{Binding Connected}" Click="Uninstall">卸载代理</Button>
<Label Content="{DynamicResource Install}" />
<Button Height="24" Padding="10,0" Margin="10,0,0,0" IsEnabled="{Binding Connected}" Click="Install" Content="{DynamicResource XrayInstallerInstall}" />
<Button Height="24" Padding="10,0" Margin="10,0,0,0" IsEnabled="{Binding Connected}" Click="Uninstall" Content="{DynamicResource XrayInstallerUninstall}" />
</StackPanel>
<StackPanel Margin="10" Orientation="Horizontal">
<Label Content="配置" />
<Button Height="24" Padding="10,0" Margin="10,0,0,0" IsEnabled="{Binding Connected}" Click="InstallCert">手动续签证书</Button>
<Button Height="24" Padding="10,0" Margin="10,0,0,0" IsEnabled="{Binding Connected}" Click="UploadWeb">上传伪装网站</Button>
<Label Content="{DynamicResource Settings}" />
<Button Height="24" Padding="10,0" Margin="10,0,0,0" IsEnabled="{Binding Connected}" Click="InstallCert" Content="{DynamicResource XrayInstallerInstallCert}" />
<Button Height="24" Padding="10,0" Margin="10,0,0,0" IsEnabled="{Binding Connected}" Click="UploadWeb" Content="{DynamicResource XrayInstallerUploadWeb}" />
</StackPanel>
</StackPanel>
</views:MvxWindow>

View File

@ -0,0 +1,103 @@
<views:MvxWindow x:Class="ProxySuper.WPF.Views.XrayConfigView"
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:local="clr-namespace:ProxySuper.WPF.Views"
xmlns:views="clr-namespace:MvvmCross.Platforms.Wpf.Views;assembly=MvvmCross.Platforms.Wpf"
xmlns:ctrl="clr-namespace:ProxySuper.WPF.Controls"
xmlns:models="clr-namespace:ProxySuper.Core.Models.Projects;assembly=ProxySuper.Core"
mc:Ignorable="d"
WindowStartupLocation="CenterScreen"
Title="XrayInfoView" Height="600" Width="1000">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="220" />
</Grid.ColumnDefinitions>
<TabControl Grid.Column="0"
Padding="10"
BorderThickness="1,0,1,0"
BorderBrush="#DDD"
TabStripPlacement="Left"
SelectionChanged="BuildQrCode">
<TabItem Width="200" Height="40"
Tag="{x:Static models:XrayType.VLESS_TCP_XTLS}"
IsEnabled="{Binding Settings.Checked_VLESS_TCP_XTLS}"
Header="VLESS-TCP-XTLS">
<ctrl:VLESS_XTLS_Control />
</TabItem>
<TabItem Width="200" Height="40"
Tag="{x:Static models:XrayType.VLESS_TCP}"
IsEnabled="{Binding Settings.Checked_VLESS_TCP}"
Header="VLESS-TCP-TLS">
<ctrl:VLESS_TCP_TLS_Control />
</TabItem>
<TabItem Width="200" Height="40"
Tag="{x:Static models:XrayType.VLESS_WS}"
IsEnabled="{Binding Settings.Checked_VLESS_WS}"
Header="VLESS-WebSocket-TLS">
<ctrl:VLESS_WS_TLS_Control />
</TabItem>
<TabItem Width="200" Height="40"
Tag="{x:Static models:XrayType.VLESS_KCP}"
IsEnabled="{Binding Settings.Checked_VLESS_KCP}"
Header="VLESS-mKCP">
<ctrl:VLESS_KCP_Control />
</TabItem>
<!--<TabItem Width="200"
Tag="{x:Static models:XrayType.VLESS_gRPC}"
IsEnabled="{Binding Settings.Checked_VLESS_gRPC}"
Header="VLESS-gRPC">
<ctrl:VLESS_gRPC_Control />
</TabItem>-->
<TabItem Width="200" Height="40"
Tag="{x:Static models:XrayType.VMESS_TCP}"
IsEnabled="{Binding Settings.Checked_VMESS_TCP}"
Header="VMESS-TCP-TLS">
<ctrl:VMESS_TCP_TLS_Control />
</TabItem>
<TabItem Width="200" Height="40"
Tag="{x:Static models:XrayType.VMESS_WS}"
IsEnabled="{Binding Settings.Checked_VMESS_WS}"
Header="VMESS-WebSocket-TLS">
<ctrl:VMESS_WS_TLS_Control />
</TabItem>
<TabItem Width="200" Height="40"
Tag="{x:Static models:XrayType.VMESS_KCP}"
IsEnabled="{Binding Settings.Checked_VMESS_KCP}"
Header="VMESS-mKCP">
<ctrl:VMESS_KCP_Control />
</TabItem>
<TabItem Width="200" Height="40"
Tag="{x:Static models:XrayType.Trojan_TCP}"
IsEnabled="{Binding Settings.Checked_Trojan_TCP}"
Header="Trojan-TCP">
<ctrl:Trojan_TCP_Control />
</TabItem>
<TabItem Width="200" Height="40"
Tag="{x:Static models:XrayType.ShadowsocksAEAD}"
IsEnabled="{Binding Settings.CheckedShadowSocks}"
Header="ShadowSocks">
<ctrl:ShadowSocksControl />
</TabItem>
</TabControl>
<StackPanel Grid.Column="1" >
<Image Width="200" Height="200" x:Name="QrImage" />
<Button Click="SaveImage" Width="100" Content="{DynamicResource SaveAs}" />
</StackPanel>
</Grid>
</views:MvxWindow>

View File

@ -0,0 +1,132 @@
using Microsoft.Win32;
using MvvmCross.Platforms.Wpf.Views;
using ProxySuper.Core.Models.Projects;
using ProxySuper.Core.Services;
using ProxySuper.Core.ViewModels;
using QRCoder;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
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.Shapes;
namespace ProxySuper.WPF.Views
{
/// <summary>
/// XrayInfoView.xaml 的交互逻辑
/// </summary>
public partial class XrayConfigView : MvxWindow
{
public XrayConfigView()
{
InitializeComponent();
}
public XraySettings Settings
{
get
{
return ((XrayConfigViewModel)ViewModel).Settings;
}
}
private void BuildQrCode(object sender, SelectionChangedEventArgs e)
{
var tabControl = e.Source as TabControl;
var item = (tabControl.SelectedItem as TabItem);
if (item == null) return;
var type = (XrayType)item.Tag;
BuildQrCode(type);
}
private void SaveImage(object sender, RoutedEventArgs e)
{
SaveFileDialog sfd = new SaveFileDialog();
sfd.FileName += QrImage.Tag;
sfd.Filter = "Image Files (*.bmp, *.png, *.jpg)|*.bmp;*.png;*.jpg | All Files | *.*";
sfd.RestoreDirectory = true;//保存对话框是否记忆上次打开的目录
if (sfd.ShowDialog() == true)
{
var encoder = new PngBitmapEncoder();
encoder.Frames.Add(BitmapFrame.Create((BitmapSource)QrImage.Source));
using (FileStream stream = new FileStream(sfd.FileName, FileMode.Create))
encoder.Save(stream);
}
}
private void BuildQrCode(XrayType type)
{
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;
QrImage.Tag = type.ToString();
}
}
}

View File

@ -26,18 +26,18 @@
/>
<StackPanel Margin="10" Orientation="Horizontal">
<Label Content="安装" />
<Button Height="24" Padding="10,0" Margin="10,0,0,0" IsEnabled="{Binding Connected}" Click="Install">一键安装</Button>
<Button Height="24" Padding="10,0" Margin="10,0,0,0" IsEnabled="{Binding Connected}" Click="UpdateXraySettings">更新配置</Button>
<Button Height="24" Padding="10,0" Margin="10,0,0,0" IsEnabled="{Binding Connected}" Click="UpdateXrayCore">更新内核</Button>
<Button Height="24" Padding="10,0" Margin="10,0,0,0" IsEnabled="{Binding Connected}" Click="UninstallXray">卸载代理</Button>
<Label Content="{DynamicResource Install}" />
<Button Height="24" Padding="10,0" Margin="10,0,0,0" IsEnabled="{Binding Connected}" Click="Install" Content="{DynamicResource XrayInstallerInstall}" />
<Button Height="24" Padding="10,0" Margin="10,0,0,0" IsEnabled="{Binding Connected}" Click="UpdateXraySettings" Content="{DynamicResource XrayInstallerUpdateSettings}" />
<Button Height="24" Padding="10,0" Margin="10,0,0,0" IsEnabled="{Binding Connected}" Click="UpdateXrayCore" Content="{DynamicResource XrayInstallerUpdateCore}" />
<Button Height="24" Padding="10,0" Margin="10,0,0,0" IsEnabled="{Binding Connected}" Click="UninstallXray" Content="{DynamicResource XrayInstallerUninstall}" />
</StackPanel>
<StackPanel Margin="10" Orientation="Horizontal">
<Label Content="配置" />
<Button Height="24" Padding="10,0" Margin="10,0,0,0" IsEnabled="{Binding Connected}" Click="InstallCert">手动续签证书</Button>
<Button Height="24" Padding="10,0" Margin="10,0,0,0" IsEnabled="{Binding Connected}" Click="UploadWeb">上传伪装网站</Button>
<Button Height="24" Padding="10,0" Margin="10,0,0,0" IsEnabled="{Binding Connected}" Click="UploadCert">上传自有证书</Button>
<Label Content="{DynamicResource Settings}" />
<Button Height="24" Padding="10,0" Margin="10,0,0,0" IsEnabled="{Binding Connected}" Click="InstallCert" Content="{DynamicResource XrayInstallerInstallCert}" />
<Button Height="24" Padding="10,0" Margin="10,0,0,0" IsEnabled="{Binding Connected}" Click="UploadWeb" Content="{DynamicResource XrayInstallerUploadWeb}" />
<Button Height="24" Padding="10,0" Margin="10,0,0,0" IsEnabled="{Binding Connected}" Click="UploadCert" Content="{DynamicResource XrayInstallerUploadCert}" />
</StackPanel>
</StackPanel>
</views:MvxWindow>

View File

@ -2,6 +2,7 @@
<packages>
<package id="MvvmCross" version="7.1.2" targetFramework="net461" />
<package id="MvvmCross.Platforms.Wpf" version="7.1.2" targetFramework="net461" />
<package id="QRCoder" version="1.4.1" targetFramework="net461" />
<package id="SSH.NET" version="2020.0.1" targetFramework="net461" />
<package id="System.Console" version="4.3.1" targetFramework="net461" />
<package id="System.Runtime.WindowsRuntime" version="4.6.0" targetFramework="net461" />