A colleague was coding a Chrome extension and was tired of constantly changing his hosts file to switch between production and localhost DNS resolution for a particular domain from which the extension loaded some assets.
For example, lets proxy domain overide-me.com to IP address 126.96.36.199:
# Start proxy listening on 127.0.0.1:9000 to route requests to \ # domain "overide-me.com" to IP "188.8.131.52" instead of DNS' address socks5map -l 127.0.0.1:9000 -r overide-me.com:184.108.40.206
Then in another console you use cURL:
# This request will be routed to server at IP set \ # in socks5map (eg. 220.127.116.11) curl --socks5-hostname 127.0.0.1:9000 \ http://overide-me.com/resource/path