Skip to content
New issue

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

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

Already on GitHub? # to your account

希望添加 应用层协议协商(ALPN)的选项(h2、http/1.1),用于精确控制 Xray 服务端的回落 #1643

Closed
xiaopang0v0 opened this issue Sep 19, 2022 · 1 comment

Comments

@xiaopang0v0
Copy link

希望可以在 v2rayNG 中看到像下图 1 v2rayN 一样的 ALPN 的选择,因为访问时发送的不同 ALPN 会影响 Xray 接下来的回落

image

图 1 v2rayN 的 ALPN 选择框

预期行为

节点编辑界面中新增一个下拉选择框一个包含两个横向单选框的选项(跟 v2rayN 一个风格),供用户在任何模式下选择程序发出的 ALPN(或者像隔壁 SagerNet 一样给用户自定义也可以,SagerNet 的配置界面如下图 2 和图 3 所示)

image

图 2 SagerNet 的 ALPN 选项(未点击进入)

image

图 3 SagerNet 的 ALPN 选项(点击进入后)

实际行为

如下图 4 没有在节点编辑页面找到类似的设置

image

图 4 未在 v2rayNG 中找到设置的地点

复现方法

如下图 5点击笔的图案进入节点编辑界面即可

image

图 5 进入节点信息编辑界面

日志信息

服务端配置文件服务端的 error.log

服务端配置文件(下面的回落域名均为 xx.net )

        "fallbacks": [
            {
                "dest": 5001,
                "xver": 1
            },
            {
                "alpn": "h2",
                "dest": 5002,
                "xver": 1
            },
            {
                "name": "xx.net",
                "dest": 5003,
                "xver": 1
            },
            {
                "name": "xx.net",
                "alpn": "h2",      # 不同的ALPN 会导致回落到不同端口
                "dest": 5004,
                "xver": 1
            },
            {
                "name": "xx.net",
                "path": "/video-stream",
                "dest": 5005,
                "xver": 1
            },
            {
                "name": "xx.net",
                "alpn": "h2",
                "path": "/video-stream",
                "dest": 5006,
                "xver": 1
            },
        ]

Xray 服务端的 error.log
模式:INFO 模式

2022/09/19 16:27:18 [Info] [1954532682] proxy/vless/inbound: firstLen = 163
2022/09/19 16:27:18 [Info] [1954532682] proxy/vless/inbound: received request for tcp:www.google.com:80
2022/09/19 16:27:18 [Info] [1954532682] app/dispatcher: default route for tcp:www.google.com:80
2022/09/19 16:27:18 [Info] [1954532682] proxy/freedom: opening connection to tcp:www.google.com:80
2022/09/19 16:27:18 [Info] [1954532682] transport/internet/tcp: dialing TCP to tcp:www.google.com:80
2022/09/19 16:27:41 [Info] [2588343928] proxy/vless/inbound: firstLen = 0
2022/09/19 16:27:41 [Info] [2588343928] proxy/vless/inbound: fallback starts > proxy/vless/inbound: fallback directly
2022/09/19 16:27:41 [Info] [2588343928] proxy/vless/inbound: realName = xx.net
**2022/09/19 16:27:41 [Info] [2588343928] proxy/vless/inbound: realAlpn = h2  通过发送的这个决定Xray将回落到何处**
2022/09/19 16:27:41 [Info] [2588343928] app/proxyman/inbound: connection ends > proxy/vless/inbound: fallback ends > proxy/vless/inbound: failed to fallback request payload > remote error: tls: bad certificate

环境信息

平台 软件名称 内核名称 运行架构
Android v2rayNG v1.7.19 Xray-core v1.5.10 arm64-v8a
Ubuntu 22.04 LTS Xray 服务端 Xray 1.5.5 (Xray, Penetrates Everything) go1.18.1 linux/amd64
@2dust
Copy link
Owner

2dust commented Oct 20, 2022

@2dust 2dust closed this as completed Oct 20, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants