fix context

This commit is contained in:
anlicheng 2025-05-12 17:57:22 +08:00
parent 39f95f0aa5
commit 24bf7c1908
2 changed files with 3 additions and 6 deletions

View File

@ -25,13 +25,9 @@ class PacketTunnelProvider: NEPacketTunnelProvider {
self.context = try SDLContext(provider: self, config: .init(
version: 1,
installedChannel: installed_channel,
superHost: "39.98.184.67",
//superHost: "127.0.0.1",
superHost: "118.178.229.213",
superPort: 18083,
stunServers: [.init(host: "39.98.184.67", ports: [1265, 1266]), .init(host: "39.98.184.67", ports: [1265, 1266])],
//stunServers: [.init(host: "127.0.0.1", ports: [1265, 1266]), .init(host: "127.0.0.1", ports: [1265, 1266])],
stunServers: [.init(host: "118.178.229.213", ports: [1265, 1266]), .init(host: "118.178.229.213", ports: [1265, 1266])],
clientId: SDLContext.getUUID(),
token: ""
//token: token

View File

@ -56,6 +56,7 @@ class SDLSuperClient: ChannelInboundHandler {
}
do {
NSLog("super client connect: \(self.host):\(self.port)")
self.channel = try await bootstrap.connect(host: self.host, port: self.port).get()
} catch let err {
NSLog("super client get error: \(err)")