From ef44ef7436feacd606a1d07fd4195b8d9a66c8bd Mon Sep 17 00:00:00 2001 From: zu1k Date: Tue, 18 Aug 2020 16:42:30 +0800 Subject: [PATCH] use deep copy --- app/task.go | 5 +- assets/clash.html | 1 + assets/index.html | 196 +++++++++++++++++++++++++++------------------- 3 files changed, 122 insertions(+), 80 deletions(-) diff --git a/app/task.go b/app/task.go index dba91f4..aea607c 100644 --- a/app/task.go +++ b/app/task.go @@ -43,7 +43,10 @@ func CrawlGo() { cache.SetProxies("allproxies", proxies) // 可用性检测 - proxies = proxy.CleanProxies(provider.Clash{Proxies: proxies}.CleanProxies()) + proxiesUseful := proxy.CleanProxies(provider.Clash{Proxies: proxies}.CleanProxies()) + proxies = make(proxy.ProxyList, len(proxiesUseful)) + copy(proxies, proxiesUseful) + log.Println("CrawlGo clash useable node count:", len(proxies)) // 排序和重命名 diff --git a/assets/clash.html b/assets/clash.html index 7521b03..c6baca9 100644 --- a/assets/clash.html +++ b/assets/clash.html @@ -109,6 +109,7 @@

Clash proxy-provider(Shadowrocket添加订阅方式可用):https://proxy.tgbot.co/clash/proxies


筛选代理类型(此种方式你只能自己维护配置文件):https://proxy.tgbot.co/clash/proxies?type=ss,ssr,vmess

+

所有节点的Provider(不是都可以用):https://proxy.tgbot.co/clash/proxies?type=all


抓取程序已开源:https://github.com/zu1k/proxypool

diff --git a/assets/index.html b/assets/index.html index d80713c..0747a97 100644 --- a/assets/index.html +++ b/assets/index.html @@ -1,89 +1,127 @@ - - - - 免费节点 - + .section { + margin-bottom: 36px; + } + + .section.friendly { + color: #222222; + } + + .section.friendly h1 { + font-size: 26px; + background-color: #dad8e4; + padding: 18px 22px 15px 22px; + margin: 0; + overflow: hidden; + } + + .section.friendly h1 strong { + display: inline-block; + float: left; + } + + .section.friendly h1 small { + display: inline-block; + float: right; + text-align: right; + font-size: 18px; + padding-top: 4px; + color: #333333; + } + + .section.friendly .article { + border: 4px solid #dad8e4; + padding: 24px 18px 18px 18px; + } + + .section.friendly .article h3 { + font-size: 20px; + margin: 0 0 18px 0; + } + + .section.friendly .article a { + color: #6b6ceb; + } + + .section.friendly .article a:visited { + color: #1d1d3b; + } + + .section.friendly .article p { + font-size: 14px; + } + + .section.friendly .article ul { + list-style-type: square; + } + + .section.original { + background-color: #eeeeee; + color: #444444; + } + + .section.original h2 { + background-color: #dddddd; + margin: 0; + padding: 18px 22px 18px 22px; + font-size: 20px; + } + + .section.original pre { + margin: 0; + padding: 18px 22px 18px 22px; + overflow: auto; + font-family: monaco, monospaced; + } + + .section.original pre code { + display: block; + font-size: 11px; + width: 100%; + } +
-
-

免费节点

-
-

自动抓取tg频道、订阅地址、公开互联网上的ss、ssr、vmess节点信息,聚合去重后提供节点列表,每10分钟更新

-
-

Clash配置文件:https://proxy.tgbot.co/clash/config 一键导入

-

Clash proxy-provider(Shadowrocket添加订阅方式可用):https://proxy.tgbot.co/clash/proxies

-
-

Surge配置文件:https://proxy.tgbot.co/surge/config 一键导入

-

Surge proxy list:https://proxy.tgbot.co/surge/proxies

-
-

抓取程序已开源:https://github.com/zu1k/proxypool

-
-
+
+

免费节点

+
+

自动抓取tg频道、订阅地址、公开互联网上的ss、ssr、vmess节点信息,聚合去重后提供节点列表,每10分钟更新

+
+
Clash
+

Clash配置文件:https://proxy.tgbot.co/clash/config 一键导入

+

Clash proxy-provider(Shadowrocket添加订阅方式可用):https://proxy.tgbot.co/clash/proxies +

+

所有节点的Provider(不是都可以用):https://proxy.tgbot.co/clash/proxies?type=all +

+
+
Surge
+

Surge配置文件:https://proxy.tgbot.co/surge/config 一键导入

+

Surge proxy list:https://proxy.tgbot.co/surge/proxies +

+
+

抓取程序已开源:https://github.com/zu1k/proxypool

+
+
\ No newline at end of file