domain name resolution

  • kestasjk

    kestasjk - 2005-03-12

    Is there any chance of getting tsocks to do domain name resolution on the server side? This is a must-have for those of us without DNS servers on the internet gateway machine. Thanks,

    • Lindberg G Williams Jr

      The approach I have opted to take is to spoof gethostbyname, gethostbyname2, gethostbyname_r, gethostbyname2_r, and getaddrinfo in a similar way that TSOCKS uses connect, select, poll, close, and res_init to intercept library calls so named. I am not exactly sure how to become a contributor to TSOCKS  or if I should even bother for that matter, so I am considering just leading a project of my own. We will see. You can use the above name resolution calls to return "dummy" IPv4 addresses per name to calling processes, and then when a connect to one of these unique dummy addresses occurs, the TSOCKS library will know what hostname to send to the SOCKS 4a server or SOCKS 5 server as a request. A notable issue with this is that of clients that maintain host keys like OpenSSH, but it's probably not a big deal. IPv4 addresses above are "reserved" and often cannot (will not) be routed.

      I am not sure what do to about the POSIX getaddrinfo_a at the moment but it is on my mind. I have never seen an application that uses it.


Log in to post a comment.