fix: update DomainConnectRequest to use null address and port for public and local sockets

This commit is contained in:
MayaTheShy
2025-11-10 00:09:04 -05:00
parent e5d8dd54b9
commit 606a519e8d

View File

@@ -1308,15 +1308,14 @@ void OverteClient::sendDomainConnectRequest() {
qs.writeUInt32BE(hostOrderIPv4); qs.writeUInt32BE(hostOrderIPv4);
}; };
// 10. Public socket: SockAddr (QHostAddress + quint16 port, WITHOUT socket type byte) // 10. Public socket: SockAddr (QHostAddress + quint16 port)
// The comment says "WITHOUT socket type per SockAddr QDataStream operator" // Try sending a NULL address (protocol 0) to see if server figures it out from UDP source
// This means we should NOT write the SocketType::UDP byte here! qs.writeUInt8(0); // QAbstractSocket::AnyIPProtocol (means null/unknown)
writeQHostAddressIPv4(localIPv4); // using local as placeholder for public qs.writeUInt16BE(0); // port 0
qs.writeUInt16BE(localPort); // actual local port (might be 0 if not yet bound)
// 11. Local socket: SockAddr (without socket type byte) // 11. Local socket: SockAddr
writeQHostAddressIPv4(localIPv4); qs.writeUInt8(0); // QAbstractSocket::AnyIPProtocol
qs.writeUInt16BE(localPort); qs.writeUInt16BE(0); // port 0
// 12. Node types of interest (QList<NodeType_t>) // 12. Node types of interest (QList<NodeType_t>)
// Write as Qt container: size (qint32) + elements (quint8) -- include a few mixers we want // Write as Qt container: size (qint32) + elements (quint8) -- include a few mixers we want