Package net.i2p.router.web
Class ConfigUpdateHandler
- java.lang.Object
-
- net.i2p.router.web.FormHandler
-
- net.i2p.router.web.ConfigUpdateHandler
-
public class ConfigUpdateHandler extends FormHandler
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_NEWS_URL
older defaultstatic String
DEFAULT_NEWS_URL_SU3
current default, i2pnews.i2p, run by echelon NOTE: If you change, also change in Android: app/src/main/java/net/i2p/android/apps/NewsFetcher.javastatic String
DEFAULT_PROXY_HOST
static String
DEFAULT_PROXY_PORT
static int
DEFAULT_PROXY_PORT_INT
static long
DEFAULT_REFRESH_FREQ
static String
DEFAULT_REFRESH_FREQUENCY
static boolean
DEFAULT_SHOULD_PROXY
static boolean
DEFAULT_SHOULD_PROXY_NEWS
static String
DEFAULT_UPDATE_POLICY
static String
DEFAULT_UPDATE_URL
These are only for .sud and .su2.static String
OLD_DEFAULT_NEWS_URL
very old defaultstatic String
OLD_DEFAULT_NEWS_URL_SU3
old defaultstatic String
PROP_DEV_SU3_URL
no defaultstatic String
PROP_NEWS_URL
static String
PROP_PROXY_HOST
static String
PROP_PROXY_PORT
static String
PROP_REFRESH_FREQUENCY
static String
PROP_SHOULD_PROXY
static String
PROP_SHOULD_PROXY_NEWS
static String
PROP_TRUSTED_KEYS
static String
PROP_UPDATE_DEV_SU3
default falsestatic String
PROP_UPDATE_DISABLED
default false - use for distrosstatic String
PROP_UPDATE_POLICY
static String
PROP_UPDATE_UNSIGNED
default falsestatic String
PROP_UPDATE_URL
static String
PROP_ZIP_URL
no defaultstatic String
SU3_UPDATE_URLS
Empty string if disabled.static boolean
USE_SU3_UPDATE
Only enabled if we have trusted public key certificates installed-
Fields inherited from class net.i2p.router.web.FormHandler
_action, _context, _log, _method, _out, _requestWrapper, _settings
-
-
Constructor Summary
Constructors Constructor Description ConfigUpdateHandler()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
processForm()
Implement this to perform the final processing (in turn, adding formNotice and formError messages, etc) Will only be called if _action is non-null and the nonce is valid.static int
proxyPort(I2PAppContext ctx)
Convenience method for updatersvoid
setDevSU3URL(String url)
void
setNewsThroughProxy(String foo)
void
setNewsURL(String url)
void
setProxyHost(String host)
void
setProxyPort(String port)
void
setRefreshFrequency(String freq)
void
setTrustedKeys(String keys)
void
setUpdateDevSU3(String foo)
void
setUpdatePolicy(String policy)
void
setUpdateThroughProxy(String foo)
void
setUpdateUnsigned(String foo)
void
setUpdateURL(String url)
void
setZipURL(String url)
-
Methods inherited from class net.i2p.router.web.FormHandler
_t, _t, _t, _x, addFormError, addFormErrorNoEscape, addFormNotice, addFormNoticeNoEscape, getAllMessages, getErrors, getJettyString, getNewNonce, getNotices, isAdvanced, setAction, setContextId, setNonce, setRequestWrapper, setSettings, storeMethod, storeNonces, storeWriter
-
-
-
-
Field Detail
-
PROP_NEWS_URL
public static final String PROP_NEWS_URL
- See Also:
- Constant Field Values
-
OLD_DEFAULT_NEWS_URL
public static final String OLD_DEFAULT_NEWS_URL
very old default- See Also:
- Constant Field Values
-
DEFAULT_NEWS_URL
public static final String DEFAULT_NEWS_URL
older default- See Also:
- Constant Field Values
-
OLD_DEFAULT_NEWS_URL_SU3
public static final String OLD_DEFAULT_NEWS_URL_SU3
old default- See Also:
- Constant Field Values
-
DEFAULT_NEWS_URL_SU3
public static final String DEFAULT_NEWS_URL_SU3
current default, i2pnews.i2p, run by echelon NOTE: If you change, also change in Android: app/src/main/java/net/i2p/android/apps/NewsFetcher.java- See Also:
- Constant Field Values
-
PROP_REFRESH_FREQUENCY
public static final String PROP_REFRESH_FREQUENCY
- See Also:
- Constant Field Values
-
DEFAULT_REFRESH_FREQ
public static final long DEFAULT_REFRESH_FREQ
- See Also:
- Constant Field Values
-
DEFAULT_REFRESH_FREQUENCY
public static final String DEFAULT_REFRESH_FREQUENCY
-
PROP_UPDATE_POLICY
public static final String PROP_UPDATE_POLICY
- See Also:
- Constant Field Values
-
DEFAULT_UPDATE_POLICY
public static final String DEFAULT_UPDATE_POLICY
- See Also:
- Constant Field Values
-
PROP_SHOULD_PROXY
public static final String PROP_SHOULD_PROXY
- See Also:
- Constant Field Values
-
DEFAULT_SHOULD_PROXY
public static final boolean DEFAULT_SHOULD_PROXY
- See Also:
- Constant Field Values
-
PROP_SHOULD_PROXY_NEWS
public static final String PROP_SHOULD_PROXY_NEWS
- Since:
- 0.9.9
- See Also:
- Constant Field Values
-
DEFAULT_SHOULD_PROXY_NEWS
public static final boolean DEFAULT_SHOULD_PROXY_NEWS
- Since:
- 0.9.9
- See Also:
- Constant Field Values
-
PROP_PROXY_HOST
public static final String PROP_PROXY_HOST
- See Also:
- Constant Field Values
-
DEFAULT_PROXY_HOST
public static final String DEFAULT_PROXY_HOST
- See Also:
- Constant Field Values
-
PROP_PROXY_PORT
public static final String PROP_PROXY_PORT
- See Also:
- Constant Field Values
-
DEFAULT_PROXY_PORT_INT
public static final int DEFAULT_PROXY_PORT_INT
- See Also:
- Constant Field Values
-
DEFAULT_PROXY_PORT
public static final String DEFAULT_PROXY_PORT
-
PROP_UPDATE_UNSIGNED
public static final String PROP_UPDATE_UNSIGNED
default false- See Also:
- Constant Field Values
-
PROP_UPDATE_DISABLED
public static final String PROP_UPDATE_DISABLED
default false - use for distros- See Also:
- Constant Field Values
-
PROP_ZIP_URL
public static final String PROP_ZIP_URL
no default- See Also:
- Constant Field Values
-
PROP_UPDATE_URL
public static final String PROP_UPDATE_URL
- See Also:
- Constant Field Values
-
PROP_UPDATE_DEV_SU3
public static final String PROP_UPDATE_DEV_SU3
default false- Since:
- 0.9.20
- See Also:
- Constant Field Values
-
PROP_DEV_SU3_URL
public static final String PROP_DEV_SU3_URL
no default- Since:
- 0.9.20
- See Also:
- Constant Field Values
-
DEFAULT_UPDATE_URL
public static final String DEFAULT_UPDATE_URL
These are only for .sud and .su2. Do NOT use this for .su3
-
USE_SU3_UPDATE
public static final boolean USE_SU3_UPDATE
Only enabled if we have trusted public key certificates installed- Since:
- 0.9.9
-
SU3_UPDATE_URLS
public static final String SU3_UPDATE_URLS
Empty string if disabled. Cannot be overridden by config.- Since:
- 0.9.9
-
PROP_TRUSTED_KEYS
public static final String PROP_TRUSTED_KEYS
- See Also:
- Constant Field Values
-
-
Method Detail
-
proxyPort
public static int proxyPort(I2PAppContext ctx)
Convenience method for updaters- Returns:
- the configured value, else the registered HTTP proxy, else the default
- Since:
- 0.8.13
-
processForm
protected void processForm()
Description copied from class:FormHandler
Implement this to perform the final processing (in turn, adding formNotice and formError messages, etc) Will only be called if _action is non-null and the nonce is valid.- Specified by:
processForm
in classFormHandler
-
setNewsURL
public void setNewsURL(String url)
-
setRefreshFrequency
public void setRefreshFrequency(String freq)
-
setUpdateURL
public void setUpdateURL(String url)
-
setUpdatePolicy
public void setUpdatePolicy(String policy)
-
setTrustedKeys
public void setTrustedKeys(String keys)
-
setUpdateThroughProxy
public void setUpdateThroughProxy(String foo)
-
setProxyHost
public void setProxyHost(String host)
-
setProxyPort
public void setProxyPort(String port)
-
setUpdateUnsigned
public void setUpdateUnsigned(String foo)
-
setZipURL
public void setZipURL(String url)
-
setNewsThroughProxy
public void setNewsThroughProxy(String foo)
- Since:
- 0.9.9
-
setUpdateDevSU3
public void setUpdateDevSU3(String foo)
- Since:
- 0.9.20
-
setDevSU3URL
public void setDevSU3URL(String url)
- Since:
- 0.9.20
-
-