Gateway-keepaliveForPowershell/config.ps1

18 lines
1.3 KiB
PowerShell
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

$Global:TestDomain = "www.google.com" #测试代理是否可用
$Global:TestIP = "223.5.5.5" #测试是否连接网络
$Global:originalDns = "223.5.5.5" #默认DNS
$Global:originalGateway = "192.168.6.1" #默认网关
$Global:CustomGateway = "192.168.6.2" #代理网关
$Global:TargetNetworkAdapter = {} #网络适配器实例
$Global:TargetNetworkAdapterKeyword = "Ethernet" #网络适配器名字通配符
$Global:isCustomGateway = $false #是否为自定义网关
$Global:isDebugging = $false #是否为调试模式(日志输出到控制台)
$Global:ProxyPort = 1070 #代理网关SOCKS5检测端口
$Global:UseSocksProxyHealthCheck = $true #是否检测SOCKS5代理端口
$Global:DirectDnsServers = @() #直连模式DNS留空表示恢复DHCP下发的DNS
$Global:ProxySuccessThreshold = 3 #连续成功多少次后切换到代理网关
$Global:ProxyFailureThreshold = 3 #连续失败多少次后切回默认网关
$Global:HealthCheckIntervalSeconds = 5 #检测间隔
$Global:SwitchCooldownSeconds = 30 #切换后的冷却时间