1
0
mirror of https://github.com/proxysu/ProxySU.git synced 2024-11-21 20:56:08 +03:00

update ...

This commit is contained in:
autumn 2022-11-20 23:00:16 +08:00
parent 89af852433
commit 89649d136f
10 changed files with 236 additions and 212 deletions

View File

@ -6,6 +6,7 @@
xmlns:ui="http://schemas.modernwpf.com/2019"
StartupUri="MainWindow.xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<!--Language-->

View File

@ -11,7 +11,7 @@ namespace ProxySuper.WPF
{
protected override void RegisterSetup()
{
this.RegisterSetupType<MvxWpfSetup<Core.App>>();
this.RegisterSetupType<Setup>();
}
}
}

View File

@ -47,7 +47,7 @@
VerticalContentAlignment="Center"
Foreground="LimeGreen"
IsChecked="{Binding Path=Checked_VLESS_gRPC}">
<Label Content="VLESS gRPC&#x0a;基于http2多路复用。" FontSize="13" Foreground="LimeGreen" />
<Label Content="{DynamicResource VlessRpcDesc}" FontSize="13" Foreground="LimeGreen" />
</CheckBox>
<!--TCP-->
@ -99,106 +99,115 @@
<TextBox Text="{Binding Path=Domain}" Width="200" />
</StackPanel>
<!--Mask Domain-->
<StackPanel Margin="30,15,0,0"
Orientation="Horizontal">
<Label Content="{DynamicResource XrayMarkDomain}" Width="120" />
<TextBox Text="{Binding Path=MaskDomain}" Width="200" />
</StackPanel>
<StackPanel Margin="30,15,0,0"
Orientation="Horizontal">
<Label Content="{DynamicResource XrayWithTLS}" Width="120" />
<CheckBox IsChecked="{Binding Path=WithTLS}"
Content="{DynamicResource XrayWithTLSDesc}"
VerticalContentAlignment="Center"
VerticalAlignment="Center" />
</StackPanel>
<!--UUID-->
<StackPanel Margin="30,10,0,0"
Orientation="Horizontal">
<StackPanel Margin="30,10,0,0" Orientation="Horizontal">
<Label Content="{DynamicResource XrayUUID}" Width="120" />
<TextBox Text="{Binding Path=UUID}"
Width="200" />
<Button Margin="5,0,0,0"
Padding="12,3"
Command="{Binding Path=RandomUuid}"
Content="{DynamicResource Random}" />
Padding="12,3"
Command="{Binding Path=RandomUuid}"
Content="{DynamicResource Random}" />
</StackPanel>
<!--WebSocket Path-->
<StackPanel Margin="30,15,0,0"
Orientation="Horizontal"
Visibility="{
Binding Path=Checked_VLESS_WS,
Converter={StaticResource VisibleConverter}
}">
<Label Content="{DynamicResource VlessWsPath}" Foreground="LimeGreen" Width="120" />
<TextBox Text="{Binding Path=VLESS_WS_Path}"
Width="200" />
<!--xray prot-->
<StackPanel Margin="30,15,0,0" Orientation="Horizontal">
<Label Content="{DynamicResource XrayPort}" Foreground="Gray" Width="120" />
<TextBox Text="{Binding Path=Port}" Width="120" />
<Label Content="{DynamicResource XrayPortDefault}" Foreground="Red" />
</StackPanel>
<!--seed-->
<StackPanel Margin="30,15,0,0"
Orientation="Horizontal"
Visibility="{
Binding Path=Checked_VLESS_KCP,
Converter={StaticResource VisibleConverter}
}">
<Label Content="{DynamicResource VlessKcpSeed}" Foreground="LimeGreen" Width="120" />
<TextBox Text="{Binding Path=VLESS_KCP_Seed}" Width="200" />
</StackPanel>
<Expander ExpandDirection="Down" Margin="30,10,0,0">
<Expander.Header>
<TextBlock Text="更多参数" FontWeight="Bold" />
</Expander.Header>
<Expander.Content>
<StackPanel>
<StackPanel Margin="0,15,0,0" Orientation="Horizontal">
<Label Content="{DynamicResource XrayWithTLS}" Width="120" />
<CheckBox IsChecked="{Binding Path=WithTLS}"
Content="{DynamicResource XrayWithTLSDesc}"
VerticalContentAlignment="Center"
VerticalAlignment="Center" />
</StackPanel>
<!--kcp type-->
<StackPanel Margin="30,15,0,0"
Visibility="{
Binding Path=Checked_VLESS_KCP,
Converter={StaticResource VisibleConverter}
}" Orientation="Horizontal">
<!--Mask Domain-->
<StackPanel Margin="0,15,0,0" Orientation="Horizontal">
<Label Content="{DynamicResource XrayMarkDomain}" Width="120" />
<TextBox Text="{Binding Path=MaskDomain}" Width="200" />
</StackPanel>
<Label Content="{DynamicResource VlessKcpType}" Foreground="LimeGreen" Width="120" />
<ComboBox Width="200"
ItemsSource="{Binding Path=KcpTypes}"
SelectedValue="{Binding VLESS_KCP_Type,Mode=TwoWay}">
</ComboBox>
</StackPanel>
<!--WebSocket Path-->
<StackPanel Margin="0,15,0,0"
Orientation="Horizontal"
Visibility="{
Binding Path=Checked_VLESS_WS,
Converter={StaticResource VisibleConverter}
}">
<Label Content="{DynamicResource VlessWsPath}" Foreground="LimeGreen" Width="120" />
<TextBox Text="{Binding Path=VLESS_WS_Path}" Width="200" />
</StackPanel>
<!--kcp port-->
<StackPanel Margin="30,15,0,0"
Visibility="{
Binding Path=Checked_VLESS_KCP,
Converter={StaticResource VisibleConverter}
}"
Orientation="Horizontal">
<Label Content="{DynamicResource VlessKcpPort}" Width="120" Foreground="LimeGreen" />
<TextBox Text="{Binding Path=VLESS_KCP_Port}" Width="200" />
</StackPanel>
<!--seed-->
<StackPanel Margin="0,15,0,0"
Orientation="Horizontal"
Visibility="{
Binding Path=Checked_VLESS_KCP,
Converter={StaticResource VisibleConverter}
}">
<Label Content="{DynamicResource VlessKcpSeed}" Foreground="LimeGreen" Width="120" />
<TextBox Text="{Binding Path=VLESS_KCP_Seed}" Width="200" />
</StackPanel>
<!--gRPC Port-->
<StackPanel Margin="30,15,0,0"
Orientation="Horizontal"
Visibility="{
Binding Path=Checked_VLESS_gRPC,
Converter={StaticResource VisibleConverter}
}">
<Label Content="{DynamicResource VlessRPCPort}" Width="120" Foreground="LimeGreen" />
<TextBox Text="{Binding Path=VLESS_gRPC_Port}" Width="200" />
</StackPanel>
<!--kcp type-->
<StackPanel Margin="0,15,0,0"
Visibility="{
Binding Path=Checked_VLESS_KCP,
Converter={StaticResource VisibleConverter}
}" Orientation="Horizontal">
<StackPanel Margin="30,15,0,0"
Orientation="Horizontal"
Visibility="{
Binding Path=Checked_VLESS_gRPC,
Converter={StaticResource VisibleConverter}
}">
<Label Content="{DynamicResource VlessRPCName}" Width="120" Foreground="LimeGreen" />
<TextBox Text="{Binding Path=VLESS_gRPC_ServiceName}" Width="200" />
</StackPanel>
<Label Content="{DynamicResource VlessKcpType}" Foreground="LimeGreen" Width="120" />
<ComboBox Width="200"
ItemsSource="{Binding Path=KcpTypes}"
SelectedValue="{Binding VLESS_KCP_Type,Mode=TwoWay}">
</ComboBox>
</StackPanel>
<!--Tcp Path
<!--kcp port-->
<StackPanel Margin="0,15,0,0"
Visibility="{
Binding Path=Checked_VLESS_KCP,
Converter={StaticResource VisibleConverter}
}"
Orientation="Horizontal">
<Label Content="{DynamicResource VlessKcpPort}" Width="120" Foreground="LimeGreen" />
<TextBox Text="{Binding Path=VLESS_KCP_Port}" Width="200" />
</StackPanel>
<!--gRPC Port-->
<StackPanel Margin="0,15,0,0"
Orientation="Horizontal"
Visibility="{
Binding Path=Checked_VLESS_gRPC,
Converter={StaticResource VisibleConverter}
}">
<Label Content="{DynamicResource VlessRPCPort}" Width="120" Foreground="LimeGreen" />
<TextBox Text="{Binding Path=VLESS_gRPC_Port}" Width="200" />
</StackPanel>
<StackPanel Margin="0,15,0,0"
Orientation="Horizontal"
Visibility="{
Binding Path=Checked_VLESS_gRPC,
Converter={StaticResource VisibleConverter}
}">
<Label Content="{DynamicResource VlessRPCName}" Width="120" Foreground="LimeGreen" />
<TextBox Text="{Binding Path=VLESS_gRPC_ServiceName}" Width="200" />
</StackPanel>
<!--Tcp Path
<StackPanel Margin="30,15,0,0"
Orientation="Horizontal"
Visibility="{
@ -211,128 +220,121 @@
Width="200" />
</StackPanel>-->
<!--WebSocket Path-->
<StackPanel Margin="30,15,0,0"
Orientation="Horizontal"
Visibility="{
Binding Path=Checked_VMESS_WS,
Converter={StaticResource VisibleConverter}
}">
<Label Content="{DynamicResource VmessWsPath}" Foreground="Blue" Width="120" />
<TextBox Text="{Binding Path=VMESS_WS_Path}"
<!--WebSocket Path-->
<StackPanel Margin="0,15,0,0"
Orientation="Horizontal"
Visibility="{
Binding Path=Checked_VMESS_WS,
Converter={StaticResource VisibleConverter}
}">
<Label Content="{DynamicResource VmessWsPath}" Foreground="Blue" Width="120" />
<TextBox Text="{Binding Path=VMESS_WS_Path}"
VerticalAlignment="Bottom"
Width="200" />
</StackPanel>
</StackPanel>
<!--seed-->
<StackPanel Margin="30,15,0,0"
Orientation="Horizontal"
Visibility="{
Binding Path=Checked_VMESS_KCP,
Converter={StaticResource VisibleConverter}
}">
<Label Content="{DynamicResource VmessKcpSeed}" Foreground="Blue" Width="120" />
<TextBox Text="{Binding Path=VMESS_KCP_Seed}" Width="200" />
</StackPanel>
<!--seed-->
<StackPanel Margin="0,15,0,0"
Orientation="Horizontal"
Visibility="{
Binding Path=Checked_VMESS_KCP,
Converter={StaticResource VisibleConverter}
}">
<Label Content="{DynamicResource VmessKcpSeed}" Foreground="Blue" Width="120" />
<TextBox Text="{Binding Path=VMESS_KCP_Seed}" Width="200" />
</StackPanel>
<!--kcp type-->
<StackPanel Margin="30,15,0,0"
Orientation="Horizontal"
Visibility="{
Binding Path=Checked_VMESS_KCP,
Converter={StaticResource VisibleConverter}
}">
<Label Content="{DynamicResource VmessKcpType}" Foreground="Blue" Width="120" VerticalAlignment="Bottom"/>
<ComboBox Width="200"
VerticalAlignment="Bottom"
ItemsSource="{Binding Path=KcpTypes}"
SelectedValue="{Binding VMESS_KCP_Type,Mode=TwoWay}">
</ComboBox>
</StackPanel>
<!--kcp type-->
<StackPanel Margin="0,15,0,0"
Orientation="Horizontal"
Visibility="{
Binding Path=Checked_VMESS_KCP,
Converter={StaticResource VisibleConverter}
}">
<Label Content="{DynamicResource VmessKcpType}" Foreground="Blue" Width="120" VerticalAlignment="Bottom"/>
<ComboBox Width="200"
VerticalAlignment="Bottom"
ItemsSource="{Binding Path=KcpTypes}"
SelectedValue="{Binding VMESS_KCP_Type,Mode=TwoWay}">
</ComboBox>
</StackPanel>
<!--kcp port-->
<StackPanel Margin="30,15,0,0"
Orientation="Horizontal"
Visibility="{
Binding Path=Checked_VMESS_KCP,
Converter={StaticResource VisibleConverter}
}">
<Label Content="{DynamicResource VmessKcpPort}" Foreground="Blue" Width="120" />
<TextBox Text="{Binding Path=VMESS_KCP_Port}" Width="200" />
</StackPanel>
<!--kcp port-->
<StackPanel Margin="0,15,0,0"
Orientation="Horizontal"
Visibility="{
Binding Path=Checked_VMESS_KCP,
Converter={StaticResource VisibleConverter}
}">
<Label Content="{DynamicResource VmessKcpPort}" Foreground="Blue" Width="120" />
<TextBox Text="{Binding Path=VMESS_KCP_Port}" Width="200" />
</StackPanel>
<!--ss密码-->
<StackPanel Margin="30,15,0,0"
Orientation="Horizontal"
Visibility="{
Binding Path=CheckedShadowSocks,
Converter={StaticResource VisibleConverter}
}">
<Label Content="{DynamicResource SSPassword}" Foreground="Fuchsia" Width="120" />
<TextBox Text="{Binding Path=ShadowSocksPassword}"
<!--ss密码-->
<StackPanel Margin="0,15,0,0"
Orientation="Horizontal"
Visibility="{
Binding Path=CheckedShadowSocks,
Converter={StaticResource VisibleConverter}
}">
<Label Content="{DynamicResource SSPassword}" Foreground="Fuchsia" Width="120" />
<TextBox Text="{Binding Path=ShadowSocksPassword}"
Width="200"/>
</StackPanel>
</StackPanel>
<!--ss加密方式-->
<StackPanel Margin="30,15,0,0"
Orientation="Horizontal"
Visibility="{
Binding Path=CheckedShadowSocks,
Converter={StaticResource VisibleConverter}
}">
<Label Content="{DynamicResource SSMethods}" Foreground="Fuchsia" Width="120" />
<ComboBox Width="200"
ItemsSource="{Binding ShadowSocksMethods}"
SelectedValue="{Binding ShadowSocksMethod}">
</ComboBox>
</StackPanel>
<!--ss加密方式-->
<StackPanel Margin="0,15,0,0"
Orientation="Horizontal"
Visibility="{
Binding Path=CheckedShadowSocks,
Converter={StaticResource VisibleConverter}
}">
<Label Content="{DynamicResource SSMethods}" Foreground="Fuchsia" Width="120" />
<ComboBox Width="200"
ItemsSource="{Binding ShadowSocksMethods}"
SelectedValue="{Binding ShadowSocksMethod}">
</ComboBox>
</StackPanel>
<!--ss端口-->
<StackPanel Margin="30,15,0,0"
Orientation="Horizontal"
Visibility="{
Binding Path=CheckedShadowSocks,
Converter={StaticResource VisibleConverter}
}">
<Label Content="{DynamicResource SSPort}" Foreground="Fuchsia" Width="120" />
<TextBox Text="{Binding Path=ShadowSocksPort}" Width="200"/>
</StackPanel>
<!--ss端口-->
<StackPanel Margin="0,15,0,0"
Orientation="Horizontal"
Visibility="{
Binding Path=CheckedShadowSocks,
Converter={StaticResource VisibleConverter}
}">
<Label Content="{DynamicResource SSPort}" Foreground="Fuchsia" Width="120" />
<TextBox Text="{Binding Path=ShadowSocksPort}" Width="200"/>
</StackPanel>
<!--Trojan密码-->
<StackPanel Margin="30,15,0,0"
Orientation="Horizontal"
Visibility="{
Binding Path=Checked_Trojan_TCP,
Converter={StaticResource VisibleConverter}
}">
<Label Content="{DynamicResource TrojanPassword}" Foreground="CadetBlue" Width="120" />
<TextBox Text="{Binding Path=TrojanPassword}"
Width="200" />
</StackPanel>
<!--Trojan密码-->
<StackPanel Margin="0,15,0,0"
Orientation="Horizontal"
Visibility="{
Binding Path=Checked_Trojan_TCP,
Converter={StaticResource VisibleConverter}
}">
<Label Content="{DynamicResource TrojanPassword}" Foreground="CadetBlue" Width="120" />
<TextBox Text="{Binding Path=TrojanPassword}" Width="200" />
</StackPanel>
<!--xray prot-->
<StackPanel Margin="30,15,0,0"
Orientation="Horizontal">
<Label Content="{DynamicResource XrayPort}" Foreground="Gray" Width="120" />
<TextBox Text="{Binding Path=Port}" Width="120" />
<Label Content="{DynamicResource XrayPortDefault}" Foreground="Red" />
</StackPanel>
<!--多用户-->
<StackPanel Margin="0,10,0,0" Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<Label Content="{DynamicResource MultiUser}" Width="120" />
<!--多用户-->
<StackPanel Margin="30,10,0,0"
Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<Label Content="{DynamicResource MultiUser}" Width="120" />
<TextBox Text="{Binding Path=MultiUUID}"
Height="60"
TextWrapping="Wrap"
Width="200" />
</StackPanel>
<StackPanel>
<TextBlock Margin="120,3,0,0" Text="{DynamicResource MultiUserHelp}" />
</StackPanel>
</StackPanel>
<TextBox Text="{Binding Path=MultiUUID}"
Height="60"
TextWrapping="Wrap"
Width="200" />
</StackPanel>
<StackPanel>
<TextBlock Margin="120,3,0,0" Text="{DynamicResource MultiUserHelp}" />
</StackPanel>
</StackPanel>
</StackPanel>
</Expander.Content>
</Expander>
</StackPanel>
</StackPanel>

View File

@ -136,6 +136,7 @@
<Compile Include="MainWindow.xaml.cs">
<DependentUpon>MainWindow.xaml</DependentUpon>
</Compile>
<Compile Include="Setup.cs" />
<Compile Include="Views\Brook\BrookConfigView.xaml.cs">
<DependentUpon>BrookConfigView.xaml</DependentUpon>
</Compile>

View File

@ -67,9 +67,10 @@
<!--Xray-->
<sys:String x:Key="VlessXtlsDesc" xml:space="preserve">VLESS over TCP With XTLS&#x0a;Preferred</sys:String>
<sys:String x:Key="VlessTcpDesc" xml:space="preserve">VLESS over TCP with TLS&#x0a;XTLS is Preferred</sys:String>
<sys:String x:Key="VlessXtlsDesc" xml:space="preserve">VLESS over TCP With XTLS&#x0a;</sys:String>
<sys:String x:Key="VlessTcpDesc" xml:space="preserve">VLESS over TCP with TLS&#x0a;</sys:String>
<sys:String x:Key="VlessWsDesc" xml:space="preserve">VLESS over WS with TLS&#x0a;Support CDN</sys:String>
<sys:String x:Key="VlessRpcDesc" xml:space="preserve">VLESS gRPC&#x0a;http2multiplexing。</sys:String>
<sys:String x:Key="VlessKcpDesc" xml:space="preserve">VLESS mKCP&#x0a;low delaywithout Domain</sys:String>
<sys:String x:Key="VmessWsDesc" xml:space="preserve">VMESS over WS with TLS&#x0a;Support CDN</sys:String>
<sys:String x:Key="VmessKcpDesc" xml:space="preserve">VMESS mKCP&#x0a;low delaywithout Domian</sys:String>

View File

@ -65,9 +65,10 @@
<sys:String x:Key="ProxyTypeSocks5">Socks5</sys:String>
<!--Xray-->
<sys:String x:Key="VlessXtlsDesc" xml:space="preserve">VLESS Over TCP With XTLS&#x0a;性能數倍,首選方式。</sys:String>
<sys:String x:Key="VlessTcpDesc" xml:space="preserve">VLESS over TCP with TLS&#x0a;仍推薦XTLS。</sys:String>
<sys:String x:Key="VlessXtlsDesc" xml:space="preserve">VLESS Over TCP With XTLS&#x0a;安全隱患,謹慎。</sys:String>
<sys:String x:Key="VlessTcpDesc" xml:space="preserve">VLESS over TCP with TLS&#x0a;</sys:String>
<sys:String x:Key="VlessWsDesc" xml:space="preserve">VLESS over WS with TLS&#x0a;推薦支持CDN。</sys:String>
<sys:String x:Key="VlessRpcDesc" xml:space="preserve">VLESS gRPC&#x0a;基於http2多路複用。</sys:String>
<sys:String x:Key="VlessKcpDesc" xml:space="preserve">VLESS mKCP&#x0a;遊戲推薦,延遲低,免域名。</sys:String>
<sys:String x:Key="VmessWsDesc" xml:space="preserve">VMESS over WS with TLS&#x0a;推薦支持CDN。</sys:String>
<sys:String x:Key="VmessKcpDesc" xml:space="preserve">VMESS mKCP&#x0a;遊戲推薦,延遲低,免域名。</sys:String>

View File

@ -66,9 +66,10 @@
<sys:String x:Key="ProxyTypeSocks5">Socks5</sys:String>
<!--Xray-->
<sys:String x:Key="VlessXtlsDesc" xml:space="preserve">VLESS Over TCP With XTLS&#x0a;性能数倍,首选方式。</sys:String>
<sys:String x:Key="VlessTcpDesc" xml:space="preserve">VLESS over TCP with TLS&#x0a;仍推荐XTLS。</sys:String>
<sys:String x:Key="VlessXtlsDesc" xml:space="preserve">VLESS Over TCP With XTLS&#x0a;安全隐患,谨慎。</sys:String>
<sys:String x:Key="VlessTcpDesc" xml:space="preserve">VLESS over TCP with TLS&#x0a;推荐,主流。</sys:String>
<sys:String x:Key="VlessWsDesc" xml:space="preserve">VLESS over WS with TLS&#x0a;推荐支持CDN。</sys:String>
<sys:String x:Key="VlessRpcDesc" xml:space="preserve">VLESS gRPC&#x0a;基于http2多路复用。</sys:String>
<sys:String x:Key="VlessKcpDesc" xml:space="preserve">VLESS mKCP&#x0a;游戏推荐,延迟低,免域名。</sys:String>
<sys:String x:Key="VmessWsDesc" xml:space="preserve">VMESS over WS with TLS&#x0a;推荐支持CDN。</sys:String>
<sys:String x:Key="VmessKcpDesc" xml:space="preserve">VMESS mKCP&#x0a;游戏推荐,延迟低,免域名。</sys:String>

23
ProxySuper.WPF/Setup.cs Normal file
View File

@ -0,0 +1,23 @@
using Microsoft.Extensions.Logging;
using MvvmCross.Platforms.Wpf.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ProxySuper.WPF
{
public class Setup : MvxWpfSetup<Core.App>
{
protected override ILoggerProvider CreateLogProvider()
{
return null;
}
protected override ILoggerFactory CreateLogFactory()
{
return null;
}
}
}

View File

@ -1,6 +1,8 @@
using MvvmCross;
using MvvmCross.Navigation;
using MvvmCross.Platforms.Wpf.Presenters.Attributes;
using MvvmCross.Platforms.Wpf.Views;
using MvvmCross.ViewModels;
using ProxySuper.Core.Models;
using ProxySuper.Core.ViewModels;
using System;
@ -10,9 +12,8 @@ using System.Windows;
namespace ProxySuper.WPF.Views
{
/// <summary>
/// HomeView.xaml 的交互逻辑
/// </summary>
[MvxContentPresentation]
[MvxViewFor(typeof(HomeViewModel))]
public partial class HomeView : MvxWpfView
{

View File

@ -59,13 +59,6 @@
<ctrl:VLESS_gRPC_Control />
</TabItem>
<!--<TabItem Width="200" Height="40"
Tag="{x:Static models:XrayType.VMESS_TCP}"
IsEnabled="{Binding Checked_VMESS_TCP}"
Header="VMESS-TCP-TLS">
<ctrl:VMESS_TCP_TLS_Control />
</TabItem>-->
<TabItem Width="200" Height="40"
Tag="{x:Static models:RayType.VMESS_WS}"
IsEnabled="{Binding Checked_VMESS_WS}"