infra dns for http requests

This commit is contained in:
trigger
2025-07-27 17:47:36 -07:00
parent cab8533bda
commit 787cd9b119
5 changed files with 63 additions and 63 deletions
+4 -1
View File
@@ -18,6 +18,7 @@
#include "Common/Data/Encoding/Compression.h"
#include "Common/Net/NetBuffer.h"
#include "Common/Log.h"
#include "Core/HLE/sceNet.h"
namespace net {
@@ -63,8 +64,10 @@ bool Connection::Resolve(const char *host, int port, DNSType type) {
char port_str[16];
snprintf(port_str, sizeof(port_str), "%d", port);
std::string processedHostname = ProcessHostnameWithInfraDNS(std::string(host));
std::string err;
if (!net::DNSResolve(host, port_str, &resolved_, err, type)) {
if (!net::DNSResolve(processedHostname.c_str(), port_str, &resolved_, err, type)) {
WARN_LOG(Log::IO, "Failed to resolve host '%s': '%s' (%s)", host, err.c_str(), DNSTypeAsString(type));
// Zero port so that future calls fail.
port_ = 0;