yrutschle/sslh — pull request #26 by rvstaveren (2014-07-24 18:17:45+00:00)
Title: Transparant proxy support for FreeBSD

Changes to support transparant proxying under FreeBSD. Developed/tested on FreeBSD10, will work on others versions as long as IP_BINDANY / IPV6_BINDANY defines are present.

Due to separate v4/v6 handling some extra code is needed to make sure both connections use the same address family (you're expecting a v6 endpoint on your v6 socket etc)

I am not following CHECK_RES_DIE(res, "setsockopt"); as if that option doesn't work it will fail on the bind later on anyway.

Tested original Linux transparent proxy capability on Ubuntu 14.04 LTS, still connects