Improvements and Adjustments

pull/6510/head
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 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";

View File

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

View File

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

View File

@ -11,15 +11,14 @@
x:DataType="vms:StatusBarViewModel"
mc:Ignorable="d">
<Grid>
<StackPanel Height="50">
<DockPanel>
<DockPanel Margin="4">
<StackPanel
Margin="8,0"
VerticalAlignment="Center"
DockPanel.Dock="Right">
<TextBlock x:Name="txtSpeedProxyDisplay" />
<Border Margin="2" />
<TextBlock x:Name="txtSpeedDirectDisplay" />
<TextBlock x:Name="txtSpeedProxyDisplay" HorizontalAlignment="Right" />
<Border Margin="1" />
<TextBlock x:Name="txtSpeedDirectDisplay" HorizontalAlignment="Right" />
</StackPanel>
<StackPanel
@ -27,7 +26,7 @@
VerticalAlignment="Center"
DockPanel.Dock="Left">
<TextBlock x:Name="txtInboundDisplay" />
<Border Margin="2" />
<Border Margin="1" />
<TextBlock x:Name="txtInboundLanDisplay" />
</StackPanel>
@ -74,10 +73,9 @@
<StackPanel Margin="8,0" VerticalAlignment="Center">
<TextBlock x:Name="txtRunningServerDisplay" />
<Border Margin="2" />
<Border Margin="1" />
<TextBlock x:Name="txtRunningInfoDisplay" />
</StackPanel>
</DockPanel>
</StackPanel>
</Grid>
</UserControl>

View File

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