▎增加参数
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, 禁用失败缓存. 即不缓存失败结果1.0.4listenersport65535META_DISABLE_AUTO_CLEAN=true 和 META_TEMP_FOLDER=/opt/app/dataMETA_MAX_AVAILABLE_PORT 默认为 65534META_MIN_AVAILABLE_PORT 默认为 1entrance.js 和 http_meta_geo.jsif ($server._domain) $server.server = $server._domaincountryCodeaso 和 countryCode 存在其一即可🇨🇳.*➮(.*)$ => $1 中转
图 1 导入我的 预设配置: 1. App (使用内部接口版) 2. App (使用网络请求版) 3. Node.js 版 internal 参数使用内部方法获取数据, 数据来自 GEOIP 数据库, 大幅提速订阅 中, 输入你的 本地节点 或 远程订阅timeout 超时, retries 重试次数图 2 的结果if ($server._domain) $server.server = $server._domain🇨🇳.*➮(.*)$ => $1 中转countryCode
http-meta tag 的镜像HTTP-META 的版本)接口 和 格式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=10000HTTP META 配合)timeout, concurrency 和 size 适当调节keep_incompatible 保留当前客户端不兼容的协议show_speed 显示速度. 默认不显示. 注: 即使不开启这个参数, 节点上也会添加一个 _speed 字段, 按速度倒序https://raw.githubusercontent.com/xream/scripts/main/surge/modules/sub-store-scripts/check/speed.js#keep_incompatible=true&show_speed&size=10&timeout=10000&concurrency=1
2. Node.js 版(需要 HTTP META 配合)https://raw.githubusercontent.com/xream/scripts/main/surge/modules/sub-store-scripts/check/http_meta_speed.js#keep_incompatible=true&show_speed&size=10&timeout=10000&concurrency=1&http_meta_protocol=http&http_meta_host=127.0.0.1&http_meta_port=9876&http_meta_start_delay=3000&http_meta_proxy_timeout=10000HTTP META 配合)timeout 可适当调小, keep_incompatible 保留当前客户端不兼容的协议, show_latency 节点名称加上延迟url 需要 encodeURIComponent. 默认 http://connectivitycheck.platform.hicloud.com/generate_204status 合法的状态码的表达式. 需要 encodeURIComponent . 默认 204http://223.6.6.6 状态码 404: url=http%3A%2F%2F223.6.6.6&status=404节点操作 - 脚本操作 中 选择 链接https://raw.githubusercontent.com/xream/scripts/main/surge/modules/sub-store-scripts/check/availability.js#show_latency=true&keep_incompatible=true&status=204&url=http%3A%2F%2Fconnectivitycheck.platform.hicloud.com%2Fgenerate_204&timeout=1000&retries=1&retry_delay=1000&concurrency=10
2. Node.js 版(需要 HTTP META 配合):https://raw.githubusercontent.com/xream/scripts/main/surge/modules/sub-store-scripts/check/http_meta_availability.js#show_latency=true&keep_incompatible=true&status=204&url=http%3A%2F%2Fconnectivitycheck.platform.hicloud.com%2Fgenerate_204&timeout=1000&retries=1&retry_delay=1000&concurrency=10&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
https://raw.githubusercontent.com/sub-store-org/Sub-Store/master/scripts/fancy-characters.js#type=sans-serif-bold⁰ ¹ ² ³ ⁴ ⁵ ⁶ ⁷ ⁸ ⁹
https://gist.githubusercontent.com/xream/4c4083769f24f1a7b4d254aad6917cf1/raw/cname_http_meta_beta.js#inflag&flag&city&sheng&iisp&yisp&snone&yuan