▎增加参数
include_unsupported_proxy传递给运行环境时, 包含官方/商店版不支持的协议
默认不包含. 若开启, 需要保证你的运行环境确实支持这些协议, 不然会报错
▎使用场景
你悄咪咪准备了一个 http-meta 和 tpl.yaml 如图 2 放好了
然后如图 1 配置参数
用这个支持官方/商店版不支持的协议的 http-meta 来测这些协议
include_unsupported_proxy
return $server._geo && !$server._geo.includes('www.google.cn')
https://translate.google.com/m?sl=zh-tw&tl=zh-cn&hl=zh-cn&q={{proxy.name}}a:<div class="result-container">(.+?)<\/div>{{api.a}}
cv:data-name="country-version"[^>]*>[^<]*<\/a>\s*([^<]+)https://policies.google.com/terms?hl=en-US_gpt_latency 字段, 指响应延迟disable_failed_cache, 禁用失败缓存. 即不缓存失败结果entrance.js 和 http_meta_geo.jsif ($server._domain) $server.server = $server._domaincountryCodeaso 和 countryCode 存在其一即可🇨🇳.*➮(.*)$ => $1 中转HTTP-METAntp 用于检测的 NTP 服务器. 默认 time.apple.comhttps://raw.githubusercontent.com/xream/scripts/main/surge/modules/sub-store-scripts/check/http_meta_udp.js#concurrency=10&timeout=5000&retries=1
图 1 导入我的 预设配置: 1. App (使用内部接口版) 2. App (使用网络请求版) 3. Node.js 版 internal 参数使用内部方法获取数据, 数据来自 GEOIP 数据库, 大幅提速订阅 中, 输入你的 本地节点 或 远程订阅timeout 超时, retries 重试次数图 2 的结果if ($server._domain) $server.server = $server._domain🇨🇳.*➮(.*)$ => $1 中转countryCode接口 和 格式internal: 可切换为使用内部方法获取数据, 数据来自 GEOIP 数据库, 无需网络请求. 适用于以下环境: $utils.ipaso 和 $utils.geoip API 的 AppNode.js 版 Sub-Store, 设置环境变量 SUB_STORE_MMDB_COUNTRY_PATH 和 SUB_STORE_MMDB_ASN_PATH 或 传入 mmdb_country_path 和 mmdb_asn_path 参数(分别为 MaxMind GeoLite2 Country 和 GeoLite2 ASN 数据库 的路径)countryCodetimeout, concurrency , retries 适当调节 api 接口. 默认为 http://ip-api.com/json/{{proxy.server}}?lang=zh-CNformat 自定义格式, 从 节点(proxy) 和 入口 API 响应(api)中取数据. 默认为: {{api.country}} {{api.isp}} - {{proxy.name}}valid 验证 api 请求是否合法. 默认: ProxyUtils.isIP('{{api.ip || api.query}}') (判断 响应中的字段是否为合法`IP`)https://raw.githubusercontent.com/xream/scripts/main/surge/modules/sub-store-scripts/check/entrance.js#concurrency=10&timeout=5000&retries=1
ability=http-client-policy) 和 任何能运行 HTTP META 的环境2.14.229 后端 >= 2.14.298接口 和 格式HTTP META 配合)internal: 可切换为使用内部方法获取数据, 数据来自 GEOIP 数据库. 此时仅需要一个支持返回 IP 的远程 API, 大幅缩短了请求时长. 适用于以下环境: $utils.ipaso 和 $utils.geoip API 的 AppNode.js 版 Sub-Store 需配置 GEOIP 数据, 设置环境变量 SUB_STORE_MMDB_COUNTRY_PATH 和 SUB_STORE_MMDB_ASN_PATH 或 传入 mmdb_country_path 和 mmdb_asn_path 参数(分别为 MaxMind GeoLite2 Country 和 GeoLite2 ASN 数据库 的路径)countryCodetimeout, concurrency 适当调节api 接口. 默认为 http://ip-api.com/json?lang=zh-CNformat 自定义格式, 从 节点(proxy) 和 API 接口响应(api) 中取数据. 默认为: {{api.country}} {{api.isp}} - {{proxy.name}}eval 所以...其实可以玩很多花活 甚至可以 当前日期: {{new Date().toLocaleDateString()}} https://speed.cloudflare.com/meta
{{api.country}} {{api.asOrganization}} - {{proxy.name}}ability=http-client-policy 的模块) 版:https://raw.githubusercontent.com/xream/scripts/main/surge/modules/sub-store-scripts/check/geo.js#concurrency=10&timeout=5000&retries=1
2. Node.js 版(需要 HTTP META 配合)https://raw.githubusercontent.com/xream/scripts/main/surge/modules/sub-store-scripts/check/http_meta_geo.js#http_meta_protocol=http&http_meta_host=127.0.0.1&http_meta_port=9876&http_meta_start_delay=3000&http_meta_proxy_timeout=10000timeout 可适当调小 gpt_prefix 显示前缀. 默认为 "[GPT] "_gpt 字段, 可用于脚本筛选 示范_gpt_latency 字段, 指响应延迟disable_failed_cache, 禁用失败缓存. 即不缓存失败结果https://raw.githubusercontent.com/xream/scripts/main/surge/modules/sub-store-scripts/check/http_meta_gpt.js#timeout=1000&retries=1&retry_delay=1000&concurrency=10&client=iOS&http_meta_protocol=http&http_meta_host=127.0.0.1&http_meta_port=9876&http_meta_start_delay=3000&http_meta_proxy_timeout=10000
403 , 但是响应中有 unsupported_countryability=http-client-policy 的模块)timeout 可适当调小gpt_prefix 显示前缀. 默认为 "[GPT] "_gpt 字段, 可用于脚本筛选 示范_gpt_latency 字段, 指响应延迟disable_failed_cache, 禁用失败缓存. 即不缓存失败结果https://raw.githubusercontent.com/xream/scripts/main/surge/modules/sub-store-scripts/check/gpt.js#timeout=1000&retries=1&retry_delay=1000&concurrency=10&client=iOS
https://raw.githubusercontent.com/sub-store-org/Sub-Store/master/scripts/fancy-characters.js#type=sans-serif-bold⁰ ¹ ² ³ ⁴ ⁵ ⁶ ⁷ ⁸ ⁹