jshell> byte[] bytes = new byte[] {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}
bytes ==> byte[16] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 }
jshell> var proxyAddress = new InetSocketAddress(InetAddress.getByAddress(bytes), 8888)
proxyAddress ==> /0:0:0:0:0:0:0:1:8888
jshell> var endpointAddress = new InetSocketAddress(InetAddress.getByAddress(bytes), 9999)
endpointAddress ==> /0:0:0:0:0:0:0:1:9999
jshell> var proxy = new Proxy(Proxy.Type.HTTP, proxyAddress)
proxy ==> HTTP @ /0:0:0:0:0:0:0:1:8888
jshell> var socket = new Socket(proxy)
socket ==> Socket[unconnected]
jshell> socket.connect(endpointAddress)
| Exception java.net.MalformedURLException: Error at index 1 in: "0:0:0:0:0:0:1:9999"
| at URL.<init> (URL.java:684)
| at URL.<init> (URL.java:546)
| at URL.<init> (URL.java:493)
| at HttpConnectSocketImpl.doTunnel (HttpConnectSocketImpl.java:163)
| at HttpConnectSocketImpl$2.run (HttpConnectSocketImpl.java:151)
| at HttpConnectSocketImpl$2.run (HttpConnectSocketImpl.java:149)
| at AccessController.doPrivileged (AccessController.java:553)
| at HttpConnectSocketImpl.privilegedDoTunnel (HttpConnectSocketImpl.java:148)
| at HttpConnectSocketImpl.connect (HttpConnectSocketImpl.java:111)
| at Socket.connect (Socket.java:589)
| at Socket.connect (Socket.java:538)
| at (#6:1)
| Caused by: java.lang.NumberFormatException: Error at index 1 in: "0:0:0:0:0:0:1:9999"
| at NumberFormatException.forCharSequence (NumberFormatException.java:84)
| at Integer.parseInt (Integer.java:741)
| at URLStreamHandler.parseURL (URLStreamHandler.java:223)
| at URL.<init> (URL.java:679)
| ...