Merge pull request #336 from cooip-jm/patch-1

处理grpc-opts为 {} 的情况
This commit is contained in:
xream 2024-07-02 21:03:30 +08:00 committed by GitHub
commit 9558b63261
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;