From 604dad0584a1ccac79cf13ef31f98064c2b281a5 Mon Sep 17 00:00:00 2001 From: anlicheng <244108715@qq.com> Date: Wed, 20 May 2026 22:17:25 +0800 Subject: [PATCH] =?UTF-8?q?fix=20inbound=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Tun/Punchnet/Inbound/PacketInboundActor.swift | 2 +- ...DLHoleDataProcessor.swift => PacketInboundProcessor.swift} | 4 ++-- Tun/Punchnet/Outbound/PacketOutboundActor.swift | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) rename Tun/Punchnet/Inbound/{SDLHoleDataProcessor.swift => PacketInboundProcessor.swift} (98%) diff --git a/Tun/Punchnet/Inbound/PacketInboundActor.swift b/Tun/Punchnet/Inbound/PacketInboundActor.swift index 96847ce..3467b63 100644 --- a/Tun/Punchnet/Inbound/PacketInboundActor.swift +++ b/Tun/Punchnet/Inbound/PacketInboundActor.swift @@ -46,7 +46,7 @@ actor PacketInboundActor { } func handleData(_ data: SDLData) async { - let processor = SDLHoleDataProcessor( + let processor = PacketInboundProcessor( networkAddress: self.networkAddress, dataCipher: self.dataCipher, policySnapshot: self.policyService.policySnapshot(), diff --git a/Tun/Punchnet/Inbound/SDLHoleDataProcessor.swift b/Tun/Punchnet/Inbound/PacketInboundProcessor.swift similarity index 98% rename from Tun/Punchnet/Inbound/SDLHoleDataProcessor.swift rename to Tun/Punchnet/Inbound/PacketInboundProcessor.swift index 293f0fc..9ba880b 100644 --- a/Tun/Punchnet/Inbound/SDLHoleDataProcessor.swift +++ b/Tun/Punchnet/Inbound/PacketInboundProcessor.swift @@ -1,5 +1,5 @@ // -// SDLHoleDataProcessor.swift +// PacketInboundProcessor.swift // Tun // // Created by 安礼成 on 2026/4/14. @@ -7,7 +7,7 @@ import Foundation -final class SDLHoleDataProcessor { +final class PacketInboundProcessor { enum ProcessingAction { case sendARPReply(dstMac: Data, data: Data) case appendARP(ip: UInt32, mac: Data) diff --git a/Tun/Punchnet/Outbound/PacketOutboundActor.swift b/Tun/Punchnet/Outbound/PacketOutboundActor.swift index 12dfbf2..506054a 100644 --- a/Tun/Punchnet/Outbound/PacketOutboundActor.swift +++ b/Tun/Punchnet/Outbound/PacketOutboundActor.swift @@ -117,7 +117,7 @@ actor PacketOutboundActor { packetReaderTask?.cancel() } - func handleTunPacket(_ packet: IPPacket) async { + func handleTunPacket(_ packet: IPPacket) { let router = PacketOutboundRouter(networkAddress: self.networkAddress, exitNode: self.exitNode) let decision = router.route(packet: packet)