* Console:

- countries.txt: Convert to mixed case, include in update
      - netdb.jsp: Hide all routers by default, sort and tag country names
      - oldstats.jsp: Move to stats.jsp
      - profiles.jsp: Show new DBH times instead of counts
    * Profiles:
      - Track last good and bad lookup times
        and last good and bad store times,
        to prep for floodfill changes
      - Don't reset last-heard-about at router startup
    * Checklist and Android readme fixups
This commit is contained in:
zzz
2009-11-07 19:32:00 +00:00
parent 827a92ef2f
commit a0b4b7db86
18 changed files with 442 additions and 312 deletions

View File

@ -1,9 +1,13 @@
These instructions are for the 1.5 SDK. These instructions are for the 1.5 Android SDK.
The build file is not compatible with the 1.1 SDK any more. The build file is not compatible with the 1.1 SDK any more.
1.6 and 2.0 SDKs are untested.
#Unzip the android SDK in ../../ #Unzip the android SDK in ../../
#So then the android tools will be in ../../android-sdk-linux_x86-1.5_r2/tools/ #So then the android tools will be in ../../android-sdk-linux_x86-1.5_r2/tools/
# create a file local.properties with the following line:
# sdk-location=/path/to/your/android-sdk-linux_x86-1.5_r2
#then build the android apk file: #then build the android apk file:
ant debug ant debug

View File

@ -19,6 +19,20 @@ CLASS=net.i2p.router.web.messages
TMPFILE=build/javafiles.txt TMPFILE=build/javafiles.txt
export TZ=UTC export TZ=UTC
#
# generate strings/Countries.java from ../../../installer/resources/countries.txt
#
CFILE=../../../installer/resources/countries.txt
JFILE=build/Countries.java
if [ $CFILE -nt $JFILE -o ! -s $JFILE ]
then
mkdir -p build
echo '// Automatically generated pseudo-java for xgettext - do not edit' > $JFILE
echo '// Translators may wish to translate a few of these, do not bother to translate all of them!!' >> $JFILE
sed 's/..,\(..*\)/_("\1");/' $CFILE >> $JFILE
fi
JPATHS="src ../jsp/WEB-INF strings $JFILE"
for i in ../locale/messages_*.po for i in ../locale/messages_*.po
do do
# get language # get language
@ -26,7 +40,7 @@ do
LG=${LG%.po} LG=${LG%.po}
# make list of java files newer than the .po file # make list of java files newer than the .po file
find src ../jsp/WEB-INF strings -name *.java -newer $i > $TMPFILE find $JPATHS -name *.java -newer $i > $TMPFILE
if [ -s build/obj/net/i2p/router/web/messages_$LG.class -a \ if [ -s build/obj/net/i2p/router/web/messages_$LG.class -a \
build/obj/net/i2p/router/web/messages_$LG.class -nt $i -a \ build/obj/net/i2p/router/web/messages_$LG.class -nt $i -a \
! -s $TMPFILE ] ! -s $TMPFILE ]
@ -48,7 +62,7 @@ do
# In a jsp, you must use a helper or handler that has the context set. # In a jsp, you must use a helper or handler that has the context set.
# To start a new translation, copy the header from an old translation to the new .po file, # To start a new translation, copy the header from an old translation to the new .po file,
# then ant distclean updater. # then ant distclean updater.
find src ../jsp/WEB-INF strings -name *.java > $TMPFILE find $JPATHS -name *.java > $TMPFILE
xgettext -f $TMPFILE -F -L java --from-code=UTF-8 \ xgettext -f $TMPFILE -F -L java --from-code=UTF-8 \
--keyword=_ --keyword=_x --keyword=intl._ --keyword=intl.title \ --keyword=_ --keyword=_x --keyword=intl._ --keyword=intl.title \
--keyword=handler._ --keyword=formhandler._ \ --keyword=handler._ --keyword=formhandler._ \

View File

@ -8,6 +8,20 @@ CLASS=net.i2p.router.web.messages
TMPFILE=build/javafiles.txt TMPFILE=build/javafiles.txt
export TZ=UTC export TZ=UTC
#
# generate strings/Countries.java from ../../../installer/resources/countries.txt
#
CFILE=../../../installer/resources/countries.txt
JFILE=build/Countries.java
if [ $CFILE -nt $JFILE -o ! -s $JFILE ]
then
mkdir -p build
echo '// Automatically generated pseudo-java for xgettext - do not edit' > $JFILE
echo '// Translators may wish to translate a few of these, do not bother to translate all of them!!' >> $JFILE
sed 's/..,\(..*\)/_("\1");/' $CFILE >> $JFILE
fi
JPATHS="src ../jsp/WEB-INF strings $JFILE"
for i in ../locale/messages_*.po for i in ../locale/messages_*.po
do do
# get language # get language
@ -15,7 +29,7 @@ do
LG=${LG%.po} LG=${LG%.po}
# make list of java files newer than the .po file # make list of java files newer than the .po file
find src ../jsp/WEB-INF strings -name *.java -newer $i > $TMPFILE find $JPATHS -name *.java -newer $i > $TMPFILE
if [ -s build/obj/net/i2p/router/web/messages_$LG.class -a \ if [ -s build/obj/net/i2p/router/web/messages_$LG.class -a \
build/obj/net/i2p/router/web/messages_$LG.class -nt $i -a \ build/obj/net/i2p/router/web/messages_$LG.class -nt $i -a \
! -s $TMPFILE ] ! -s $TMPFILE ]
@ -37,7 +51,7 @@ do
# In a jsp, you must use a helper or handler that has the context set. # In a jsp, you must use a helper or handler that has the context set.
# To start a new translation, copy the header from an old translation to the new .po file, # To start a new translation, copy the header from an old translation to the new .po file,
# then ant distclean updater. # then ant distclean updater.
find src ../jsp/WEB-INF strings -name *.java > $TMPFILE find $JPATHS -name *.java > $TMPFILE
xgettext -f $TMPFILE -F -L java --from-code=UTF-8 \ xgettext -f $TMPFILE -F -L java --from-code=UTF-8 \
--keyword=_ --keyword=_x --keyword=intl._ --keyword=intl.title \ --keyword=_ --keyword=_x --keyword=intl._ --keyword=intl.title \
--keyword=handler._ --keyword=formhandler._ \ --keyword=handler._ --keyword=formhandler._ \

View File

@ -7,13 +7,17 @@ import java.io.OutputStreamWriter;
public class NetDbHelper extends HelperBase { public class NetDbHelper extends HelperBase {
private String _routerPrefix; private String _routerPrefix;
private boolean _full = false; private int _full;
private boolean _lease = false; private boolean _lease = false;
public NetDbHelper() {} public NetDbHelper() {}
public void setRouter(String r) { _routerPrefix = r; } public void setRouter(String r) { _routerPrefix = r; }
public void setFull(String f) { _full = "1".equals(f); } public void setFull(String f) {
try {
_full = Integer.parseInt(f);
} catch (NumberFormatException nfe) {}
}
public void setLease(String l) { _lease = "1".equals(l); } public void setLease(String l) { _lease = "1".equals(l); }
public String getNetDbSummary() { public String getNetDbSummary() {

View File

@ -77,10 +77,6 @@ public class NetDbRenderer {
out.flush(); out.flush();
} }
public void renderStatusHTML(Writer out) throws IOException {
renderStatusHTML(out, true);
}
public void renderLeaseSetHTML(Writer out) throws IOException { public void renderLeaseSetHTML(Writer out) throws IOException {
StringBuilder buf = new StringBuilder(4*1024); StringBuilder buf = new StringBuilder(4*1024);
buf.append("<h2>" + _("Network Database Contents") + "</h2>\n"); buf.append("<h2>" + _("Network Database Contents") + "</h2>\n");
@ -131,7 +127,10 @@ public class NetDbRenderer {
out.flush(); out.flush();
} }
public void renderStatusHTML(Writer out, boolean full) throws IOException { /**
* @param mode 0: our info and charts only; 1: full routerinfos and charts; 2: abbreviated routerinfos and charts
*/
public void renderStatusHTML(Writer out, int mode) throws IOException {
out.write("<h2>" + _("Network Database Contents") + " (<a href=\"netdb.jsp?l=1\">" + _("View LeaseSets") + "</a>)</h2>\n"); out.write("<h2>" + _("Network Database Contents") + " (<a href=\"netdb.jsp?l=1\">" + _("View LeaseSets") + "</a>)</h2>\n");
if (!_context.netDb().isInitialized()) { if (!_context.netDb().isInitialized()) {
out.write(_("Not initialized")); out.write(_("Not initialized"));
@ -139,13 +138,16 @@ public class NetDbRenderer {
return; return;
} }
boolean full = mode == 1;
boolean shortStats = mode == 2;
boolean showStats = full || shortStats;
Hash us = _context.routerHash(); Hash us = _context.routerHash();
out.write("<a name=\"routers\" ></a><h3>" + _("Routers") + " (<a href=\"netdb.jsp"); out.write("<a name=\"routers\" ></a><h3>" + _("Routers") + " (<a href=\"netdb.jsp");
if (full) if (full || !showStats)
out.write("#routers\" >" + _("view without")); out.write("?f=2#routers\" >" + _("Show all routers"));
else else
out.write("?f=1#routers\" >" + _("view with")); out.write("?f=1#routers\" >" + _("Show all routers with full stats"));
out.write(' ' + _("stats") + "</a>)</h3>\n"); out.write("</a>)</h3>\n");
StringBuilder buf = new StringBuilder(8192); StringBuilder buf = new StringBuilder(8192);
RouterInfo ourInfo = _context.router().getRouterInfo(); RouterInfo ourInfo = _context.router().getRouterInfo();
@ -163,9 +165,11 @@ public class NetDbRenderer {
Hash key = ri.getIdentity().getHash(); Hash key = ri.getIdentity().getHash();
boolean isUs = key.equals(us); boolean isUs = key.equals(us);
if (!isUs) { if (!isUs) {
renderRouterInfo(buf, ri, false, full); if (showStats) {
out.write(buf.toString()); renderRouterInfo(buf, ri, false, full);
buf.setLength(0); out.write(buf.toString());
buf.setLength(0);
}
String routerVersion = ri.getOption("router.version"); String routerVersion = ri.getOption("router.version");
if (routerVersion != null) if (routerVersion != null)
versions.increment(routerVersion); versions.increment(routerVersion);
@ -194,14 +198,14 @@ public class NetDbRenderer {
List<String> countryList = new ArrayList(countries.objects()); List<String> countryList = new ArrayList(countries.objects());
if (countryList.size() > 0) { if (countryList.size() > 0) {
Collections.sort(countryList); Collections.sort(countryList, new CountryComparator());
buf.append("<table>\n"); buf.append("<table>\n");
buf.append("<tr><th align=\"left\">" + _("Country") + "</th><th>" + _("Count") + "</th></tr>\n"); buf.append("<tr><th align=\"left\">" + _("Country") + "</th><th>" + _("Count") + "</th></tr>\n");
for (String country : countryList) { for (String country : countryList) {
int num = countries.count(country); int num = countries.count(country);
buf.append("<tr><td><img height=\"11\" width=\"16\" alt=\"").append(country.toUpperCase()).append("\""); buf.append("<tr><td><img height=\"11\" width=\"16\" alt=\"").append(country.toUpperCase()).append("\"");
buf.append(" src=\"/flags.jsp?c=").append(country).append("\"> "); buf.append(" src=\"/flags.jsp?c=").append(country).append("\"> ");
buf.append(_context.commSystem().getCountryName(country)); buf.append(_(_context.commSystem().getCountryName(country)));
buf.append("</td><td align=\"center\">").append(num).append("</td></tr>\n"); buf.append("</td><td align=\"center\">").append(num).append("</td></tr>\n");
} }
buf.append("</table>\n"); buf.append("</table>\n");
@ -211,6 +215,14 @@ public class NetDbRenderer {
out.flush(); out.flush();
} }
/** sort by translated country name */
private class CountryComparator implements Comparator {
public int compare(Object l, Object r) {
return _(_context.commSystem().getCountryName((String)l))
.compareTo(_(_context.commSystem().getCountryName((String)r)));
}
}
/** /**
* Be careful to use stripHTML for any displayed routerInfo data * Be careful to use stripHTML for any displayed routerInfo data
* to prevent vulnerabilities * to prevent vulnerabilities

View File

@ -171,28 +171,24 @@ class ProfileOrganizerRenderer {
buf.append("<h2>").append(_("Floodfill and Integrated Peers")).append("</h2>\n"); buf.append("<h2>").append(_("Floodfill and Integrated Peers")).append("</h2>\n");
buf.append("<table>"); buf.append("<table>");
buf.append("<tr>"); buf.append("<tr>");
buf.append("<th class=\"smallhead\">Peer</th>"); buf.append("<th class=\"smallhead\">").append(_("Peer")).append("</th>");
buf.append("<th class=\"smallhead\">Caps</th>"); buf.append("<th class=\"smallhead\">").append(_("Caps")).append("</th>");
buf.append("<th class=\"smallhead\">Integ. Value</th>"); buf.append("<th class=\"smallhead\">").append(_("Integ. Value")).append("</th>");
buf.append("<th class=\"smallhead\">Last Heard About</th>"); buf.append("<th class=\"smallhead\">").append(_("Last Heard About")).append("</th>");
buf.append("<th class=\"smallhead\">Last Heard From</th>"); buf.append("<th class=\"smallhead\">").append(_("Last Heard From")).append("</th>");
// "<th class=\"smallhead\">Last Successful Send</th>" + buf.append("<th class=\"smallhead\">").append(_("Last Good Send")).append("</th>");
buf.append("<th class=\"smallhead\">Last Good Send</th>"); buf.append("<th class=\"smallhead\">").append(_("Last Bad Send")).append("</th>");
// "<th class=\"smallhead\">Last Failed Send</th>" + buf.append("<th class=\"smallhead\">").append(_("10m Resp. Time")).append("</th>");
buf.append("<th class=\"smallhead\">Last Bad Send</th>"); buf.append("<th class=\"smallhead\">").append(_("1h Resp. Time")).append("</th>");
buf.append("<th class=\"smallhead\">10m Resp. Time</th>"); buf.append("<th class=\"smallhead\">").append(_("1d Resp. Time")).append("</th>");
buf.append("<th class=\"smallhead\">1h Resp. Time</th>"); buf.append("<th class=\"smallhead\">").append(_("Last Good Lookup")).append("</th>");
buf.append("<th class=\"smallhead\">1d Resp. Time</th>"); buf.append("<th class=\"smallhead\">").append(_("Last Bad Lookup")).append("</th>");
// "<th class=\"smallhead\">Successful Lookups</th>" + buf.append("<th class=\"smallhead\">").append(_("Last Good Store")).append("</th>");
buf.append("<th class=\"smallhead\">Good Lookups</th>"); buf.append("<th class=\"smallhead\">").append(_("Last Bad Store")).append("</th>");
// "<th>Failed Lookups</th>" + buf.append("<th class=\"smallhead\">").append(_("1h Fail Rate")).append("</th>");
buf.append("<th class=\"smallhead\">Bad Lookups</th>"); buf.append("<th class=\"smallhead\">").append(_("1d Fail Rate")).append("</th>");
buf.append("<th class=\"smallhead\">New Stores</th>"); buf.append("</tr>");
buf.append("<th class=\"smallhead\">Old Stores</th>");
buf.append("<th class=\"smallhead\">1h Fail Rate</th>");
buf.append("<th class=\"smallhead\">1d Fail Rate</th>");
buf.append("</tr>");
for (Iterator iter = integratedPeers.iterator(); iter.hasNext();) { for (Iterator iter = integratedPeers.iterator(); iter.hasNext();) {
PeerProfile prof = (PeerProfile)iter.next(); PeerProfile prof = (PeerProfile)iter.next();
Hash peer = prof.getPeer(); Hash peer = prof.getPeer();
@ -221,10 +217,14 @@ class ProfileOrganizerRenderer {
buf.append("<td align=\"right\">").append(avg(prof, 24*60*60*1000l)).append("</td>"); buf.append("<td align=\"right\">").append(avg(prof, 24*60*60*1000l)).append("</td>");
DBHistory dbh = prof.getDBHistory(); DBHistory dbh = prof.getDBHistory();
if (dbh != null) { if (dbh != null) {
buf.append("<td align=\"right\">").append(dbh.getSuccessfulLookups()).append("</td>"); time = now - dbh.getLastLookupSuccessful();
buf.append("<td align=\"right\">").append(dbh.getFailedLookups()).append("</td>"); buf.append("<td align=\"right\">").append(DataHelper.formatDuration(time)).append("</td>");
buf.append("<td align=\"right\">").append(dbh.getUnpromptedDbStoreNew()).append("</td>"); time = now - dbh.getLastLookupFailed();
buf.append("<td align=\"right\">").append(dbh.getUnpromptedDbStoreOld()).append("</td>"); buf.append("<td align=\"right\">").append(DataHelper.formatDuration(time)).append("</td>");
time = now - dbh.getLastStoreSuccessful();
buf.append("<td align=\"right\">").append(DataHelper.formatDuration(time)).append("</td>");
time = now - dbh.getLastStoreFailed();
buf.append("<td align=\"right\">").append(DataHelper.formatDuration(time)).append("</td>");
buf.append("<td align=\"right\">").append(davg(dbh, 60*60*1000l)).append("</td>"); buf.append("<td align=\"right\">").append(davg(dbh, 60*60*1000l)).append("</td>");
buf.append("<td align=\"right\">").append(davg(dbh, 24*60*60*1000l)).append("</td>"); buf.append("<td align=\"right\">").append(davg(dbh, 24*60*60*1000l)).append("</td>");
} else { } else {
@ -242,13 +242,13 @@ class ProfileOrganizerRenderer {
buf.append("<b>").append(_("Integration")).append(":</b> ").append(num(_organizer.getIntegrationThreshold())) buf.append("<b>").append(_("Integration")).append(":</b> ").append(num(_organizer.getIntegrationThreshold()))
.append(" (").append(integrated).append(' ').append(_(" well integrated peers")).append(")</p>"); .append(" (").append(integrated).append(' ').append(_(" well integrated peers")).append(")</p>");
buf.append("<h3>").append(_("Definitions")).append(":</h3><ul>"); buf.append("<h3>").append(_("Definitions")).append(":</h3><ul>");
buf.append("<li><b>").append(_("groups")).append("</b>: ").append(_("as determined by the profile organizer")).append("</li>"); buf.append("<li><b>").append(_("groups")).append("</b>: ").append(_("as determined by the profile organizer")).append("</li>");
buf.append("<li><b>").append(_("caps")).append("</b>: ").append(_("capabilities in the netDb, not used to determine profiles")).append("</li>"); buf.append("<li><b>").append(_("caps")).append("</b>: ").append(_("capabilities in the netDb, not used to determine profiles")).append("</li>");
buf.append("<li><b>").append(_("speed")).append("</b>: ").append(_("peak throughput (bytes per second) over a 1 minute period that the peer has sustained in a single tunnel")).append("</li>"); buf.append("<li><b>").append(_("speed")).append("</b>: ").append(_("peak throughput (bytes per second) over a 1 minute period that the peer has sustained in a single tunnel")).append("</li>");
buf.append("<li><b>").append(_("capacity")).append("</b>: ").append(_("how many tunnels can we ask them to join in an hour?")).append("</li>"); buf.append("<li><b>").append(_("capacity")).append("</b>: ").append(_("how many tunnels can we ask them to join in an hour?")).append("</li>");
buf.append("<li><b>").append(_("integration")).append("</b>: ").append(_("how many new peers have they told us about lately?")).append("</li>"); buf.append("<li><b>").append(_("integration")).append("</b>: ").append(_("how many new peers have they told us about lately?")).append("</li>");
buf.append("<li><b>").append(_("status")).append("</b>: ").append(_("is the peer banned, or unreachable, or failing tunnel tests?")).append("</li>"); buf.append("<li><b>").append(_("status")).append("</b>: ").append(_("is the peer banned, or unreachable, or failing tunnel tests?")).append("</li>");
buf.append("</ul></i>"); buf.append("</ul></i>");
out.write(buf.toString()); out.write(buf.toString());
out.flush(); out.flush();
} }

View File

@ -29,7 +29,7 @@ public class StatsGenerator {
public void generateStatsPage(Writer out) throws IOException { public void generateStatsPage(Writer out) throws IOException {
StringBuilder buf = new StringBuilder(16*1024); StringBuilder buf = new StringBuilder(16*1024);
buf.append("<div class=\"joblog\"><form action=\"/oldstats.jsp\">"); buf.append("<div class=\"joblog\"><form action=\"/stats.jsp\">");
buf.append("<select name=\"go\" onChange='location.href=this.value'>"); buf.append("<select name=\"go\" onChange='location.href=this.value'>");
out.write(buf.toString()); out.write(buf.toString());
buf.setLength(0); buf.setLength(0);
@ -39,11 +39,11 @@ public class StatsGenerator {
Map.Entry entry = (Map.Entry)iter.next(); Map.Entry entry = (Map.Entry)iter.next();
String group = (String)entry.getKey(); String group = (String)entry.getKey();
Set stats = (Set)entry.getValue(); Set stats = (Set)entry.getValue();
buf.append("<option value=\"/oldstats.jsp#").append(group).append("\">"); buf.append("<option value=\"/stats.jsp#").append(group).append("\">");
buf.append(group).append("</option>\n"); buf.append(group).append("</option>\n");
for (Iterator statIter = stats.iterator(); statIter.hasNext(); ) { for (Iterator statIter = stats.iterator(); statIter.hasNext(); ) {
String stat = (String)statIter.next(); String stat = (String)statIter.next();
buf.append("<option value=\"/oldstats.jsp#"); buf.append("<option value=\"/stats.jsp#");
buf.append(stat); buf.append(stat);
buf.append("\">..."); buf.append("\">...");
buf.append(stat); buf.append(stat);

View File

@ -118,7 +118,7 @@ public class SummaryBarRenderer {
.append(_("Graphs")) .append(_("Graphs"))
.append("</a>\n" + .append("</a>\n" +
"<a href=\"oldstats.jsp\" target=\"_top\" title=\"") "<a href=\"stats.jsp\" target=\"_top\" title=\"")
.append(_("Textual router performance statistics")) .append(_("Textual router performance statistics"))
.append("\">") .append("\">")
.append(_("Stats")) .append(_("Stats"))

View File

@ -410,6 +410,8 @@
<copy file="build/i2ptunnel.war" todir="pkg-temp/webapps/" /> <copy file="build/i2ptunnel.war" todir="pkg-temp/webapps/" />
<copy file="build/routerconsole.war" todir="pkg-temp/webapps/" /> <copy file="build/routerconsole.war" todir="pkg-temp/webapps/" />
<copy file="build/addressbook.war" todir="pkg-temp/webapps/" /> <copy file="build/addressbook.war" todir="pkg-temp/webapps/" />
<!-- decapitalized the file in 0.7.8 -->
<copy file="installer/resources/countries.txt" todir="pkg-temp/geoip/" />
</target> </target>
<target name="prepupdateRouter" depends="buildrouter, deletepkg-temp"> <target name="prepupdateRouter" depends="buildrouter, deletepkg-temp">
<copy file="build/i2p.jar" todir="pkg-temp/lib/" /> <copy file="build/i2p.jar" todir="pkg-temp/lib/" />

View File

@ -8,9 +8,9 @@ Deploy the Jetty archive, a clean checkout lacks it
Change revision in: Change revision in:
history.txt history.txt
initialNews.xml installer/resources/initialNews.xml
installer/install.xml installer/install.xml
news.xml installer/resources/news.xml
router/java/src/net/i2p/router/RouterVersion.java router/java/src/net/i2p/router/RouterVersion.java
(change to BUILD = 0 and EXTRA = "") (change to BUILD = 0 and EXTRA = "")
core/java/src/net/i2p/CoreVersion.java core/java/src/net/i2p/CoreVersion.java
@ -23,6 +23,8 @@ Verify that no untrusted revisions were inadvertently
blessed by a trusted party: blessed by a trusted party:
mtn log --brief --no-graph --to t:i2p-0.7.(xx-1) | cut -d ' ' -f 2- | sort mtn log --brief --no-graph --to t:i2p-0.7.(xx-1) | cut -d ' ' -f 2- | sort
NOTE: Most tasks below here are now automated by 'ant release'
Build and tag: Build and tag:
ant pkg ant pkg
mtn ci mtn ci
@ -60,16 +62,18 @@ Generate PGP signatures:
gpg -b i2pupdate-0.7.xx.zip gpg -b i2pupdate-0.7.xx.zip
gpg -b i2pupdate.sud gpg -b i2pupdate.sud
(end of tasks automated by 'ant release')
Distribute files to download locations and to www.i2p2.i2p Distribute files to download locations and to www.i2p2.i2p
Website files to change: Website files to change:
Sync with mtn.i2p2.i2p Sync with mtn.i2p2.i2p
announcements.html announcements.html
announcements_de.html announcements_*.html
download.html (change SHA256s) download.html (change version numbers and SHA256s)
download_de.html (change SHA256s) download_*.html (change version numbers and SHA256s)
index.html index.html
index_de.html index_*.html
hosts.txt (copy from mtn) hosts.txt (copy from mtn)
release-x.y.z.html (new) release-x.y.z.html (new)
Sync with mtn.i2p2.i2p Sync with mtn.i2p2.i2p

View File

@ -1,3 +1,16 @@
2009-11-08 zzz
* Console:
- countries.txt: Convert to mixed case, include in update
- netdb.jsp: Hide all routers by default, sort and tag country names
- oldstats.jsp: Move to stats.jsp
- profiles.jsp: Show new DBH times instead of counts
* Profiles:
- Track last good and bad lookup times
and last good and bad store times,
to prep for floodfill changes
- Don't reset last-heard-about at router startup
* Checklist and Android readme fixups
2009-11-04 zzz 2009-11-04 zzz
* Build: * Build:
- Move some files to installer/resources - Move some files to installer/resources

View File

@ -1,237 +1,237 @@
AD,ANDORRA AD,Andorra
AE,UNITED ARAB EMIRATES AE,United Arab Emirates
AF,AFGHANISTAN AF,Afghanistan
AG,ANTIGUA AND BARBUDA AG,Antigua and Barbuda
AI,ANGUILLA AI,Anguilla
AL,ALBANIA AL,Albania
AM,ARMENIA AM,Armenia
AN,NETHERLANDS ANTILLES AN,Netherlands Antilles
AO,ANGOLA AO,Angola
AQ,ANTARCTICA AQ,Antarctica
AR,ARGENTINA AR,Argentina
AS,AMERICAN SAMOA AS,American Samoa
AT,AUSTRIA AT,Austria
AU,AUSTRALIA AU,Australia
AW,ARUBA AW,Aruba
AX, AX,
AZ,AZERBAIJAN AZ,Azerbaijan
BA,BOSNIA AND HERZEGOVINA BA,Bosnia and Herzegovina
BB,BARBADOS BB,Barbados
BD,BANGLADESH BD,Bangladesh
BE,BELGIUM BE,Belgium
BF,BURKINA FASO BF,Burkina Faso
BG,BULGARIA BG,Bulgaria
BH,BAHRAIN BH,Bahrain
BI,BURUNDI BI,Burundi
BJ,BENIN BJ,Benin
BM,BERMUDA BM,Bermuda
BN,BRUNEI DARUSSALAM BN,Brunei Darussalam
BO,BOLIVIA BO,Bolivia
BR,BRAZIL BR,Brazil
BS,BAHAMAS BS,Bahamas
BT,BHUTAN BT,Bhutan
BV,BOUVET ISLAND BV,Bouvet Island
BW,BOTSWANA BW,Botswana
BY,BELARUS BY,Belarus
BZ,BELIZE BZ,Belize
CA,CANADA CA,Canada
CD,THE DEMOCRATIC REPUBLIC OF THE CONGO CD,The Democratic Republic of the Congo
CF,CENTRAL AFRICAN REPUBLIC CF,Central African Republic
CG,CONGO CG,Congo
CH,SWITZERLAND CH,Switzerland
CI,COTE D'IVOIRE CI,Cote D'Ivoire
CK,COOK ISLANDS CK,Cook Islands
CL,CHILE CL,Chile
CM,CAMEROON CM,Cameroon
CN,CHINA CN,China
CO,COLOMBIA CO,Colombia
CR,COSTA RICA CR,Costa Rica
CS,SERBIA AND MONTENEGRO CS,Serbia and Montenegro
CU,CUBA CU,Cuba
CV,CAPE VERDE CV,Cape Verde
CY,CYPRUS CY,Cyprus
CZ,CZECH REPUBLIC CZ,Czech Republic
DE,GERMANY DE,Germany
DJ,DJIBOUTI DJ,Djibouti
DK,DENMARK DK,Denmark
DM,DOMINICA DM,Dominica
DO,DOMINICAN REPUBLIC DO,Dominican Republic
DZ,ALGERIA DZ,Algeria
EC,ECUADOR EC,Ecuador
EE,ESTONIA EE,Estonia
EG,EGYPT EG,Egypt
ER,ERITREA ER,Eritrea
ES,SPAIN ES,Spain
ET,ETHIOPIA ET,Ethiopia
FI,FINLAND FI,Finland
FJ,FIJI FJ,Fiji
FK,FALKLAND ISLANDS (MALVINAS) FK,Falkland Islands (Malvinas)
FM,FEDERATED STATES OF MICRONESIA FM,Federated States of Micronesia
FO,FAROE ISLANDS FO,Faroe Islands
FR,FRANCE FR,France
GA,GABON GA,Gabon
GB,UNITED KINGDOM GB,United Kingdom
GD,GRENADA GD,Grenada
GE,GEORGIA GE,Georgia
GF,FRENCH GUIANA GF,French Guiana
GH,GHANA GH,Ghana
GI,GIBRALTAR GI,Gibraltar
GL,GREENLAND GL,Greenland
GM,GAMBIA GM,Gambia
GN,GUINEA GN,Guinea
GP,GUADELOUPE GP,Guadeloupe
GQ,EQUATORIAL GUINEA GQ,Equatorial Guinea
GR,GREECE GR,Greece
GS,SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS GS,South Georgia and the South Sandwich Islands
GT,GUATEMALA GT,Guatemala
GU,GUAM GU,Guam
GW,GUINEA-BISSAU GW,Guinea-Bissau
GY,GUYANA GY,Guyana
HK,HONG KONG HK,Hong Kong
HN,HONDURAS HN,Honduras
HR,CROATIA HR,Croatia
HT,HAITI HT,Haiti
HU,HUNGARY HU,Hungary
ID,INDONESIA ID,Indonesia
IE,IRELAND IE,Ireland
IL,ISRAEL IL,Israel
IM, IM,
IN,INDIA IN,India
IO,BRITISH INDIAN OCEAN TERRITORY IO,British Indian Ocean Territory
IQ,IRAQ IQ,Iraq
IR,ISLAMIC REPUBLIC OF IRAN IR,Islamic Republic of Iran
IS,ICELAND IS,Iceland
IT,ITALY IT,Italy
JE, JE,
JM,JAMAICA JM,Jamaica
JO,JORDAN JO,Jordan
JP,JAPAN JP,Japan
KE,KENYA KE,Kenya
KG,KYRGYZSTAN KG,Kyrgyzstan
KH,CAMBODIA KH,Cambodia
KI,KIRIBATI KI,Kiribati
KM,COMOROS KM,Comoros
KN,SAINT KITTS AND NEVIS KN,Saint Kitts and Nevis
KR,REPUBLIC OF KOREA KR,Republic of Korea
KW,KUWAIT KW,Kuwait
KY,CAYMAN ISLANDS KY,Cayman Islands
KZ,KAZAKHSTAN KZ,Kazakhstan
LA,LAO PEOPLE'S DEMOCRATIC REPUBLIC LA,Lao People'S Democratic Republic
LB,LEBANON LB,Lebanon
LC,SAINT LUCIA LC,Saint Lucia
LI,LIECHTENSTEIN LI,Liechtenstein
LK,SRI LANKA LK,Sri Lanka
LR,LIBERIA LR,Liberia
LS,LESOTHO LS,Lesotho
LT,LITHUANIA LT,Lithuania
LU,LUXEMBOURG LU,Luxembourg
LV,LATVIA LV,Latvia
LY,LIBYAN ARAB JAMAHIRIYA LY,Libyan Arab Jamahiriya
MA,MOROCCO MA,Morocco
MC,MONACO MC,Monaco
MD,REPUBLIC OF MOLDOVA MD,Republic of Moldova
ME, ME,
MF, MF,
MG,MADAGASCAR MG,Madagascar
MH,MARSHALL ISLANDS MH,Marshall Islands
MK,THE FORMER YUGOSLAV REPUBLIC OF MACEDONIA MK,The Former Yugoslav Republic of Macedonia
ML,MALI ML,Mali
MM,MYANMAR MM,Myanmar
MN,MONGOLIA MN,Mongolia
MO,MACAO MO,Macao
MP,NORTHERN MARIANA ISLANDS MP,Northern Mariana Islands
MQ,MARTINIQUE MQ,Martinique
MR,MAURITANIA MR,Mauritania
MS,MONTSERRAT MS,Montserrat
MT,MALTA MT,Malta
MU,MAURITIUS MU,Mauritius
MV,MALDIVES MV,Maldives
MW,MALAWI MW,Malawi
MX,MEXICO MX,Mexico
MY,MALAYSIA MY,Malaysia
MZ,MOZAMBIQUE MZ,Mozambique
NA,NAMIBIA NA,Namibia
NC,NEW CALEDONIA NC,New Caledonia
NE,NIGER NE,Niger
NF,NORFOLK ISLAND NF,Norfolk Island
NG,NIGERIA NG,Nigeria
NI,NICARAGUA NI,Nicaragua
NL,NETHERLANDS NL,Netherlands
NO,NORWAY NO,Norway
NP,NEPAL NP,Nepal
NR,NAURU NR,Nauru
NU,NIUE NU,Niue
NZ,NEW ZEALAND NZ,New Zealand
OM,OMAN OM,Oman
PA,PANAMA PA,Panama
PE,PERU PE,Peru
PF,FRENCH POLYNESIA PF,French Polynesia
PG,PAPUA NEW GUINEA PG,Papua New Guinea
PH,PHILIPPINES PH,Philippines
PK,PAKISTAN PK,Pakistan
PL,POLAND PL,Poland
PM,SAINT PIERRE AND MIQUELON PM,Saint Pierre and Miquelon
PR,PUERTO RICO PR,Puerto Rico
PS,PALESTINIAN TERRITORY PS,Palestinian Territory
PT,PORTUGAL PT,Portugal
PW,PALAU PW,Palau
PY,PARAGUAY PY,Paraguay
QA,QATAR QA,Qatar
RE,REUNION RE,Reunion
RO,ROMANIA RO,Romania
RS,SERBIA RS,Serbia
RU,RUSSIAN FEDERATION RU,Russian Federation
RW,RWANDA RW,Rwanda
SA,SAUDI ARABIA SA,Saudi Arabia
SB,SOLOMON ISLANDS SB,Solomon Islands
SC,SEYCHELLES SC,Seychelles
SD,SUDAN SD,Sudan
SE,SWEDEN SE,Sweden
SG,SINGAPORE SG,Singapore
SI,SLOVENIA SI,Slovenia
SK,SLOVAKIA SK,Slovakia
SL,SIERRA LEONE SL,Sierra Leone
SM,SAN MARINO SM,San Marino
SN,SENEGAL SN,Senegal
SO,SOMALIA SO,Somalia
SR,SURINAME SR,Suriname
ST,SAO TOME AND PRINCIPE ST,Sao Tome and Principe
SV,EL SALVADOR SV,El Salvador
SY,SYRIAN ARAB REPUBLIC SY,Syrian Arab Republic
SZ,SWAZILAND SZ,Swaziland
TC,TURKS AND CAICOS ISLANDS TC,Turks and Caicos Islands
TD,CHAD TD,Chad
TF,FRENCH SOUTHERN TERRITORIES TF,French Southern Territories
TG,TOGO TG,Togo
TH,THAILAND TH,Thailand
TJ,TAJIKISTAN TJ,Tajikistan
TK,TOKELAU TK,Tokelau
TL,TIMOR-LESTE TL,Timor-Leste
TM,TURKMENISTAN TM,Turkmenistan
TN,TUNISIA TN,Tunisia
TO,TONGA TO,Tonga
TR,TURKEY TR,Turkey
TT,TRINIDAD AND TOBAGO TT,Trinidad and Tobago
TV,TUVALU TV,Tuvalu
TW,TAIWAN TW,Taiwan
TZ,UNITED REPUBLIC OF TANZANIA TZ,United Republic of Tanzania
UA,UKRAINE UA,Ukraine
UG,UGANDA UG,Uganda
UM,UNITED STATES MINOR OUTLYING ISLANDS UM,United States Minor Outlying Islands
US,UNITED STATES US,United States
UY,URUGUAY UY,Uruguay
UZ,UZBEKISTAN UZ,Uzbekistan
VA,HOLY SEE (VATICAN CITY STATE) VA,Holy See (Vatican City State)
VC,SAINT VINCENT AND THE GRENADINES VC,Saint Vincent and the Grenadines
VE,VENEZUELA VE,Venezuela
VG,VIRGIN ISLANDS VG,Virgin Islands
VI,VIRGIN ISLANDS VI,Virgin Islands
VN,VIET NAM VN,Viet Nam
VU,VANUATU VU,Vanuatu
WF,WALLIS AND FUTUNA WF,Wallis and Futuna
WS,SAMOA WS,Samoa
YE,YEMEN YE,Yemen
YT,MAYOTTE YT,Mayotte
ZA,SOUTH AFRICA ZA,South Africa
ZM,ZAMBIA ZM,Zambia
ZW,ZIMBABWE ZW,Zimbabwe

View File

@ -18,7 +18,7 @@ public class RouterVersion {
/** deprecated */ /** deprecated */
public final static String ID = "Monotone"; public final static String ID = "Monotone";
public final static String VERSION = CoreVersion.VERSION; public final static String VERSION = CoreVersion.VERSION;
public final static long BUILD = 12; public final static long BUILD = 13;
/** for example "-test" */ /** for example "-test" */
public final static String EXTRA = ""; public final static String EXTRA = "";
public final static String FULL_VERSION = VERSION + "-" + BUILD + EXTRA; public final static String FULL_VERSION = VERSION + "-" + BUILD + EXTRA;

View File

@ -90,7 +90,9 @@ class TransientDataStore implements DataStore {
DataStructure old = null; DataStructure old = null;
old = _data.put(key, data); old = _data.put(key, data);
if (data instanceof RouterInfo) { if (data instanceof RouterInfo) {
_context.profileManager().heardAbout(key); // Don't do this here so we don't reset it at router startup;
// the StoreMessageJob calls this
//_context.profileManager().heardAbout(key);
RouterInfo ri = (RouterInfo)data; RouterInfo ri = (RouterInfo)data;
if (old != null) { if (old != null) {
RouterInfo ori = (RouterInfo)old; RouterInfo ori = (RouterInfo)old;

View File

@ -26,6 +26,10 @@ public class DBHistory {
private long _lookupsReceived; private long _lookupsReceived;
private long _avgDelayBetweenLookupsReceived; private long _avgDelayBetweenLookupsReceived;
private long _lastLookupReceived; private long _lastLookupReceived;
private long _lastLookupSuccessful;
private long _lastLookupFailed;
private long _lastStoreSuccessful;
private long _lastStoreFailed;
private long _unpromptedDbStoreNew; private long _unpromptedDbStoreNew;
private long _unpromptedDbStoreOld; private long _unpromptedDbStoreOld;
private String _statGroup; private String _statGroup;
@ -50,24 +54,47 @@ public class DBHistory {
createRates(statGroup); createRates(statGroup);
} }
/** how many times we have sent them a db lookup and received the value back from them */ /** how many times we have sent them a db lookup and received the value back from them
* @deprecated unused
*/
public long getSuccessfulLookups() { return _successfulLookups; } public long getSuccessfulLookups() { return _successfulLookups; }
/** how many times we have sent them a db lookup and not received the value or a lookup reply */ /** how many times we have sent them a db lookup and not received the value or a lookup reply
* @deprecated unused
*/
public long getFailedLookups() { return _failedLookups; } public long getFailedLookups() { return _failedLookups; }
/** how many peers that we have never seen before did lookups provide us with? */ /** how many peers that we have never seen before did lookups provide us with?
* @deprecated unused
*/
public long getLookupReplyNew() { return _lookupReplyNew; } public long getLookupReplyNew() { return _lookupReplyNew; }
/** how many peers that we have already seen did lookups provide us with? */ /** how many peers that we have already seen did lookups provide us with?
* @deprecated unused
*/
public long getLookupReplyOld() { return _lookupReplyOld; } public long getLookupReplyOld() { return _lookupReplyOld; }
/** how many peers that we explicitly asked the peer not to send us did they reply with? */ /** how many peers that we explicitly asked the peer not to send us did they reply with?
* @deprecated unused
*/
public long getLookupReplyDuplicate() { return _lookupReplyDuplicate; } public long getLookupReplyDuplicate() { return _lookupReplyDuplicate; }
/** how many peers that were incorrectly formatted / expired / otherwise illegal did lookups provide us with? */ /** how many peers that were incorrectly formatted / expired / otherwise illegal did lookups provide us with?
* @deprecated unused
*/
public long getLookupReplyInvalid() { return _lookupReplyInvalid; } public long getLookupReplyInvalid() { return _lookupReplyInvalid; }
/** how many lookups this peer has sent us? */ /** how many lookups this peer has sent us?
* @deprecated unused
*/
public long getLookupsReceived() { return _lookupsReceived; } public long getLookupsReceived() { return _lookupsReceived; }
/** how frequently do they send us lookup requests? */ /** how frequently do they send us lookup requests?
* @deprecated unused
*/
public long getAvgDelayBetweenLookupsReceived() { return _avgDelayBetweenLookupsReceived; } public long getAvgDelayBetweenLookupsReceived() { return _avgDelayBetweenLookupsReceived; }
/** when did they last send us a request? */ /** when did they last send us a request?
* @deprecated unused
*/
public long getLastLookupReceived() { return _lastLookupReceived; } public long getLastLookupReceived() { return _lastLookupReceived; }
public long getLastLookupSuccessful() { return _lastLookupSuccessful; }
public long getLastLookupFailed() { return _lastLookupFailed; }
public long getLastStoreSuccessful() { return _lastStoreSuccessful; }
public long getLastStoreFailed() { return _lastStoreFailed; }
/** how many times have they sent us data we didn't ask for and that we've never seen? */ /** how many times have they sent us data we didn't ask for and that we've never seen? */
public long getUnpromptedDbStoreNew() { return _unpromptedDbStoreNew; } public long getUnpromptedDbStoreNew() { return _unpromptedDbStoreNew; }
/** how many times have they sent us data we didn't ask for but that we have seen? */ /** how many times have they sent us data we didn't ask for but that we have seen? */
@ -87,14 +114,37 @@ public class DBHistory {
*/ */
public void lookupSuccessful() { public void lookupSuccessful() {
_successfulLookups++; _successfulLookups++;
_lastLookupSuccessful = _context.clock().now();
} }
/** /**
* Note that the peer failed to respond to the db lookup in any way * Note that the peer failed to respond to the db lookup in any way
*/ */
public void lookupFailed() { public void lookupFailed() {
_failedLookups++; _failedLookups++;
_failedLookupRate.addData(1, 0); _failedLookupRate.addData(1, 0);
_lastLookupFailed = _context.clock().now();
} }
/**
* Note that we successfully stored to a floodfill peer and verified the result
* by asking another floodfill peer
*
*/
public void storeSuccessful() {
_lastStoreSuccessful = _context.clock().now();
}
/**
* Note that floodfill verify failed
*/
public void storeFailed() {
// Fixme, redefined this to include both lookup and store fails,
// need to fix the javadocs
_failedLookupRate.addData(1, 0);
_lastStoreFailed = _context.clock().now();
}
/** /**
* Receive a lookup reply from the peer, where they gave us the specified info * Receive a lookup reply from the peer, where they gave us the specified info
* *
@ -186,7 +236,7 @@ public class DBHistory {
_invalidReplyRate.store(out, "dbHistory.invalidReplyRate"); _invalidReplyRate.store(out, "dbHistory.invalidReplyRate");
} }
private void add(StringBuilder buf, String name, long val, String description) { private static void add(StringBuilder buf, String name, long val, String description) {
buf.append("# ").append(name.toUpperCase()).append(NL).append("# ").append(description).append(NL); buf.append("# ").append(name.toUpperCase()).append(NL).append("# ").append(description).append(NL);
buf.append("dbHistory.").append(name).append('=').append(val).append(NL).append(NL); buf.append("dbHistory.").append(name).append('=').append(val).append(NL).append(NL);
} }
@ -224,8 +274,8 @@ public class DBHistory {
_failedLookupRate = new RateStat("dbHistory.failedLookupRate", "How often does this peer to respond to a lookup?", statGroup, new long[] { 60*1000l, 60*60*1000l, 24*60*60*1000l }); _failedLookupRate = new RateStat("dbHistory.failedLookupRate", "How often does this peer to respond to a lookup?", statGroup, new long[] { 60*1000l, 60*60*1000l, 24*60*60*1000l });
if (_invalidReplyRate == null) if (_invalidReplyRate == null)
_invalidReplyRate = new RateStat("dbHistory.invalidReplyRate", "How often does this peer give us a bad (nonexistant, forged, etc) peer?", statGroup, new long[] { 30*60*1000l, 60*60*1000l, 24*60*60*1000l }); _invalidReplyRate = new RateStat("dbHistory.invalidReplyRate", "How often does this peer give us a bad (nonexistant, forged, etc) peer?", statGroup, new long[] { 30*60*1000l, 60*60*1000l, 24*60*60*1000l });
_failedLookupRate.setStatLog(_context.statManager().getStatLog()); _failedLookupRate.setStatLog(_context.statManager().getStatLog());
_invalidReplyRate.setStatLog(_context.statManager().getStatLog()); _invalidReplyRate.setStatLog(_context.statManager().getStatLog());
} }
private final static long getLong(Properties props, String key) { private final static long getLong(Properties props, String key) {

View File

@ -249,15 +249,18 @@ public class ProfileManagerImpl implements ProfileManager {
* Note that we've confirmed a successful send of db data to the peer (though we haven't * Note that we've confirmed a successful send of db data to the peer (though we haven't
* necessarily requested it again from them, so they /might/ be lying) * necessarily requested it again from them, so they /might/ be lying)
* *
* This will force creation of DB stats
*/ */
public void dbStoreSent(Hash peer, long responseTimeMs) { public void dbStoreSent(Hash peer, long responseTimeMs) {
PeerProfile data = getProfile(peer); PeerProfile data = getProfile(peer);
if (data == null) return; if (data == null) return;
long now = _context.clock().now(); long now = _context.clock().now();
data.setLastHeardFrom(now); data.setLastHeardFrom(now);
if (!data.getIsExpandedDB())
return;
data.setLastSendSuccessful(now); data.setLastSendSuccessful(now);
if (!data.getIsExpandedDB())
data.expandDBProfile();
DBHistory hist = data.getDBHistory();
hist.storeSuccessful();
// we could do things like update some sort of "how many successful stores we've sent them"... // we could do things like update some sort of "how many successful stores we've sent them"...
// naah.. dont really care now // naah.. dont really care now
} }
@ -266,8 +269,15 @@ public class ProfileManagerImpl implements ProfileManager {
* Note that we were unable to confirm a successful send of db data to * Note that we were unable to confirm a successful send of db data to
* the peer, at least not within our timeout period * the peer, at least not within our timeout period
* *
* This will force creation of DB stats
*/ */
public void dbStoreFailed(Hash peer) { public void dbStoreFailed(Hash peer) {
PeerProfile data = getProfile(peer);
if (data == null) return;
if (!data.getIsExpandedDB())
data.expandDBProfile();
DBHistory hist = data.getDBHistory();
hist.storeSuccessful();
// we could do things like update some sort of "how many successful stores we've // we could do things like update some sort of "how many successful stores we've
// failed to send them"... // failed to send them"...
} }

View File

@ -329,6 +329,7 @@ class BuildHandler {
} }
} }
/** @return handle time or -1 */
private long handleRequest(BuildMessageState state) { private long handleRequest(BuildMessageState state) {
long timeSinceReceived = System.currentTimeMillis()-state.recvTime; long timeSinceReceived = System.currentTimeMillis()-state.recvTime;
if (_log.shouldLog(Log.DEBUG)) if (_log.shouldLog(Log.DEBUG))