+
Skip to content

当URLTEST列表中有部分节点不存在时会报错 #356

@VIKINGYFY

Description

@VIKINGYFY

Bug description

一开始的URLTEST列表是
A订阅的

[hysteria2] 2x专线-新加坡-4 (IPv6)
[trojan] 2x专线-新加坡-3 (IPv6)

B订阅的

[shadowsocks] IEPL|SG 新加坡06
[shadowsocks] IEPL|SG 新加坡07

后来B订阅节点更改了名字,变成了

[shadowsocks] IEPL|SG 新加坡06|IPV6
[shadowsocks] IEPL|SG 新加坡07|IPV6

然后内核就启动失败,日志报

2025-08-09 14:29:02 [DAEMON] Service stopped.
Type error: attempt to set property on null value
In /etc/homeproxy/scripts/generate_client.uc, line 701, byte 108:

 `            config.outbounds[length(config.outbounds)-1].domain_strategy = (ipv6_support !== '1') ? 'prefer_ipv4' : null;`
  Near here ----------------------------------------------------------------------------------------------------------^


2025-08-09 14:29:02 [DAEMON] Error: failed to generate client configuration.

手动清理URLTEST失效节点后可正常运行。

Actual behavior

No response

Expected behavior

No response

Steps to reproduce

No response

HomeProxy configuration

root@OWRT:~# cat /etc/config/homeproxy

config homeproxy 'infra'
        option __warning 'DO NOT EDIT THIS SECTION, OR YOU ARE ON YOUR OWN!'
        option common_port '22,53,80,143,443,465,853,873,993,995,5222,8080,8443,9418'
        option mixed_port '5330'
        option redirect_port '5331'
        option tproxy_port '5332'
        option dns_port '5333'
        option sniff_override '1'
        option tun_name 'singtun0'
        option tun_addr4 '172.19.0.1/30'
        option tun_addr6 'fdfe:dcba:9876::1/126'
        option tun_mtu '9000'
        option table_mark '100'
        option self_mark '100'
        option tproxy_mark '101'
        option tun_mark '102'

config homeproxy 'config'
        option main_node 'urltest'
        option main_udp_node 'same'
        option dns_server 'https://dns.quad9.net/dns-query'
        option routing_mode 'bypass_mainland_china'
        option routing_port 'common'
        option proxy_mode 'redirect_tproxy'
        option ipv6_support '1'
        option china_dns_server 'https://dns.alidns.com/dns-query'
        list main_urltest_nodes '54b1da78384fc59c5d67559bac3531e7'
        list main_urltest_nodes '69109283d3413ca06a6a63f7d3afe10f'
        list main_urltest_nodes 'b77aca7759fcb912f6e2f2ea28260f9a'
        list main_urltest_nodes 'ace220b285f1b2081d915f7e2fb06e3e'

config homeproxy 'control'
        option lan_proxy_mode 'disabled'
        list wan_proxy_ipv4_ips '91.105.192.0/23'
        list wan_proxy_ipv4_ips '91.108.4.0/22'
        list wan_proxy_ipv4_ips '91.108.8.0/21'
        list wan_proxy_ipv4_ips '91.108.16.0/21'
        list wan_proxy_ipv4_ips '91.108.56.0/22'
        list wan_proxy_ipv4_ips '95.161.64.0/20'
        list wan_proxy_ipv4_ips '149.154.160.0/20'
        list wan_proxy_ipv4_ips '185.76.151.0/24'

config homeproxy 'routing'
        option sniff_override '1'
        option default_outbound 'direct-out'
        option udp_timeout '300'
        option bypass_cn_traffic '0'

config homeproxy 'dns'
        option dns_strategy 'prefer_ipv4'
        option default_server 'default-dns'

config homeproxy 'subscription'
        option auto_update '1'
        option allow_insecure '0'
        option packet_encoding 'xudp'
        option update_via_proxy '0'
        option auto_update_time '0 */6 * * *'
        option filter_nodes 'whitelist'
        list filter_keywords '新加坡'
        list subscription_url '***********************************#SMJC'
        list subscription_url '***********************************#FWY'

config homeproxy 'server'
        option enabled '0'

config dns_rule 'nodes_domain'
        option label 'NodesDomain'
        option enabled '1'
        option mode 'default'
        list outbound 'any-out'
        option server 'default-dns'

config homeproxy 'migration'
        option crontab '1'

config node 'ff8cd2db90d015691ef7cb0a4e1d3cd3'
        option label '2x专线-新加坡-1'
        option type 'hysteria2'
        option grouphash '8955c0c12cc84d44d15bc79930473462'

config node '69109283d3413ca06a6a63f7d3afe10f'
        option label '2x专线-新加坡-3 (IPv6)'
        option type 'trojan'
        option grouphash '8955c0c12cc84d44d15bc79930473462'

config node '54b1da78384fc59c5d67559bac3531e7'
        option label '2x专线-新加坡-4 (IPv6)'
        option type 'hysteria2'
        option grouphash '8955c0c12cc84d44d15bc79930473462'

config node 'f30ca79c16dbd1c18d9962c36ab5955a'
        option label 'IEPL|SG 新加坡02|IPV6'
        option type 'shadowsocks'
        option grouphash '11ba0351d95921d71a58d6a5b937e2c1'

config node 'b77aca7759fcb912f6e2f2ea28260f9a'
        option label 'IEPL|SG 新加坡06|IPV6'
        option type 'shadowsocks'
        option grouphash '11ba0351d95921d71a58d6a5b937e2c1'

config node 'ace220b285f1b2081d915f7e2fb06e3e'
        option label 'IEPL|SG 新加坡07|IPV6'
        option type 'shadowsocks'
        option grouphash '11ba0351d95921d71a58d6a5b937e2c1'

sing-box configuration

root@OWRT:~# cat /var/run/homeproxy/sing-box-c.json
{
        "log": {
                "disabled": false,
                "level": "warn",
                "output": "/var/run/homeproxy/sing-box-c.log",
                "timestamp": true
        },
        "ntp": {
                "enabled": true,
                "server": "time.apple.com",
                "detour": "direct-out"
        },
        "dns": {
                "servers": [
                        {
                                "tag": "default-dns",
                                "address": "221.3.131.12",
                                "detour": "direct-out"
                        },
                        {
                                "tag": "system-dns",
                                "address": "local",
                                "detour": "direct-out"
                        },
                        {
                                "tag": "block-dns",
                                "address": "rcode://refused"
                        },
                        {
                                "tag": "main-dns",
                                "address": "https://dns.quad9.net/dns-query",
                                "address_resolver": "default-dns",
                                "detour": "main-out"
                        },
                        {
                                "tag": "china-dns",
                                "address": "https://dns.alidns.com/dns-query",
                                "address_resolver": "default-dns",
                                "detour": "direct-out"
                        }
                ],
                "rules": [
                        {
                                "domain": "time.apple.com",
                                "action": "route",
                                "server": "default-dns"
                        },
                        {
                                "outbound": "any",
                                "action": "route",
                                "server": "default-dns"
                        },
                        {
                                "rule_set": "geosite-cn",
                                "action": "route",
                                "server": "china-dns"
                        },
                        {
                                "type": "logical",
                                "mode": "and",
                                "rules": [
                                        {
                                                "rule_set": "geosite-noncn",
                                                "invert": true
                                        },
                                        {
                                                "rule_set": "geoip-cn"
                                        }
                                ],
                                "action": "route",
                                "server": "china-dns"
                        }
                ],
                "disable_cache": false,
                "disable_expire": false,
                "independent_cache": false,
                "final": "main-dns"
        },
        "inbounds": [
                {
                        "type": "direct",
                        "tag": "dns-in",
                        "listen": "::",
                        "listen_port": 5333
                },
                {
                        "type": "mixed",
                        "tag": "mixed-in",
                        "listen": "::",
                        "listen_port": 5330,
                        "sniff": true,
                        "sniff_override_destination": true,
                        "set_system_proxy": false
                },
                {
                        "type": "redirect",
                        "tag": "redirect-in",
                        "listen": "::",
                        "listen_port": 5331,
                        "sniff": true,
                        "sniff_override_destination": true
                },
                {
                        "type": "tproxy",
                        "tag": "tproxy-in",
                        "listen": "::",
                        "listen_port": 5332,
                        "network": "udp",
                        "sniff": true,
                        "sniff_override_destination": true
                }
        ],
        "outbounds": [
                {
                        "type": "direct",
                        "tag": "direct-out",
                        "routing_mark": 100
                },
                {
                        "type": "block",
                        "tag": "block-out"
                },
                {
                        "type": "urltest",
                        "tag": "main-out",
                        "outbounds": [
                                "cfg-54b1da78384fc59c5d67559bac3531e7-out",
                                "cfg-69109283d3413ca06a6a63f7d3afe10f-out",
                                "cfg-b77aca7759fcb912f6e2f2ea28260f9a-out",
                                "cfg-ace220b285f1b2081d915f7e2fb06e3e-out"
                        ]
                },
                {
                        "type": "hysteria2",
                        "tag": "cfg-54b1da78384fc59c5d67559bac3531e7-out",
                        "routing_mark": 100,
                        "tls": {
                                "enabled": true,
                                "server_name": "d1--cn-gotcha204-3.bilivideo.com",
                                "insecure": true
                        }
                },
                {
                        "type": "trojan",
                        "tag": "cfg-69109283d3413ca06a6a63f7d3afe10f-out",
                        "routing_mark": 100,
                        "tls": {
                                "enabled": true,
                                "server_name": "d1--cn-gotcha204-3.bilivideo.com",
                                "insecure": false
                        }
                },
                {
                        "type": "shadowsocks",
                        "tag": "cfg-b77aca7759fcb912f6e2f2ea28260f9a-out",
                        "routing_mark": 100,
                        "method": "chacha20-ietf-poly1305"
                },
                {
                        "type": "shadowsocks",
                        "tag": "cfg-ace220b285f1b2081d915f7e2fb06e3e-out",
                        "routing_mark": 100,
                        "method": "chacha20-ietf-poly1305"
                }
        ],
        "route": {
                "rules": [
                        {
                                "inbound": "dns-in",
                                "action": "hijack-dns"
                        }
                ],
                "rule_set": [
                        {
                                "type": "remote",
                                "tag": "geoip-cn",
                                "format": "binary",
                                "url": "https://fastly.jsdelivr.net/gh/1715173329/IPCIDR-CHINA@rule-set/cn.srs",
                                "download_detour": "main-out"
                        },
                        {
                                "type": "remote",
                                "tag": "geosite-cn",
                                "format": "binary",
                                "url": "https://fastly.jsdelivr.net/gh/1715173329/sing-geosite@rule-set-unstable/geosite-geolocation-cn.srs",
                                "download_detour": "main-out"
                        },
                        {
                                "type": "remote",
                                "tag": "geosite-noncn",
                                "format": "binary",
                                "url": "https://fastly.jsdelivr.net/gh/1715173329/sing-geosite@rule-set-unstable/geosite-geolocation-!cn.srs",
                                "download_detour": "main-out"
                        }
                ],
                "auto_detect_interface": true,
                "final": "main-out"
        },
        "experimental": {
                "cache_file": {
                        "enabled": true,
                        "path": "/var/run/homeproxy/cache.db"
                }
        }
}

HomeProxy log

root@OWRT:~# cat /var/run/homeproxy/homeproxy.log

2025-08-09 14:28:48 [SUBSCRIBE] Stopping service...
2025-08-09 14:28:53 [DAEMON] Service stopped.
2025-08-09 14:28:54 [SUBSCRIBE] Skipping blacklist node: 2x专线-香港-1.
2025-08-09 14:28:54 [SUBSCRIBE] Skipping blacklist node: 2x专线-香港-3 (IPv6).
2025-08-09 14:28:54 [SUBSCRIBE] Skipping blacklist node: 2x专线-香港-4 (IPv6).
2025-08-09 14:28:54 [SUBSCRIBE] Skipping blacklist node: 2x专线-日本-1.
2025-08-09 14:28:54 [SUBSCRIBE] Skipping blacklist node: 2x专线-日本-3 (IPv6).
2025-08-09 14:28:54 [SUBSCRIBE] Skipping blacklist node: 2x专线-日本-4 (IPv6).
2025-08-09 14:28:54 [SUBSCRIBE] Skipping blacklist node: 如果很少节点可用,去官网更新软件.
2025-08-09 14:28:54 [SUBSCRIBE] Skipping blacklist node: 美国 pz (gpt优化).
2025-08-09 14:28:54 [SUBSCRIBE] Skipping blacklist node: 美国 rs (gpt优化).
2025-08-09 14:28:54 [SUBSCRIBE] Skipping blacklist node: 美国 01(电信移动优化).
2025-08-09 14:28:54 [SUBSCRIBE] Skipping blacklist node: 美国 3(移动联通优化).
2025-08-09 14:28:54 [SUBSCRIBE] Skipping blacklist node: 加拿大 IPv6.
2025-08-09 14:28:54 [SUBSCRIBE] Skipping blacklist node: 台湾(原生IP).
2025-08-09 14:28:54 [SUBSCRIBE] Skipping blacklist node: 加拿大 高速 cdn 1.
2025-08-09 14:28:54 [SUBSCRIBE] Skipping blacklist node: 美国 高速 cdn 1.
2025-08-09 14:28:54 [SUBSCRIBE] Skipping blacklist node: 加拿大+高速+cdn+2.
2025-08-09 14:28:54 [SUBSCRIBE] Skipping blacklist node: 美国+高速+cdn+2.
2025-08-09 14:28:54 [SUBSCRIBE] Skipping blacklist node: 香港 原生ip.
2025-08-09 14:28:54 [SUBSCRIBE] Successfully fetched 3 nodes of total 34 from ***********************************
2025-08-09 14:28:57 [SUBSCRIBE] Skipping blacklist node: 普通|马来西亚MYS|01|直连.
2025-08-09 14:28:57 [SUBSCRIBE] Skipping blacklist node: IEPL|JP 日本02|IPV6.
2025-08-09 14:28:57 [SUBSCRIBE] Skipping blacklist node: IEPL|JP 日本03|IPV6.
2025-08-09 14:28:57 [SUBSCRIBE] Skipping blacklist node: IEPL|US 美国03 MITM|IPV6.
2025-08-09 14:28:57 [SUBSCRIBE] Skipping blacklist node: IEPL|VN 越南01|IPV6.
2025-08-09 14:28:57 [SUBSCRIBE] Skipping blacklist node: IEPL|VN 越南02|IPV6.
2025-08-09 14:28:57 [SUBSCRIBE] Skipping blacklist node: IEPL|HK 香港06|IPV6.
2025-08-09 14:28:57 [SUBSCRIBE] Skipping blacklist node: IEPL|HK 香港07|IPV6.
2025-08-09 14:28:57 [SUBSCRIBE] Skipping blacklist node: IEPL|HK 香港08|IPV6.
2025-08-09 14:28:57 [SUBSCRIBE] Skipping blacklist node: IEPL|JP 日本05|IPV6.
2025-08-09 14:28:58 [SUBSCRIBE] Skipping blacklist node: IEPL|TW 台湾03|IPV6.
2025-08-09 14:28:58 [SUBSCRIBE] Skipping blacklist node: 官网:蜂窝云.com.
2025-08-09 14:28:58 [SUBSCRIBE] Skipping blacklist node: 剩余流量:202.67GB.
2025-08-09 14:28:58 [SUBSCRIBE] Skipping blacklist node: 过期时间:2025-08-30.
2025-08-09 14:28:58 [SUBSCRIBE] Successfully fetched 3 nodes of total 17 from ***********************************
2025-08-09 14:28:58 [SUBSCRIBE] Removing node: IEPL|SG 新加坡02.
2025-08-09 14:28:58 [SUBSCRIBE] Removing node: IEPL|SG 新加坡06.
2025-08-09 14:28:58 [SUBSCRIBE] Removing node: IEPL|SG 新加坡07.
2025-08-09 14:28:58 [SUBSCRIBE] Adding node: IEPL|SG 新加坡02|IPV6.
2025-08-09 14:28:58 [SUBSCRIBE] Adding node: IEPL|SG 新加坡06|IPV6.
2025-08-09 14:28:58 [SUBSCRIBE] Adding node: IEPL|SG 新加坡07|IPV6.
2025-08-09 14:28:58 [SUBSCRIBE] Node e1a697191468f8e2047eb92a5ad877b8 is gone, removing from urltest list.
2025-08-09 14:28:58 [SUBSCRIBE] Node 260ebe71a760405e4627fcd5e8383f52 is gone, removing from urltest list.
2025-08-09 14:28:58 [SUBSCRIBE] Restarting service...
2025-08-09 14:29:02 [DAEMON] Service stopped.
Type error: attempt to set property on null value
In /etc/homeproxy/scripts/generate_client.uc, line 701, byte 108:

 `            config.outbounds[length(config.outbounds)-1].domain_strategy = (ipv6_support !== '1') ? 'prefer_ipv4' : null;`
  Near here ----------------------------------------------------------------------------------------------------------^


2025-08-09 14:29:02 [DAEMON] Error: failed to generate client configuration.
2025-08-09 14:29:02 [SUBSCRIBE] 3 nodes added, 3 removed.
2025-08-09 14:29:02 [SUBSCRIBE] Successfully updated subscriptions.
2025-08-09 14:29:20 [DAEMON] Reloading service...
2025-08-09 14:29:24 [DAEMON] Service stopped.
WARN[0000] legacy DNS servers is deprecated in sing-box 1.12.0 and will be removed in sing-box 1.14.0, checkout documentation for migration: https://sing-box.sagernet.org/migration/#migrate-to-new-dns-server-formats
WARN[0000] outbound DNS rule item is deprecated in sing-box 1.12.0 and will be removed in sing-box 1.14.0, checkout documentation for migration: https://sing-box.sagernet.org/migration/#migrate-outbound-dns-rule-items-to-domain-resolver
WARN[0000] missing `route.default_domain_resolver` or `domain_resolver` in dial fields is deprecated in sing-box 1.12.0 and will be removed in sing-box 1.14.0, checkout documentation for migration: https://sing-box.sagernet.org/migration/#migrate-outbound-dns-rule-items-to-domain-resolver
2025-08-09 14:29:27 [DAEMON] sing-box 1.12.0 started.

sing-box log

日志已被自动清理

OpenWrt/ImmortalWrt release

SNAPSHOT r0-b1d8f36

Device

Aliyun AP8220

Additional information

luci-app-homeproxy 25.216.54381~60fbec2
sing-box 1.12.0-r1

Terms

  • I confirm that the HomeProxy I installed is from official source, like GitHub artifacts or official ImmortalWrt opkg feeds.
  • I confirm that the Homeproxy I installed does not contain Clash mode support.
  • I confirm that the version of OpenWrt/ImmortalWrt I installed is >= 23.05.
  • I confirm that I have installed the latest version of HomeProxy and sing-box.
  • I confirm that I have read the sing-box documentation, understand the meaning of all the configuration items I added.
  • I confirm that I have not mixed iptables and nftables rules.
  • I confirm that I have not modified system DNS settings, or enabled any other DNS servers like MosDNS and SmartDNS.
  • I confirm that I have cleared the browser cache.
  • I confirm that I have selected all terms blindly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载