moon wrote:
> Hi Reader
>
> Below java program work on Proxy server before. Now, Our compary change
> using "Automatic configuration script" to connect internet. Now, I want to
> know how to change the java program ?
>
> the setup changed to ip address:8081/pixs.pac
>
> /* Environment variable set to
> * CLASSPATH=c:\j2sdk1.4.1_01\lib\classes.zip;c:\exam ple;.
> *
> */
>
> import java.util.*;
> import java.io.*;
> import java.net.*;
>
> public class eproxy_kgi {
> public static void main(String[] args) {
> Properties prop = System.getProperties();
> String myproxy = "xx.xx.xx.xx";
> prop.put("http.proxyHost",myproxy);
> prop.put("http.proxyPort","8081/pixs.pac");
Read the proxy.pac script into your browser and take a look at it. It
shold be easy to understand. It usually consists of a function which
returns the name of the proxy server depending on the URL. You can see
what proxy server name you need to code into your java, or how to make
the decision about which proxy server to use.
|