Skip to content

Commit 5bcc8f6

Browse files
committed
Update all-base.tpl
1 parent 91f5333 commit 5bcc8f6

File tree

1 file changed

+89
-97
lines changed

1 file changed

+89
-97
lines changed

Subconverter-base/all-base.tpl

+89-97
Original file line numberDiff line numberDiff line change
@@ -536,143 +536,135 @@ test-timeout = 5
536536
{% if request.target == "singbox" %}
537537

538538
{
539-
"log": { "disabled": false, "level": "info", "timestamp": true },
539+
"log": { "disabled": false, "level": "info", "output": "box.log", "timestamp": true },
540540
"dns": {
541541
"servers": [
542542
{
543+
"type": "fakeip",
544+
"tag": "fakeip",
545+
"inet4_range": "28.0.0.0/8",
546+
"inet6_range": "fc00::/18"
547+
},
548+
{
549+
"type": "tls",
543550
"tag": "local",
544-
"address": "tls://223.5.5.5",
545-
"address_resolver": "dns_resolver",
546-
"address_strategy": "prefer_ipv4",
547-
"strategy": "prefer_ipv4",
551+
"server": "tls://223.5.5.5",
552+
"server_port": 853,
548553
"detour": "DIRECT"
549554
},
550555
{
551-
"tag": "remote",
552-
"address": "tls://1.1.1.1",
553-
"address_resolver": "dns_resolver",
554-
"address_strategy": "prefer_ipv4",
555-
"strategy": "prefer_ipv4",
556-
"detour": "select"
557-
},
558-
{ "tag": "fakeip", "address": "fakeip" },
559-
{ "tag": "dns_resolver", "address": "tls://223.5.5.5", "detour": "DIRECT" },
560-
{ "tag": "block", "address": "rcode://success" }
556+
"type": "tls",
557+
"tag": "proxy",
558+
"server": "tls://1.1.1.1",
559+
"server_port": 853,
560+
"detour": "proxy"
561+
}
561562
],
562563
"rules": [
563-
{ "outbound": ["any"], "server": "dns_resolver" },
564564
{
565-
"inbound": ["tun-in"],
566-
"query_type": ["A", "AAAA", "HTTPS"],
567-
"network": ["tcp", "udp"],
568-
"protocol": ["tls", "http", "quic"],
569-
"port": [80, 443],
570-
"port_range": ["1000:2000", ":3000", "4000:"],
571-
"clash_mode": "Rule",
572-
"invert": false,
573-
"outbound": ["any"],
574-
"server": "fakeip",
575-
"disable_cache": false,
576-
"rewrite_ttl": 100
565+
"query_type": ["A", "AAAA"],
566+
"server": "fakeip"
577567
},
578-
{ "clash_mode": "Global", "server": "remote" },
579-
{ "clash_mode": "Direct", "server": "local" }
568+
{
569+
"rule_set": "geoip-cn",
570+
"clash_mode": "rule",
571+
"action": "route",
572+
"server": "local"
573+
},
574+
{
575+
"rule_set": "geoip-cn",
576+
"invert": true,
577+
"clash_mode": "rule",
578+
"action": "route",
579+
"server": "proxy"
580+
}
580581
],
581582
"final": "",
582-
"strategy": "prefer_ipv4",
583-
"disable_cache": false,
584-
"disable_expire": false,
585-
"independent_cache": true,
586-
"reverse_mapping": true,
587-
"fakeip": {
588-
"enabled": true,
589-
{% if default(request.singbox.ipv6, "") == "1" %}
590-
"inet6_range": "fc00::\/18",
591-
{% endif %}
592-
"inet4_range": "28.0.0.0\/8"
593-
}
583+
"strategy": "prefer_ipv4"
594584
},
595585
"ntp": {
596586
"enabled": true,
597587
"server": "time.apple.com",
598588
"server_port": 123,
599589
"interval": "30m",
600-
"detour": "DIRECT"
590+
"detour": "local"
601591
},
592+
"certificate": {},
593+
"endpoints": [],
602594
"inbounds": [
603595
{
604596
"type": "tun",
605597
"tag": "tun-in",
606-
"interface_name": "tun0",
607-
"inet4_address": "22.0.0.1/30",
608-
{% if default(request.singbox.ipv6, "") == "1" %}
609-
"inet6_address": "fdfe:dcba:9876::1/126",
610-
{% endif %}
598+
"interface_name": "singtun",
599+
"address": ["28.0.0.1/30", "fdfe:dcba:9876::1/126"],
611600
"mtu": 9000,
612601
"auto_route": true,
602+
"iproute2_table_index": 2022,
603+
"iproute2_rule_index": 9000,
604+
"auto_redirect": false,
605+
"auto_redirect_input_mark": "0x2023",
606+
"auto_redirect_output_mark": "0x2024",
613607
"strict_route": true,
614-
"domain_strategy": "prefer_ipv4",
608+
"route_address": ["0.0.0.0/1", "128.0.0.0/1", "::/1", "8000::/1"],
615609
"endpoint_independent_nat": false,
616-
"stack": "mixed",
617-
"sniff": true,
618-
"sniff_override_destination": true,
619-
"sniff_timeout": "300ms",
610+
"udp_timeout": "5m",
611+
"stack": "system",
620612
"platform": {
621-
"http_proxy": {
622-
"enabled": true,
623-
"server": "127.0.0.1",
624-
"server_port": 2334
625-
}
626-
}
627-
},
628-
{
629-
"type": "mixed",
630-
"tag": "mixed-in",
631-
"domain_strategy": "prefer_ipv4",
632-
{% if bool(default(global.singbox.allow_lan, "")) %}
633-
"listen": "0.0.0.0",
634-
{% else %}
635-
"listen": "127.0.0.1",
636-
{% endif %}
637-
"listen_port": {{ default(global.singbox.mixed_port, "2080") }}
613+
"http_proxy": {
614+
"enabled": false,
615+
"server": "127.0.0.1",
616+
"server_port": 18888
617+
}
618+
},
619+
"listen": "::",
620+
"listen_port": 18888,
621+
"tcp_fast_open": true,
622+
"tcp_multi_path": false,
623+
"udp_fragment": false
638624
}
639625
],
640626
"outbounds": [],
641627
"route": {
642628
"rules": [
643-
{
644-
"port": 53,
645-
"outbound": "dns-out"
646-
},
647-
{
648-
"clash_mode": "Direct",
649-
"outbound": "DIRECT"
650-
},
651-
{
652-
"clash_mode": "Global",
653-
"outbound": "select"
654-
},
655-
{
656-
"ip_is_private": true,
657-
"outbound": "DIRECT"
658-
}
629+
{
630+
"ip_is_private": true,
631+
"outbound": "direct"
632+
},
633+
{
634+
"rule_set": "geoip-cn",
635+
"outbound": "direct"
636+
}
659637
],
660-
"auto_detect_interface": true,
661-
"override_android_vpn": true,
662-
"find_process": true
638+
"rule_set": [
639+
{
640+
"tag": "geoip-cn",
641+
"type": "remote",
642+
"format": "binary",
643+
"url": "https://raw.githubusercontent.com/SagerNet/sing-geoip/rule-set/geoip-cn.srs",
644+
"download_detour": "proxy"
645+
}
646+
]
663647
},
664648
"experimental": {
665-
"clash_api": {
666-
"external_controller": "0.0.0.0:19090",
667-
"secret": "",
668-
"default_mode": "Rule"
669-
},
670649
"cache_file": {
671650
"enabled": true,
672-
"path": "",
651+
"path": "cache.db",
673652
"cache_id": "",
674-
"store_fakeip": false
675-
}
653+
"store_fakeip": true,
654+
"store_rdrc": true,
655+
"rdrc_timeout": ""
656+
},
657+
"clash_api": {
658+
"external_controller": "127.0.0.1:19090",
659+
"external_ui": "",
660+
"external_ui_download_url": "",
661+
"external_ui_download_detour": "proxy",
662+
"secret": "",
663+
"default_mode": "rule",
664+
"access_control_allow_origin": [],
665+
"access_control_allow_private_network": false
666+
},
667+
"v2ray_api": {}
676668
}
677669
}
678670

0 commit comments

Comments
 (0)