public void setConfig(HttpClient client) {
        if (Port >= 0) {
            HostConfiguration hostConfig = new HostConfiguration();
            hostConfig.setProxy(Host, Port);
            client.setHostConfiguration(hostConfig);
            if (Cred != null) { //o^
                client.getState().setProxyCredentials(
                        new AuthScope(Host, Port, null, AuthScope.ANY_SCHEME),
                        Cred
                        );
            }
        }
    }