mirror of
https://github.com/isboyjc/GoProxy.git
synced 2026-05-11 18:11:30 +08:00
feat: ✨ implement custom proxy subscription management and enhance configuration
- Added support for importing Clash/V2ray subscriptions, including automatic format detection and integration with sing-box for protocol conversion. - Introduced five proxy usage modes in the configuration, allowing flexible selection between mixed, custom-only, and free-only modes. - Enhanced `.env.example` and `docker-compose.yml` to include new environment variables for custom proxy settings. - Updated `CHANGELOG.md` to document new features and improvements related to subscription management. - Improved WebUI for managing subscriptions and displaying proxy statistics. - Implemented a background process for refreshing subscriptions and probing disabled proxies for reactivation.
This commit is contained in:
@@ -78,9 +78,14 @@ func (hc *HealthChecker) RunOnce() {
|
||||
} else {
|
||||
// 失败次数+1
|
||||
hc.storage.IncrementFailCount(result.Proxy.Address)
|
||||
// 如果失败次数 >= 3,删除
|
||||
// 如果失败次数 >= 3
|
||||
if result.Proxy.FailCount+1 >= 3 {
|
||||
hc.storage.Delete(result.Proxy.Address)
|
||||
if result.Proxy.Source == "custom" {
|
||||
// 订阅代理:禁用而非删除
|
||||
hc.storage.DisableProxy(result.Proxy.Address)
|
||||
} else {
|
||||
hc.storage.Delete(result.Proxy.Address)
|
||||
}
|
||||
removeCount++
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user