That's not at all a C# problem.
A possible solution is a proxy server, with user authentication. Then the proxy server can be configured in the desired way.
A simpler solution is a proxy configuration script, typically "proxy.pac". When the browser is configured to take that script from a user-specific location, you can get the desired effect.
The proxy.pac script looks something like
function FindProxyForURL(url, host)
{
if (dnsDomainIs(host, ".facebook.com")) {
return "PROXY 127.0.0.1:80";
}
else {
return "DIRECT";
}
}