Skip to content

tcpFastOpen似乎在服务端不生效 #4743

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

Closed
4 tasks done
Arrow-Li opened this issue May 19, 2025 · 4 comments
Closed
4 tasks done

tcpFastOpen似乎在服务端不生效 #4743

Arrow-Li opened this issue May 19, 2025 · 4 comments

Comments

@Arrow-Li
Copy link

完整性要求

  • 我保证阅读了文档,了解所有我编写的配置文件项的含义,而不是大量堆砌看似有用的选项或默认值。
  • 我提供了完整的配置文件和日志,而不是出于自己的判断只给出截取的部分。
  • 我搜索了 issues, 没有发现已提出的类似问题。
  • 问题在 Release 最新的版本上可以成功复现

描述

客户端和服务端版本都是25.5.16,服务器上抓包看SYN请求里有tfo.request但是SYN-ACK里并没有tfo.cookie/proc/net/netstatTCPFastOpenPassive也是0
客户端:/proc/sys/net/ipv4/tcp_fastopen : 1
服务器:net.ipv4.tcp_fastopen = 3

Image

Image

重现方式

xhttp auto + reality, 两端都开启tcp fastopen,观察服务器响应包是否包含tfo cookie

客户端配置


{
    "log": {},
    "routing": {},
    "inbounds": [],
    "outbounds": [
        {
            "protocol": "vless",
            "settings": {
                "vnext": [
                    {
                        "address": "",
                        "port": 443,
                        "users": [
                            {
                                "id": "",
                                "encryption": "none"
                            }
                        ]
                    }
                ]
            },
            "streamSettings": {
                "network": "xhttp",
                "security": "reality",
                "realitySettings": {
                    "show": false,
                    "fingerprint": "chrome",
                    "serverName": "",
                    "publicKey": "",
                    "shortId": ""
                },
                "xhttpSettings": {
                    "path": "/",
                    "mode": "auto"
                },
                "sockopt": {
                    "tcpFastOpen": true
                }
            }
        }
    ]
}

服务端配置


{
    "log": {},
    "routing": {},
    "inbounds": [
        {
            "tag": "in",
            "listen": "/dev/shm/xray.socket",
            "port": 8000,
            "protocol": "vless",
            "settings": {
                "clients": [
                    {
                        "id": ""
                    }
                ],
                "decryption": "none"
            },
            "streamSettings": {
                "network": "xhttp",
                "security": "reality",
                "realitySettings": {
                    "show": false,
                    "dest": "",
                    "serverNames": [
                        ""
                    ],
                    "xver": 1,
                    "privateKey": "",
                    "shortIds": [
                        ""
                    ]
                },
                "xhttpSettings": {
                    "path": "/",
                    "mode": "auto"
                },
                "sockopt": {
                    "tcpFastOpen": true
                }
            },
            "sniffing": {
                "enabled": false
            }
        }
    ],
    "outbounds": []
}

客户端日志


N/A

服务端日志


2025/05/19 11:31:44.210420 [Debug] app/log: Logger started
2025/05/19 11:31:44.273562 [Info] app/dns: DNS: created localhost client
2025/05/19 11:31:44.291042 [Debug] app/router: MphDomainMatcher is enabled for 1 domain rule(s)
2025/05/19 11:31:44.593730 [Debug] app/router: MphDomainMatcher is enabled for 122067 domain rule(s)
2025/05/19 11:31:44.593917 [Debug] app/proxyman/inbound: creating unix domain socket worker on /dev/shm/xray.socket
2025/05/19 11:31:44.593990 [Info] transport/internet/splithttp: listening UNIX domain socket for XHTTP on /dev/shm/xray.socket
2025/05/19 11:31:44.594044 [Warning] core: Xray 25.5.16 started
@Fangliding
Copy link
Member

uds哪来的tfo。。。。

@Fangliding Fangliding closed this as not planned Won't fix, can't repro, duplicate, stale May 19, 2025
@Arrow-Li
Copy link
Author

服务端 127.0.0.1:8000 一样没有tfo cookie @Fangliding

@Fangliding
Copy link
Member

再想想

@Arrow-Li
Copy link
Author

再想想

我不理解

Image

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

No branches or pull requests

2 participants