basing on demain to switch the proxy