]> git.ipfire.org Git - thirdparty/bind9.git/commit
PROXY Stream transport
authorArtem Boldariev <artem@boldariev.com>
Thu, 16 Mar 2023 10:50:04 +0000 (12:50 +0200)
committerArtem Boldariev <artem@boldariev.com>
Wed, 6 Dec 2023 13:15:24 +0000 (15:15 +0200)
commitd119d666b3e694e532f287424516715d47a1ec79
tree5cc42101f4d842ba9c02a7bfe4da06c9894bf981
parent7d9a8ddc00a0e53b4a52a64b92a5c8b0fdf7d068
PROXY Stream transport

This commit adds a new stream-based transport with an interface
compatible with TCP. The transport is built on top of TCP transport
and the new PROXYv2 handling code. Despite being built on top of TCP,
it can be easily extended to work on top of any TCP-like stream-based
transport. The intention of having this transport is to add PROXYv2
support into all existing stream-based DNS transport (DNS over TCP,
DNS over TLS, DNS over HTTP) by making the work on top of this new
transport.

The idea behind the transport is simple after accepting the connection
or connecting to a remote server it enters PROXYv2 handling mode: that
is, it either attempts to read (when accepting the connection) or send
(when establishing a connection) a PROXYv2 header. After that it works
like a mere wrapper on top of the underlying stream-based
transport (TCP).
lib/isc/Makefile.am
lib/isc/include/isc/netmgr.h
lib/isc/include/isc/types.h
lib/isc/netmgr/netmgr-int.h
lib/isc/netmgr/netmgr.c
lib/isc/netmgr/proxystream.c [new file with mode: 0644]