这应该可以解决问题:
URL url = new URL(yourUrlHere);Proxy proxy = new Proxy(Proxy.Type.DIRECT, new InetSocketAddress( InetAddress.getByAddress( new byte[]{your, ip, interface, here}), yourTcpPortHere));URLConnection conn = url.openConnection(proxy);您完成了。不要忘记很好地处理异常,当然,请更改值以适合您的情况。
嗯,我省略了导入语句



