mirror of
https://github.com/proxysu/ProxySU.git
synced 2024-11-23 05:36:08 +03:00
dc38de67d5
fix acme issue
154 lines
8.8 KiB
XML
154 lines
8.8 KiB
XML
<metro:MetroWindow x:Class="ProxySU_Core.MainWindow"
|
||
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"
|
||
mc:Ignorable="d"
|
||
BorderThickness="1"
|
||
xmlns:metro="http://metro.mahapps.com/winfx/xaml/controls"
|
||
xmlns:mah="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
|
||
TextElement.FontSize="14"
|
||
Title="ProxySU Core" Height="800" Width="1200">
|
||
|
||
<mah:MetroWindow.LeftWindowCommands>
|
||
<mah:WindowCommands>
|
||
<Button Click="LaunchGitHubSite" ToolTip="Open up the GitHub site">
|
||
github
|
||
</Button>
|
||
</mah:WindowCommands>
|
||
</mah:MetroWindow.LeftWindowCommands>
|
||
|
||
<mah:MetroWindow.RightWindowCommands>
|
||
<mah:WindowCommands>
|
||
<StackPanel Orientation="Horizontal" Margin="0,0,20,0">
|
||
<TextBlock Text="{DynamicResource LanguageText}" VerticalAlignment="Center" Margin="0,0,20,0" />
|
||
<ComboBox
|
||
SelectionChanged="ChangeLanguage"
|
||
x:Name="cmbLanguage"
|
||
IsEnabled="False"
|
||
SelectedIndex="0">
|
||
<ComboBoxItem x:Name="zh_cn" Content="{DynamicResource LanguageChinese}"></ComboBoxItem>
|
||
<ComboBoxItem x:Name="en" Content="{DynamicResource LanguageEnglish}"></ComboBoxItem>
|
||
</ComboBox>
|
||
</StackPanel>
|
||
</mah:WindowCommands>
|
||
</mah:MetroWindow.RightWindowCommands>
|
||
|
||
<Window.Resources>
|
||
<DataTemplate x:Key="HostTagTemplate">
|
||
<TextBlock Text="{Binding Tag}" />
|
||
</DataTemplate>
|
||
</Window.Resources>
|
||
|
||
|
||
<Grid>
|
||
<TabControl
|
||
Background="#fff"
|
||
Style="{StaticResource MaterialDesignNavigatilRailTabControl}"
|
||
Padding="10">
|
||
<TabItem
|
||
Width="160"
|
||
Style="{StaticResource MaterialDesignNavigationRailTabItem}"
|
||
Header="{DynamicResource TabItemHeaderAppDeployment}">
|
||
<StackPanel Orientation="Vertical">
|
||
|
||
<StackPanel HorizontalAlignment="Left" Orientation="Horizontal">
|
||
<Button
|
||
Content="{DynamicResource AddHost}"
|
||
Click="AddHost"
|
||
Width="100"/>
|
||
|
||
<Button
|
||
Margin="10,0,0,0"
|
||
Content="导出配置"
|
||
Click="ExportXraySettings"
|
||
Width="100" />
|
||
|
||
<Button
|
||
Margin="10,0,0,0"
|
||
Content="导出订阅"
|
||
Click="ExportXraySub"
|
||
Width="100" />
|
||
</StackPanel>
|
||
|
||
<DataGrid ItemsSource="{Binding Records}"
|
||
Margin="0,20,0,0"
|
||
IsReadOnly="True"
|
||
x:Name="DataGrid"
|
||
CellStyle="{StaticResource DataGridCell}"
|
||
Style="{StaticResource MaterialDesignDataGrid}"
|
||
ColumnHeaderStyle="{StaticResource DataGridColumnHeader}"
|
||
SelectionUnit="FullRow"
|
||
BorderBrush="#eee"
|
||
BorderThickness="1"
|
||
AutoGenerateColumns="False">
|
||
<DataGrid.Columns>
|
||
<DataGridCheckBoxColumn Header="选择"
|
||
Binding="{Binding Path=IsChecked, UpdateSourceTrigger=PropertyChanged}"
|
||
IsReadOnly="False"
|
||
Width="80"/>
|
||
<DataGridTextColumn Header="{DynamicResource HostTag}"
|
||
Binding="{Binding Path=Host.Tag}"
|
||
Width="150"/>
|
||
<DataGridTextColumn Header="{DynamicResource HostAddress}"
|
||
Binding="{Binding Path=Host.Address}"
|
||
Width="200"/>
|
||
<DataGridTextColumn Header="{DynamicResource HostPort}"
|
||
Binding="{Binding Path=Host.Port}"
|
||
Width="100"/>
|
||
<DataGridTextColumn Header="{DynamicResource ProxyGroupName}"
|
||
Binding="{Binding Path=Host.Proxy.Type}"
|
||
Width="100"/>
|
||
<DataGridTemplateColumn>
|
||
<DataGridTemplateColumn.Header>
|
||
<TextBlock Text="{DynamicResource Actions}" />
|
||
</DataGridTemplateColumn.Header>
|
||
<DataGridTemplateColumn.CellTemplate>
|
||
<DataTemplate>
|
||
<StackPanel Orientation="Horizontal">
|
||
<Button Content="控制台" FontSize="12" Height="24" Click="Connect" />
|
||
<Button Content="查看配置" FontSize="12" Height="24" Margin="10,0,0,0" Click="ShowClientInfo" />
|
||
<Button Content="编辑" FontSize="12" Height="24" Margin="10,0,0,0" Click="EditHost" />
|
||
<Button Content="删除" FontSize="12" Height="24" Margin="10,0,0,0" Click="DeleteHost" BorderBrush="IndianRed" Background="IndianRed" />
|
||
</StackPanel>
|
||
</DataTemplate>
|
||
</DataGridTemplateColumn.CellTemplate>
|
||
</DataGridTemplateColumn>
|
||
</DataGrid.Columns>
|
||
</DataGrid>
|
||
|
||
|
||
</StackPanel>
|
||
</TabItem>
|
||
|
||
<TabItem
|
||
Width="160"
|
||
Style="{StaticResource MaterialDesignNavigationRailTabItem}"
|
||
Header="说明文档">
|
||
<StackPanel>
|
||
<StackPanel Margin="0,10,0,0">
|
||
<TextBlock Text="新书指引:" FontWeight="Black" />
|
||
<TextBlock Text="1. 【添加主机】,填写主机信息及节点配置信息,保存。" />
|
||
<TextBlock Text="2. 点【控制台】,自动连接主机,连接成功后,点【一键安装】,待输出 “请尽情享用吧” 代表安装完成。" />
|
||
<TextBlock Text="3. 在【查看配置】中可以查看节点配置信息,选中【导出配置】可以复制所有节点的分享拦截。" />
|
||
</StackPanel>
|
||
<StackPanel Margin="0,10,0,0">
|
||
<TextBlock Text="自定义功能" FontWeight="Black" />
|
||
<TextBlock Text="【更新配置】:用户想修改节点的信息,比如增加一个websocket或修改用户id,在【编辑】中修改保存后,不需要重新安装了,这个功能就可以更新配置。" />
|
||
<TextBlock Text="【更新内核】:更新官方xray-core的最新版本。" />
|
||
<TextBlock Text="【卸载代理】:卸载 域名证书、caddy服务、xray内核,一些安装过程中的基础功能,不影响不卸载,会影响到您的系统,请自行处理。" />
|
||
<TextBlock Text="【续签证书】:默认是会自动续签的,但由于各种平台的基础环境不一样,可能有些会续签失败,这个功能可手动续签证书。" />
|
||
<TextBlock Text="【上传证书】:上传自有证书,将您的证书 crt 和 key 文件打包zip上传即可。" />
|
||
<TextBlock Text="【上传网站】:上传伪装静态网站,静态网站必须根目录有一个index.html文件,请自行检查。" />
|
||
</StackPanel>
|
||
<StackPanel Margin="0,10,0,0">
|
||
<TextBlock Text="关于v3版本:" FontWeight="Black" />
|
||
<TextBlock Text="初步以xray为基础,方便自动安装、修改、卸载,看建议再考虑其他方式,如有需要请先用v2的版本。" />
|
||
</StackPanel>
|
||
</StackPanel>
|
||
</TabItem>
|
||
</TabControl>
|
||
</Grid>
|
||
</metro:MetroWindow>
|