1
0
mirror of https://github.com/proxysu/ProxySU.git synced 2024-11-22 05:06:08 +03:00
ProxySU/ProxySuper.WPF/Controls/V2raySettingsControl.xaml
2022-11-23 22:06:09 +08:00

473 lines
26 KiB
XML

<UserControl x:Class="ProxySuper.WPF.Controls.V2raySettingsControl"
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"
xmlns:convert="clr-namespace:ProxySuper.Core.Converters;assembly=ProxySuper.Core"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<UserControl.Resources>
<convert:VisibleConverter x:Key="VisibleConverter" />
</UserControl.Resources>
<StackPanel Orientation="Vertical" Margin="10,0,20,20">
<!--节点类型-->
<GroupBox Padding="10" Header="{DynamicResource EditorProxyType}">
<StackPanel Orientation="Horizontal">
<!--#region VLESS -->
<WrapPanel Orientation="Vertical">
<!--TCP-->
<CheckBox Width="150"
VerticalContentAlignment="Center"
IsChecked="{Binding Path=Checked_VLESS_TCP}">
<Label Content="{DynamicResource VlessTcpDesc}" FontSize="13" Foreground="LimeGreen" />
</CheckBox>
<!--WebSocket-->
<CheckBox Width="150"
VerticalContentAlignment="Center"
IsChecked="{Binding Path=Checked_VLESS_WS}">
<Label Content="{DynamicResource VlessWsDesc}" FontSize="13" Foreground="LimeGreen" />
</CheckBox>
<!--mKCP-->
<CheckBox Width="150"
VerticalContentAlignment="Center"
Foreground="LimeGreen"
IsChecked="{Binding Path=Checked_VLESS_KCP}">
<Label Content="{DynamicResource VlessKcpDesc}" FontSize="13" Foreground="LimeGreen" />
</CheckBox>
<!--quic-->
<CheckBox Width="150"
VerticalContentAlignment="Center"
Foreground="LimeGreen"
IsChecked="{Binding Path=Checked_VLESS_QUIC}">
<Label Content="{DynamicResource VlessQuicDesc}" FontSize="12" Foreground="LimeGreen" />
</CheckBox>
<!--gRPC-->
<CheckBox Width="150"
VerticalContentAlignment="Center"
Foreground="LimeGreen"
IsChecked="{Binding Path=Checked_VLESS_gRPC}">
<Label Content="{DynamicResource VlessRpcDesc}" FontSize="13" Foreground="LimeGreen" />
</CheckBox>
</WrapPanel>
<!--#endregion-->
<!--#region VMESS -->
<WrapPanel Orientation="Vertical">
<!--WebSocket-->
<CheckBox Width="150"
VerticalContentAlignment="Center"
IsChecked="{Binding Path=Checked_VMESS_WS}">
<Label Content="{DynamicResource VmessWsDesc}" FontSize="13" Foreground="Blue" />
</CheckBox>
<!--mKCP-->
<CheckBox Width="150"
VerticalContentAlignment="Center"
IsChecked="{Binding Path=Checked_VMESS_KCP}">
<Label Foreground="Blue" FontSize="13" Content="{DynamicResource VmessKcpDesc}" />
</CheckBox>
<!--quic-->
<CheckBox Width="150"
VerticalContentAlignment="Center"
Foreground="Blue"
IsChecked="{Binding Path=Checked_VMESS_QUIC}">
<Label Content="{DynamicResource VmessQuicDesc}" FontSize="12" Foreground="Blue" />
</CheckBox>
</WrapPanel>
<!--#endregion-->
<!--#region SS And Trojan -->
<WrapPanel Orientation="Vertical">
<!--ss-->
<CheckBox Width="150"
VerticalContentAlignment="Center"
IsChecked="{Binding Path=CheckedShadowSocks}">
<Label Content="{DynamicResource SSDesc}" FontSize="13" Foreground="Fuchsia" />
</CheckBox>
<!--Trojan-->
<CheckBox Width="150"
Foreground="CadetBlue"
VerticalContentAlignment="Center"
IsChecked="{Binding Path=Checked_Trojan_TCP}">
<Label Content="{DynamicResource TrojanDesc}" FontSize="13" Foreground="CadetBlue" />
</CheckBox>
</WrapPanel>
<!--#endregion-->
</StackPanel>
</GroupBox>
<!--************************** 参数 **************************-->
<!--参数设置-->
<GroupBox Padding="10" Margin="0,10,0,0" Header="{DynamicResource EditorProxyParams}">
<StackPanel>
<!--#region Common Settings -->
<!--Domain-->
<StackPanel Orientation="Horizontal">
<Label Content="{DynamicResource XrayDomain}" Width="120" />
<TextBox Text="{Binding Path=Domain}" Width="200" />
</StackPanel>
<!--Mask Domain-->
<StackPanel Margin="0,15,0,0" Orientation="Horizontal">
<Label Content="{DynamicResource XrayMarkDomain}" Width="120" />
<TextBox Text="{Binding Path=MaskDomain}" Width="200" />
</StackPanel>
<!--UUID-->
<StackPanel Margin="0,15,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}" />
</StackPanel>
<!--#endregion-->
<!--more params-->
<Expander ExpandDirection="Down" Margin="0,10,0,0">
<Expander.Header>
<TextBlock Text="更多参数" FontWeight="Bold" />
</Expander.Header>
<Expander.Content>
<StackPanel>
<!--#region Cert Settings -->
<!--证书-->
<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>
<!--#endregion-->
<!--#region VLESS WebSocket Settings -->
<!--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>
<!--#endregion-->
<!--#region VLESS KCP Settings -->
<!--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>
<!--kcp type-->
<StackPanel Margin="0,15,0,0"
Visibility="{
Binding Path=Checked_VLESS_KCP,
Converter={StaticResource VisibleConverter}
}"
Orientation="Horizontal">
<Label Content="{DynamicResource VlessKcpType}" Foreground="LimeGreen" Width="120" />
<ComboBox Width="200"
ItemsSource="{Binding Path=KcpTypes}"
SelectedValue="{Binding VLESS_KCP_Type,Mode=TwoWay}">
</ComboBox>
</StackPanel>
<!--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>
<!--#endregion-->
<!--#region VLESS Quic Settings -->
<!--quic port-->
<StackPanel Margin="0,15,0,0"
Orientation="Horizontal"
Visibility="{
Binding Path=Checked_VLESS_QUIC,
Converter={StaticResource VisibleConverter}
}">
<Label Content="{DynamicResource VlessQuicPort}" Foreground="LimeGreen" Width="120" />
<TextBox Text="{Binding Path=VLESS_QUIC_Port}" Width="260" />
</StackPanel>
<!--quic key-->
<StackPanel Margin="0,15,0,0"
Orientation="Horizontal"
Visibility="{
Binding Path=Checked_VLESS_QUIC,
Converter={StaticResource VisibleConverter}
}">
<Label Content="{DynamicResource VlessQuicKey}" Foreground="LimeGreen" Width="120" />
<TextBox Text="{Binding Path=VLESS_QUIC_Key}" Width="260" />
</StackPanel>
<!--quic security-->
<StackPanel Margin="0,15,0,0"
Orientation="Horizontal"
Visibility="{
Binding Path=Checked_VLESS_QUIC,
Converter={StaticResource VisibleConverter}
}">
<Label Content="{DynamicResource VlessQuicSecurity}" Foreground="LimeGreen" Width="120" />
<ComboBox Width="260"
ItemsSource="{Binding QuicSecurities}"
SelectedValue="{Binding VLESS_QUIC_Security}">
</ComboBox>
</StackPanel>
<!--quic type-->
<StackPanel Margin="0,15,0,0"
Orientation="Horizontal"
Visibility="{
Binding Path=Checked_VLESS_QUIC,
Converter={StaticResource VisibleConverter}
}">
<Label Content="{DynamicResource VlessQuicType}" Foreground="LimeGreen" Width="120" VerticalAlignment="Bottom"/>
<ComboBox Width="260"
VerticalAlignment="Bottom"
ItemsSource="{Binding Path=QuicTypes}"
SelectedValue="{Binding VLESS_QUIC_Type,Mode=TwoWay}">
</ComboBox>
</StackPanel>
<!--#endregion-->
<!--#region VLESS gRPC Settings -->
<!--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>
<!--#endregion-->
<!--#region VMESS WebSocket Settings -->
<!--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>
<!--#endregion-->
<!--#region VMESS KCP Settings -->
<!--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="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="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>
<!--#endregion-->
<!--#region VMESS Quic Settings -->
<!--quic port-->
<StackPanel Margin="0,15,0,0"
Orientation="Horizontal"
Visibility="{
Binding Path=Checked_VMESS_QUIC,
Converter={StaticResource VisibleConverter}
}">
<Label Content="{DynamicResource VmessQuicPort}" Foreground="Blue" Width="120" />
<TextBox Text="{Binding Path=VMESS_QUIC_Port}" Width="260" />
</StackPanel>
<!--quic key-->
<StackPanel Margin="0,15,0,0"
Orientation="Horizontal"
Visibility="{
Binding Path=Checked_VMESS_QUIC,
Converter={StaticResource VisibleConverter}
}">
<Label Content="{DynamicResource VmessQuicKey}" Foreground="Blue" Width="120" />
<TextBox Text="{Binding Path=VMESS_QUIC_Key}" Width="260" />
</StackPanel>
<!--quic security-->
<StackPanel Margin="0,15,0,0"
Orientation="Horizontal"
Visibility="{
Binding Path=Checked_VMESS_QUIC,
Converter={StaticResource VisibleConverter}
}">
<Label Content="{DynamicResource VmessQuicSecurity}" Foreground="Blue" Width="120" />
<ComboBox Width="260"
ItemsSource="{Binding QuicSecurities}"
SelectedValue="{Binding VMESS_QUIC_Security}">
</ComboBox>
</StackPanel>
<!--quic type-->
<StackPanel Margin="0,15,0,0"
Orientation="Horizontal"
Visibility="{
Binding Path=Checked_VMESS_QUIC,
Converter={StaticResource VisibleConverter}
}">
<Label Content="{DynamicResource VmessQuicType}" Foreground="Blue" Width="120" VerticalAlignment="Bottom"/>
<ComboBox Width="260"
VerticalAlignment="Bottom"
ItemsSource="{Binding Path=QuicTypes}"
SelectedValue="{Binding VMESS_QUIC_Type,Mode=TwoWay}">
</ComboBox>
</StackPanel>
<!--#endregion-->
<!--#region ShadowSocks Settings -->
<!--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>
<!--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="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>
<!--#endregion-->
<!--#region Trojan Settings -->
<!--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>
<!--v2ray prot-->
<StackPanel Margin="0,15,0,0" Orientation="Horizontal">
<Label Content="{DynamicResource V2rayPort}" Foreground="Gray" Width="120" />
<TextBox Text="{Binding Path=Port}" Width="120" />
<Label Content="{DynamicResource XrayPortDefault}" Foreground="Red" />
</StackPanel>
<!--#endregion-->
<!--#region Multiple Users Settings -->
<!--多用户-->
<StackPanel Margin="0,15,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>
<!--#endregion-->
</StackPanel>
</Expander.Content>
</Expander>
</StackPanel>
</GroupBox>
</StackPanel>
</UserControl>