fix open method
This commit is contained in:
parent
5c10c7a33b
commit
035ec9343d
@ -79,7 +79,7 @@ public class SDLContext: @unchecked Sendable {
|
||||
private var flowTracer = SDLFlowTracerActor()
|
||||
private var flowTracerCancel: AnyCancellable?
|
||||
|
||||
init(provider: NEPacketTunnelProvider, config: SDLConfiguration, rsaCipher: RSACipher, aesCipher: AESCipher) throws {
|
||||
public init(provider: NEPacketTunnelProvider, config: SDLConfiguration, rsaCipher: RSACipher, aesCipher: AESCipher) throws {
|
||||
self.config = config
|
||||
self.rsaCipher = rsaCipher
|
||||
self.aesCipher = aesCipher
|
||||
@ -96,7 +96,7 @@ public class SDLContext: @unchecked Sendable {
|
||||
self.noticeClient = SDLNoticeClient()
|
||||
}
|
||||
|
||||
func start() async throws {
|
||||
public func start() async throws {
|
||||
try await self.startSuperClient()
|
||||
try await self.startUDPHole()
|
||||
self.noticeClient.start()
|
||||
@ -350,7 +350,7 @@ public class SDLContext: @unchecked Sendable {
|
||||
}
|
||||
|
||||
// 流量统计
|
||||
func flowReportTask() {
|
||||
public func flowReportTask() {
|
||||
Task {
|
||||
// 每分钟汇报一次
|
||||
self.flowTracerCancel = Timer.publish(every: 60.0, on: .main, in: .common).autoconnect()
|
||||
@ -506,7 +506,7 @@ public class SDLContext: @unchecked Sendable {
|
||||
|
||||
extension SDLContext {
|
||||
|
||||
static func getUUID() -> String {
|
||||
public static func getUUID() -> String {
|
||||
let userDefaults = UserDefaults.standard
|
||||
if let uuid = userDefaults.value(forKey: "gClientId") as? String {
|
||||
return uuid
|
||||
@ -519,7 +519,7 @@ extension SDLContext {
|
||||
}
|
||||
|
||||
// 获取mac地址
|
||||
static func getMacAddress() -> Data {
|
||||
public static func getMacAddress() -> Data {
|
||||
let key = "gMacAddress2"
|
||||
|
||||
let userDefaults = UserDefaults.standard
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user