Comments (5)
I attach one solution
Original comment by [email protected]
on 6 Dec 2010 at 7:28
Attachments:
from proxy-vole.
Hi,
This is known problem. And I do not know about a clear way to solve this.
The file URLs are handled differently and seem not to be clearly specified.
You will have a lot of confusion with this, particularly when you have an UNC
name encoded in A URL: e.g. \\my_server\path\file.pac
Will give you a URL of this format
file:///my_server/path/file.pac or file:////my_server/path/file.pac
So you never know exactly how many slashes belong to the protocol and how many
to the location.
I will review your patch and test it and if all looks good integrate it.
Thanks for reporting this and thanks for taking your time to provide a patch.
Have fun,
- Rossi
Original comment by [email protected]
on 11 Dec 2010 at 12:12
- Changed state: Accepted
- Added labels: Type-Enhancement
- Removed labels: Type-Defect
from proxy-vole.
With IE8 there is also a Problem with reading PAC via HTTP-Protokol. When i do
the standard way: ProxySelector lcMyProxySelector =
proxySearch.getProxySelector();
lcMyProxySelector is null. I had to use a workaround:
Win32IESettings ieSettings = new IEProxySearchStrategy().readSettings();
UrlPacScriptSource lcPSS = new
UrlPacScriptSource(ieSettings.getAutoConfigUrl());
lcMyProxySelector = new PacProxySelector(lcPSS);
Then lcMyProxySelector can be set to default.
Original comment by [email protected]
on 26 Aug 2011 at 1:00
from proxy-vole.
I noticed the same thing. Setting a URL to a pac file in Internet Explorer 9,
via Internet Options > Connections > LAN Settings > Use automatic
configurations script: Expects a file: URL to have 2 slashes like this
"file://C:/sample.pac"
But when this is parsed inside of IEProxySearchStrategy.createPacSelector the
URL is unrecognized unless it has the more proper 3 slashes like this:
"file:///C:/sample.pac"
ERROR: com.btr.proxy.selector.pac.UrlPacScriptSource - File reading error.
ERROR: com.btr.proxy.selector.pac.UrlPacScriptSource - Loading script failed.
ERROR: com.btr.proxy.selector.pac.JavaxPacScriptParser - JS evaluation error.
ERROR: com.btr.proxy.selector.pac.PacProxySelector - PAC resolving error.
Since this is really an IE problem of forcing you to use improperly formatted
URL's
http://en.wikipedia.org/wiki/File_URI_scheme
It seems a simple fix would be to patch the IE URL inside of the
IEProxySearchStrategy class like this...
if (pacUrl != null && pacUrl.trim().length() > 0) {
Logger.log(getClass(), LogLevel.TRACE, "IE uses script: "+pacUrl);
// If the IE has a file URL and it only starts has 2 slashes, add a third so
// it can be properly converted to the URL class
if(pacUrl.startsWith("file://") && !pacUrl.startsWith("file:///")) {
pacUrl = "file:///" + pacUrl.substring(7);
}
return new PacProxySelector(new UrlPacScriptSource(pacUrl));
}
I tested the above code and it now works properly for me.
Original comment by [email protected]
on 1 Nov 2011 at 11:13
from proxy-vole.
Hi,
I really like your fix proposal. It is local to the IE code and will align the
URLs to the common format.
I integrated this in the repository and also made a new release containing this.
Thanks for the good proposal,
- Rossi
Original comment by [email protected]
on 2 Nov 2011 at 9:23
- Changed state: Fixed
from proxy-vole.
Related Issues (20)
- OSX: proxy-vole ignores PAC proxy settings HOT 8
- Return of myIpAddress will treated by JavaxPacScriptParser as an object with following side effects. HOT 1
- proxy-vole is selecting bluetooth interface in OS/X 10.8 HOT 5
- The proxy selector is taking long time after updating windows ( in windows7 ) HOT 2
- Invalid java.io.tmpdir will cause NullPointerException in static initializer which leads to ExceptionInInitializerError HOT 1
- NullPointerException when PAC file not available HOT 3
- Improper logic to reload PAC file HOT 2
- ProxyListFallbackSelector returns a proxy rather than DIRECT when asked the proxy for the proxy.
- Local bypass in IE is ignored if additional whitelist-entries are defined HOT 1
- UnsatisfiedLinkError HOT 1
- DefaultWhiteListParser cannot handle www.*.com
- ProxySearch using default is giving erroneous proxy HOT 1
- Improvement in proxy fallback selection
- shExpMatch for IP address HOT 3
- Apache Httpclient 4 - not reading proxy settings from proxy-vole HOT 2
- Cannot detect Linux EVN_VAR IPv6 proxy
- JavaProxySearchStrategy only enabled with HTTP system properties given HOT 1
- Security-Exception with PAC script in Java 8
- SOCKS implementation is wrong
- NPE in IEProxySearchStrategy.getProxySelector()
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from proxy-vole.