SagerNet / serenity

The configuration generator for sing-box
https://serenity.sagernet.org
Other
177 stars 36 forks source link

There is an unexpected field in the direct type outbound of generated config #8

Closed skyf0cker closed 8 months ago

skyf0cker commented 11 months ago

config:

{
    "log": {},
    "listen": ":8088",
    "tls": {},
    "cache_file": "",
    "outbounds": [],
    "subscriptions": [
        {
            "name": "youtu",
            "url": "https://xxxx.top/api/v1/client/subscribe?token=xxxx",
            "update_interval": "5m"
        }
    ],
    "templates": [
        {
            "name": "youtu-template",
            "domain_strategy": "",
            "disable_traffic_bypass": false,
            "disable_rule_set": false,
            "remote_resolve": false,

            "dns_default": "https://1.1.1.1/dns-query",
            "dns_local": "https://223.5.5.5/dns-query",
            "enable_fakeip": true,
            "pre_dns_rules": [],
            "custom_dns_rules": [
                {
                    "clash_mode": "global",
                    "ip_version": 4,
                    "server": "remote"
                },
                {
                    "clash_mode": "direct",
                    "server": "local"
                },
                {
                    "outbound": ["any"],
                    "server": "local"
                },
                {
                    "geosite": "cn",
                    "server": "local"
                }
            ],
            "disable_tun": false,
            "disable_system_proxy": false,
            "custom_tun": {
                "type": "tun",
                "inet4_address": "172.19.0.1/30",
                "sniff": true,
                "sniff_override_destination": true,
                "strict_route": true,
                "mtu": 9000,
                "endpoint_independent_nat": true,
                "auto_route": true
            },
            "custom_mixed": {
                "type": "mixed",
                "tag": "mixed-in",
                "sniff": true,
                "sniff_override_destination": true,
                "listen": "127.0.0.1",
                "listen_port": 2334,
                "users": []
            },

            "generate_global_urltest": true,
            "extra_groups": [
                {
                    "tag": "美国",
                    "type": "urltest",
                    "filter": "^.*美国.*$"
                },
                {
                    "tag": "日本",
                    "type": "urltest",
                    "filter": "^.*日本.*$"
                },
                {
                    "tag": "台湾",
                    "type": "urltest",
                    "filter": "^.*台湾.*$"
                },
                {
                    "tag": "香港",
                    "type": "urltest",
                    "filter": "^.*香港.*$"
                }
            ],
            "custom_geoip": {
                "path": "geoip.db",
                "download_url": "https://github.com/lyc8503/sing-box-rules/releases/latest/download/geoip.db",
                "download_detour": "direct"
            },
            "custom_geosite": {
                "path": "geosite.db",
                "download_url": "https://github.com/lyc8503/sing-box-rules/releases/latest/download/geosite.db",
                "download_detour": "direct"
            },
            "custom_rules": [
                {
                    "geosite": "category-ads-all",
                    "outbound": "block"
                },
                {
                    "protocol": "dns",
                    "outbound": "dns-out"
                },
                {
                    "clash_mode": "direct",
                    "outbound": "direct"
                },
                {
                    "clash_mode": "global",
                    "outbound": "select"
                },
                {
                    "geosite": "openai",
                    "outbound": "美国"
                },
                {
                    "geoip": ["cn", "private"],
                    "outbound": "direct"
                },
                {
                    "geosite": "geolocation-!cn",
                    "outbound": "select"
                },
                {
                    "geosite": "cn",
                    "outbound": "direct"
                },
                {
                    "port": 22,
                    "outbound": "direct"
                }
            ]
        }
    ],
    "profiles": [
        {
            "name": "youtu-macos",
            "template": "youtu-template",
            "template_for_platform": {},
            "template_for_user_agent": {},
            "subscription": ["youtu"]
        }
    ],
    "users": []
}

generated:

image

Why is there a low-dash field in the direct outbound config?