We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sing-box是一款日益完善的工具,其配置文件是json。一些参考资料:
{ "dns": { "servers": [ { "tag": "dnspod-doh", "address": "https://1.12.12.12/dns-query", "detour": "direct" }, { "tag": "remote", "address": "fakeip" }, { "tag": "block", "address": "rcode://success" } ], "rules": [ { "rule_set": "geosite-category-ads-all", "server": "block" }, { "outbound": "any", "server": "dnspod-doh" }, { "query_type": [ "A", "AAAA" ], "server": "remote" } ], "fakeip": { "enabled": true, "inet4_range": "198.18.0.0/15", "inet6_range": "fc00::/18" }, "independent_cache": true }, "inbounds": [ { "type": "tun", "inet4_address": "172.19.0.1/30", "inet6_address": "fdfe:dcba:9876::1/126", "auto_route": true, "strict_route": true, "sniff": true } ], "outbounds": [ { "type": "direct", "tag": "direct", "tcp_fast_open": false, "tcp_multi_path": true }, { "type": "block", "tag": "block" }, { "type": "dns", "tag": "dns" }, { "type": "selector", "tag": "proxy", "outbounds": [ "auto", "{{ getNodeNames(nodeList, undefined, '", "') }}" ], "interrupt_exist_connections": false }, { "type": "urltest", "tag": "auto", "outbounds": [ "{{ getNodeNames(nodeList, undefined, '", "') }}" ], "interrupt_exist_connections": false }, {{ getSingBoxNodes(nodeList) }} ], "route": { "rules": [ { "type": "logical", "mode": "or", "rules": [ { "protocol": "dns" }, { "port": 53 } ], "outbound": "dns" }, { "ip_is_private": true, "outbound": "direct" }, { "clash_mode": "Direct", "outbound": "direct" }, { "clash_mode": "Global", "outbound": "proxy" }, { "geosite": "geosite-category-ads-all", "outbound": "block" }, { "type": "logical", "mode": "and", "rules": [ { "rule_set": "geosite-geolocation-!cn", "invert": true }, { "rule_set": [ "geoip-cn", "geosite-cn" ] } ], "outbound": "direct" } ], "rule_set": [ { "tag": "geosite-category-ads-all", "type": "remote", "format": "binary", "url": "https://cdn.jsdelivr.net/gh/SagerNet/sing-geosite@rule-set/geosite-category-ads-all.srs" }, { "type": "remote", "tag": "geosite-geolocation-!cn", "format": "binary", "url": "https://cdn.jsdelivr.net/gh/SagerNet/sing-geosite@rule-set/geosite-geolocation-!cn.srs" }, { "tag": "geosite-cn", "type": "remote", "format": "binary", "url": "https://cdn.jsdelivr.net/gh/SagerNet/sing-geosite@rule-set/geosite-cn.srs" }, { "tag": "geoip-cn", "type": "remote", "format": "binary", "url": "https://cdn.jsdelivr.net/gh/SagerNet/sing-geoip@rule-set/geoip-cn.srs" } ], "auto_detect_interface": true }, "experimental": { "cache_file": { "enabled": true }, "clash_api": { "external_controller": "127.0.0.1:9090" } } }
其中"{{ getNodeNames(nodeList, undefined, '", "') }}"根据现有文档,应该可转成"node1", "node2", "node3"。 {{ getSingBoxNodes(nodeList) }}期望输出这里定义的有效outbound,例如:
"{{ getNodeNames(nodeList, undefined, '", "') }}"
"node1", "node2", "node3"
{{ getSingBoxNodes(nodeList) }}
{ "type": "shadowsocks", "tag": "node1", "server": "", "server_port": 1, "method": "", "password": "", "tcp_fast_open": false, "tcp_multi_path": true }, { "type": "shadowsocks", "tag": "node2", "server": "", "server_port": 1, "method": "", "password": "", "tcp_fast_open": false, "tcp_multi_path": true }
The text was updated successfully, but these errors were encountered:
+1
Sorry, something went wrong.
created a PR for this issue.
https://github.com/surgioproject/surgio/releases/tag/v3.7.0-beta.1
No branches or pull requests
sing-box是一款日益完善的工具,其配置文件是json。一些参考资料:
个人给出一份适用于1.8.0以上的客户端template示例:
其中
"{{ getNodeNames(nodeList, undefined, '", "') }}"
根据现有文档,应该可转成"node1", "node2", "node3"
。{{ getSingBoxNodes(nodeList) }}
期望输出这里定义的有效outbound,例如:The text was updated successfully, but these errors were encountered: