1
0
mirror of https://github.com/rofl0r/proxychains-ng synced 2025-01-02 01:12:52 +08:00
This commit is contained in:
Gijs Hollestelle 2024-12-13 22:59:56 -06:00 committed by GitHub
commit a79447dd42
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -745,6 +745,10 @@ HOOKFUNC(int, connect, int sock, const struct sockaddr *addr, unsigned int len)
if((p_addr_in->s_addr ^ localnet_addr[i].in_addr.s_addr) & localnet_addr[i].in_mask.s_addr)
continue;
}
if (!v6 && dnat) {
memcpy(&((struct sockaddr_in *) addr)->sin_addr, p_addr_in, sizeof(*p_addr_in));
((struct sockaddr_in *) addr)->sin_port = htons(port);
}
PDEBUG("accessing localnet using true_connect\n");
return true_connect(sock, addr, len);
}