Merged
Conversation
(mostly vibe coded)
9d4d4a6 to
6a9cbe2
Compare
Contributor
Author
|
Config Example: |
(mostly vibe coded)
75990b2 to
8680c51
Compare
2862b42 to
6b1c373
Compare
102f44d to
3f51469
Compare
Contributor
Author
|
DualStack example: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(Machine Generated)
This pull request introduces a new gVisor-based packet switch stack implementation and related utilities, refactors device and stack initialization, and improves UDP handler logic. The main changes are the addition of a gVisor stack adapter for packet switching, a new interconnect cable device for network-layer packet bridging, and several updates to device and handler interfaces for better abstraction and compatibility.
gVisor stack integration and packet switch improvements:
gvisorstackpackage, including:adapter.go: ImplementsNetworkLayerDeviceToGvisorLinkEndpointAdaptorto bridge V2Ray's packet switch devices with gVisor'sstack.LinkEndpointinterface. This enables seamless integration between V2Ray's internal packet switching and the gVisor network stack.stack.go: ImplementsWrappedStackfor creating and managing a gVisor stack, including NIC setup, address/routing configuration, and stack closure logic.dialer.go: Adds TCP and UDP dial/listen methods on the gVisor stack, supporting both IPv4 and IPv6.config.proto: Introduces a proto config for the new stack, supporting MTU, user level, IPs, routes, and socket settings.Network-layer device interconnect:
interconnectpackage withnetworkLayer_cable.go:NetworkLayerCabledevice to bridge two network-layer devices for bidirectional packet transfer, supporting dynamic attachment and detachment. [1] [2]Device and stack interface refactoring:
common.Closableinterface from theDeviceinterface indevice.go.NextNICID()instead of a deprecated or less appropriate method.rawfileingvisor_linux.gofor clarity and correctness.Closemethod signature forGvisorTUNto match the interface and avoid returning an error.UDP handler improvements:
gonet.NewUDPConnto use the latest API.Packet buffer interface updates:
packetaddradaptar.goto use*stack.PacketBufferinstead ofstack.PacketBufferPtr, aligning with upstream gVisor changes.These changes collectively modernize the V2Ray core's packet switching and device abstraction, enabling advanced use cases with gVisor and improving modularity and maintainability.