Compare commits
2 Commits
2e30d8b9b7
...
276eedf205
| Author | SHA1 | Date | |
|---|---|---|---|
| 276eedf205 | |||
| 5ad4f4f37a |
34
go.mod
34
go.mod
@ -1,8 +1,9 @@
|
||||
module proxyrules
|
||||
|
||||
go 1.22
|
||||
go 1.19.8
|
||||
|
||||
require (
|
||||
github.com/gin-gonic/gin v1.10.0
|
||||
github.com/go-git/go-git/v5 v5.12.0
|
||||
gopkg.in/yaml.v3 v3.0.1
|
||||
)
|
||||
@ -11,45 +12,44 @@ require (
|
||||
dario.cat/mergo v1.0.0 // indirect
|
||||
github.com/Microsoft/go-winio v0.6.1 // indirect
|
||||
github.com/ProtonMail/go-crypto v1.0.0 // indirect
|
||||
github.com/bytedance/sonic v1.12.5 // indirect
|
||||
github.com/bytedance/sonic/loader v0.2.1 // indirect
|
||||
github.com/bytedance/sonic v1.11.6 // indirect
|
||||
github.com/bytedance/sonic/loader v0.1.1 // indirect
|
||||
github.com/cloudflare/circl v1.3.7 // indirect
|
||||
github.com/cloudwego/base64x v0.1.4 // indirect
|
||||
github.com/cloudwego/iasm v0.2.0 // indirect
|
||||
github.com/cyphar/filepath-securejoin v0.2.4 // indirect
|
||||
github.com/emirpasic/gods v1.18.1 // indirect
|
||||
github.com/gabriel-vasile/mimetype v1.4.7 // indirect
|
||||
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
|
||||
github.com/gin-contrib/sse v0.1.0 // indirect
|
||||
github.com/gin-gonic/gin v1.10.0 // indirect
|
||||
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
|
||||
github.com/go-git/go-billy/v5 v5.5.0 // indirect
|
||||
github.com/go-playground/locales v0.14.1 // indirect
|
||||
github.com/go-playground/universal-translator v0.18.1 // indirect
|
||||
github.com/go-playground/validator/v10 v10.23.0 // indirect
|
||||
github.com/goccy/go-json v0.10.4 // indirect
|
||||
github.com/go-playground/validator/v10 v10.20.0 // indirect
|
||||
github.com/goccy/go-json v0.10.2 // indirect
|
||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
|
||||
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
|
||||
github.com/json-iterator/go v1.1.12 // indirect
|
||||
github.com/kevinburke/ssh_config v1.2.0 // indirect
|
||||
github.com/klauspost/cpuid/v2 v2.2.9 // indirect
|
||||
github.com/klauspost/cpuid/v2 v2.2.7 // indirect
|
||||
github.com/leodido/go-urn v1.4.0 // indirect
|
||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
|
||||
github.com/pjbgf/sha1cd v0.3.0 // indirect
|
||||
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect
|
||||
github.com/skeema/knownhosts v1.2.2 // indirect
|
||||
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
|
||||
github.com/ugorji/go/codec v1.2.12 // indirect
|
||||
github.com/xanzy/ssh-agent v0.3.3 // indirect
|
||||
golang.org/x/arch v0.12.0 // indirect
|
||||
golang.org/x/crypto v0.31.0 // indirect
|
||||
golang.org/x/mod v0.17.0 // indirect
|
||||
golang.org/x/net v0.32.0 // indirect
|
||||
golang.org/x/sys v0.28.0 // indirect
|
||||
golang.org/x/text v0.21.0 // indirect
|
||||
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
|
||||
google.golang.org/protobuf v1.35.2 // indirect
|
||||
golang.org/x/arch v0.8.0 // indirect
|
||||
golang.org/x/crypto v0.23.0 // indirect
|
||||
golang.org/x/mod v0.12.0 // indirect
|
||||
golang.org/x/net v0.25.0 // indirect
|
||||
golang.org/x/sys v0.20.0 // indirect
|
||||
golang.org/x/text v0.15.0 // indirect
|
||||
golang.org/x/tools v0.13.0 // indirect
|
||||
google.golang.org/protobuf v1.34.1 // indirect
|
||||
gopkg.in/warnings.v0 v0.1.2 // indirect
|
||||
)
|
||||
|
||||
@ -5,3 +5,7 @@ DOMAIN-SUFFIX,deepl.com
|
||||
DOMAIN-SUFFIX,poecdn.net
|
||||
DOMAIN-SUFFIX,api.sprig.com
|
||||
DOMAIN-SUFFIX,www.grepper.com
|
||||
DOMAIN-SUFFIX,cdn.sstatic.net
|
||||
DOMAIN-SUFFIX,cdn.cookielaw.org
|
||||
DOMAIN-SUFFIX,i.sstatic.net
|
||||
DOMAIN-SUFFIX,stackexchange.com
|
||||
|
||||
@ -95,7 +95,7 @@ func GenerateConfig() {
|
||||
proxyGroups = append(proxyGroups, entity.ProxyGroup{
|
||||
Name: "AutoSelect",
|
||||
Type: "url-test",
|
||||
Proxies: proxyNameList,
|
||||
Proxies: removeChargeNode(proxyNameList),
|
||||
URL: "http://www.gstatic.com/generate_204",
|
||||
Interval: 300,
|
||||
})
|
||||
@ -144,7 +144,7 @@ func GenerateConfig() {
|
||||
}
|
||||
orderedGroupNames := []string{"AutoSelect", "PROXY", "Final", "OpenAi", "Claude", "ClaudeAI", "Gemini", "Telegram", "Bilibili", "BilibiliHMT", "Steam", "SteamCN", "SteamRegionCheck", "Porn", "Pornhub", "Pixiv", "JetBrains", "PrivateTracker", "Microsoft", "Bing", "Apple", "AppleNews", "AppleTV", "Github", "Google", "GoogleCNProxyIP", "GoogleEarth", "GoogleFCM", "Youtube", "YoutubeMusic", "Tiktok", "Instagram", "Line", "LineTV", "Wikipedia", "Zoom", "Epic", "MIUIPrivacy", "MI"}
|
||||
|
||||
dealOrder(rulesList, orderedGroupNames)
|
||||
dealOrder(rulesList, append([]string{"AdditionalProxy", "CherrDirect", "CherrProxy", "VPN"}, orderedGroupNames...))
|
||||
|
||||
proxyGroups = ReorderProxyGroups(proxyGroups, orderedGroupNames)
|
||||
// 更新配置中的 ProxyGroups
|
||||
@ -385,3 +385,12 @@ func ReorderProxyGroups(proxyGroups []entity.ProxyGroup, nameOrder []string) []e
|
||||
|
||||
return orderedGroups
|
||||
}
|
||||
func removeChargeNode(proxyNameList []string) []string {
|
||||
newList := []string{}
|
||||
for _, name := range proxyNameList {
|
||||
if !strings.Contains(name, "计费") {
|
||||
newList = append(newList, name)
|
||||
}
|
||||
}
|
||||
return newList
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user