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

ProtectedDialer: Use Unix.Bind and return PacketConnWrapper for UDP #57

Merged
merged 2 commits into from
Sep 7, 2024
Merged

ProtectedDialer: Use Unix.Bind and return PacketConnWrapper for UDP #57

merged 2 commits into from
Sep 7, 2024

Conversation

dyhkwong
Copy link
Contributor

@dyhkwong dyhkwong commented Sep 1, 2024

@yuhan6665
Copy link
Contributor

Thank you! Does it work for wireguard outbound and splitHTTP with h3?

@dyhkwong
Copy link
Contributor Author

dyhkwong commented Sep 3, 2024

It works for QUIC/splitHTTP with h3 because they explicitly check PacketConnWrapper. https://github.com/XTLS/Xray-core/blob/9a953c070f9c3bd2b7f255fb50f076ae8ece7bce/transport/internet/splithttp/dialer.go#L123

I don't have a WireGuard server to test, but it should work as long as it treats PacketConnWrapper as net.Conn.

This is only a "overfitting" fix under current API limitation. A real fix should require some new APIs.

@RPRX
Copy link

RPRX commented Sep 3, 2024

A real fix should require some new APIs.

我觉得没问题,这些非 gRPC 的 API 也就 NG 和几个 iOS App 会用到,趁着下个版本改大版本号可以 breaking,甚至不用等大版本

@RPRX
Copy link

RPRX commented Sep 3, 2024

如果想出了更好的设计可以直接引入,我是打算十月开始梳理 Xray 的基础架构了,年内搞定,然后 25 年又可以 breaking 删代码

@2dust 2dust merged commit 43cde7a into 2dust:main Sep 7, 2024
ichurkin added a commit to ichurkin/AndroidLibXrayLite that referenced this pull request Nov 18, 2024
* main:
  google.golang.org/grpc v1.66.3
  Revert to go 1.22 (2dust#60)
  Update dependencies (2dust#59)
  google.golang.org/grpc v1.66.1
  Update go.mod
  Update go.mod for xray v24.9.7 (2dust#58)
  Update go.mod
  Update go.mod
  Update README.md
  Update main.yml
  ProtectedDialer: Use Unix.Bind and return PacketConnWrapper for UDP (2dust#57)

# Conflicts:
#	go.mod
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

Successfully merging this pull request may close these issues.

4 participants