It looks like you're new here. If you want to get involved, click one of these buttons!
"com.neovisionaries.ws.client.HostnameUnverifiedException: The certificate of the peer does not match the expected hostname (ws.kite.trade)".I am setting the right proxy and port using below code. Please note: In my system Windows 7 Enterprise 64 bit, the proxy setting is through a PAC file and it resolves to "dummyproxy.net" and that is what I am setting in the code.
InetSocketAddress proxyAddress = new InetSocketAddress("dummyproxy.net", 8080);
Proxy systemProxy = new Proxy(Proxy.Type.HTTP, proxyAddress);
kiteConnect.setProxy(systemProxy);
Logs
com.neovisionaries.ws.client.HostnameUnverifiedException: The certificate of the peer does not match the expected hostname (ws.kite.trade)
at com.neovisionaries.ws.client.SocketConnector.verifyHostname(SocketConnector.java:171)
at com.neovisionaries.ws.client.SocketConnector.doConnect(SocketConnector.java:126)
at com.neovisionaries.ws.client.SocketConnector.connect(SocketConnector.java:83)
at com.neovisionaries.ws.client.WebSocket.connect(WebSocket.java:2152)
at com.zerodhatech.ticker.KiteTicker.connect(KiteTicker.java:214)
at Main.main(Main.java:112)
The dummyproxy.net hostname doesn't seem to exist.
The certificate of the peer...does not match he expected hostname
This seems to be the same library that Kite uses for Web Socket connection. The author has added a new method setVerifyHostname by which the verification can be controlled.
I have removed some personal details and token from the logs When the socket connection happens
I think you are looking for a solution like this.
We have missed adding proxy settings to websocket connection. We will add it in the future release. For now, you can fork the javakiteconnect and add proxy settings here.