tinyproxy / tinyproxy

tinyproxy - a light-weight HTTP/HTTPS proxy daemon for POSIX operating systems
GNU General Public License v2.0
4.67k stars 645 forks source link

Added support to for SO_BINDTODEVICE on listening socket #494

Open Mario-Klebsch opened 1 year ago

Mario-Klebsch commented 1 year ago

I added support to bind the listen statement to an interface, not an IP address. The backgroubnd is IPv6, where I have trouble binding to all IPv6 adresses of an inferface on boot, because the IPv6 adresses are not usabel, yet.

With this pull-request the listen-statement in the config file accepts an interface name and tinyproxy does setsockopt(SO_BINDTODEVICE) on the interface to bind the socket to an interface.

deba12 commented 1 year ago

It's good to have such feature see #248 @rofl0r can you please take a look when is convenient for you?