This is a WIP branch to implement support for Mac OS X, which in theory should work since it has a similar mechanism (DYLD_INSERT_LIBRARIES) to LD_PRELOAD on GNU/Linux.
Fundamental issues:
[ ] Find a way to handle PID/GID in LOCAL_PEERCRED. It seems that there is only xucred.cr_uid, but in order to provide fake client IPs we need at least the peer PID to properly distinguish the individual peers.
[x] We can't use std::filesystem yet, because Ubuntu 18.04 is still using GCC 7. Find a less ugly way to get_current_dir_name in a cross-platform way. According to https://ubuntu.com/18-04, the standard support has expired on 31 May 2023.
This is a WIP branch to implement support for Mac OS X, which in theory should work since it has a similar mechanism (
DYLD_INSERT_LIBRARIES
) toLD_PRELOAD
on GNU/Linux.Fundamental issues:
LOCAL_PEERCRED
. It seems that there is onlyxucred.cr_uid
, but in order to provide fake client IPs we need at least the peer PID to properly distinguish the individual peers.We can't useAccording to https://ubuntu.com/18-04, the standard support has expired on 31 May 2023.std::filesystem
yet, because Ubuntu 18.04 is still using GCC 7. Find a less ugly way toget_current_dir_name
in a cross-platform way.