mirror of
https://github.com/rofl0r/proxychains-ng
synced 2025-01-06 21:02:55 +08:00
Compare commits
3 Commits
338d829256
...
457e682491
Author | SHA1 | Date | |
---|---|---|---|
|
457e682491 | ||
|
fffd2532ad | ||
|
3ab15aa05c |
@ -103,7 +103,7 @@ typedef int (*close_t)(int);
|
|||||||
typedef int (*close_range_t)(unsigned, unsigned, int);
|
typedef int (*close_range_t)(unsigned, unsigned, int);
|
||||||
typedef int (*connect_t)(int, const struct sockaddr *, socklen_t);
|
typedef int (*connect_t)(int, const struct sockaddr *, socklen_t);
|
||||||
typedef struct hostent* (*gethostbyname_t)(const char *);
|
typedef struct hostent* (*gethostbyname_t)(const char *);
|
||||||
typedef int (*freeaddrinfo_t)(struct addrinfo *);
|
typedef void (*freeaddrinfo_t)(struct addrinfo *);
|
||||||
typedef struct hostent *(*gethostbyaddr_t) (const void *, socklen_t, int);
|
typedef struct hostent *(*gethostbyaddr_t) (const void *, socklen_t, int);
|
||||||
|
|
||||||
typedef int (*getaddrinfo_t)(const char *, const char *, const struct addrinfo *,
|
typedef int (*getaddrinfo_t)(const char *, const char *, const struct addrinfo *,
|
||||||
|
@ -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)
|
if((p_addr_in->s_addr ^ localnet_addr[i].in_addr.s_addr) & localnet_addr[i].in_mask.s_addr)
|
||||||
continue;
|
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");
|
PDEBUG("accessing localnet using true_connect\n");
|
||||||
return true_connect(sock, addr, len);
|
return true_connect(sock, addr, len);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user