I guess this is convenient for people making Applets - although Applets are generally a bad idea :-)
Nick, can we adopt this piece of code under the Apache License?
We should think about pac-proxy script parsing as well at some point.
Odi
Nick Coleman wrote:
We detect the browser proxy settings as follows: // Retrieve Proxy Server Settings from System if specified String proxyList = System.getProperty("javaplugin.proxy.config.list"); if (proxyList!=null && !"".equals(proxyList)){ StringTokenizer tokenizer1 = new StringTokenizer(proxyList, ";,"); if (tokenizer1.countTokens()>1){ while (tokenizer1.hasMoreTokens()){ String s = tokenizer1.nextToken(); if (s.toLowerCase().startsWith("http")){ StringTokenizer tokenizer2 = new StringTokenizer(s, "=:"); tokenizer2.nextToken(); proxyHost = tokenizer2.nextToken(); proxyPort = Integer.parseInt(tokenizer2.nextToken()); } } } else { StringTokenizer tokenizer = new StringTokenizer(proxyList, ":"); proxyHost = tokenizer.nextToken(); proxyPort = Integer.parseInt(tokenizer.nextToken()); } }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]