Comments (5)
To clarify further, my bluetooth service does not have the ability to set a
proxy.
Original comment by [email protected]
on 9 Aug 2013 at 7:22
from proxy-vole.
Please see https://code.google.com/p/proxy-vole/issues/detail?id=42
I'm also looking for a solution.
Original comment by [email protected]
on 14 Nov 2013 at 8:05
from proxy-vole.
After a ton of Google searching I came across this:
route get 0.0.0.0 2>/dev/null | awk '/interface: / {print $2}'
This is a terminal call that will return the name of the currently active
network interface (eg. en0)
This should be baked into proxy-vole and used to map against the service orders
rather than assuming the first service order is the active interface.
Original comment by [email protected]
on 14 Nov 2013 at 8:12
from proxy-vole.
This modified OsxProxySearchStrategy#getProxySelector() method should also
solve the problem:
public ProxySelector getProxySelector() throws ProxyException {
Logger.log(getClass(), LogLevel.TRACE, "Detecting OSX proxy settings");
// First create a list of Ethernet interfaces that are connected
List<String> acceptedInterfaces = new ArrayList<String>();
try {
Enumeration<NetworkInterface> interfaces = NetworkInterface.getNetworkInterfaces();
for (Iterator<NetworkInterface> it = Collections.list(interfaces).iterator(); it.hasNext();) {
NetworkInterface ni = it.next();
if (ni.isLoopback() || ni.isPointToPoint() || ni.isVirtual() || !ni.isUp()) {
// Ignore
continue;
}
acceptedInterfaces.add(ni.getName());
}
} catch (SocketException ex) {
throw new ProxyException("Error getting the Network Interfaces");
}
if (acceptedInterfaces.isEmpty()) {
throw new ProxyException("No acceptable Network Interfaces found");
}
// Now look at the Network Settings
try {
Dict settings = PListParser.load(getSettingsFile());
Object currentSet = settings.getAtPath("/CurrentSet");
if (currentSet == null) {
throw new ProxyException("CurrentSet not defined");
}
Dict networkSet = (Dict) settings.getAtPath(String.valueOf(currentSet));
List<?> serviceOrder = (List<?>) networkSet.getAtPath("/Network/Global/IPv4/ServiceOrder");
if (serviceOrder == null || serviceOrder.size() == 0) {
throw new ProxyException("ServiceOrder not defined");
}
// Look at the Services in priority order and pick the first one that was
// also accepted above
Dict proxySettings = null;
for (int i = 0; i < serviceOrder.size(); i++) {
Object candidateService = serviceOrder.get(i);
Object networkService = networkSet.getAtPath("/Network/Service/"+candidateService+"/__LINK__");
if (networkService == null ) {
throw new ProxyException("NetworkService not defined.");
}
Dict selectedServiceSettings = (Dict) settings.getAtPath(""+networkService);
String interfaceName = (String) selectedServiceSettings.getAtPath("/Interface/DeviceName");
if (acceptedInterfaces.contains(interfaceName)) {
Logger.log(getClass(), LogLevel.TRACE, "Looking up proxies for device " + interfaceName);
proxySettings = (Dict) selectedServiceSettings.getAtPath("/Proxies");
break;
}
}
if (proxySettings == null) {
throw new ProxyException("No Ethernet service found");
}
ProtocolDispatchSelector ps = new ProtocolDispatchSelector();
installSelectorForProtocol(proxySettings, ps, "HTTP");
installSelectorForProtocol(proxySettings, ps, "HTTPS");
installSelectorForProtocol(proxySettings, ps, "FTP");
installSelectorForProtocol(proxySettings, ps, "Gopher");
installSelectorForProtocol(proxySettings, ps, "RTSP");
installSocksProxy(proxySettings, ps);
ProxySelector result = ps;
result = installPacProxyIfAvailable(proxySettings, result);
result = autodetectProxyIfAvailable(proxySettings, result);
result = installExceptionList(proxySettings, result);
result = installSimpleHostFilter(proxySettings, result);
return result;
} catch (XmlParseException e) {
throw new ProxyException(e);
} catch (IOException e) {
throw new ProxyException(e);
}
}
Original comment by [email protected]
on 14 Nov 2013 at 11:07
from proxy-vole.
Hi all,
Finally I found the time (and an OSX laptop) to fix this issue. I integrated a
solution based on the fix of "hansbergstengtalk". Thanks for submitting this.
The fix is in the repository checked in with revision 117.
I will release it with a new version of proxy vole within this week.
Please note that in the OSX Network Settings there is a little known feature to
change the order of the interfaces. So you might want to sort your WLAN
interface to the top. This could also help for other applications that fetch
the wrong interface.
But with the new release this should be no longer necessary.
Have fun,
- Rossi
Original comment by [email protected]
on 4 Dec 2013 at 12:27
- 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
- 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.