System Settings are not designed to be reset during a session. The change won't take effect until after the current user is gone, so I don't think a System Settings is a good choice for what you're doing.
You could use a $_SESSION variable, but that would be kind of silly since anywhere it would be available, $SERVER['http_host'] would also be available.
How to handle this depends partly on what you need to do with the http_host information.
I think your best might be a simple snippet that returns a string based on the http_host setting:
$output = 'other'
if ($_SERVER['http_host'] =='yyyy.ru') {
$output = 'domain1';
} elseif ($_SERVER['http_host'] === 'xxxx.ru') {
$output = 'domain1';
}
return $output;
Shorter version:
return $_SERVER['http_host'] === 'yyyy.ru'? 'domain1' : $_SERVER['http_host'] === 'xxxx.ru'? 'domain2' : 'other';