UDP communication through proxy
Hello,
I've been struggling for hours now trying to work out how to use UDP communication through a proxy. It took me quite a bit of work to get it working for HTTP, but it's working fine now.
I'm trying to use the DatagramSocket class and there's no option to use a proxy anywhere. I tried setting the proxy globally by doing:
properties.put("proxyHost", "proxyAddress");
properties.put("proxyPort", "proxyPOrt");
properties.put("proxySet", "true");
but it doesn't work. I get errors on name resolution when I try to connect.
I'm looking for a global (programmatical) way to set up the proxy, so that I can use the InetAddress too to get IP addresses and such.
Cheers.
[730 byte] By [
R4cOOna] at [2007-11-27 3:41:50]

# 1
> properties.put("proxyHost", "proxyAddress");
> properties.put("proxyPort", "proxyPort");
Those two properties are just equivalents for http.proxyHost/proxyPort. They come from the defunct HotJavaBean (1997-8) and somehow leaked into the JDK, maybe because books of the era mistakenly documented them as part of the JDK, or maybe because part of the HJB implementation leaked into Java.
> properties.put("proxySet", "true");
That property has never done anything in the JDK. It did something in the HJB which is no longer with us ...
There is no support for UDP proxying in Java.
> but it doesn't work. I get errors on name resolution
> when I try to connect.
That's a DNS topology issue, nothing to do with proxying really.
ejpa at 2007-7-12 8:45:23 >
