Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This code provides a basis for mapping IP addresses (so far, only really tested with IPv4, but I think that IPv6 may also work).
See #23
This implementation establishes a new subsystem "rdns" (for reverse dns), which can be configured with a path to a fifo. Supplying "ad.dr.e.ss hostname" entries (one per line) will populate a hashtable, from which these mappings can subsequently be looked up by e.g. http-connect.c (or the socksX.c files, but this will require more sophisticated coding to create the appropriate socks messages with hostnames rather than addresses).
The implementation in http-connect has been omitted, as it is not clear to me how to establish a link between the rdns subsystem and the redsocks subsystem to allow calls to get_hostname_for_addr(). Advice on this would be appreciated.