forked from I2P_Developers/i2p.i2p
2005-08-10 jrandom
* Deployed the peer testing implementation to be run every few minutes on each router, as well as any time the user requests a test manually. The tests do not reconfigure the ports at the moment, merely determine under what conditions the local router is reachable. The status shown in the top left will be "ERR-SymmetricNAT" if the user's IP and port show up differently for different peers, "ERR-Reject" if the router cannot receive unsolicited packets or the peer helping test could not find a collaborator, "Unknown" if the test has not been run or the test participants were unreachable, or "OK" if the router can receive unsolicited connections and those connections use the same IP and port.
This commit is contained in:
@ -27,6 +27,7 @@ public class ConfigNetHandler extends FormHandler {
|
||||
private boolean _guessRequested;
|
||||
private boolean _reseedRequested;
|
||||
private boolean _saveRequested;
|
||||
private boolean _recheckReachabilityRequested;
|
||||
private boolean _timeSyncEnabled;
|
||||
private String _tcpPort;
|
||||
private String _udpPort;
|
||||
@ -44,6 +45,8 @@ public class ConfigNetHandler extends FormHandler {
|
||||
reseed();
|
||||
} else if (_saveRequested) {
|
||||
saveChanges();
|
||||
} else if (_recheckReachabilityRequested) {
|
||||
recheckReachability();
|
||||
} else {
|
||||
// noop
|
||||
}
|
||||
@ -53,6 +56,7 @@ public class ConfigNetHandler extends FormHandler {
|
||||
public void setReseed(String moo) { _reseedRequested = true; }
|
||||
public void setSave(String moo) { _saveRequested = true; }
|
||||
public void setEnabletimesync(String moo) { _timeSyncEnabled = true; }
|
||||
public void setRecheckReachability(String moo) { _recheckReachabilityRequested = true; }
|
||||
|
||||
public void setHostname(String hostname) {
|
||||
_hostname = (hostname != null ? hostname.trim() : null);
|
||||
@ -195,6 +199,11 @@ public class ConfigNetHandler extends FormHandler {
|
||||
fos.close();
|
||||
}
|
||||
|
||||
private void recheckReachability() {
|
||||
_context.commSystem().recheckReachability();
|
||||
addFormNotice("Rechecking router reachability...");
|
||||
}
|
||||
|
||||
/**
|
||||
* The user made changes to the network config and wants to save them, so
|
||||
* lets go ahead and do so.
|
||||
|
Reference in New Issue
Block a user