/etc/hosts for single process
It is pissible to intercept most calls to libc with a creative usage of LD_PRELOAD and RTLD_NEXT. Google these strings, there's a lot of info out there. Intercept calls to open
, substitute your own file for /etc/hosts
. It should work.