mirror of
https://github.com/proxysu/ProxySU.git
synced 2024-11-24 06:06:07 +03:00
update
This commit is contained in:
parent
5db61a02b5
commit
1a5a7219e3
@ -14,6 +14,8 @@ namespace ProxySuper.Core.Models.Projects
|
||||
|
||||
public string Email { get; set; } = "";
|
||||
|
||||
public string Protocol { get; set; } = "udp";
|
||||
|
||||
public int Port { get; set; } = 36712;
|
||||
|
||||
public int UpMbps { get; set; } = 300;
|
||||
|
@ -1,4 +1,5 @@
|
||||
using MvvmCross.Navigation;
|
||||
using MvvmCross.Commands;
|
||||
using MvvmCross.Navigation;
|
||||
using MvvmCross.ViewModels;
|
||||
using ProxySuper.Core.Models;
|
||||
using ProxySuper.Core.Models.Hosts;
|
||||
@ -23,6 +24,10 @@ namespace ProxySuper.Core.ViewModels
|
||||
|
||||
public IMvxNavigationService NavigationService { get; }
|
||||
|
||||
public IMvxCommand SaveCommand => new MvxCommand(() => Save());
|
||||
|
||||
public IMvxCommand SaveAndInstallCommand => new MvxCommand(SaveAndInstall);
|
||||
|
||||
public HysteriaEditorViewModel(IMvxNavigationService mvxNavigationService)
|
||||
{
|
||||
NavigationService = mvxNavigationService;
|
||||
|
@ -158,6 +158,9 @@
|
||||
<Compile Include="Views\HomeView.xaml.cs">
|
||||
<DependentUpon>HomeView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\Hysteria\HysteriaEditorView.xaml.cs">
|
||||
<DependentUpon>HysteriaEditorView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\MTProxyGo\MTProxyGoConfigView.xaml.cs">
|
||||
<DependentUpon>MTProxyGoConfigView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@ -318,6 +321,10 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Page>
|
||||
<Page Include="Views\Hysteria\HysteriaEditorView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Views\MTProxyGo\MTProxyGoConfigView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
|
@ -149,4 +149,12 @@
|
||||
<sys:String x:Key="MTProtoPort">Port</sys:String>
|
||||
<sys:String x:Key="MTProtoCleartext">Cleantext</sys:String>
|
||||
<sys:String x:Key="MTProtoSecretText">Secret</sys:String>
|
||||
|
||||
<!--Hysteria-->
|
||||
<sys:String x:Key="HysteriaDomain">Address</sys:String>
|
||||
<sys:String x:Key="HysteriaPort">Port</sys:String>
|
||||
<sys:String x:Key="HysteriaObfs">OBFS</sys:String>
|
||||
<sys:String x:Key="HysteriaEmail">Email</sys:String>
|
||||
<sys:String x:Key="HysteriaUpMbps">UpMbps</sys:String>
|
||||
<sys:String x:Key="HysteriaDownMbps">DownMbps</sys:String>
|
||||
</ResourceDictionary>
|
@ -150,4 +150,12 @@
|
||||
<sys:String x:Key="MTProtoPort">端口</sys:String>
|
||||
<sys:String x:Key="MTProtoCleartext">加密前字符</sys:String>
|
||||
<sys:String x:Key="MTProtoSecretText">密鑰</sys:String>
|
||||
|
||||
<!--Hysteria-->
|
||||
<sys:String x:Key="HysteriaDomain">域名</sys:String>
|
||||
<sys:String x:Key="HysteriaPort">端口</sys:String>
|
||||
<sys:String x:Key="HysteriaObfs">加密字符</sys:String>
|
||||
<sys:String x:Key="HysteriaEmail">郵箱</sys:String>
|
||||
<sys:String x:Key="HysteriaUpMbps">上傳限速</sys:String>
|
||||
<sys:String x:Key="HysteriaDownMbps">下載限速</sys:String>
|
||||
</ResourceDictionary>
|
@ -151,4 +151,13 @@
|
||||
<sys:String x:Key="MTProtoPort">端口</sys:String>
|
||||
<sys:String x:Key="MTProtoCleartext">加密前字符</sys:String>
|
||||
<sys:String x:Key="MTProtoSecretText">密钥</sys:String>
|
||||
|
||||
<!--Hysteria-->
|
||||
<sys:String x:Key="HysteriaDomain">域名</sys:String>
|
||||
<sys:String x:Key="HysteriaPort">端口</sys:String>
|
||||
<sys:String x:Key="HysteriaObfs">加密字符</sys:String>
|
||||
<sys:String x:Key="HysteriaProtocol">协议</sys:String>
|
||||
<sys:String x:Key="HysteriaEmail">邮箱</sys:String>
|
||||
<sys:String x:Key="HysteriaUpMbps">上传限速</sys:String>
|
||||
<sys:String x:Key="HysteriaDownMbps">下载限速</sys:String>
|
||||
</ResourceDictionary>
|
87
ProxySuper.WPF/Views/Hysteria/HysteriaEditorView.xaml
Normal file
87
ProxySuper.WPF/Views/Hysteria/HysteriaEditorView.xaml
Normal file
@ -0,0 +1,87 @@
|
||||
<Window x:Class="ProxySuper.WPF.Views.Hysteria.HysteriaEditorView"
|
||||
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:ProxySuper.WPF.Views.Hysteria"
|
||||
xmlns:ctrl="clr-namespace:ProxySuper.WPF.Controls"
|
||||
mc:Ignorable="d"
|
||||
BorderThickness="0,1,0,0"
|
||||
BorderBrush="#eee"
|
||||
Icon="/Resources/ProxySU.ico"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
Title="Hysteria编辑配置" Height="600" Width="1000">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="310" />
|
||||
<ColumnDefinition Width="1" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<StackPanel Grid.Column="0" Margin="10">
|
||||
<ctrl:HostControl />
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="1" Background="#EEE"></StackPanel>
|
||||
|
||||
<Grid Grid.Column="2" Margin="10,10,0,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="36" />
|
||||
<RowDefinition Height="36" />
|
||||
<RowDefinition Height="36" />
|
||||
<RowDefinition Height="36" />
|
||||
<RowDefinition Height="36" />
|
||||
<RowDefinition Height="36" />
|
||||
<RowDefinition Height="36" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="50" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="120" />
|
||||
<ColumnDefinition Width="200" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Content="{DynamicResource HysteriaDomain}" Grid.Row="0" Grid.Column="0" />
|
||||
<TextBox Text="{Binding Settings.Domain}" Grid.Row="0" Grid.Column="1" />
|
||||
|
||||
<Label Content="{DynamicResource HysteriaPort}" Grid.Row="1" Grid.Column="0" />
|
||||
<TextBox Text="{Binding Settings.Port}" Grid.Row="1" Grid.Column="1" />
|
||||
|
||||
<Label Content="{DynamicResource HysteriaObfs}" Grid.Row="2" Grid.Column="0" />
|
||||
<TextBox Text="{Binding Settings.Obfs}" Grid.Row="2" Grid.Column="1" />
|
||||
|
||||
<Label Content="{DynamicResource HysteriaProtocol}" Grid.Row="3" Grid.Column="0" />
|
||||
<TextBox Text="{Binding Settings.Protocol}" Grid.Row="3" Grid.Column="1" />
|
||||
|
||||
<Label Content="{DynamicResource HysteriaEmail}" Grid.Row="4" Grid.Column="0" />
|
||||
<TextBox Text="{Binding Settings.Email}" Grid.Row="4" Grid.Column="1" />
|
||||
|
||||
<Label Content="{DynamicResource HysteriaUpMbps}" Grid.Row="5" Grid.Column="0" />
|
||||
<TextBox Text="{Binding Settings.UpMbps}" Grid.Row="5" Grid.Column="1" />
|
||||
|
||||
<Label Content="{DynamicResource HysteriaDownMbps}" Grid.Row="6" Grid.Column="0" />
|
||||
<TextBox Text="{Binding Settings.DownMbps}" Grid.Row="6" Grid.Column="1" />
|
||||
|
||||
<Border Grid.Row="8"
|
||||
Grid.ColumnSpan="3"
|
||||
BorderBrush="#eee"
|
||||
BorderThickness="0,1,0,0">
|
||||
<StackPanel Orientation="Horizontal"
|
||||
HorizontalAlignment="Right">
|
||||
<Button Content="{DynamicResource Save}"
|
||||
Command="{Binding SaveCommand}"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Padding="10,5" />
|
||||
|
||||
<Button Content="{DynamicResource SaveAndInstall}"
|
||||
Command="{Binding SaveAndInstallCommand}"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Padding="10,5"
|
||||
Margin="20,0,40,0" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Window>
|
27
ProxySuper.WPF/Views/Hysteria/HysteriaEditorView.xaml.cs
Normal file
27
ProxySuper.WPF/Views/Hysteria/HysteriaEditorView.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 ProxySuper.WPF.Views.Hysteria
|
||||
{
|
||||
/// <summary>
|
||||
/// HysteriaEditorView.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class HysteriaEditorView : Window
|
||||
{
|
||||
public HysteriaEditorView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user