mirror of https://github.com/2dust/v2rayN
Improvements and Adjustments
parent
649e89e7af
commit
7a8680711e
|
@ -63,6 +63,7 @@
|
||||||
public const string HttpProtocol = "http://";
|
public const string HttpProtocol = "http://";
|
||||||
public const string HttpsProtocol = "https://";
|
public const string HttpsProtocol = "https://";
|
||||||
public const string SocksProtocol = "socks://";
|
public const string SocksProtocol = "socks://";
|
||||||
|
public const string Socks5Protocol = "socks5://";
|
||||||
|
|
||||||
public const string UserEMail = "t@t.tt";
|
public const string UserEMail = "t@t.tt";
|
||||||
public const string AutoRunRegPath = @"Software\Microsoft\Windows\CurrentVersion\Run";
|
public const string AutoRunRegPath = @"Software\Microsoft\Windows\CurrentVersion\Run";
|
||||||
|
|
|
@ -118,7 +118,7 @@
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class ConstItem
|
public class ConstItem
|
||||||
{
|
{
|
||||||
public string SubConvertUrl { get; set; } = string.Empty;
|
public string? SubConvertUrl { get; set; }
|
||||||
public string? GeoSourceUrl { get; set; }
|
public string? GeoSourceUrl { get; set; }
|
||||||
public string? SrsSourceUrl { get; set; }
|
public string? SrsSourceUrl { get; set; }
|
||||||
public string? RouteRulesTemplateSourceUrl { get; set; }
|
public string? RouteRulesTemplateSourceUrl { get; set; }
|
||||||
|
|
|
@ -210,13 +210,13 @@ namespace ServiceLib.ViewModels
|
||||||
var address = $"{Global.Loopback}:{AppHandler.Instance.GetLocalPort(EInboundProtocol.socks)}";
|
var address = $"{Global.Loopback}:{AppHandler.Instance.GetLocalPort(EInboundProtocol.socks)}";
|
||||||
|
|
||||||
var sb = new StringBuilder();
|
var sb = new StringBuilder();
|
||||||
sb.AppendLine($"{cmd} http_proxy=http://{address}");
|
sb.AppendLine($"{cmd} http_proxy={Global.HttpProtocol}{address}");
|
||||||
sb.AppendLine($"{cmd} https_proxy=http://{address}");
|
sb.AppendLine($"{cmd} https_proxy={Global.HttpProtocol}{address}");
|
||||||
sb.AppendLine($"{cmd} all_proxy=socks5://{address}");
|
sb.AppendLine($"{cmd} all_proxy={Global.Socks5Protocol}{address}");
|
||||||
sb.AppendLine("");
|
sb.AppendLine("");
|
||||||
sb.AppendLine($"{cmd} HTTP_PROXY=http://{address}");
|
sb.AppendLine($"{cmd} HTTP_PROXY={Global.HttpProtocol}{address}");
|
||||||
sb.AppendLine($"{cmd} HTTPS_PROXY=http://{address}");
|
sb.AppendLine($"{cmd} HTTPS_PROXY={Global.HttpProtocol}{address}");
|
||||||
sb.AppendLine($"{cmd} ALL_PROXY=socks5://{address}");
|
sb.AppendLine($"{cmd} ALL_PROXY={Global.Socks5Protocol}{address}");
|
||||||
|
|
||||||
await _updateView?.Invoke(EViewAction.SetClipboardData, sb.ToString());
|
await _updateView?.Invoke(EViewAction.SetClipboardData, sb.ToString());
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,73 +11,71 @@
|
||||||
x:DataType="vms:StatusBarViewModel"
|
x:DataType="vms:StatusBarViewModel"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<Grid>
|
<Grid>
|
||||||
<StackPanel Height="50">
|
<DockPanel Margin="4">
|
||||||
<DockPanel>
|
<StackPanel
|
||||||
<StackPanel
|
Margin="8,0"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
DockPanel.Dock="Right">
|
||||||
|
<TextBlock x:Name="txtSpeedProxyDisplay" HorizontalAlignment="Right" />
|
||||||
|
<Border Margin="1" />
|
||||||
|
<TextBlock x:Name="txtSpeedDirectDisplay" HorizontalAlignment="Right" />
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<StackPanel
|
||||||
|
Margin="8,0"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
DockPanel.Dock="Left">
|
||||||
|
<TextBlock x:Name="txtInboundDisplay" />
|
||||||
|
<Border Margin="1" />
|
||||||
|
<TextBlock x:Name="txtInboundLanDisplay" />
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<StackPanel
|
||||||
|
x:Name="spEnableTun"
|
||||||
|
Margin="8,0"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
DockPanel.Dock="Left"
|
||||||
|
Orientation="Horizontal">
|
||||||
|
<TextBlock
|
||||||
Margin="8,0"
|
Margin="8,0"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
DockPanel.Dock="Right">
|
Text="{x:Static resx:ResUI.TbEnableTunAs}" />
|
||||||
<TextBlock x:Name="txtSpeedProxyDisplay" />
|
<ToggleSwitch
|
||||||
<Border Margin="2" />
|
x:Name="togEnableTun"
|
||||||
<TextBlock x:Name="txtSpeedDirectDisplay" />
|
HorizontalAlignment="Center"
|
||||||
</StackPanel>
|
Classes="Margin8"
|
||||||
|
Theme="{DynamicResource SimpleToggleSwitch}" />
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
<StackPanel
|
<StackPanel
|
||||||
|
Margin="8,0"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
DockPanel.Dock="Left"
|
||||||
|
Orientation="Horizontal">
|
||||||
|
<ComboBox
|
||||||
|
x:Name="cmbSystemProxy"
|
||||||
|
Width="160"
|
||||||
Margin="8,0"
|
Margin="8,0"
|
||||||
VerticalAlignment="Center"
|
ToolTip.Tip="{x:Static resx:ResUI.menuSystemproxy}">
|
||||||
DockPanel.Dock="Left">
|
<ComboBoxItem Content="{x:Static resx:ResUI.menuSystemProxyClear}" />
|
||||||
<TextBlock x:Name="txtInboundDisplay" />
|
<ComboBoxItem Content="{x:Static resx:ResUI.menuSystemProxySet}" />
|
||||||
<Border Margin="2" />
|
<ComboBoxItem Content="{x:Static resx:ResUI.menuSystemProxyNothing}" />
|
||||||
<TextBlock x:Name="txtInboundLanDisplay" />
|
</ComboBox>
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
<StackPanel
|
<ComboBox
|
||||||
x:Name="spEnableTun"
|
x:Name="cmbRoutings2"
|
||||||
|
Width="160"
|
||||||
Margin="8,0"
|
Margin="8,0"
|
||||||
VerticalAlignment="Center"
|
DisplayMemberBinding="{Binding Remarks}"
|
||||||
DockPanel.Dock="Left"
|
ItemsSource="{Binding RoutingItems}"
|
||||||
Orientation="Horizontal">
|
ToolTip.Tip="{x:Static resx:ResUI.menuRouting}" />
|
||||||
<TextBlock
|
</StackPanel>
|
||||||
Margin="8,0"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
Text="{x:Static resx:ResUI.TbEnableTunAs}" />
|
|
||||||
<ToggleSwitch
|
|
||||||
x:Name="togEnableTun"
|
|
||||||
HorizontalAlignment="Center"
|
|
||||||
Classes="Margin8"
|
|
||||||
Theme="{DynamicResource SimpleToggleSwitch}" />
|
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
<StackPanel
|
<StackPanel Margin="8,0" VerticalAlignment="Center">
|
||||||
Margin="8,0"
|
<TextBlock x:Name="txtRunningServerDisplay" />
|
||||||
VerticalAlignment="Center"
|
<Border Margin="1" />
|
||||||
DockPanel.Dock="Left"
|
<TextBlock x:Name="txtRunningInfoDisplay" />
|
||||||
Orientation="Horizontal">
|
</StackPanel>
|
||||||
<ComboBox
|
</DockPanel>
|
||||||
x:Name="cmbSystemProxy"
|
|
||||||
Width="160"
|
|
||||||
Margin="8,0"
|
|
||||||
ToolTip.Tip="{x:Static resx:ResUI.menuSystemproxy}">
|
|
||||||
<ComboBoxItem Content="{x:Static resx:ResUI.menuSystemProxyClear}" />
|
|
||||||
<ComboBoxItem Content="{x:Static resx:ResUI.menuSystemProxySet}" />
|
|
||||||
<ComboBoxItem Content="{x:Static resx:ResUI.menuSystemProxyNothing}" />
|
|
||||||
</ComboBox>
|
|
||||||
|
|
||||||
<ComboBox
|
|
||||||
x:Name="cmbRoutings2"
|
|
||||||
Width="160"
|
|
||||||
Margin="8,0"
|
|
||||||
DisplayMemberBinding="{Binding Remarks}"
|
|
||||||
ItemsSource="{Binding RoutingItems}"
|
|
||||||
ToolTip.Tip="{x:Static resx:ResUI.menuRouting}" />
|
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
<StackPanel Margin="8,0" VerticalAlignment="Center">
|
|
||||||
<TextBlock x:Name="txtRunningServerDisplay" />
|
|
||||||
<Border Margin="2" />
|
|
||||||
<TextBlock x:Name="txtRunningInfoDisplay" />
|
|
||||||
</StackPanel>
|
|
||||||
</DockPanel>
|
|
||||||
</StackPanel>
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
|
@ -15,15 +15,24 @@
|
||||||
Style="{StaticResource ViewGlobal}"
|
Style="{StaticResource ViewGlobal}"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<Grid>
|
<Grid>
|
||||||
<materialDesign:ColorZone Height="50" Mode="Standard">
|
<materialDesign:ColorZone
|
||||||
|
Height="auto"
|
||||||
|
Margin="{StaticResource Margin4}"
|
||||||
|
Mode="Standard">
|
||||||
<DockPanel>
|
<DockPanel>
|
||||||
<StackPanel
|
<StackPanel
|
||||||
Margin="{StaticResource MarginLeftRight8}"
|
Margin="{StaticResource MarginLeftRight8}"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
DockPanel.Dock="Right">
|
DockPanel.Dock="Right">
|
||||||
<TextBlock x:Name="txtSpeedProxyDisplay" Style="{StaticResource StatusbarItem}" />
|
<TextBlock
|
||||||
<Border Margin="{StaticResource Margin4}" />
|
x:Name="txtSpeedProxyDisplay"
|
||||||
<TextBlock x:Name="txtSpeedDirectDisplay" Style="{StaticResource StatusbarItem}" />
|
HorizontalAlignment="Right"
|
||||||
|
Style="{StaticResource StatusbarItem}" />
|
||||||
|
<Border Margin="1" />
|
||||||
|
<TextBlock
|
||||||
|
x:Name="txtSpeedDirectDisplay"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
|
Style="{StaticResource StatusbarItem}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<StackPanel
|
<StackPanel
|
||||||
|
@ -32,7 +41,7 @@
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
DockPanel.Dock="Left">
|
DockPanel.Dock="Left">
|
||||||
<TextBlock x:Name="txtInboundDisplay" Style="{StaticResource StatusbarItem}" />
|
<TextBlock x:Name="txtInboundDisplay" Style="{StaticResource StatusbarItem}" />
|
||||||
<Border Margin="{StaticResource Margin4}" />
|
<Border Margin="1" />
|
||||||
<TextBlock x:Name="txtInboundLanDisplay" Style="{StaticResource StatusbarItem}" />
|
<TextBlock x:Name="txtInboundLanDisplay" Style="{StaticResource StatusbarItem}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
|
@ -85,7 +94,7 @@
|
||||||
|
|
||||||
<StackPanel Margin="{StaticResource MarginLeftRight8}" VerticalAlignment="Center">
|
<StackPanel Margin="{StaticResource MarginLeftRight8}" VerticalAlignment="Center">
|
||||||
<TextBlock x:Name="txtRunningServerDisplay" Style="{StaticResource StatusbarItem}" />
|
<TextBlock x:Name="txtRunningServerDisplay" Style="{StaticResource StatusbarItem}" />
|
||||||
<Border Margin="{StaticResource Margin4}" />
|
<Border Margin="1" />
|
||||||
<TextBlock x:Name="txtRunningInfoDisplay" Style="{StaticResource StatusbarItem}" />
|
<TextBlock x:Name="txtRunningInfoDisplay" Style="{StaticResource StatusbarItem}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
|
|
Loading…
Reference in New Issue