问题描述:

I'm trying to force my Java applet's HTTP network traffic through Fiddler, and I'm not having any luck. Fiddler is running on my localhost on port 8888, and so I have set these values in my applet:

System.getProperties().put("proxyHost", "localhost");

System.getProperties().put("proxyPort", "8888");

When I do this, I get the following exception in the Java Console as soon as I try to create a socket:

java.net.SocketException: Unknown proxy type : HTTP

According to Java bug 6370908, the HTTP proxy type is not supported by the socket class. So my question is, how can I drive my socket traffic through Fiddler? If it cannot be done, is there some other network monitoring tool that will allow me to see the traffic? I'm not a networking expert, so maybe I'm missing something simple here.

I should also note that running directly from Eclipse doesn't seem possible, since my applet is expecting various HTML page elements to be present.

网友答案:

I don't know if it's possible using Fiddler but you could give Wireshark a try.

网友答案:

Try to check Java Networking Settings in Java Control Panel. Switching from "Direct connection" to "Use browser settings" have helped me.
Go Control Panel -> Java -> General -> Network Settings and select "Use browser settings".

网友答案:

Java Networking Settings in Java Control Panel worked for me however make sure you use your machine external ip address rather than localhost or 127.0.0.1.

相关阅读:
Top