▎增加参数
include_unsupported_proxy传递给运行环境时, 包含官方/商店版不支持的协议
默认不包含. 若开启, 需要保证你的运行环境确实支持这些协议, 不然会报错
▎使用场景
你悄咪咪准备了一个 http-meta 和 tpl.yaml 如图 2 放好了
然后如图 1 配置参数
用这个支持官方/商店版不支持的协议的 http-meta 来测这些协议
include_unsupported_proxy
return $server._geo && !$server._geo.includes('www.google.cn')if($options){
$options._res = {
headers: {
'profile-update-interval': 24
}
}
} $options._res = {
headers: {
'profile-update-interval': 24
}
}
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 默认为 1https://proxy.api.030101.xyz/https://raw.githubusercontent.com/mihomo-party-org/override-hub/refs/heads/main/yaml/ACL4SSR_Online_Full_WithIcon.yaml
文件 tab, 按图 1 新建 Mihomo 配置文件https://proxy.api.030101.xyz/https://raw.githubusercontent.com/mihomo-party-org/override-hub/refs/heads/main/yaml/ACL4SSR_Online_Full_WithIcon.yamlif($options){
$options._res = {
headers: {
'profile-update-interval': 24
}
}
}
2.16.0 前端 >= 2.14.319https://a.com/download/collection/name?target=ClashMeta, 文件名称为 config.yaml{ url: 'https://a.com/download/collection/name?target=ClashMeta' }https://a.com/api/file/config.yaml?$options=%7B%22url%22%3A%22https%3A%2F%2Fa.com%2Fdownload%2Fcollection%2Fname%3Ftarget%3DClashMeta%22%7Dhttps://a.com/download/collection/namehttps://a.com/api/file/config.yaml?$options=url=https://a.com/download/collection/nameproxy-providers 的例子:const yaml = ProxyUtils.yaml.safeLoad($content ?? $files[0])
yaml['proxy-providers'] = {
provider: {
url: 'https://sub.com/share/col/name?token=b&target=ClashMeta',
type: 'http',
interval: 86400,
'health-check': {
enable: true,
url: 'https://www.gstatic.com/generate_204',
interval: 300
}
}
}
$content = ProxyUtils.yaml.safeDump(yaml)entrance.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=10000