> Wouldn't it be problematic to make 100% sure that certain applications
> only use this special interface, and doesn't ever "leak over" to the
> "normal" interface sometimes? This must never be allowed to happen of
> course.
Good point.
After some consideration...
I think there is such a variety of existing IP applications that we
can't
actually anticipate the operational requirements of each... it's quite
an
ambitious goal to have any arbitrary application 'just work' on
phantom
and never have any cross-over (with regards to stored data, caches,
program state, or whatever).
Take the case of some applications that require resolution of a
particular domain name in order to function (localhost, software
update servers, commercial software auth servers, etc.).
Forcing such applications on to phantom from some lower level
as you suggest could be difficult or impossible to do automatically
while retaining functionality, since there will be issues (eg: name
resolution for an auth server would fail entirely and the program
would fail to start.).
The case of localhost is interesting too, since most servers
will default to wanting access to localhost/
127.0.0.1 and may
sometimes either:
1. Provide a potential leak opportunity via the local host,
via arbitrary program state (very hard to assume on a
generic level of 'all IPv4 software ever written'), or
any network-related caches (same).
2. Fail entirely.
I'm not sure at what level of which operating system you suggest
fiddling with sockets or whatever... but to be honest I think this
approach is doomed to be painful and not 100% reliable due to
the variety of software that is out there, plus the mix of OSs.
Of course if there's some hack you could do to make certain
applications think that they were binding or connecting to
127.0.0.1 but actually connect to
127.<random-phantom-specific-prefix>.0.1, for example, then
that'd be great ... but the difficulties of implementing such
hacks with reliability on a wide variety of operating systems
may be(?) significant (to be honest I don't really know, I
don't write software at this level - it's just my gut feeling).
For a base requirement for most applications (point to point
communications over TCP, such as FTP/HTTP/SMTP, and
point to point communications over UDP, such as VOIP)
then I think the approach suggested would be reliable and
easy enough to implement on a range of platforms. And
for the more complex / interesting / popular case of web
browsing, the proxy/nameserver/plugin combo would
definitely work - provided that the browser actually did
use the proxy for every single connection (I'm not sure
how browsers are written, but I suspect this may not
be a 100% valid assumption.).
We probably can't get away from requiring
program-specific reconfiguration to use non-routable
(eg: 127.x.x.x) IPs that are mapped to APs and go
out through a phantom TUN/TAP interface once
people actually want to run services on the network.
The 'per program switch' concept is still a good idea for
implementing phantom (dis)connection for simplistic
non-browser programs. Particularly if there's some
way that the pipe backend to the nameserver
(eg: PowerDNS) is able to ascertain which program has
queried it, then it probably wouldn't be all that hard to
implement. (But there's probably still detail issues with
multi-process daemons... eg: many SMTP daemons)
How would a per-program switch work? One of those
preload library tricks would do it under Linux, though
I'm not sure how this carries over to OSX or 'doze.
Argh.
Perhaps it's just a fact of life that a perfectly simple
'click this button to phantomise this entire application'
concept cannot easily easily be realised, and the most
that is easily possible is to make that happen for most
(ie: simpler) programs. Later, we could bundle drop-in
configurations (with auto-detection routines) to handle
the case of more common software that cannot be
handled by the most simplistic changes (eg: daemons
that are not single process, commercial software
requiring auth servers that needs particular domain
names resolved - even responses spoofed, etc.).
Anyway I don't know the answers.
Just thinking out loud! :)
- Walter