1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-01-06 09:15:37 -05:00

feat: refine handle logic

This commit is contained in:
AkinoKaede
2023-05-30 13:28:22 +08:00
committed by Shelikhoo
parent 5f6031b1e8
commit 0a090a073b
5 changed files with 20 additions and 67 deletions

View File

@@ -29,8 +29,8 @@ func (t *TUN) CreateStack(linkedEndpoint stack.LinkEndpoint) (*stack.Stack, erro
nicID := tcpip.NICID(s.UniqueID())
opts := []StackOption{
HandleTCP(handleTCP),
HandleUDP(handleUDP),
SetTCPHandler(t.ctx, t.dispatcher, t.policyManager, t.config),
SetUDPHandler(t.ctx, t.dispatcher, t.policyManager, t.config),
CreateNIC(nicID, linkedEndpoint),
AddProtocolAddress(nicID, t.config.Ips),