punchnet-macos/punchnet/Core/SystemConfig.swift
2025-08-27 19:11:22 +08:00

48 lines
1.2 KiB
Swift

//
// SystemConfig.swift
// sdlan
//
// Created by on 2024/6/3.
//
import Foundation
struct SystemConfig {
//
static let version = 1
static let version_name = "1.1"
//
static let installedChannel = "MacAppStore"
// super
//static let superHost = "118.178.229.213"
static let superHost = "punchnet.aioe.tech"
static let superPort = 18083
// stun
static let stunServers = "118.178.229.213:1265,1266;118.178.229.213:1265,1266"
static func getOptions(token: String, noticePort: Int) -> [String:NSObject]? {
guard let superIp = DNSResolver.resolveAddrInfos(superHost).first else {
return nil
}
let options = [
"version:": version as NSObject,
"installed_channel": installedChannel as NSObject,
"token": token as NSObject,
"super_ip": "118.178.229.213" as NSObject,
"super_port": superPort as NSObject,
"stun_servers": stunServers as NSObject,
"notice_port": noticePort as NSObject
]
print("options: \(options)")
return options
}
}