简体   繁体   English

java tcp ip 套接字编程与代理类型无关

[英]java tcp ip socket programming regardless of proxy type

How to write TCP IP socket programming in java.如何在 java 中编写 TCP IP 套接字编程。 If the client is behind any type of proxy (may be http or socks or no proxy).如果客户端使用任何类型的代理(可能是 http 或 socks 或无代理)。

Thanks Bapi谢谢巴皮

When I faced such kind of problem I had to code myself http layer (over HTTP CONNECT) and used existing (in standard library) socks layer.当我遇到此类问题时,我不得不自己编写 http 层(在 HTTP CONNECT 之上)并使用现有的(在标准库中)袜子层。 However the main problem is to get the proxy settings.然而,主要问题是获取代理设置。 As far as I was doing it for a Web Start application, I could use default browser settings.就我为 Web Start 应用程序执行此操作而言,我可以使用默认浏览器设置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM