This commit is contained in:
anlicheng 2026-02-03 13:06:58 +08:00
parent 57dd0d9538
commit 2f9920ad6d
2 changed files with 56 additions and 4 deletions

View File

@ -51,14 +51,25 @@ struct SDLV6Info: @unchecked Sendable {
init() {}
}
/// token,
/// (access_token)
struct SDLEmpty: Sendable {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
var pktID: UInt32 = 0
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
}
/// ,
struct SDLRegisterSuper: @unchecked Sendable {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.
/// 4pktId
var pktID: UInt32 = 0
var clientID: String = String()
@ -75,6 +86,8 @@ struct SDLRegisterSuper: @unchecked Sendable {
var pubKey: String = String()
/// 使httptoken, access_token;
/// RegisterSuper (access_token)
var accessToken: String = String()
var unknownFields = SwiftProtobuf.UnknownStorage()
@ -82,7 +95,6 @@ struct SDLRegisterSuper: @unchecked Sendable {
init() {}
}
/// udp: session_token
struct SDLRegisterSuperAck: @unchecked Sendable {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
@ -92,6 +104,8 @@ struct SDLRegisterSuperAck: @unchecked Sendable {
var aesKey: Data = Data()
/// session_token; session_token
/// SDLQueryInfoSDLStunRequest, SDLData, SDLArpRequestsession_token(SDLData)
var sessionToken: Data = Data()
var unknownFields = SwiftProtobuf.UnknownStorage()
@ -207,6 +221,7 @@ struct SDLNatChangedEvent: @unchecked Sendable {
}
/// Endpoints
/// udp线SDLStunRequest
struct SDLDropMacsEvent: @unchecked Sendable {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
@ -222,6 +237,7 @@ struct SDLDropMacsEvent: @unchecked Sendable {
}
///
/// 线(SDLRegisterSuper)
struct SDLRefreshAuthEvent: Sendable {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
@ -332,6 +348,8 @@ struct SDLData: @unchecked Sendable {
var sessionToken: Data = Data()
/// https
///
var identityID: UInt32 = 0
var unknownFields = SwiftProtobuf.UnknownStorage()
@ -405,6 +423,8 @@ struct SDLStunProbeReply: Sendable {
init() {}
}
/// ARP
/// arp广macostunarpmacip广
struct SDLArpRequest: @unchecked Sendable {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
@ -521,6 +541,38 @@ extension SDLV6Info: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementation
}
}
extension SDLEmpty: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
static let protoMessageName: String = "SDLEmpty"
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .standard(proto: "pkt_id"),
]
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch fieldNumber {
case 1: try { try decoder.decodeSingularUInt32Field(value: &self.pktID) }()
default: break
}
}
}
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
if self.pktID != 0 {
try visitor.visitSingularUInt32Field(value: self.pktID, fieldNumber: 1)
}
try unknownFields.traverse(visitor: &visitor)
}
static func ==(lhs: SDLEmpty, rhs: SDLEmpty) -> Bool {
if lhs.pktID != rhs.pktID {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
}
extension SDLRegisterSuper: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
static let protoMessageName: String = "SDLRegisterSuper"
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [

View File

@ -50,7 +50,7 @@ final class SDLTunnelProviderAdapter {
// Add code here to start the process of connecting the tunnel.
let networkSettings = NEPacketTunnelNetworkSettings(tunnelRemoteAddress: "8.8.8.8")
networkSettings.mtu = 1460
networkSettings.mtu = 1250
// DNS