fix Cloudflare IP优选v1.3\n调整插件开启状态判断条件

This commit is contained in:
thsrite
2024-06-15 19:38:15 +08:00
parent ad21b4d953
commit 98faa952c4
2 changed files with 4 additions and 3 deletions

View File

@@ -169,11 +169,12 @@
"name": "Cloudflare IP优选",
"description": "🌩 测试 Cloudflare CDN 延迟和速度自动优选IP。",
"labels": "网络,站点",
"version": "1.2",
"version": "1.3",
"icon": "cloudflare.jpg",
"author": "thsrite",
"level": 1,
"history": {
"v1.3": "调整插件开启状态判断条件",
"v1.2": "增强API安全性"
}
},

View File

@@ -32,7 +32,7 @@ class CloudflareSpeedTest(_PluginBase):
# 插件图标
plugin_icon = "cloudflare.jpg"
# 插件版本
plugin_version = "1.2"
plugin_version = "1.3"
# 插件作者
plugin_author = "thsrite"
# 作者主页
@@ -470,7 +470,7 @@ class CloudflareSpeedTest(_PluginBase):
})
def get_state(self) -> bool:
return True if self._cf_ip and self._cron else False
return True if self._cf_ip and self._cron and (self._ipv4 or self._ipv6) else False
@staticmethod
def get_command() -> List[Dict[str, Any]]: