Skip to content

Support Unix sockets in hostfwd

Nicholas Ngai requested to merge nicholasngai/libslirp:hostfwd-unix into master

QEMU has an issue open (https://gitlab.com/qemu-project/qemu/-/issues/347) to forward a Unix domain socket to guest TCP port. Both of these protocols support stream modes of operation (and user-mode networking can only access the stream anyway), so this patch enables Unix-to-TCP hostfwds.

Like with localhost hostfwds, the sotranslate_accept function will translate a Unix domain socket connection to a TCP connection originating from vhost_addr and a randomized ephemeral port.

Merge request reports