Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在 TransportObject 中写的 grpcSettings 设置不生效 #3247

Closed
mclovin-2k opened this issue Apr 8, 2024 · 6 comments
Closed

在 TransportObject 中写的 grpcSettings 设置不生效 #3247

mclovin-2k opened this issue Apr 8, 2024 · 6 comments
Labels
documentation Improvements or additions to documentation

Comments

@mclovin-2k
Copy link

mclovin-2k commented Apr 8, 2024

TransportObject 配置

{
    "transport": {
        "wsSettings": {
            "path": "ProxyWS?ed=2560"
        },
        "httpupgradeSettings": {
            "path": "ProxyHU?ed=2560"
        },
        "grpcSettings": {
            "serviceName": "ProxyGRPC",
            "multiMode": true,
            "idle_timeout": 60,
            "permit_without_stream": true,
            "initial_windows_size": 65536
        }
    }
}

Outbounds 配置

{
    "outbounds": [
        {
            "protocol": "vless",
            "settings": {
                "vnext": [
                    {
                        "address": "xxxxx.com",
                        "port": 443,
                        "users": [
                            {
                                "id": "1234",
                                "encryption": "none"
                            }
                        ]
                    }
                ]
            },
            "streamSettings": {
                "network": "ws",
                "security": "tls",
                "tlsSettings": {
                    "fingerprint": "chrome"
                }
            }
        },
        {
            "protocol": "vless",
            "settings": {
                "vnext": [
                    {
                        "address": "xxxxx.com",
                        "port": 443,
                        "users": [
                            {
                                "id": "1234",
                                "encryption": "none"
                            }
                        ]
                    }
                ]
            },
            "streamSettings": {
                "network": "httpupgrade",
                "security": "tls",
                "tlsSettings": {
                    "fingerprint": "chrome"
                }
            }
        },
        {
            "protocol": "vless",
            "settings": {
                "vnext": [
                    {
                        "address": "xxxxx.com",
                        "port": 443,
                        "users": [
                            {
                                "id": "1234",
                                "encryption": "none"
                            }
                        ]
                    }
                ]
            },
            "streamSettings": {
                "network": "grpc",
                "security": "tls",
                "tlsSettings": {
                    "fingerprint": "chrome"
                }
            }
        }
    ]
}

3个出站,ws 和 httpupgrade 都正常,就是 GRPC 连不上。
从服务端的日志看,是 TransportObject 中写的 grpcSettings 设置没生效,serviceName 是空。
必须把 grpcSettings 里的内容放到出站的 streamSettings 里才可以。

忘了说了Server和Client都是 1.8.10。

@mclovin-2k mclovin-2k changed the title 在 TransportObject 中写的 grpcSettings 设置不生效,wsSettings 和 httpupgradeSettings 却可以生效。 在 TransportObject 中写的 grpcSettings 设置不生效 Apr 8, 2024
@Fangliding
Copy link
Member

古代问题 那个所谓的全局配置早该移除了 现在不推荐这么配置 推荐都写在streamsettings里

@mclovin-2k
Copy link
Author

mclovin-2k commented Apr 9, 2024

古代问题 那个所谓的全局配置早该移除了 现在不推荐这么配置 推荐都写在streamsettings里

我觉得 TransportObject 还挺方便的啊 节点多的话可以省很多复制粘贴啊
如果真要取消全局配置,请给用户设计一个灵活的多配置文件机制,类似于V2FLY V5那种的也行。

@RPRX
Copy link
Member

RPRX commented Apr 9, 2024

@Fangliding 可以把这个上古配置方式给删了 文档也需要删 还有文档都没写的上古配置可以直接把相关代码删了

不知不觉 #1967 快一年了

@mclovin-2k
Copy link
Author

@Fangliding 可以把这个上古配置方式给删了 文档也需要删 还有文档都没写的上古配置可以直接把相关代码删了

不知不觉 #1967 快一年了

TransportObject 全局配置只是一种简化重复配置的方法,并不是什么过时的协议。这也不能保留吗?

@chika0801
Copy link
Contributor

https://xtls.github.io/Xray-docs-next/config/transport.html

楼主不提还真没注意到,有这种上古的 全局配置([TransportObject](https://xtls.github.io/Xray-docs-next/config/transport.html#transportobject)) 这写法

一直习惯写 局部配置([StreamSettingsObject](https://xtls.github.io/Xray-docs-next/config/transport.html#streamsettingsobject))

@yuhan6665 yuhan6665 added the documentation Improvements or additions to documentation label Apr 29, 2024
@Fangliding
Copy link
Member

在文档里折叠掉了 不过为了提个醒(code里还没删掉 当然删掉了指不定就出事了)就没完全移除 毕竟不想有什么代码里有文档里没有的幽灵功能()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

5 participants