Help with static IP

msuri1975
I am running my code in my local computer. I use Jio broadband.
I bought a static IP from app.proxy-cheap.com

When I try to use, I get error :

Error while fetching profile name Failed to authenticate with proxy
java.io.IOException: Failed to authenticate with proxy

From below code


System.setProperty("http.proxyUser", proxyUser);
System.setProperty("http.proxyPassword", proxyPassword);
System.setProperty("https.proxyUser", proxyUser);
System.setProperty("https.proxyPassword", proxyPassword);

Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(proxyUser, proxyPassword.toCharArray());
}
});
Proxy tradingProxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(staticIP, port));

// 2. Pass it to your KiteConnect instance
kc = new KiteConnect((String)mapUser.get("APIKEY"), tradingProxy, false);
try {
System.out.println("iiiiii----- "+kc.getProfile().userName);
} catch (Exception e) {
System.out.println("Error while fetching profile name " + e.getMessage());
}


Error while fetching profile name Failed to authenticate with proxy
java.io.IOException: Failed to authenticate with proxy

Can any one help me to fix it.
Thanks in advance
Tagged:
  • msuri1975
    pls ignore... google AI gave me complex answer to purchase a static ip and use it as proxy... To solve this all I had to do was to get my IP from website "whatismyipaddress.com" and whitelist it in user profile
Sign In or Register to comment.