-
Notifications
You must be signed in to change notification settings - Fork 0
/
ServerWindow.xaml
128 lines (121 loc) · 7.42 KB
/
ServerWindow.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<Window x:Class="rbq_ray.ServerWindow"
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:rbq_ray"
mc:Ignorable="d"
Title="节点设置" Height="Auto" Width="800" SizeToContent="Height">
<StackPanel>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Label Content="名称" />
<TextBox x:Name="serverNameTextBox" Grid.Column="1" />
</Grid>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"></ColumnDefinition>
<ColumnDefinition Width="1*"></ColumnDefinition>
<ColumnDefinition Width="1*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<GroupBox Header="代理协议" Grid.Row="0" Grid.Column="0">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<ComboBox x:Name="protocolComboBox" Grid.Row="0" Grid.ColumnSpan="2" SelectionChanged="protocolComboBox_SelectionChanged" >
<ComboBoxItem Content="HTTP"/>
<ComboBoxItem Content="Socks"/>
<ComboBoxItem Content="Shadowsocks"/>
<ComboBoxItem Content="Shadowsocks 2022"/>
<ComboBoxItem Content="VMess"/>
<ComboBoxItem Content="VLESS"/>
<ComboBoxItem Content="Trojan"/>
</ComboBox>
<Label Content="地址" Grid.Row="1" Grid.Column="0"></Label>
<TextBox x:Name="addressTextBox" Grid.Row="1" Grid.Column="1" />
<Label Grid.Row="2" Content="端口" />
<TextBox x:Name="portTextBox" Grid.Row="2" Grid.Column="1" />
<Label Grid.Row="3" Content="用户名/UUID" />
<TextBox x:Name="usernameTextBox" Grid.Row="3" Grid.Column="1" IsEnabled="False" />
<Label Grid.Row="4" Content="密码/IPSK" />
<TextBox x:Name="passwordTextBox" Grid.Row="4" Grid.Column="1" IsEnabled="False" />
<Label Grid.Row="5" Content="加密方式" />
<ComboBox x:Name="methodComboBox" Grid.Row="5" Grid.Column="1" IsEnabled="False" >
<ComboBoxItem x:Name="aes_256_gcmComboBoxItem" Content="aes-256-gcm"/>
<ComboBoxItem x:Name="aes_128_gcmComboBoxItem" Content="aes-128-gcm"/>
<ComboBoxItem x:Name="chacha20_poly1305ComboBoxItem" Content="chacha20-poly1305"/>
<ComboBoxItem x:Name="chacha20_ietf_poly1305ComboBoxItem" Content="chacha20-ietf-poly1305"/>
<ComboBoxItem x:Name="methodNoneComboBoxItem" Content="none"/>
<ComboBoxItem x:Name="methodPlainComboBoxItem" Content="plain"/>
<ComboBoxItem x:Name="_2022_blake3_aes_128_gcmComboBoxItem" Content="2022-blake3-aes-128-gcm"/>
<ComboBoxItem x:Name="_2022_blake3_aes_256_gcmComboBoxItem" Content="2022-blake3-aes-256-gcm"/>
</ComboBox>
<Label Grid.Row="6" Content="PSK" />
<TextBox x:Name="pskTextBox" Grid.Row="6" Grid.Column="1" IsEnabled="False" />
</Grid>
</GroupBox>
<GroupBox Header="传输协议" Grid.Column="1">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<ComboBox x:Name="transportComboBox" Grid.Row="0" Grid.ColumnSpan="2" SelectedIndex="0" SelectionChanged="transportComboBox_SelectionChanged" >
<ComboBoxItem Content="TCP"/>
<ComboBoxItem Content="WebSocket"/>
<ComboBoxItem Content="mKCP"/>
<ComboBoxItem Content="gRPC"/>
<ComboBoxItem Content="QUIC"/>
<ComboBoxItem Content="Meek"/>
<ComboBoxItem Content="HTTPUpgrade"/>
</ComboBox>
<Label Content="路径/种子/服务" Grid.Row="1" Grid.Column="0"></Label>
<TextBox x:Name="pathTextBox" Grid.Row="1" Grid.Column="1" IsEnabled="False" />
<Label Grid.Row="2" Content="主机" />
<TextBox x:Name="hostTextBox" Grid.Row="2" Grid.Column="1" IsEnabled="False" />
</Grid>
</GroupBox>
<GroupBox Header="安全协议" Grid.Column="2">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<ComboBox x:Name="securityComboBox" Grid.Row="0" Grid.ColumnSpan="2" SelectedIndex="0" SelectionChanged="securityComboBox_SelectionChanged" >
<ComboBoxItem x:Name="securityNoneComboBoxItem" Content=""/>
<ComboBoxItem x:Name="tlsComboBoxItem" Content="TLS"/>
</ComboBox>
<Label Content="SNI" Grid.Row="1" Grid.Column="0"></Label>
<TextBox x:Name="sniTextBox" Grid.Row="1" Grid.Column="1" IsEnabled="False" />
</Grid>
</GroupBox>
</Grid>
<WrapPanel HorizontalAlignment="Right">
<Button x:Name="serverConfirmButton" IsDefault="True" Content="确定" Width="75" Click="serverConfirmButton_Click" Margin="5,5,5,5" />
<Button IsCancel="True" Content="取消" Width="75" Margin="0,5,5,5" />
</WrapPanel>
</StackPanel>
</Window>