changes = new HashMap();
if ( (_newsURL != null) && (_newsURL.length() > 0) ) {
+ if (_newsURL.startsWith("https"))
+ _newsThroughProxy = false;
String oldURL = ConfigUpdateHelper.getNewsURL(_context);
if ( (oldURL == null) || (!_newsURL.equals(oldURL)) ) {
changes.put(PROP_NEWS_URL, _newsURL);
@@ -189,8 +196,9 @@ public class ConfigUpdateHandler extends FormHandler {
}
}
- changes.put(PROP_SHOULD_PROXY, "" + _updateThroughProxy);
- changes.put(PROP_UPDATE_UNSIGNED, "" + _updateUnsigned);
+ changes.put(PROP_SHOULD_PROXY, Boolean.toString(_updateThroughProxy));
+ changes.put(PROP_SHOULD_PROXY_NEWS, Boolean.toString(_newsThroughProxy));
+ changes.put(PROP_UPDATE_UNSIGNED, Boolean.toString(_updateUnsigned));
String oldFreqStr = _context.getProperty(PROP_REFRESH_FREQUENCY, DEFAULT_REFRESH_FREQUENCY);
long oldFreq = DEFAULT_REFRESH_FREQ;
@@ -252,4 +260,6 @@ public class ConfigUpdateHandler extends FormHandler {
public void setProxyPort(String port) { _proxyPort = port; }
public void setUpdateUnsigned(String foo) { _updateUnsigned = true; }
public void setZipURL(String url) { _zipURL = url; }
+ /** @since 0.9.9 */
+ public void setNewsThroughProxy(String foo) { _newsThroughProxy = true; }
}
diff --git a/apps/routerconsole/java/src/net/i2p/router/web/ConfigUpdateHelper.java b/apps/routerconsole/java/src/net/i2p/router/web/ConfigUpdateHelper.java
index 7fecfc85f..037acb8bc 100644
--- a/apps/routerconsole/java/src/net/i2p/router/web/ConfigUpdateHelper.java
+++ b/apps/routerconsole/java/src/net/i2p/router/web/ConfigUpdateHelper.java
@@ -73,13 +73,20 @@ public class ConfigUpdateHelper extends HelperBase {
}
public String getUpdateThroughProxy() {
- String proxy = _context.getProperty(ConfigUpdateHandler.PROP_SHOULD_PROXY, ConfigUpdateHandler.DEFAULT_SHOULD_PROXY);
- if (Boolean.parseBoolean(proxy))
+ if (_context.getProperty(ConfigUpdateHandler.PROP_SHOULD_PROXY, ConfigUpdateHandler.DEFAULT_SHOULD_PROXY))
return "";
else
return "";
}
+ /** @since 0.9.9 */
+ public String getNewsThroughProxy() {
+ if (_context.getProperty(ConfigUpdateHandler.PROP_SHOULD_PROXY_NEWS, ConfigUpdateHandler.DEFAULT_SHOULD_PROXY_NEWS))
+ return "";
+ else
+ return "";
+ }
+
public String getUpdateUnsigned() {
if (_context.getBooleanProperty(ConfigUpdateHandler.PROP_UPDATE_UNSIGNED))
return "";
diff --git a/apps/routerconsole/jsp/configupdate.jsp b/apps/routerconsole/jsp/configupdate.jsp
index 2fd5e6536..c29a9a95d 100644
--- a/apps/routerconsole/jsp/configupdate.jsp
+++ b/apps/routerconsole/jsp/configupdate.jsp
@@ -48,6 +48,8 @@
<%=formhandler._("Update policy")%>: |
|
<% } // if canInstall %>
+ <%=intl._("Fetch news through the eepProxy?")%> |
+ |
<%=intl._("Update through the eepProxy?")%> |
|
<% if (updatehelper.isAdvanced()) { %>