Skip to content

1.3-beta8 版本提示 unknown field "rewrite_ttl" #552

@chika0801

Description

@chika0801

Welcome

  • Yes, I'm using the latest major release. Only such installations are supported.
  • Yes, I'm using the latest Golang release. Only such installations are supported.
  • Yes, I've searched similar issues on GitHub and didn't find any.
  • Yes, I've included all information below (version, FULL config, FULL log, etc).

Description of the problem

1.3-beta8 在配置文件中使用 "rewrite_ttl" 参数,运行出错,提示

E:\Program Files\sing-box>sing-box.exe check -c config_fakeip.json
FATAL[0000] decode config at config_fakeip.json: route rule: json: unknown field "rewrite_ttl"

Version of sing-box

Details
1.3-beta8

Server and client configuration file

Details
{
  "log": {
    "level": "info",
    "timestamp": true
  },
    "dns": {
        "servers": [
            {
                "tag": "dns_proxy",
                "address": "fakeip",
                "strategy": "prefer_ipv6",
                "detour": "proxy"
            },
            {
                "tag": "dns_direct",
                "address": "https://223.5.5.5/dns-query",
                "strategy": "prefer_ipv6",
                "detour": "direct"
            },
            {
                "tag": "dns_block",
                "address": "rcode://success"
            }
        ],
        "rules": [
            {
                "geosite": [
                    "category-ads-all"
                ],
                "server": "dns_block",
                "disable_cache": true
            },
            {
                "geosite": [
                    "category-games@cn"
                ],
                "server": "dns_direct"
            },
            {
                "geosite": [
                    "geolocation-!cn"
                ],
                "server": "dns_proxy"
            },
            {
                "geosite": [
                    "cn",
                    "private"
                ],
                "server": "dns_direct"
            }
        ],
        "fakeip": {
            "enabled": true,
            "inet4_range": "198.18.0.0/15",
            "inet6_range": "fc00::/18"
        }
    },
    "route": {
        "geoip": {
            "download_url": "https://github.com/soffchen/sing-geoip/releases/latest/download/geoip.db"
        },
        "geosite": {
            "download_url": "https://github.com/soffchen/sing-geosite/releases/latest/download/geosite.db"
        },
        "rules": [
            {
                "protocol": "dns",
                "outbound": "dns-out"
            },
            {
                "geosite": [
                    "category-ads-all"
                ],
                "outbound": "block"
            },
            {
                "geosite": [
                    "category-porn"
                ],
                "outbound": "tokyo"
            },
            {
                "type": "logical",
                "mode": "and",
                "rules": [
                    {
                        "geosite": [
                            "category-games@cn"
                        ]
                    },
                    {
                        "geoip": [
                            "cn"
                        ]
                    }
                ],
                "outbound": "direct"
            },
            {
                "geosite": [
                            "geolocation-!cn"
                ],
                "outbound": "proxy",
                // 在此处使用的
                "rewrite_ttl": 100
            },
            {
                "type": "logical",
                "mode": "and",
                "rules": [
                    {
                        "geosite": [
                            "cn"
                        ]
                    },
                    {
                        "geoip": [
                            "cn"
                        ]
                    }
                ],
                "outbound": "direct"
            },
            {
                "geosite": [
                    "private"
                ],
                "outbound": "direct"
            },
            {
                "geoip": [
                    "cn",
                    "private"
                ],
                "outbound": "direct"
            },
            {
                "port": 53,
                "process_name": [
                    "xray.exe",
                    "hysteria.exe",
                    "IDMan.exe",
                    "Xshell.exe",
                    "XshellCore.exe",
                    "WinSCP.exe"
                ],
                "outbound": "dns-out"
            },
            {
                "process_name": [
                    "xray.exe",
                    "hysteria.exe",
                    "IDMan.exe",
                    "Xshell.exe",
                    "XshellCore.exe",
                    "WinSCP.exe"
                ],
                "outbound": "direct"
            }
        ],
        "auto_detect_interface": true
    },
    "inbounds": [
        {
            "type": "tun",
            "tag": "tun-in",
            "interface_name": "tun0",
            "inet4_address": "172.19.0.1/30",
            "inet6_address": "fdfe:dcba:9876::1/126",
            "mtu": 9000,
            "auto_route": true,
            "strict_route": true,
            "endpoint_independent_nat": false,
            "stack": "system",
            "sniff": true,
            "sniff_override_destination": false
        }
    ],
    "outbounds": [
        {
            "type": "socks",
            "tag": "proxy",
            "server": "127.0.0.1",
            "server_port": 10808,
            "udp_fragment": true
        },
        {
            "type": "vless",
            "tag": "tokyo",
            "server": "154.19.186.132",
            "server_port": 443,
            "uuid": "ee48f7be-6ae9-5654-9b61-8466aa8e16bc",
            "flow": "xtls-rprx-vision",
            "tls": {
                "enabled": true,
                "server_name": "www.mitosea.com",
                "utls": {
                    "enabled": true,
                    "fingerprint": "chrome"
                },
                "reality": {
                    "enabled": true,
                    "public_key": "I4rlDl4Ks9Ci8behRdTZvRplpx_3yJtQHjkLb8OT9Q4",
                    "short_id": "3b4d463175cd2f6b"
                }
            },
            "packet_encoding": "xudp"
        },
        {
            "type": "direct",
            "tag": "direct"
        },
        {
            "type": "block",
            "tag": "block"
        },
        {
            "type": "dns",
            "tag": "dns-out"
        }
    ]
}

Server and client log file

Details
E:\Program Files\sing-box>sing-box.exe check -c config_fakeip.json
FATAL[0000] decode config at config_fakeip.json: route rule: json: unknown field "rewrite_ttl"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions