Improvements and Adjustments

This commit is contained in:
2dust 2025-01-12 14:30:49 +08:00
parent 649e89e7af
commit 7a8680711e
5 changed files with 82 additions and 74 deletions

View file

@ -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";

View file

@ -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; }

View file

@ -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());
} }

View file

@ -11,15 +11,14 @@
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" Margin="8,0"
VerticalAlignment="Center" VerticalAlignment="Center"
DockPanel.Dock="Right"> DockPanel.Dock="Right">
<TextBlock x:Name="txtSpeedProxyDisplay" /> <TextBlock x:Name="txtSpeedProxyDisplay" HorizontalAlignment="Right" />
<Border Margin="2" /> <Border Margin="1" />
<TextBlock x:Name="txtSpeedDirectDisplay" /> <TextBlock x:Name="txtSpeedDirectDisplay" HorizontalAlignment="Right" />
</StackPanel> </StackPanel>
<StackPanel <StackPanel
@ -27,7 +26,7 @@
VerticalAlignment="Center" VerticalAlignment="Center"
DockPanel.Dock="Left"> DockPanel.Dock="Left">
<TextBlock x:Name="txtInboundDisplay" /> <TextBlock x:Name="txtInboundDisplay" />
<Border Margin="2" /> <Border Margin="1" />
<TextBlock x:Name="txtInboundLanDisplay" /> <TextBlock x:Name="txtInboundLanDisplay" />
</StackPanel> </StackPanel>
@ -74,10 +73,9 @@
<StackPanel Margin="8,0" VerticalAlignment="Center"> <StackPanel Margin="8,0" VerticalAlignment="Center">
<TextBlock x:Name="txtRunningServerDisplay" /> <TextBlock x:Name="txtRunningServerDisplay" />
<Border Margin="2" /> <Border Margin="1" />
<TextBlock x:Name="txtRunningInfoDisplay" /> <TextBlock x:Name="txtRunningInfoDisplay" />
</StackPanel> </StackPanel>
</DockPanel> </DockPanel>
</StackPanel>
</Grid> </Grid>
</UserControl> </UserControl>

View file

@ -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>