Skip to content

Commit

Permalink
#147: Try to fix proxy not found if autoDetect is enabled but detectA…
Browse files Browse the repository at this point in the history
…utoProxyConfigUrl returns empty string (#148)

* #147: Try to fix proxy not found if autoDetect is enabled but detectAutoProxyConfigUrl returns empty string.

* #147: Update changelog
  • Loading branch information
akuhtz authored Nov 25, 2024
1 parent d2e11e4 commit 65a24c1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Change Log
This file contains the change log.

## 1.1.6
* Fixed issue #147: Unexpected proxy auto-detection result on Windows.
* Update dependencies

## 1.1.5
* Fixed issue #109: PListParser#base64decode does not expect data to be multiline. Thanks to vsalavatov!
* Update dependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,9 @@ private PacProxySelector createPacSelector(IEProxyConfig ieProxyConfig) {
WINHTTP_AUTO_DETECT_TYPE_DHCP | WINHTTP_AUTO_DETECT_TYPE_DNS_A);
pacUrl = WinHttpHelpers.detectAutoProxyConfigUrl(dwAutoDetectFlags);
}
if (pacUrl == null) {
if (pacUrl == null || pacUrl.trim().length() == 0) {
pacUrl = ieProxyConfig.getAutoConfigUrl();
Logger.log(getClass(), LogLevel.TRACE, "Autodetecting script URL did not return valid pacUrl. Use autoConfigUrl from IE proxy config: " + pacUrl);
}
if (pacUrl != null && pacUrl.trim().length() > 0) {
Logger.log(getClass(), LogLevel.TRACE, "IE uses script: " + pacUrl);
Expand All @@ -121,6 +122,9 @@ private PacProxySelector createPacSelector(IEProxyConfig ieProxyConfig) {
}
return ProxyUtil.buildPacSelectorForUrl(pacUrl);
}
else {
Logger.log(getClass(), LogLevel.TRACE, "The pacUrl for IE is not available: " + pacUrl);
}

return null;
}
Expand Down

0 comments on commit 65a24c1

Please sign in to comment.