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