NekoBoxForAndroid
NekoBoxForAndroid copied to clipboard
BUG: mihomo yaml 配置 Number of aliases for non-scalar nodes exceeds the specified max=50
Describe the problem
clash 配置包含
proxy-ref:
default: &default
type: select
include-all: true
proxies: [节点选择]
withDirect: &withDirect
type: select
include-all: true
proxies: [DIRECT, 节点选择]
filter:
highRate: &highRate "((([1-9][0-9]+)|[2-9])[xX]|续费|直连|专线)"
us: &us "(?i)美|us|unitedstates|united states"
hk: &hk "(?i)香港|港|hk|hongkong"
jp: &jp "(?i)JP|日本"
tw: &tw "(?i)台湾|台|tw|taiwan"
eu: &eu "(?i)uk|英国|de|德国|eu|欧洲"
proxy-groups:
- name: 节点选择
type: select
include-all: true
proxies: [自动选择]
- name: 自动选择
type: url-test
include-all: true
url: "https://detectportal.firefox.com/success.txt"
tolerance: 10
exclude-filter: *highRate
- name: 自己的网站
<<: *withDirect
- name: 微软
<<: *withDirect
- name: YouTube
<<: *default
- name: Google
<<: *default
- name: Apple
<<: *withDirect
- name: Telegram
<<: *default
- name: Twitter
<<: *default
- name: 哔哩哔哩
<<: *withDirect
- name: NETFLIX
<<: *default
- name: Github
<<: *default
- name: speedtest
<<: *withDirect
- name: 常见CDN
<<: *withDirect
- name: 下载
<<: *withDirect
ruleParam:
classical: &ruleParamClassical
type: http
behavior: classical
format: text
interval: 43200
domain: &ruleParamDomain
<<: *ruleParamClassical
behavior: domain
ipcidr: &ruleParamIpcidr
<<: *ruleParamClassical
behavior: ipcidr
rule-providers:
tailscale:
type: inline
behavior: domain
payload:
- "+.tailscale.com"
- "+.tailscale.io"
- "+.ts.net"
fake-ip:
type: inline
behavior: domain
payload:
- stun.*.*.*
- stun.*.*
- time.windows.com
- time.nist.gov
- time.apple.com
- time.asia.apple.com
- "*.ntp.org.cn"
- "*.openwrt.pool.ntp.org"
- time1.cloud.tencent.com
- time.ustc.edu.cn
- pool.ntp.org
- ntp.ubuntu.com
- ntp.aliyun.com
- ntp1.aliyun.com
- ntp2.aliyun.com
- ntp3.aliyun.com
- ntp4.aliyun.com
- ntp5.aliyun.com
- ntp6.aliyun.com
- ntp7.aliyun.com
- time1.aliyun.com
- time2.aliyun.com
- time3.aliyun.com
- time4.aliyun.com
- time5.aliyun.com
- time6.aliyun.com
- time7.aliyun.com
- "*.time.edu.cn"
- time1.apple.com
- time2.apple.com
- time3.apple.com
- time4.apple.com
- time5.apple.com
- time6.apple.com
- time7.apple.com
- time1.google.com
- time2.google.com
- time3.google.com
- time4.google.com
- music.163.com
- "*.music.163.com"
- "*.126.net"
- musicapi.taihe.com
- music.taihe.com
- songsearch.kugou.com
- trackercdn.kugou.com
- "*.kuwo.cn"
- api-jooxtt.sanook.com
- api.joox.com
- joox.com
- +.qq.com
- "*.xiami.com"
- +.music.migu.cn
- "*.msftconnecttest.com"
- "*.msftncsi.com"
- "*.*.*.srv.nintendo.net"
- "*.*.stun.playstation.net"
- xbox.*.*.microsoft.com
- "*.ipv6.microsoft.com"
- "*.*.xboxlive.com"
- speedtest.cros.wr.pvp.net
- +.test.steampowered.com
rule-self-oversea-domainset:
type: inline
behavior: domain
payload:
- example.com
rule-self-direct-domainset:
type: inline
behavior: domain
payload:
- example.com
- example.com
rule-self-direct-ipset:
type: inline
behavior: ipcidr
payload:
- 1.1.1.1/32
china_ip:
<<: *ruleParamIpcidr
url: https://ruleset.skk.moe/Clash/ip/china_ip.txt
path: ./sukkaw_ruleset/china_ip.txt
china_ip_ipv6:
<<: *ruleParamIpcidr
url: https://ruleset.skk.moe/Clash/ip/china_ip_ipv6.txt
path: ./sukkaw_ruleset/china_ipv6.txt
domestic_non_ip:
<<: *ruleParamClassical
url: https://ruleset.skk.moe/Clash/non_ip/domestic.txt
path: ./sukkaw_ruleset/domestic_non_ip.txt
direct_non_ip:
<<: *ruleParamClassical
url: https://ruleset.skk.moe/Clash/non_ip/direct.txt
path: ./sukkaw_ruleset/direct_non_ip.txt
global_non_ip:
<<: *ruleParamClassical
url: https://ruleset.skk.moe/Clash/non_ip/global.txt
path: ./sukkaw_ruleset/global_non_ip.txt
domestic_ip:
<<: *ruleParamClassical
url: https://ruleset.skk.moe/Clash/ip/domestic.txt
path: ./sukkaw_ruleset/domestic_ip.txt
lan_non_ip:
<<: *ruleParamClassical
url: https://ruleset.skk.moe/Clash/non_ip/lan.txt
path: ./sukkaw_ruleset/lan_non_ip.txt
lan_ip:
<<: *ruleParamClassical
url: https://ruleset.skk.moe/Clash/ip/lan.txt
path: ./sukkaw_ruleset/lan_ip.txt
download_domainset:
<<: *ruleParamDomain
url: https://ruleset.skk.moe/Clash/domainset/download.txt
path: ./sukkaw_ruleset/download_domainset.txt
download_non_ip:
<<: *ruleParamClassical
url: https://ruleset.skk.moe/Clash/non_ip/download.txt
path: ./sukkaw_ruleset/download_non_ip.txt
microsoft_non_ip:
<<: *ruleParamClassical
url: https://ruleset.skk.moe/Clash/non_ip/microsoft.txt
path: ./sukkaw_ruleset/microsoft_non_ip.txt
microsoft_cdn_non_ip:
<<: *ruleParamClassical
url: https://ruleset.skk.moe/Clash/non_ip/microsoft_cdn.txt
path: ./sukkaw_ruleset/microsoft_cdn_non_ip.txt
apple_cn_non_ip:
<<: *ruleParamClassical
url: https://ruleset.skk.moe/Clash/non_ip/apple_cn.txt
path: ./sukkaw_ruleset/apple_cn_non_ip.txt
apple_services:
<<: *ruleParamClassical
url: https://ruleset.skk.moe/Clash/non_ip/apple_services.txt
path: ./sukkaw_ruleset/apple_services.txt
apple_cdn:
<<: *ruleParamDomain
url: https://ruleset.skk.moe/Clash/domainset/apple_cdn.txt
path: ./sukkaw_ruleset/apple_cdn.txt
reject_non_ip_no_drop:
<<: *ruleParamClassical
url: https://ruleset.skk.moe/Clash/non_ip/reject-no-drop.txt
path: ./sukkaw_ruleset/reject_non_ip_no_drop.txt
reject_non_ip_drop:
<<: *ruleParamClassical
url: https://ruleset.skk.moe/Clash/non_ip/reject-drop.txt
path: ./sukkaw_ruleset/reject_non_ip_drop.txt
reject_non_ip:
<<: *ruleParamClassical
url: https://ruleset.skk.moe/Clash/non_ip/reject.txt
path: ./sukkaw_ruleset/reject_non_ip.txt
reject_domainset:
<<: *ruleParamDomain
url: https://ruleset.skk.moe/Clash/domainset/reject.txt
path: ./sukkaw_ruleset/reject_domainset.txt
# 在 Clash 上,同时启用基础和额外的拦截域名会导致内存占用过高和匹配用时增加等性能问题
reject_extra_domainset:
<<: *ruleParamDomain
url: https://ruleset.skk.moe/Clash/domainset/reject_extra.txt
path: ./sukkaw_ruleset/reject_domainset_extra.txt
reject_ip:
<<: *ruleParamClassical
url: https://ruleset.skk.moe/Clash/ip/reject.txt
path: ./sukkaw_ruleset/reject_ip.txt
speedtest:
<<: *ruleParamDomain
url: https://ruleset.skk.moe/Clash/domainset/speedtest.txt
path: ./sukkaw_ruleset/speedtest.txt
cdn_domainset:
<<: *ruleParamDomain
url: https://ruleset.skk.moe/Clash/domainset/cdn.txt
path: ./sukkaw_ruleset/cdn_domainset.txt
cdn_non_ip:
<<: *ruleParamClassical
url: https://ruleset.skk.moe/Clash/non_ip/cdn.txt
path: ./sukkaw_ruleset/cdn_non_ip.txt
# 北美相关流媒体
stream_us_non_ip:
<<: *ruleParamClassical
url: https://ruleset.skk.moe/Clash/non_ip/stream_us.txt
path: ./sukkaw_ruleset/stream_us_non_ip.txt
# 欧洲相关流媒体
stream_eu_non_ip:
<<: *ruleParamClassical
url: https://ruleset.skk.moe/Clash/non_ip/stream_eu.txt
path: ./sukkaw_ruleset/stream_eu_non_ip.txt
stream_jp_non_ip:
<<: *ruleParamClassical
url: https://ruleset.skk.moe/Clash/non_ip/stream_jp.txt
path: ./sukkaw_ruleset/stream_jp_non_ip.txt
# 韩国相关流媒体
# stream_kr_non_ip:
# <<: *ruleParamClassical
# url: https://ruleset.skk.moe/Clash/non_ip/stream_kr.txt
# path: ./sukkaw_ruleset/stream_kr_non_ip.txt
# 香港相关流媒体
stream_hk_non_ip:
<<: *ruleParamClassical
url: https://ruleset.skk.moe/Clash/non_ip/stream_hk.txt
path: ./sukkaw_ruleset/stream_hk_non_ip.txt
# 台湾相关流媒体
stream_tw_non_ip:
<<: *ruleParamClassical
url: https://ruleset.skk.moe/Clash/non_ip/stream_tw.txt
path: ./sukkaw_ruleset/stream_tw_non_ip.txt
stream_non_ip:
<<: *ruleParamClassical
url: https://ruleset.skk.moe/Clash/non_ip/stream.txt
path: ./sukkaw_ruleset/stream_non_ip.txt
stream_ip:
<<: *ruleParamClassical
url: https://ruleset.skk.moe/Clash/ip/stream.txt
path: ./sukkaw_ruleset/stream_ip.txt
ai_non_ip:
<<: *ruleParamClassical
url: https://ruleset.skk.moe/Clash/non_ip/ai.txt
path: ./sukkaw_ruleset/ai_non_ip.txt
telegram_non_ip:
<<: *ruleParamClassical
url: https://ruleset.skk.moe/Clash/non_ip/telegram.txt
path: ./sukkaw_ruleset/telegram_non_ip.txt
telegram_ip:
<<: *ruleParamIpcidr
url: https://core.telegram.org/resources/cidr.txt
path: ./sukkaw_ruleset/telegram_ip.txt
proxy: Telegram
proxy-config:
self: &selfVless
type: vless
port: 12345
udp: true
uuid: "zzzzzzzzzzzzzzzzzzzzz"
flow: "xtls-rprx-vision"
packet-encoding: xudp
tls: true
alpn:
- h2
- http/1.1
client-fingerprint: chrome
skip-cert-verify: false
network: tcp
proxies:
- name: "xxxxx"
server: "xxxxx"
<<: *selfVless
servername: xxxxxx
- name: "yyxxxxxxxxx"
server: "yyyy"
<<: *selfVless
servername: yyyyy
解释
Expected behavior:
希望正常导入
Actual behavior:
SubscriptionFoundException
How to reproduce
包含锚点多的文件
log
If you have logs, please upload them. Please see the detailed steps for exporting logs in the documentation.
2025/10/06 17:42:22 [Warning] [RawUpdater] org.yaml.snakeyaml.error.YAMLException: Number of aliases for non-scalar nodes exceeds the specified max=50
at org.yaml.snakeyaml.composer.Composer.composeNode(SourceFile:92)
at org.yaml.snakeyaml.composer.Composer.composeValueNode(SourceFile:1)
at org.yaml.snakeyaml.composer.Composer.composeMappingChildren(SourceFile:21)
at org.yaml.snakeyaml.composer.Composer.composeMappingNode(SourceFile:119)
at org.yaml.snakeyaml.composer.Composer.composeNode(SourceFile:182)
at org.yaml.snakeyaml.composer.Composer.composeSequenceNode(SourceFile:119)
at org.yaml.snakeyaml.composer.Composer.composeNode(SourceFile:177)
at org.yaml.snakeyaml.composer.Composer.composeValueNode(SourceFile:1)
at org.yaml.snakeyaml.composer.Composer.composeMappingChildren(SourceFile:21)
at org.yaml.snakeyaml.composer.Composer.composeMappingNode(SourceFile:119)
at org.yaml.snakeyaml.composer.Composer.composeNode(SourceFile:182)
at org.yaml.snakeyaml.composer.Composer.getNode(SourceFile:59)
at org.yaml.snakeyaml.composer.Composer.getSingleNode(SourceFile:17)
at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(SourceFile:3)
at org.yaml.snakeyaml.Yaml.loadFromReader(SourceFile:28)
at org.yaml.snakeyaml.Yaml.loadAs(SourceFile:2)
at io.nekohasekai.sagernet.group.RawUpdater.parseRaw(SourceFile:6)
at io.nekohasekai.sagernet.group.RawUpdater.parseRaw$default(SourceFile:7)
at io.nekohasekai.sagernet.group.RawUpdater.doUpdate(SourceFile:22)
at io.nekohasekai.sagernet.group.GroupUpdater$Companion$executeUpdate$2.invokeSuspend(SourceFile:261)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(SourceFile:6)
at kotlinx.coroutines.DispatchedTask.run(SourceFile:110)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(SourceFile:92)
2025/10/06 17:42:22 [Warning] [RawUpdater] java.lang.IllegalStateException: Not found
at io.nekohasekai.sagernet.group.RawUpdater.parseRaw(SourceFile:360)
at io.nekohasekai.sagernet.group.RawUpdater.parseRaw$default(SourceFile:7)
at io.nekohasekai.sagernet.group.RawUpdater.doUpdate(SourceFile:22)
at io.nekohasekai.sagernet.group.GroupUpdater$Companion$executeUpdate$2.invokeSuspend(SourceFile:261)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(SourceFile:6)
at kotlinx.coroutines.DispatchedTask.run(SourceFile:110)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(SourceFile:92)
2025/10/06 17:42:22 [Debug] [FormatsKt] Try parse http link: https://ruleset.skk.moe/Clash/ip/china_ip.txt
2025/10/06 17:42:22 [Warning] [FormatsKt] java.lang.IllegalStateException: Not http proxy
at io.nekohasekai.sagernet.fmt.http.HttpFmtKt.parseHttp(SourceFile:97)
at io.nekohasekai.sagernet.ktx.FormatsKt.parseProxies$parseLink(SourceFile:130)
at io.nekohasekai.sagernet.ktx.FormatsKt.parseProxies(SourceFile:128)
at io.nekohasekai.sagernet.group.RawUpdater.parseRaw(SourceFile:362)
at io.nekohasekai.sagernet.group.RawUpdater.parseRaw$default(SourceFile:7)
at io.nekohasekai.sagernet.group.RawUpdater.doUpdate(SourceFile:22)
at io.nekohasekai.sagernet.group.GroupUpdater$Companion$executeUpdate$2.invokeSuspend(SourceFile:261)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(SourceFile:6)
at kotlinx.coroutines.DispatchedTask.run(SourceFile:110)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(SourceFile:92)
2025/10/06 17:42:22 [Warning] [GroupUpdater$Companion$executeUpdate$2] io.nekohasekai.sagernet.ktx.SubscriptionFoundException
at io.nekohasekai.sagernet.ktx.FormatsKt.parseProxies$parseLink(SourceFile:199)
at io.nekohasekai.sagernet.ktx.FormatsKt.parseProxies(SourceFile:128)
at io.nekohasekai.sagernet.group.RawUpdater.parseRaw(SourceFile:362)
at io.nekohasekai.sagernet.group.RawUpdater.parseRaw$default(SourceFile:7)
at io.nekohasekai.sagernet.group.RawUpdater.doUpdate(SourceFile:22)
at io.nekohasekai.sagernet.group.GroupUpdater$Companion$executeUpdate$2.invokeSuspend(SourceFile:261)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(SourceFile:6)
at kotlinx.coroutines.DispatchedTask.run(SourceFile:110)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(SourceFile:92)