ruby / resolv

A thread-aware DNS resolver library written in Ruby
Other
37 stars 29 forks source link

Adding query source IP bindhost config params #4

Open astounding opened 3 years ago

astounding commented 3 years ago

Adding config params :bindhost and :bindhost6 to allow specifying IPv4 and IPv6 (respectively) IPs for outbound query UDP and TCP sockets to bind to when desired on hosts with multiple IP addresses. This is only LIGHTLY tested and has worked for me. I do NOT know if this is the preferred method for controlling the source IP for outbound queries, but it does what I need.

This addresses my question posted here: https://github.com/ruby/resolv/issues/3