处理grpc-opts为 {} 的情况

该字段仅影响sing-box内核,对mihomo无影响
This commit is contained in:
cooip-jm 2024-07-02 21:01:11 +08:00 committed by GitHub
parent 9d29fc8a09
commit 4bfdef17ee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -415,6 +415,13 @@ function lastParse(proxy) {
) {
delete proxy['reality-opts'];
}
// 删除 grpc-opts: {}
if (
proxy['grpc-opts'] &&
Object.keys(proxy['grpc-opts']).length === 0
) {
delete proxy['grpc-opts'];
}
// 非 reality, 空 flow 没有意义
if (!proxy['reality-opts'] && !proxy.flow) {
delete proxy.flow;