Quantcast
Channel: web development helpdesk » proxy
Browsing latest articles
Browse All 9 View Live

How do I specify a SOCKS proxy using Java?

You can use the system properties socksProxyHost and socksProxyPort to specify a SOCKS proxy to use for all connections. eg. java -DsocksProxyHost=socks.objects.com -DsocksProxyPort=88 MyApp

View Article



How do I specify a different HTTP proxy for each connection?

The Proxy class can be used specify proxy details at the connection level. SocketAddress addr = new InetSocketAddress("proxy.objects.com", 88); Proxy proxy = new Proxy(Proxy.Type.HTTP, addr); URL url =...

View Article

How do I specify a different SOCKS proxy for each connection?

The Proxy class can be used specify proxy details at the connection level. SocketAddress addr = new InetSocketAddress("proxy.objects.com", 88); Proxy proxy = new Proxy(Proxy.Type.SOCKS, addr); URL url...

View Article

How to tell a Java application to use a proxy server?

Set the following system properties http.proxyHost http.proxyPort java -Dhttp.proxyHost=proxy.objects.com.au -Dhttp.proxyPort=8080 au.com.objects.MyApplication To do the same programatically use the...

View Article

How to specify a proxy server when using ftp protocol?

Set the following system properties ftp.proxyHost ftp.proxyPort java -Dftp.proxyHost=proxy.objects.com.au -Dftp.proxyPort=80 au.com.objects.MyApplication To do the same programatically use the System...

View Article


How to specify authentication details for proxy server?

You need to set the “Proxy-Authorization” request property. URLConnection connection = url.openConnection(); String authentication = username"+":"+password; String encodedAuthentication =...

View Article

How to find the actual Object being proxied by HibernateProxy?

The underlying Object can be found using the LazyInitializer instance available from the proxy. HibernateProxy proxy = (HibernateProxy) o; Object actual =...

View Article

Is the proxySet system property required to use a proxy server?

No, it has not been used since Java 1.1. The presence of proxyHost system property is used to determine whether to use a proxy or not.

View Article


How to get HttpClient to use a proxy server?

HttpClient does not use the standard Java system properties for specifying proxy details. Specifying the proxy details when using HttpClient is achieved using the host configuration of the client as...

View Article

Browsing latest articles
Browse All 9 View Live




Latest Images