vjay82 / proxy-vole Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/proxy-vole
License: Other
Automatically exported from code.google.com/p/proxy-vole
License: Other
Introduction: ------------- The intent of this project is to build a framework to detecting the proxy settings used by the current platform. There are multiple strategies available to detect the proxy settings. Proxy Vole will detect proxy settings from: KDE, Gnome, Windows, Firefox, Internet Explorer, ... See java doc for usage examples and API details. There is also a change log in the doc folder. Building -------- The source can be found on the homepage at: http://code.google.com/p/proxy-vole/ An Eclipse project to build the source is included. For windows some native code is used to read the IE proxy configuration. For the windows dll an Visual Studio project is included. There is also an maven build file to create an JAR file for deployment. To build and use the library you will need Java 1.5 or higher. For some features you will need Java 1.6 License: -------- This project is released under BSD license (see LICENSE.txt for details). Have fun - Bernd Rosstauscher
I noticed this while testing on my laptop. It is configured to use a PAC file,
but this file is only available when I am at work on the company network. If I
run from another location where the PAC file is not available, I get an NPE.
The OS will just not use a proxy when the PAC file is not available and I would
expect the same behavior from proxy-vole.
What steps will reproduce the problem?
1) Configure the OS to use a PAC file that is not available.
2) Run the following code:
ProxySearch proxySearch = new ProxySearch();
proxySearch.addStrategy(ProxySearch.Strategy.OS_DEFAULT);
proxySelector = proxySearch.getProxySelector();
What is the expected output? What do you see instead?
I would expect to get a ProxySelector that would always give me Proxy.NO_PROXY.
Instead I get an NPE with the following stack trace:
java.lang.NullPointerException: ProxySelector must not be null.
at com.btr.proxy.selector.whitelist.ProxyBypassListSelector.<init>(ProxyBypassListSelector.java:39)
at com.btr.proxy.selector.whitelist.ProxyBypassListSelector.<init>(ProxyBypassListSelector.java:54)
at com.btr.proxy.search.desktop.osx.OsxProxySearchStrategy.installExceptionList(OsxProxySearchStrategy.java:224)
at com.btr.proxy.search.desktop.osx.OsxProxySearchStrategy.buildSelector(OsxProxySearchStrategy.java:141)
at com.btr.proxy.search.desktop.osx.OsxProxySearchStrategy.getProxySelector(OsxProxySearchStrategy.java:113)
at com.btr.proxy.search.desktop.DesktopProxySearchStrategy.getProxySelector(DesktopProxySearchStrategy.java:34)
at com.btr.proxy.search.ProxySearch.getProxySelector(ProxySearch.java:193)
What version of the product are you using? On what operating system?
proxy-vole 20131209 on Max OSX 10.7.5
Please provide any additional information below.
In OsxProxySearchStrategy.buildSelector, line 138, installPacProxyIfAvailable
is returning a null. This breaks things further down the line when calling
installExceptionList.
Original issue reported on code.google.com by [email protected]
on 9 Mar 2014 at 2:38
We've seen some machines with PAC configuration where the url to the PAC file
is of the form:
file://\\servername\path\to\file.pac
These can't be read because the backslashes are probably not supported by
windows.
Since it's difficult to have control over the machines where the software is
installed, any change of being resilient to this configuration error by
replacing all backslashes with forward slashes in the PAC url?
Original issue reported on code.google.com by [email protected]
on 26 Apr 2013 at 2:58
The code now uses the InetAddress class to handle the parsing. The other
problem, is that the host parameter can be a host name and not an IP address.
Original issue reported on code.google.com by jeff%[email protected]
on 23 Mar 2011 at 4:10
Attachments:
What steps will reproduce the problem?
1. Set system property java.io.tmpdir to a directory which does not exist
2. Run proxy-vole on Windows with the Browser Strategy
3. => Exception occurs because the result from File.listFiles() in
DLLManager.cleanupTempFiles() is not checked for null, but is invoked via
static initializer in Win32ProxyUtils:
java.lang.ExceptionInInitializerError
at ProxySelectorInvalidTempdirTest.testNPEDllLoad(ClientProxySelectorInvalidTempdirTest.java:39)
Caused by: java.lang.RuntimeException: Error loading dllThe system cannot find
the path specified
at com.btr.proxy.search.desktop.win.Win32ProxyUtils.<clinit>(Win32ProxyUtils.java:40)
... 24 more
Caused by: java.io.IOException: The system cannot find the path specified
at java.io.WinNTFileSystem.createFileExclusively(Native Method)
at java.io.File.createNewFile(File.java:1006)
at java.io.File.createTempFile(File.java:1989)
at java.io.File.createTempFile(File.java:2040)
at com.btr.proxy.search.desktop.win.DLLManager.extractToTempFile(DLLManager.java:103)
at com.btr.proxy.search.desktop.win.DLLManager.findLibFile(DLLManager.java:50)
at com.btr.proxy.search.desktop.win.Win32ProxyUtils.<clinit>(Win32ProxyUtils.java:36)
... 24 more
What is the expected output? What do you see instead?
* Proxy vole detects browser settings and does not throw Exceptions
What version of the product are you using? On what operating system?
* last released version, Windows
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 28 Nov 2013 at 3:09
What steps will reproduce the problem?
1. ps.select(new URI("socks://host:port"))
2.
3.
What is the expected output? What do you see instead?
expected: SOCKS proxy see: DIRECT
What version of the product are you using? On what operating system?
latest on Win platform
Please provide any additional information below.
FirefoxProxySearchStrategy => miss socks management
attached corrected version
Original issue reported on code.google.com by [email protected]
on 20 Apr 2011 at 4:03
Attachments:
[deleted issue]
Just started using proxy-vole, its great thanks!
I know this is kind of an annoying suggestion, and you are probably using the
home cooked logging to minimize dependencies. That said,plugging into
somethign many people are using anyway would be awesome :)
thanks again!
Original issue reported on code.google.com by [email protected]
on 19 Jul 2010 at 9:00
What steps will reproduce the problem?
1. setup a proxy in IE, that doesn't exist
2. use proxy vole
3.
What is the expected output? What do you see instead?
- Less LOG output
What version of the product are you using? On what operating system?
- Windows, (latest release) 2012-12-03
Please provide any additional information below.
- If you have a proxy, which I normally have when connected to the Corporate
Network
- proxy-vole writes a lot of output
- So the process can be "aborted" earlier
For example if you get:
- UnknownHostException, get out "early", and use fallback
- If the content of the PAC file is empty, get out "early", and use fallback
I know this is a small enhancement, but I'm always "annoyed" by "unnecessary"
messages in the errorlog file...
"unnecessary" messages, will lead to "cry wolf", and at the end the missing
*real* error messages.
Here is the log output...
-----------------------------
2013-02-07 23:54:04,111 - INFO - checkForUpdates - CheckForUpdates
- com.btr.proxy.selector.pac.JavaxPacScriptParser: JS evaluation
error. Caught: javax.script.ScriptException:
sun.org.mozilla.javascript.internal.EvaluatorException: syntax error (<Unknown
source>#1) in <Unknown source> at line number 1
2013-02-07 23:54:04,111 - INFO - checkForUpdates - CheckForUpdates
- com.btr.proxy.selector.pac.PacProxySelector: PAC resolving
error. Caught: com.btr.proxy.selector.pac.ProxyEvaluationException: Error while
executing PAC script: sun.org.mozilla.javascript.internal.EvaluatorException:
syntax error (<Unknown source>#1) in <Unknown source> at line number 1
2013-02-07 23:54:04,174 - INFO - checkForUpdates - CheckForUpdates
- com.btr.proxy.selector.pac.JavaxPacScriptParser: JS evaluation
error. Caught: javax.script.ScriptException:
sun.org.mozilla.javascript.internal.EvaluatorException: syntax error (<Unknown
source>#1) in <Unknown source> at line number 1
2013-02-07 23:54:04,174 - INFO - checkForUpdates - CheckForUpdates
- com.btr.proxy.selector.pac.PacProxySelector: PAC resolving
error. Caught: com.btr.proxy.selector.pac.ProxyEvaluationException: Error while
executing PAC script: sun.org.mozilla.javascript.internal.EvaluatorException:
syntax error (<Unknown source>#1) in <Unknown source> at line number 1
2013-02-07 23:54:04,267 - WARN - checkForUpdates - CheckForUpdates
- When checking for new version, found an 'ERROR:' response row,
which looked like 'ERROR: ---WARNING--- THE USER 'GORANS' SHOULD BE LOG
DISABLED, HOPEFULLY THIS IS A TEST.'.
2013-02-07 23:54:04,267 - INFO - checkForUpdates - CheckForUpdates
- You have got the latest release of 'AseTune'.
-----------------------------
Original issue reported on code.google.com by [email protected]
on 7 Feb 2013 at 11:25
call isInNet("10.13.75.47", "10.13.72.0", "255.255.252.0") this should return
true
I'm attaching my changes to the file.
If you can incorporate the changes, that would be great.
Let me know if I can be of assistance in any way.
Thanks,
Jeff Stano
Original issue reported on code.google.com by jeff%[email protected]
on 22 Mar 2011 at 2:00
Attachments:
The attached patch for build.xml and the jar-libraries will add targets to the
ant-build.xml which allows to run tests and compute a nice code coverage report
using the JaCoCo code coverage tool.
Original issue reported on code.google.com by [email protected]
on 28 Jul 2012 at 4:33
Attachments:
When evaluating pac scripts, I get a runtime exception from rhino: No
Context associated with current Thread.
After some investigation, I found that Javascript context has to be
initialized with org.mozilla.javascript.Context.enter().
In PacProxySelector.java, I changed the findProxy() method, and now it works:
org.mozilla.javascript.Context.enter(); // <<<<< new line
String parseResult = this.pacScriptParser.evaluate(uri.toString(),
uri.getHost());
org.mozilla.javascript.Context.exit(); // <<<<< new line
Original issue reported on code.google.com by [email protected]
on 1 Jun 2010 at 6:21
WPAD defines two modes to detect the location of the proxy PAC script.
URL guessing and DNS query. Currently proxy-vole only supports url. DNS
does not seem to be very common. Nevertheless support for it would be good.
Original issue reported on code.google.com by [email protected]
on 30 Jan 2010 at 9:48
The logic to reload PAC script content from a file on remote machine seems
incorrect.
The comparison should be expireAtMillis < System.currentTimeMillis()
Original issue reported on code.google.com by [email protected]
on 1 Apr 2014 at 12:02
ProxySearch.getDefaultProxySearch() uses JAVA as first strategy, however on my
machine, this strategy does not work at all.
What steps will reproduce the problem?
ProxySearch proxySearch = ProxySearch.getDefaultProxySearch();
ProxySelector myProxySelector = proxySearch.getProxySelector();
ProxySelector.setDefault(myProxySelector); // adapt global proxy selector
List<Proxy> proxies = myProxySelector.select(new URI("http://www.google.com"));
System.out.println("\n" + proxies.size() + " proxies found via ProxySelector " + myProxySelector.getClass());
for (Proxy proxy : proxies) {
System.out.println(proxy.toString());
}
Output is:
TRACE: Detecting platform. Name is: Windows 7
TRACE: Detected Windows platform: Windows 7
TRACE: Detected Browser is InternetExplorer
TRACE: Using default search priority: Proxy search:
com.btr.proxy.search.java.JavaProxySearchStrategy@83cc67
com.btr.proxy.search.browser.ie.IEProxySearchStrategy@e09713
com.btr.proxy.search.desktop.DesktopProxySearchStrategy@de6f34
com.btr.proxy.search.env.EnvProxySearchStrategy@156ee8e
TRACE: Executing search strategies to find proxy selector
TRACE: Using settings from Java System Properties
1 proxies found via ProxySelector class
com.btr.proxy.selector.misc.ProtocolDispatchSelector
DIRECT
If I use OS_DEFAULT strategy or BROWSER strategy, it works fine:
ProxySearch proxySearch = new ProxySearch();
proxySearch.addStrategy(Strategy.OS_DEFAULT);
Output is:
TRACE: Executing search strategies to find proxy selector
TRACE: Detecting platform. Name is: Windows 7
TRACE: Detected Windows platform: Windows 7
TRACE: Detecting platform. Name is: Windows 7
TRACE: Detected Windows platform: Windows 7
TRACE: Detected Windows desktop
TRACE: Detecting system settings.
TRACE: We are running on Windows.
TRACE: Detecting IE proxy settings
TRACE: Autodetecting script URL.
TRACE: IE uses script: http://x.x.x.x/wpad.dat
INFO: Using javax.script JavaScript engine.
3 proxies found via ProxySelector class
com.btr.proxy.selector.misc.ProxyListFallbackSelector
HTTP @ ...
I think instead of using an empty ProtocolDispatchSelector, the JAVA strategy
should detect that no java settings are there and it should then use OS_DEFAULT
or BROWSER instead.
Original issue reported on code.google.com by [email protected]
on 27 Jul 2012 at 11:07
What steps will reproduce the problem?
1.
2.
3.
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 25 May 2011 at 8:20
I implemented the code some time ago and it was written to work with Gnome 2
Does it still work for Gnome3 and what about Ubuntu with Unity desktop.
This needs some evaluation and testing.
Original issue reported on code.google.com by [email protected]
on 23 Sep 2012 at 8:57
What steps will reproduce the problem?
1. Try the short example script with the JavaxPacScriptParser
2. The return of myIpAddress will treated as an object
3. The split on an object will result in NaN
4. The RhinoPacScriptParser will handle the same script correct.
example script:
---------------
var myip = myIpAddress();
var octet = myip.split(".");
var ret = parseInt(octet[3]) % 7;
---------------
What is the expected output? What do you see instead?
The return of myIpAddress should treated as a string.
What version of the product are you using? On what operating system?
proxy-vole_20121203 windows
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 25 Jul 2013 at 6:34
The problem is that the DLL is locked and can't be deleted. I changed the code
to create a "unique" filename, that is stable. The code will delete the file if
it exists on startup and then create it again from scratch. I also added a
finally block to the creation so the streams will be closed properly in case of
an exception.
Original issue reported on code.google.com by jeff%[email protected]
on 23 Mar 2011 at 4:12
Attachments:
What steps will reproduce the problem?
1. Configure proxy-vole to use a number of strategies, i.e. Browser, OS, EnvVar
2. Having the Browser use a PAC script with invalid content, in my case an
invalid IpRange, unfortunately I do not have access to the actual PAC script
that was used here
3. During setting up the ProxySelector, it fails with an exception about the
invalid whitelist entry, the exception is thrown out of the
ProxySearch.getProxySelector() call
What is the expected output? What do you see instead?
* I would expect an error message in the log and the next strategy to be used,
i.e. OS in my case
What version of the product are you using? On what operating system?
* 20120727, but I compared with current trunk and there were no changes that
would change this in the latest version
Please provide any additional information below.
* Stacktrace:
Caused by: java.lang.IllegalArgumentException: IP range is not
valid:http://10.*.*.*
at com.btr.proxy.selector.whitelist.IpRangeFilter.<init>(IpRangeFilter.java:32)
at
com.btr.proxy.selector.whitelist.DefaultWhiteListParser.parseWhiteList(DefaultWh
iteListParser.java:39)
at
com.btr.proxy.selector.whitelist.ProxyBypassListSelector.<init>(ProxyBypassListS
elector.java:54)
at
com.btr.proxy.search.browser.ie.IEProxySearchStrategy.setByPassListOnSelector(IE
ProxySearchStrategy.java:140)
at
com.btr.proxy.search.browser.ie.IEProxySearchStrategy.createFixedProxySelector(I
EProxySearchStrategy.java:122)
at
com.btr.proxy.search.browser.ie.IEProxySearchStrategy.getProxySelector(IEProxySe
archStrategy.java:46)
at com.btr.proxy.search.ProxySearch.getProxySelector(ProxySearch.java:193)
... 34 more
Original issue reported on code.google.com by [email protected]
on 10 Apr 2013 at 1:26
What steps will reproduce the problem?
1. Define URL Based Pac Script for proxy connection
2. Use JRE 1.7.0_b05
3. Attempt to connect via proxy to internet
What is the expected output? What do you see instead?
Expected is to connect to internet, however, it gives a StackOverflowError. The
error is due to an infinite loop of trying to detect proxy server while
attempting to download the Pac script content.
What version of the product are you using? On what operating system?
Using the latest version 20120727.
Here is the code used:
ProxySearch proxySearch = new ProxySearch();
if(PlatformUtil.getCurrentPlattform() == Platform.WIN)
{
proxySearch.addStrategy(Strategy.IE);
proxySearch.addStrategy(Strategy.FIREFOX);
proxySearch.addStrategy(Strategy.JAVA);
}
else if (PlatformUtil.getCurrentPlattform() == Platform.LINUX)
{
proxySearch.addStrategy(Strategy.GNOME);
proxySearch.addStrategy(Strategy.KDE);
proxySearch.addStrategy(Strategy.FIREFOX);
}
else
{
proxySearch.addStrategy(Strategy.OS_DEFAULT);
}
//proxySearch.addStrategy(Strategy.OS_DEFAULT);
ProxySelector myProxySelector = proxySearch.getProxySelector();
ProxySelector.setDefault(myProxySelector);
URI salesforceUri = new URI("https://cg.na6.visual.force.com/services/Soap/u/20.0");
List<Proxy> proxies = ProxySelector.getDefault().select(salesforceUri);
Here is the stack trace:
Java Plug-in 10.5.1.255
Using JRE version 1.7.0_05-b06 Java HotSpot(TM) Client VM
User home directory = C:\Users\phe007
----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------
Exception in thread "AWT-EventQueue-2" java.lang.StackOverflowError
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.www.protocol.http.HttpURLConnection.<init>(Unknown Source)
at sun.net.www.protocol.http.Handler.openConnection(Unknown Source)
at java.net.URL.openConnection(Unknown Source)
at com.btr.proxy.selector.pac.UrlPacScriptSource.downloadPacContent(UrlPacScriptSource.java:108)
at com.btr.proxy.selector.pac.UrlPacScriptSource.getScriptContent(UrlPacScriptSource.java:52)
at com.btr.proxy.selector.pac.JavaxPacScriptParser.evaluate(JavaxPacScriptParser.java:113)
at com.btr.proxy.selector.pac.PacProxySelector.findProxy(PacProxySelector.java:105)
at com.btr.proxy.selector.pac.PacProxySelector.select(PacProxySelector.java:88)
at com.btr.proxy.selector.misc.BufferedProxySelector.select(BufferedProxySelector.java:84)
at com.btr.proxy.selector.misc.ProxyListFallbackSelector.select(ProxyListFallbackSelector.java:71)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.net.HttpURLConnection.getResponseCode(Unknown Source)
at com.btr.proxy.selector.pac.UrlPacScriptSource.downloadPacContent(UrlPacScriptSource.java:112)
at com.btr.proxy.selector.pac.UrlPacScriptSource.getScriptContent(UrlPacScriptSource.java:52)
at com.btr.proxy.selector.pac.JavaxPacScriptParser.evaluate(JavaxPacScriptParser.java:113)
at com.btr.proxy.selector.pac.PacProxySelector.findProxy(PacProxySelector.java:105)
at com.btr.proxy.selector.pac.PacProxySelector.select(PacProxySelector.java:88)
at com.btr.proxy.selector.misc.BufferedProxySelector.select(BufferedProxySelector.java:84)
at com.btr.proxy.selector.misc.ProxyListFallbackSelector.select(ProxyListFallbackSelector.java:71)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
Original issue reported on code.google.com by [email protected]
on 5 Aug 2012 at 9:44
What steps will reproduce the problem?
1. Set Automatic Proxy Configuration on OSX
2. Use http://somelocation/proxy.pac
3. Try to get Proxy inside Java application
What is the expected output?
java application uses proxy
What do you see instead?
java application is uploading directly
What version of the product are you using?
proxy-vole_20121203.jar
On what operating system?
OSX 10.6.8
Please provide any additional information below.
I've tried these strategies - Strategy.OS_DEFAULT, Strategy.BROWSER
This java application works fine on WIN through PAC proxy.
Original issue reported on code.google.com by [email protected]
on 24 Jul 2013 at 3:11
What steps will reproduce the problem?
1. Setup IE to use a PAC file which has multiple proxies such as the following
function FindProxyForURL(url, host)
{
return "PROXY my-proxy.com:80; PROXY my-proxy2.com:8080;";
}.
What is the expected output? What do you see instead?
Using proxy-vole to print the list of proxies
the result will be the following
proxy hostname my-proxy.com
proxy port 80
proxy hostname my-proxy2.com:8080
proxy port 80
The second proxy hostname should be "my-proxy2.com", instead it named
"my-proxy2.com:8080". The port is also incorrect.
What version of the product are you using? On what operating system?
Windows 7
IE 8
proxy-vole_20100914
Please provide any additional information below.
The problem occurs in PacProxySelector class on the following line
// Split port from host
String[] token = host.split("[: ]+");
Due to a white space padding on host string, the token array has 3 elements
instead of 2 and the following logic does not get executed
if (token.length == 2) {
host = token[0];
port = Integer.parseInt(token[1]);
}
Regards,
Jimmy
Original issue reported on code.google.com by [email protected]
on 10 Feb 2011 at 1:40
It doesn't look like the class JavaProxySearchStrategy is picking up the https
system settings. There should be some code like this added:
String hostHttps = System.getProperty("https.proxyHost");
String portHttps = System.getProperty("https.proxyPort", "80");
<snip>
if (whiteList.trim().length() > 0) {
ps.setSelector("http", new ProxyBypassListSelector(whiteList, FixedProxySelector(host, Integer.parseInt(port))));
ps.setSelector("https", new ProxyBypassListSelector(whiteList, new FixedProxySelector(hostHttps, Integer.parseInt(portHttps))));
} else {
ps.setSelector("http", new FixedProxySelector(host, Integer.parseInt(port)));
ps.setSelector("https", new FixedProxySelector(hostHttps, Integer.parseInt(portHttps)));
}
Original issue reported on code.google.com by [email protected]
on 1 Nov 2011 at 6:21
The PacScriptMethods.isInNet() function doesn't resolve host names passed into
it but tries to parse them as IP addresses instead. This causes the script to
throw a NumberFormatException when the function is used with a host name in a
PAC script.
The fix I have used in my environment is to change the function to the
following:
public boolean isInNet(String host, String pattern, String mask) {
String resolved = dnsResolve(host);
if ((resolved == null) || (resolved.length() == 0)) return false;
long lhost = parseIpAddressToLong(resolved);
long lpattern = parseIpAddressToLong(pattern);
long lmask = parseIpAddressToLong(mask);
boolean result = (lhost & lmask) == lpattern;
return result;
}
Original issue reported on code.google.com by [email protected]
on 24 Jul 2012 at 2:26
setting http_proxy="http://192.168.0.1:8080/" (seems to be valid) crashes
the FixedProxySelector with a NumberFormatException.
Attached a patch that makes the parsing more robust.
Original issue reported on code.google.com by [email protected]
on 24 Mar 2010 at 11:03
Attachments:
Hi,
I stumbled over some places where logging is not providing all the information,
see attached patch.
Original issue reported on code.google.com by [email protected]
on 1 Aug 2012 at 12:58
Attachments:
Reading failed with file URL containing a hostname such as :
file://localhost/Users/gaellalire/proxies.pac
readPacFileContent method in UrlPacScriptSource should not try to create a file
from an URL
A possible fix below
Reader reader = null;
if (scriptUrl.indexOf(":/") == -1) {
reader = new FileReader(scriptUrl);
} else {
reader = new InputStreamReader(new URL(scriptUrl).openStream());
}
BufferedReader r = new BufferedReader(reader);
Original issue reported on code.google.com by [email protected]
on 13 Nov 2012 at 10:10
Hey,
I was wondering if there is a way I could get the proxy bypass list that was
configured in the OS settings.
Thanks
Liron.
Original issue reported on code.google.com by [email protected]
on 26 Dec 2012 at 8:40
OsxProxySearchStrategy selects first interface in prefrences.plist and for
whatever reason this happens to be my Bluetooth PAN. Might help to verify that
the selected service in prefrences.plist doesn't have any mention of Bluetooth,
or that it only targets WiFi and Ethernet connections.
Original issue reported on code.google.com by [email protected]
on 9 Aug 2013 at 7:17
What steps will reproduce the problem?
1. Linux: No Kde Desktop installed or ~/.kde/share/config/kioslaverc not exists
2. Use Strategy.KDE as first entry in customized ProxySearch:
import com.btr.proxy.search.ProxySearch;
public class KdeProxySearchStrategyError {
public static void main(String[] args) {
ProxySearch proxySearch = new ProxySearch();
proxySearch.addStrategy(ProxySearch.Strategy.KDE);
proxySearch.addStrategy(ProxySearch.Strategy.GNOME);
proxySearch.getProxySelector();
}
}
What is the expected output? What do you see instead?
expected: no error
actual: NullPointerException
Exception in thread "main" java.lang.NullPointerException
at com.btr.proxy.search.desktop.kde.KdeProxySearchStrategy.getProxySelector(KdeProxySearchStrategy.java:75)
..
What version of the product are you using? On what operating system?
proxy-vole: v2011102 and current SVN
OS: Gentoo Linux
Desktop: Gnome 2.32
Java: 1.6.0_32
Please provide any additional information below.
KdeSettingsParser.parseSettings() returns <null> if no settings file was found.
This <null> value is used unchecked here:
KdeProxySearchStrategy.getProxySelector()
..
Properties settings = readSettings(); // settings == null
ProxySelector result = null;
int type = Integer.parseInt(settings.getProperty("ProxyType", "-1")); // NPE
..
TODO:
Keep the <null> result for readSettings() if no settings available.
Check for <null> after readSettings() and return <null> if no settings
available.
In general I would prefer this for all ..SearchStrategy parsers if the checked
environment is not available. Actual in this case an empty Properties() is
returned for some parsers.
Regards
Stefan.
Original issue reported on code.google.com by [email protected]
on 25 May 2012 at 2:36
For the differents Strategy (IE, Firefox, etc) the url is different
(IE=file://... , FIREFOX=file:///...) and the UrlPacScriptSource class evaluate
"file:/".
This do that not parse de PAC file.
Original issue reported on code.google.com by [email protected]
on 6 Dec 2010 at 3:49
Improve API to query what proxy settings are available and what proxy
settings are actually used. The API allows to autodetect settings and to
automatically create a ProxySelector. There is currently only limited
support to inspect the proxy settings.
Original issue reported on code.google.com by [email protected]
on 30 Jan 2010 at 9:49
Need a way to detect the proxy settings on OSX.
I do not have access to a Mac to I would need some information/help here.
Original issue reported on code.google.com by [email protected]
on 30 Jan 2010 at 9:46
C:\Users\Mario\AppData\Local\Temp\proxy_vole5021726725351777432.dll:
Can't load IA 32-bit .dll on a AMD 64-bit platform
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1803)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1699)
at java.lang.Runtime.load0(Runtime.java:770)
at java.lang.System.load(System.java:1003)
at
com.btr.proxy.search.desktop.win.Win32ProxyUtils.<clinit>(Win32ProxyUtils.java:5
7)
at
com.btr.proxy.search.browser.ie.IEProxySearchStrategy.readSettings(IEProxySearch
Strategy.java:53)
at
com.btr.proxy.search.browser.ie.IEProxySearchStrategy.getProxySelector(IEProxySe
archStrategy.java:38)
at
com.btr.proxy.search.ProxySearch.getProxySelector(ProxySearch.java:192)
at
at.redeye.FrameWork.base.proxy.AutoProxyHandler.<init>(AutoProxyHandler.java:49)
at
at.redeye.HMCP.Application.ModuleLauncher.<init>(ModuleLauncher.java:83)
at at.redeye.HMCP.Application.HMCPMain.main(HMCPMain.java:33)
What steps will reproduce the problem?
1. using proxy vole with a 64 bit java on windows7
I've created these missing dlls und tested amd64 bit version on win7.
IA64 Platform is untested, but should work. All of them is attached.
I've modfied Win32ProxyUtils.java and proxy_util_w32.cpp and added compile.bat
compiled by using visual studio express 2010 and win7 sdk.
All in all my conclusion to proxy vole: It's GREAT! Thanks for developing this
stuff.
Original issue reported on code.google.com by [email protected]
on 30 Jul 2010 at 6:46
Attachments:
What steps will reproduce the problem?
1. Configure an invalid URL for PAC in IE
2. Try to use Proxy-Vole
3. Error message is just "Loading script failed."
What is the expected output? What do you see instead?
* Better would be to see which actual URL failed to parse.
Therefore please log out the URL at UrlPacScriptSource.getScriptContent() at
line 57 and host/url at JavaxPacScriptParser.evaluate() at line 120 and URI at
PacProxySelector.findProxy() at line 115
Original issue reported on code.google.com by [email protected]
on 17 Dec 2012 at 12:24
What steps will reproduce the problem?
1. Define at least one whitelist-entry for the proxy in MS IE and also check
the box "Bypass proxy for local adresses"
What is the expected output? What do you see instead?
The proxy should not be used for calls to e.g. "localhost" but nevertheless it
is used.
What version of the product are you using? On what operating system?
proxy-vole_20131209.jar
IE 10
Patch provided as an attachement.
Original issue reported on code.google.com by [email protected]
on 5 May 2014 at 9:26
Attachments:
What steps will reproduce the problem?
IP6 is expected to become more used in the near future.
Proxy-vole is completly untested on IP6 from my side.
What is the expected output? What do you see instead?
All functionality should also work for IP6 networks and proxies.
I see some areas that need extensive testing.
- All places where IP addresses are parsed (e.g. white list definitions)
- PAC script methods should also accept IP6 addresses
- Windows native code to be tested too
...
This is a reminder to test this and implement missing IP6 features.
Have fun,
- Rossi
Original issue reported on code.google.com by [email protected]
on 17 May 2011 at 7:54
XML Parsing in PListParser has DTD Validation enabled. This causes the parser
to load DTDs if they are referenced in the XML. If the location points to some
internet resources, the DTD is loaded from there causing delays and timeouts if
an internet connection is not available.
How to reproduce:
* Run OS-related tests, e.g. OsxProxySearchTest, on a machine which requires
proxy settings to connect to the internet (not necessarily OSX, test also fails
on Windows), tests will fail with socket time out exceptions. The problem is
actually in PListParser where XML Parsing is done, but only manifests itself on
OSX as only OsxProxySearchStrategy uses it currently.
This is bad for two reasons:
* Access to internet resources during XML Parsing can be slow/create overhead
* At this point, no proxy server is set up yet, so access fails or in our case
runs into timeout causing very long delays during application startup.
Possible solutions:
a) Disable DTD Validation for the XML Parser
b) Store the DTD and provide an EntityResolver which avoids access to the
internet
documentBuilder.setEntityResolver(new EntityResolver() {
@Override
public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException {
// return an InputSource for the local DTD if the publicId matches...
}
});
...
Original issue reported on code.google.com by [email protected]
on 1 Aug 2012 at 2:38
What steps will reproduce the problem?
1. Set a manual proxy in IE connection config.
2. Check the "Bypass proxy for local address" checkbox
3. The option is ignored and does not work for proxy vole.
What is the expected output? What do you see instead?
To bypass the proxy for "local" addresses
Please see
http://www.windowsreference.com/internet-explorer/bypass-proxy-server-for-local-
addresses-in-internet-explorer-explained/
For a definition of the term "local address"
Add support for this IE special mode in proxy vole.
Have fun,
Rossi
Original issue reported on code.google.com by [email protected]
on 28 Sep 2010 at 7:46
Steps to reproduce:
Use proxy vole with JDK 6 default JS engine and PAC file that uses String
length property, i.e:
function FindProxyForURL(url, host)
{
var ip = myIpAddress();
if( ip==null || ip.length<1){
return "DIRECT";
}else{
return "PROXY my.proxy.com:8080";
}
}
Expected behavior:
PAC script should evaluate without problems
Actual behavior:
exception thrown on "ip.length<1" evaluation
Error cause:
PacScriptMethods.myIpAddress() returns Java String, which from JS perspective
has length() function but does not have length property (myIpAddress().length()
returns expected value, while myIpAddress().length returns a function, thus
resulting in "NaN cannot be converted to int" error when comparing it with a
number)
Version affected: 20121203
Suggested fix:
For JDK built-in JS engine, modify setupEngine() method fragment that is
registering functions available to PAC script, so that for every function
returning String, it's result would be converted to JavaScript String (see
attached diff).
Original issue reported on code.google.com by [email protected]
on 8 Jan 2013 at 12:48
Attachments:
Hi,
Proxy-vole performs what I need, however I wish I can use it as a simple Maven
dependency.
What do you think about converting your ANT project to a Maven project ?
If you are OK to convert but you don't know how or you don't want to convert it
yourself, I can do the job and send you a patch.
Original issue reported on code.google.com by [email protected]
on 12 Nov 2012 at 10:25
The KDE proxy settings file is not found with using KDE4. It's KDE4 locations
is
$HOME/.kde4/share/config/kioslaverc
Existing code tries to parse
$HOME/.kde/share/config/kioslaverc
only. And KdeProxySearchStrategy is not extendible that easy to switch the
location with not allowing to set the KdeSettingsParser (e.g. at construction)
nor the KdeSettingsParser having a constructor/setter for the file to be parsed.
Original issue reported on code.google.com by [email protected]
on 20 Sep 2012 at 6:55
What steps will reproduce the problem?
public class NPETest {
public static void main(String[] args) throws URISyntaxException {
ProxySearch proxySearch = ProxySearch.getDefaultProxySearch();
ProxySelector myProxySelector = proxySearch.getProxySelector();
ProxySelector.setDefault(myProxySelector); // adapt global proxy selector
myProxySelector.select(new URI(""));
}
}
What is the expected output? What do you see instead?
- graceful handling of such URIs
What version of the product are you using? On what operating system?
- 20111102
Original issue reported on code.google.com by [email protected]
on 26 Jul 2012 at 11:52
What steps will reproduce the problem?
1. Configure a PAC script location which allows connect, but never returns the
request, i.e. a connect to the url will hang until a timeout occurs
2. proxy-vole blocks the select() call for 5 minutes, which seems to be the
default timeout of a HttpURLConnection
What is the expected output? What do you see instead?
* We should use a shorter socket timeout in the HttpURLConnection
* It seems the code integrated into the Android Proxy App at
https://github.com/madeye/proxydroid/tree/master/src/com/btr/proxy/selector/pac
has a connection timeout, maybe we simply need to sync these two.
What version of the product are you using? On what operating system?
* 20120727, but 20121203 seems to have the same issue.
Original issue reported on code.google.com by [email protected]
on 7 Mar 2013 at 1:28
see last case notes on issue 26
I didn't know if I should open a new "issue", or just append to "the closed 26"
So I did both.
What would be the appropriate action?
Let me know so I can make it right the next time :)
Original issue reported on code.google.com by [email protected]
on 6 Sep 2012 at 5:59
What steps will reproduce the problem?
1. Start Ubuntu (in my case 12.04)
2. Open /home/<username>/.gconf/system/http_proxy/%conf.xml
3. Add the following to ignored hosts:
<li type="string">
<stringvalue>mydomain.com/test</stringvalue>
</li>
4. Log out and log in again
5. Execute the code below
As alternative to step 2 and 3 you can also add the string 'mydomain.com/test'
to the ignored hosts via the dconf-editor in the UI. You can find the entry for
this under system/proxy in the dconf-editor. Relogin is also needed in this
case.
import com.btr.proxy.search.desktop.gnome.GnomeProxySearchStrategy;
import com.btr.proxy.util.ProxyException;
public class ProxyExceptionTest {
/**
* @param args
* @throws ProxyException
*/
public static void main(String[] args) throws ProxyException {
new GnomeProxySearchStrategy().getProxySelector();
}
}
What is the expected output? What do you see instead?
The ignored host "mydomain.com/test" should be treated as hostname and not as
IP address. But I get the following exception:
Exception in thread "main" java.lang.NumberFormatException: For input string:
"test"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:481)
at java.lang.Integer.parseInt(Integer.java:514)
at com.btr.proxy.selector.whitelist.IpRangeFilter.<init>(IpRangeFilter.java:42)
at com.btr.proxy.selector.whitelist.DefaultWhiteListParser.parseWhiteList(DefaultWhiteListParser.java:39)
at com.btr.proxy.selector.whitelist.ProxyBypassListSelector.<init>(ProxyBypassListSelector.java:54)
at com.btr.proxy.search.desktop.gnome.GnomeProxySearchStrategy.getProxySelector(GnomeProxySearchStrategy.java:114)
at ProxyExceptionTest.main(ProxyExceptionTest.java:12)
What version of the product are you using? On what operating system?
proxy-vole: 20120920
OS: Ubuntu 12.04
Please provide any additional information below.
I think the determination of IP addresses in the DefaultWhiteListParser is
wrong. An IP address will be determined by just checking if the string contains
a / character. In my opinion this should be made more robust. Maybe with a
regex checker or something similar.
Original issue reported on code.google.com by [email protected]
on 27 Sep 2012 at 9:23
What steps will reproduce the problem?
1. Have a IE proxy - pac file or otherwise.
2. Have System.getProperty("http.proxyHost") return null;
3. In proxy-vole version 110515 we return null and we continue looking at other
strategies but in 111102 we don't return null thus subverting other strategies.
What is the expected output? What do you see instead?
Valid proxy servers based on PAC file setting. But instead I get no proxy
server.
What version of the product are you using? On what operating system?
111102. Windows 8.
Please provide any additional information below.
We used to return null in 110515 in getProxySelector() if host is null, this
got changed in the newer version.
Original issue reported on code.google.com by [email protected]
on 15 Aug 2012 at 3:05
What steps will reproduce the problem?
1.ProxySearch proxySearch = ProxySearch.getDefaultProxySearch();
2.ProxySelector myProxySelector = proxySearch.getProxySelector();
3. in Step2 it is taking min 20 to 25 sec in windows7 PC and in xp itis taking
1 to 2 sec.
What is the expected output? What do you see instead?
It must be less than 2 sec the reply.
What version of the product are you using? On what operating system?
Windows7 and windows8 we are using this one proxy-vole_20121203_bin.zip
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 23 Oct 2013 at 5:28
Feature request:
For multi homed (multiple NICs) setups and for testing PAC files it would be
very useful to have the ability to specify the clients IP address through a
property of the class PacScriptParser. The property setter should update a
property of the class PacScriptMethods. If an IP address is set that way the
method myIpAddress should return just this address.
Original issue reported on code.google.com by [email protected]
on 10 Dec 2010 at 8:30
What steps will reproduce the problem?
Our environment currently has the proxy based in our gateway with all machines
currently having access to it. As such the proxy.pack file we have resolves
that access to the proxy needs to be via the proxy.
ie FindProxyForURL ("socket://192.168.0.1:8080","192.168.0.1") resolves to
"PROXY 192.25.105.80:8080" and subsequently passing back a HTTP proxy back to
the SocksSocketImpl which is throwing a "Unknown proxy type : Http"
What is the expected output? What do you see instead?
When ask the ProxyListFallbackSelector for the proxy for the proxy i would have
expected Direct.
Having looked at the DefaultProxySelector it passes back Direct when asked for
the proxy address.
What version of the product are you using? On what operating system?
Proxy-vole version: 20131209
Java Version: 1.6.0_u29x64
Os Version: Windows 7
Please provide any additional information below.
As a work around i have used the ProxyBypassListSelector to exclude the proxy
from the list.
Below is the stack trace that i am currently seeing.
Caused by: java.net.SocketException: Unknown proxy type : HTTP
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:370)
at java.net.Socket.connect(Socket.java:529)
at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:117)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:178)
at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:304)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:610)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:445)
at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:863)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:57)
at org.apache.http.impl.client.DecompressingHttpClient.execute(DecompressingHttpClient.java:158)
at org.apache.http.impl.client.DecompressingHttpClient.execute(DecompressingHttpClient.java:203)
at org.apache.http.impl.client.DecompressingHttpClient.execute(DecompressingHttpClient.java:191)
at au.gov.immi.sfp.ui.web.test.headless.core.HttpTransport.doGet(HttpTransport.java:139)
Original issue reported on code.google.com by [email protected]
on 24 Apr 2014 at 3:28
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.