fix: update sendDomainConnectRequest to use actual IPv4 address and port for public and local sockets

This commit is contained in:
MayaTheShy
2025-11-10 00:15:20 -05:00
parent b7f25640ab
commit 007dde4670

View File

@@ -1309,13 +1309,13 @@ void OverteClient::sendDomainConnectRequest() {
}; };
// 10. Public socket: SockAddr (QHostAddress + quint16 port) // 10. Public socket: SockAddr (QHostAddress + quint16 port)
// Try sending a NULL address (protocol 0) to see if server figures it out from UDP source // Write the actual IPv4 address and port
qs.writeUInt8(0); // QAbstractSocket::AnyIPProtocol (means null/unknown) writeQHostAddressIPv4(localIPv4);
qs.writeUInt16BE(0); // port 0 qs.writeUInt16BE(localPort);
// 11. Local socket: SockAddr // 11. Local socket: SockAddr
qs.writeUInt8(0); // QAbstractSocket::AnyIPProtocol writeQHostAddressIPv4(localIPv4);
qs.writeUInt16BE(0); // port 0 qs.writeUInt16BE(localPort);
// 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