mirror of
https://github.com/rofl0r/proxychains-ng.git
synced 2024-11-17 21:48:52 +00:00
af5c6f0c6a
the central dns resolver function proxy_gethostbyname() used to iterate over the gethostent() db (/etc/hosts) on each dns request. since this is not threadsafe, we synchronized access to it previously using mutexes. the parsing of this file is slow, and blocking all threads to do it even moreso. since gethostent_r() is only available on a few platforms, i decided to read the hostent db once and then use a quick in-memory lookup on further usage. + some further refactoring. |
||
---|---|---|
.. | ||
test_getaddrinfo.c | ||
test_gethostent_r.c | ||
test_gethostent.c | ||
test_proxy_gethostbyname.c | ||
test_shm.c |