mirror of
https://github.com/proxysu/ProxySU.git
synced 2024-11-24 22:26:07 +03:00
merge
This commit is contained in:
parent
d04553034a
commit
2fd76baf2f
@ -205,6 +205,9 @@
|
|||||||
<Compile Include="Views\TerminalWindow.xaml.cs">
|
<Compile Include="Views\TerminalWindow.xaml.cs">
|
||||||
<DependentUpon>TerminalWindow.xaml</DependentUpon>
|
<DependentUpon>TerminalWindow.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Views\XrayWindow.xaml.cs">
|
||||||
|
<DependentUpon>XrayWindow.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Converters\LoginSecretTypeConverter.cs" />
|
<Compile Include="Converters\LoginSecretTypeConverter.cs" />
|
||||||
@ -291,6 +294,10 @@
|
|||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="Views\XrayWindow.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<Import Project="..\packages\MaterialDesignThemes.4.0.0\build\MaterialDesignThemes.targets" Condition="Exists('..\packages\MaterialDesignThemes.4.0.0\build\MaterialDesignThemes.targets')" />
|
<Import Project="..\packages\MaterialDesignThemes.4.0.0\build\MaterialDesignThemes.targets" Condition="Exists('..\packages\MaterialDesignThemes.4.0.0\build\MaterialDesignThemes.targets')" />
|
||||||
|
@ -24,8 +24,6 @@ namespace ProxySU_Core.ViewModels.Developers
|
|||||||
private const string ServerReverseDir = @"Templates\xray\server\09_reverse";
|
private const string ServerReverseDir = @"Templates\xray\server\09_reverse";
|
||||||
private const string CaddyFileDir = @"Templates\xray\caddy";
|
private const string CaddyFileDir = @"Templates\xray\caddy";
|
||||||
|
|
||||||
private int randomCaddyListenPort = 8800;
|
|
||||||
|
|
||||||
public XrayProject(SshClient sshClient, XrayParameters parameters, Action<string> writeOutput) : base(sshClient, parameters, writeOutput)
|
public XrayProject(SshClient sshClient, XrayParameters parameters, Action<string> writeOutput) : base(sshClient, parameters, writeOutput)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
Foreground="LawnGreen"
|
Foreground="LawnGreen"
|
||||||
FontSize="14"
|
FontSize="14"
|
||||||
FontFamily="Consolas"
|
FontFamily="Consolas"
|
||||||
Height="400">
|
Height="320">
|
||||||
<FlowDocument>
|
<FlowDocument>
|
||||||
<Paragraph>
|
<Paragraph>
|
||||||
<Run Text="{Binding Path=OutputText, Mode=OneWay}" />
|
<Run Text="{Binding Path=OutputText, Mode=OneWay}" />
|
||||||
@ -23,9 +23,11 @@
|
|||||||
</RichTextBox>
|
</RichTextBox>
|
||||||
|
|
||||||
<StackPanel Margin="0,10,0,0">
|
<StackPanel Margin="0,10,0,0">
|
||||||
<Button Content="{DynamicResource Install}"
|
<Button Content="安装Xray"
|
||||||
Click="Install"/>
|
Click="Install"
|
||||||
|
Height="32"
|
||||||
|
Width="100"/>
|
||||||
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</metro:MetroWindow>
|
</metro:MetroWindow>
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
using MahApps.Metro.Controls.Dialogs;
|
using MahApps.Metro.Controls.Dialogs;
|
||||||
using ProxySU_Core.ViewModels;
|
using ProxySU_Core.ViewModels;
|
||||||
using ProxySU_Core.ViewModels.Developers;
|
using ProxySU_Core.ViewModels.Developers;
|
||||||
|
using ProxySU_Core.Views;
|
||||||
using Renci.SshNet;
|
using Renci.SshNet;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@ -106,22 +107,9 @@ namespace ProxySU_Core
|
|||||||
|
|
||||||
private void Install(object sender, RoutedEventArgs e)
|
private void Install(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
var project = new XrayProject(
|
var xrayWindow = new XrayWindow();
|
||||||
_sshClient,
|
xrayWindow.ShowDialog();
|
||||||
new XrayParameters { Port = 443 },
|
|
||||||
WriteShell
|
|
||||||
);
|
|
||||||
Task.Run(() =>
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
project.Execute();
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
_vm.AddOutput(ex.Message);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
35
ProxySU_Core/Views/XrayWindow.xaml
Normal file
35
ProxySU_Core/Views/XrayWindow.xaml
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<metro:MetroWindow x:Class="ProxySU_Core.Views.XrayWindow"
|
||||||
|
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:ProxySU_Core.Views"
|
||||||
|
xmlns:metro="http://metro.mahapps.com/winfx/xaml/controls"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
Title="XrayWindow" Height="450" Width="800">
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<StackPanel Margin="20">
|
||||||
|
<CheckBox Content="VLESS OVER TCP with XTLS" Style="{StaticResource MahApps.Styles.CheckBox}" />
|
||||||
|
<Label Content="数倍性能,首选方式,不支持CDN" Margin="20,0,0,0" />
|
||||||
|
|
||||||
|
<CheckBox Content="VLESS over TCP with TLS" Style="{StaticResource MahApps.Styles.CheckBox}" 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}" 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}" 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}" Margin="0,10,0,0" />
|
||||||
|
<Label Content="常规,支持CDN" Margin="20,0,0,0" />
|
||||||
|
|
||||||
|
<CheckBox Content="Trojan over TCP with TLS" Style="{StaticResource MahApps.Styles.CheckBox}" Margin="0,10,0,0" />
|
||||||
|
<Label Content="Torjan协议,不支持CDN" Margin="20,0,0,0" />
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<StackPanel>
|
||||||
|
<Label Content="选择方式" />
|
||||||
|
</StackPanel>
|
||||||
|
</StackPanel>
|
||||||
|
</metro:MetroWindow>
|
27
ProxySU_Core/Views/XrayWindow.xaml.cs
Normal file
27
ProxySU_Core/Views/XrayWindow.xaml.cs
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
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.Shapes;
|
||||||
|
|
||||||
|
namespace ProxySU_Core.Views
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// XrayWindow.xaml 的交互逻辑
|
||||||
|
/// </summary>
|
||||||
|
public partial class XrayWindow
|
||||||
|
{
|
||||||
|
public XrayWindow()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user