fix context
This commit is contained in:
parent
78ec74a0cb
commit
83bd5dce7e
@ -13,17 +13,6 @@ import NIOCore
|
||||
/*
|
||||
1. 处理rsa的加解密逻辑
|
||||
*/
|
||||
|
||||
enum SDLContextError: Error {
|
||||
case udpHoleClosed
|
||||
|
||||
case dnsLocalClientClosed
|
||||
case dnsLocalClientCancelled
|
||||
|
||||
case dnsClientClosed
|
||||
case dnsClientCancelled
|
||||
}
|
||||
|
||||
actor SDLContextActor {
|
||||
|
||||
private var config: SDLConfiguration
|
||||
@ -129,6 +118,7 @@ actor SDLContextActor {
|
||||
|
||||
// 权限控制
|
||||
self.policyService = policyService
|
||||
|
||||
self.dnsCloudService = dnsCloudService
|
||||
self.dnsLocalService = dnsLocalService
|
||||
self.superService = superService
|
||||
@ -193,6 +183,7 @@ actor SDLContextActor {
|
||||
await self.dnsCloudService.updateEventHandler { [weak self] event in
|
||||
await self?.handleDNSEvent(event)
|
||||
}
|
||||
|
||||
await self.dnsLocalService.updateEventHandler { [weak self] event in
|
||||
await self?.handleDNSEvent(event)
|
||||
}
|
||||
@ -210,6 +201,7 @@ actor SDLContextActor {
|
||||
await packetInboundActor.handleData(data)
|
||||
}
|
||||
)
|
||||
|
||||
await self.udpHoleV6Service.updateHandlers(
|
||||
onEvent: { [weak self] event in
|
||||
await self?.handleUDPHoleControlEvent(event)
|
||||
|
||||
17
Tun/Context/SDLContextError.swift
Normal file
17
Tun/Context/SDLContextError.swift
Normal file
@ -0,0 +1,17 @@
|
||||
//
|
||||
// SDLContextError.swift
|
||||
// punchnet
|
||||
//
|
||||
// Created by 安礼成 on 2026/5/27.
|
||||
//
|
||||
import Foundation
|
||||
|
||||
enum SDLContextError: Error {
|
||||
case udpHoleClosed
|
||||
|
||||
case dnsLocalClientClosed
|
||||
case dnsLocalClientCancelled
|
||||
|
||||
case dnsClientClosed
|
||||
case dnsClientCancelled
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user