I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit d4b0bfda authored by z3d's avatar z3d
Browse files

merge of '4be12c91831cc6b24ef6fcf16af9cbb9fa32069d'

     and 'c578a1847c62244cfc8308021014c94afef01606'
parents c3597cfd 0be2ca8b
No related branches found
No related tags found
No related merge requests found
Showing
with 429 additions and 316 deletions
...@@ -179,7 +179,7 @@ public class SnarkManager implements Snark.CompleteListener { ...@@ -179,7 +179,7 @@ public class SnarkManager implements Snark.CompleteListener {
if (!_config.containsKey(PROP_STARTUP_DELAY)) if (!_config.containsKey(PROP_STARTUP_DELAY))
_config.setProperty(PROP_STARTUP_DELAY, "" + DEFAULT_STARTUP_DELAY); _config.setProperty(PROP_STARTUP_DELAY, "" + DEFAULT_STARTUP_DELAY);
if (!_config.containsKey(PROP_THEME)) if (!_config.containsKey(PROP_THEME))
_config.setProperty(PROP_THEME, "" + DEFAULT_THEME); _config.setProperty(PROP_THEME, DEFAULT_THEME);
updateConfig(); updateConfig();
} }
/** /**
...@@ -198,11 +198,9 @@ public class SnarkManager implements Snark.CompleteListener { ...@@ -198,11 +198,9 @@ public class SnarkManager implements Snark.CompleteListener {
public String[] getThemes() { public String[] getThemes() {
String[] themes = null; String[] themes = null;
// "docs/themes/snark/" // "docs/themes/snark/"
String fsc = new String(""+File.separatorChar); File dir = new File(_context.getBaseDir(), "docs/themes/snark");
String look = _context.getBaseDir() + fsc + "docs" + fsc +"themes" + fsc + "snark" + fsc;
FileFilter fileFilter = new FileFilter() { public boolean accept(File file) { return file.isDirectory(); } }; FileFilter fileFilter = new FileFilter() { public boolean accept(File file) { return file.isDirectory(); } };
// Walk the themes dir, collecting the theme names, and append them to the map // Walk the themes dir, collecting the theme names, and append them to the map
File dir = new File(look);
File[] dirnames = dir.listFiles(fileFilter); File[] dirnames = dir.listFiles(fileFilter);
if (dirnames != null) { if (dirnames != null) {
themes = new String[dirnames.length]; themes = new String[dirnames.length];
...@@ -271,7 +269,7 @@ public class SnarkManager implements Snark.CompleteListener { ...@@ -271,7 +269,7 @@ public class SnarkManager implements Snark.CompleteListener {
public void updateConfig(String dataDir, boolean autoStart, String startDelay, String seedPct, String eepHost, public void updateConfig(String dataDir, boolean autoStart, String startDelay, String seedPct, String eepHost,
String eepPort, String i2cpHost, String i2cpPort, String i2cpOpts, String eepPort, String i2cpHost, String i2cpPort, String i2cpOpts,
String upLimit, String upBW, boolean useOpenTrackers, String openTrackers, String Theme) { String upLimit, String upBW, boolean useOpenTrackers, String openTrackers, String theme) {
boolean changed = false; boolean changed = false;
//if (eepHost != null) { //if (eepHost != null) {
// // unused, we use socket eepget // // unused, we use socket eepget
...@@ -434,10 +432,10 @@ public class SnarkManager implements Snark.CompleteListener { ...@@ -434,10 +432,10 @@ public class SnarkManager implements Snark.CompleteListener {
changed = true; changed = true;
} }
} }
if (Theme != null) { if (theme != null) {
if(!Theme.equals(_config.getProperty(PROP_THEME))) { if(!theme.equals(_config.getProperty(PROP_THEME))) {
_config.setProperty(PROP_THEME, Theme +""); _config.setProperty(PROP_THEME, theme);
addMessage (Theme+(_(" theme locked and loaded."))); addMessage(_("{0} theme loaded, return to main i2psnark page to view.", theme));
changed = true; changed = true;
} }
} }
...@@ -935,8 +933,8 @@ public class SnarkManager implements Snark.CompleteListener { ...@@ -935,8 +933,8 @@ public class SnarkManager implements Snark.CompleteListener {
// , "The freak's tracker", "http://mHKva9x24E5Ygfey2llR1KyQHv5f8hhMpDMwJDg1U-hABpJ2NrQJd6azirdfaR0OKt4jDlmP2o4Qx0H598~AteyD~RJU~xcWYdcOE0dmJ2e9Y8-HY51ie0B1yD9FtIV72ZI-V3TzFDcs6nkdX9b81DwrAwwFzx0EfNvK1GLVWl59Ow85muoRTBA1q8SsZImxdyZ-TApTVlMYIQbdI4iQRwU9OmmtefrCe~ZOf4UBS9-KvNIqUL0XeBSqm0OU1jq-D10Ykg6KfqvuPnBYT1BYHFDQJXW5DdPKwcaQE4MtAdSGmj1epDoaEBUa9btQlFsM2l9Cyn1hzxqNWXELmx8dRlomQLlV4b586dRzW~fLlOPIGC13ntPXogvYvHVyEyptXkv890jC7DZNHyxZd5cyrKC36r9huKvhQAmNABT2Y~pOGwVrb~RpPwT0tBuPZ3lHYhBFYmD8y~AOhhNHKMLzea1rfwTvovBMByDdFps54gMN1mX4MbCGT4w70vIopS9yAAAA.i2p/bytemonsoon/announce.php" // , "The freak's tracker", "http://mHKva9x24E5Ygfey2llR1KyQHv5f8hhMpDMwJDg1U-hABpJ2NrQJd6azirdfaR0OKt4jDlmP2o4Qx0H598~AteyD~RJU~xcWYdcOE0dmJ2e9Y8-HY51ie0B1yD9FtIV72ZI-V3TzFDcs6nkdX9b81DwrAwwFzx0EfNvK1GLVWl59Ow85muoRTBA1q8SsZImxdyZ-TApTVlMYIQbdI4iQRwU9OmmtefrCe~ZOf4UBS9-KvNIqUL0XeBSqm0OU1jq-D10Ykg6KfqvuPnBYT1BYHFDQJXW5DdPKwcaQE4MtAdSGmj1epDoaEBUa9btQlFsM2l9Cyn1hzxqNWXELmx8dRlomQLlV4b586dRzW~fLlOPIGC13ntPXogvYvHVyEyptXkv890jC7DZNHyxZd5cyrKC36r9huKvhQAmNABT2Y~pOGwVrb~RpPwT0tBuPZ3lHYhBFYmD8y~AOhhNHKMLzea1rfwTvovBMByDdFps54gMN1mX4MbCGT4w70vIopS9yAAAA.i2p/bytemonsoon/announce.php"
// , "mastertracker", "http://VzXD~stRKbL3MOmeTn1iaCQ0CFyTmuFHiKYyo0Rd~dFPZFCYH-22rT8JD7i-C2xzYFa4jT5U2aqHzHI-Jre4HL3Ri5hFtZrLk2ax3ji7Qfb6qPnuYkuiF2E2UDmKUOppI8d9Ye7tjdhQVCy0izn55tBaB-U7UWdcvSK2i85sauyw3G0Gfads1Rvy5-CAe2paqyYATcDmGjpUNLoxbfv9KH1KmwRTNH6k1v4PyWYYnhbT39WfKMbBjSxVQRdi19cyJrULSWhjxaQfJHeWx5Z8Ev4bSPByBeQBFl2~4vqy0S5RypINsRSa3MZdbiAAyn5tr5slWR6QdoqY3qBQgBJFZppy-3iWkFqqKgSxCPundF8gdDLC5ddizl~KYcYKl42y9SGFHIukH-TZs8~em0~iahzsqWVRks3zRG~tlBcX2U3M2~OJs~C33-NKhyfZT7-XFBREvb8Szmd~p66jDxrwOnKaku-G6DyoQipJqIz4VHmY9-y5T8RrUcJcM-5lVoMpAAAA.i2p/announce.php=http://tracker.mastertracker.i2p/" // , "mastertracker", "http://VzXD~stRKbL3MOmeTn1iaCQ0CFyTmuFHiKYyo0Rd~dFPZFCYH-22rT8JD7i-C2xzYFa4jT5U2aqHzHI-Jre4HL3Ri5hFtZrLk2ax3ji7Qfb6qPnuYkuiF2E2UDmKUOppI8d9Ye7tjdhQVCy0izn55tBaB-U7UWdcvSK2i85sauyw3G0Gfads1Rvy5-CAe2paqyYATcDmGjpUNLoxbfv9KH1KmwRTNH6k1v4PyWYYnhbT39WfKMbBjSxVQRdi19cyJrULSWhjxaQfJHeWx5Z8Ev4bSPByBeQBFl2~4vqy0S5RypINsRSa3MZdbiAAyn5tr5slWR6QdoqY3qBQgBJFZppy-3iWkFqqKgSxCPundF8gdDLC5ddizl~KYcYKl42y9SGFHIukH-TZs8~em0~iahzsqWVRks3zRG~tlBcX2U3M2~OJs~C33-NKhyfZT7-XFBREvb8Szmd~p66jDxrwOnKaku-G6DyoQipJqIz4VHmY9-y5T8RrUcJcM-5lVoMpAAAA.i2p/announce.php=http://tracker.mastertracker.i2p/"
// , "Galen", "http://5jpwQMI5FT303YwKa5Rd38PYSX04pbIKgTaKQsWbqoWjIfoancFdWCShXHLI5G5ofOb0Xu11vl2VEMyPsg1jUFYSVnu4-VfMe3y4TKTR6DTpetWrnmEK6m2UXh91J5DZJAKlgmO7UdsFlBkQfR2rY853-DfbJtQIFl91tbsmjcA5CGQi4VxMFyIkBzv-pCsuLQiZqOwWasTlnzey8GcDAPG1LDcvfflGV~6F5no9mnuisZPteZKlrv~~TDoXTj74QjByWc4EOYlwqK8sbU9aOvz~s31XzErbPTfwiawiaZ0RUI-IDrKgyvmj0neuFTWgjRGVTH8bz7cBZIc3viy6ioD-eMQOrXaQL0TCWZUelRwHRvgdPiQrxdYQs7ixkajeHzxi-Pq0EMm5Vbh3j3Q9kfUFW3JjFDA-MLB4g6XnjCbM5J1rC0oOBDCIEfhQkszru5cyLjHiZ5yeA0VThgu~c7xKHybv~OMXION7V8pBKOgET7ZgAkw1xgYe3Kkyq5syAAAA.i2p/tr/announce.php=http://galen.i2p/tr/" // , "Galen", "http://5jpwQMI5FT303YwKa5Rd38PYSX04pbIKgTaKQsWbqoWjIfoancFdWCShXHLI5G5ofOb0Xu11vl2VEMyPsg1jUFYSVnu4-VfMe3y4TKTR6DTpetWrnmEK6m2UXh91J5DZJAKlgmO7UdsFlBkQfR2rY853-DfbJtQIFl91tbsmjcA5CGQi4VxMFyIkBzv-pCsuLQiZqOwWasTlnzey8GcDAPG1LDcvfflGV~6F5no9mnuisZPteZKlrv~~TDoXTj74QjByWc4EOYlwqK8sbU9aOvz~s31XzErbPTfwiawiaZ0RUI-IDrKgyvmj0neuFTWgjRGVTH8bz7cBZIc3viy6ioD-eMQOrXaQL0TCWZUelRwHRvgdPiQrxdYQs7ixkajeHzxi-Pq0EMm5Vbh3j3Q9kfUFW3JjFDA-MLB4g6XnjCbM5J1rC0oOBDCIEfhQkszru5cyLjHiZ5yeA0VThgu~c7xKHybv~OMXION7V8pBKOgET7ZgAkw1xgYe3Kkyq5syAAAA.i2p/tr/announce.php=http://galen.i2p/tr/"
"POSTMAN", "http://tracker2.postman.i2p/announce.php=http://tracker2.postman.i2p/" "Postman", "http://tracker2.postman.i2p/announce.php=http://tracker2.postman.i2p/"
,"WELTERDE", "http://tracker.welterde.i2p/a=http://tracker.welterde.i2p/stats?mode=top5" ,"Welterde", "http://tracker.welterde.i2p/a=http://tracker.welterde.i2p/stats?mode=top5"
// , "CRSTRACK", "http://b4G9sCdtfvccMAXh~SaZrPqVQNyGQbhbYMbw6supq2XGzbjU4NcOmjFI0vxQ8w1L05twmkOvg5QERcX6Mi8NQrWnR0stLExu2LucUXg1aYjnggxIR8TIOGygZVIMV3STKH4UQXD--wz0BUrqaLxPhrm2Eh9Hwc8TdB6Na4ShQUq5Xm8D4elzNUVdpM~RtChEyJWuQvoGAHY3ppX-EJJLkiSr1t77neS4Lc-KofMVmgI9a2tSSpNAagBiNI6Ak9L1T0F9uxeDfEG9bBSQPNMOSUbAoEcNxtt7xOW~cNOAyMyGydwPMnrQ5kIYPY8Pd3XudEko970vE0D6gO19yoBMJpKx6Dh50DGgybLQ9CpRaynh2zPULTHxm8rneOGRcQo8D3mE7FQ92m54~SvfjXjD2TwAVGI~ae~n9HDxt8uxOecAAvjjJ3TD4XM63Q9TmB38RmGNzNLDBQMEmJFpqQU8YeuhnS54IVdUoVQFqui5SfDeLXlSkh4vYoMU66pvBfWbAAAA.i2p/tracker/announce.php=http://crstrack.i2p/tracker/" // , "CRSTRACK", "http://b4G9sCdtfvccMAXh~SaZrPqVQNyGQbhbYMbw6supq2XGzbjU4NcOmjFI0vxQ8w1L05twmkOvg5QERcX6Mi8NQrWnR0stLExu2LucUXg1aYjnggxIR8TIOGygZVIMV3STKH4UQXD--wz0BUrqaLxPhrm2Eh9Hwc8TdB6Na4ShQUq5Xm8D4elzNUVdpM~RtChEyJWuQvoGAHY3ppX-EJJLkiSr1t77neS4Lc-KofMVmgI9a2tSSpNAagBiNI6Ak9L1T0F9uxeDfEG9bBSQPNMOSUbAoEcNxtt7xOW~cNOAyMyGydwPMnrQ5kIYPY8Pd3XudEko970vE0D6gO19yoBMJpKx6Dh50DGgybLQ9CpRaynh2zPULTHxm8rneOGRcQo8D3mE7FQ92m54~SvfjXjD2TwAVGI~ae~n9HDxt8uxOecAAvjjJ3TD4XM63Q9TmB38RmGNzNLDBQMEmJFpqQU8YeuhnS54IVdUoVQFqui5SfDeLXlSkh4vYoMU66pvBfWbAAAA.i2p/tracker/announce.php=http://crstrack.i2p/tracker/"
}; };
......
...@@ -15,6 +15,7 @@ import java.util.Properties; ...@@ -15,6 +15,7 @@ import java.util.Properties;
import java.util.zip.GZIPOutputStream; import java.util.zip.GZIPOutputStream;
import net.i2p.client.streaming.I2PSocket; import net.i2p.client.streaming.I2PSocket;
import net.i2p.I2PAppContext;
import net.i2p.data.DataHelper; import net.i2p.data.DataHelper;
import net.i2p.util.EventDispatcher; import net.i2p.util.EventDispatcher;
import net.i2p.util.I2PAppThread; import net.i2p.util.I2PAppThread;
...@@ -36,6 +37,9 @@ public class I2PTunnelHTTPServer extends I2PTunnelServer { ...@@ -36,6 +37,9 @@ public class I2PTunnelHTTPServer extends I2PTunnelServer {
private static final String HASH_HEADER = "X-I2P-DestHash"; private static final String HASH_HEADER = "X-I2P-DestHash";
private static final String DEST64_HEADER = "X-I2P-DestB64"; private static final String DEST64_HEADER = "X-I2P-DestB64";
private static final String DEST32_HEADER = "X-I2P-DestB32"; private static final String DEST32_HEADER = "X-I2P-DestB32";
private static final String[] CLIENT_SKIPHEADERS = {HASH_HEADER, DEST64_HEADER, DEST32_HEADER};
private static final String SERVER_HEADER = "Server";
private static final String[] SERVER_SKIPHEADERS = {SERVER_HEADER};
public I2PTunnelHTTPServer(InetAddress host, int port, String privData, String spoofHost, Logging l, EventDispatcher notifyThis, I2PTunnel tunnel) { public I2PTunnelHTTPServer(InetAddress host, int port, String privData, String spoofHost, Logging l, EventDispatcher notifyThis, I2PTunnel tunnel) {
super(host, port, privData, l, notifyThis, tunnel); super(host, port, privData, l, notifyThis, tunnel);
...@@ -75,7 +79,8 @@ public class I2PTunnelHTTPServer extends I2PTunnelServer { ...@@ -75,7 +79,8 @@ public class I2PTunnelHTTPServer extends I2PTunnelServer {
InputStream in = socket.getInputStream(); InputStream in = socket.getInputStream();
StringBuilder command = new StringBuilder(128); StringBuilder command = new StringBuilder(128);
Properties headers = readHeaders(in, command); Properties headers = readHeaders(in, command,
CLIENT_SKIPHEADERS, getTunnel().getContext());
headers.setProperty(HASH_HEADER, socket.getPeerDestination().calculateHash().toBase64()); headers.setProperty(HASH_HEADER, socket.getPeerDestination().calculateHash().toBase64());
headers.setProperty(DEST32_HEADER, Base32.encode(socket.getPeerDestination().calculateHash().getData()) + ".b32.i2p" ); headers.setProperty(DEST32_HEADER, Base32.encode(socket.getPeerDestination().calculateHash().getData()) + ".b32.i2p" );
headers.setProperty(DEST64_HEADER, socket.getPeerDestination().toBase64()); headers.setProperty(DEST64_HEADER, socket.getPeerDestination().toBase64());
...@@ -118,7 +123,9 @@ public class I2PTunnelHTTPServer extends I2PTunnelServer { ...@@ -118,7 +123,9 @@ public class I2PTunnelHTTPServer extends I2PTunnelServer {
useGZIP = true; useGZIP = true;
if (allowGZIP && useGZIP) { if (allowGZIP && useGZIP) {
I2PAppThread req = new I2PAppThread(new CompressedRequestor(s, socket, modifiedHeader), Thread.currentThread().getName()+".hc"); I2PAppThread req = new I2PAppThread(
new CompressedRequestor(s, socket, modifiedHeader, getTunnel().getContext()),
Thread.currentThread().getName()+".hc");
req.start(); req.start();
} else { } else {
new I2PTunnelRunner(s, socket, slock, null, modifiedHeader.getBytes(), null); new I2PTunnelRunner(s, socket, slock, null, modifiedHeader.getBytes(), null);
...@@ -155,10 +162,12 @@ public class I2PTunnelHTTPServer extends I2PTunnelServer { ...@@ -155,10 +162,12 @@ public class I2PTunnelHTTPServer extends I2PTunnelServer {
private Socket _webserver; private Socket _webserver;
private I2PSocket _browser; private I2PSocket _browser;
private String _headers; private String _headers;
public CompressedRequestor(Socket webserver, I2PSocket browser, String headers) { private I2PAppContext _ctx;
public CompressedRequestor(Socket webserver, I2PSocket browser, String headers, I2PAppContext ctx) {
_webserver = webserver; _webserver = webserver;
_browser = browser; _browser = browser;
_headers = headers; _headers = headers;
_ctx = ctx;
} }
public void run() { public void run() {
if (_log.shouldLog(Log.INFO)) if (_log.shouldLog(Log.INFO))
...@@ -200,8 +209,8 @@ public class I2PTunnelHTTPServer extends I2PTunnelServer { ...@@ -200,8 +209,8 @@ public class I2PTunnelHTTPServer extends I2PTunnelServer {
//Change headers to protect server identity //Change headers to protect server identity
StringBuilder command = new StringBuilder(128); StringBuilder command = new StringBuilder(128);
Properties headers = readHeaders(serverin, command); Properties headers = readHeaders(serverin, command,
headers.setProperty("Server", "I2PServer"); SERVER_SKIPHEADERS, _ctx);
String modifiedHeaders = formatHeaders(headers, command); String modifiedHeaders = formatHeaders(headers, command);
compressedOut.write(modifiedHeaders.getBytes()); compressedOut.write(modifiedHeaders.getBytes());
...@@ -336,7 +345,7 @@ public class I2PTunnelHTTPServer extends I2PTunnelServer { ...@@ -336,7 +345,7 @@ public class I2PTunnelHTTPServer extends I2PTunnelServer {
/** ridiculously long, just to prevent OOM DOS @since 0.7.13 */ /** ridiculously long, just to prevent OOM DOS @since 0.7.13 */
private static final int MAX_HEADERS = 60; private static final int MAX_HEADERS = 60;
private static Properties readHeaders(InputStream in, StringBuilder command) throws IOException { private static Properties readHeaders(InputStream in, StringBuilder command, String[] skipHeaders, I2PAppContext ctx) throws IOException {
Properties headers = new Properties(); Properties headers = new Properties();
StringBuilder buf = new StringBuilder(128); StringBuilder buf = new StringBuilder(128);
...@@ -356,8 +365,8 @@ public class I2PTunnelHTTPServer extends I2PTunnelServer { ...@@ -356,8 +365,8 @@ public class I2PTunnelHTTPServer extends I2PTunnelServer {
} }
} }
} }
//if (trimmed > 0) if (trimmed > 0)
// getTunnel().getContext().statManager().addRateData("i2ptunnel.httpNullWorkaround", trimmed, 0); ctx.statManager().addRateData("i2ptunnel.httpNullWorkaround", trimmed, 0);
int i = 0; int i = 0;
while (true) { while (true) {
...@@ -379,16 +388,24 @@ public class I2PTunnelHTTPServer extends I2PTunnelServer { ...@@ -379,16 +388,24 @@ public class I2PTunnelHTTPServer extends I2PTunnelServer {
value = buf.substring(split+1).trim(); // ":" value = buf.substring(split+1).trim(); // ":"
else else
value = ""; value = "";
if ("Accept-encoding".equalsIgnoreCase(name)) if ("Accept-encoding".equalsIgnoreCase(name))
name = "Accept-encoding"; name = "Accept-encoding";
else if ("X-Accept-encoding".equalsIgnoreCase(name)) else if ("X-Accept-encoding".equalsIgnoreCase(name))
name = "X-Accept-encoding"; name = "X-Accept-encoding";
else if (HASH_HEADER.equalsIgnoreCase(name))
continue; // Prevent spoofing //We want to remove certain headers to improve anonymity
else if (DEST64_HEADER.equalsIgnoreCase(name)) boolean skip = false;
continue; // Prevent spoofing for (String skipHeader: skipHeaders) {
else if (DEST32_HEADER.equalsIgnoreCase(name)) if (skipHeader.equalsIgnoreCase(name)) {
continue; // Prevent spoofing skip = true;
break;
}
}
if(skip) {
continue;
}
headers.setProperty(name, value); headers.setProperty(name, value);
if (_log.shouldLog(Log.DEBUG)) if (_log.shouldLog(Log.DEBUG))
_log.debug("Read the header [" + name + "] = [" + value + "]"); _log.debug("Read the header [" + name + "] = [" + value + "]");
......
...@@ -23,9 +23,10 @@ ...@@ -23,9 +23,10 @@
<echo message=" dist: pkg and javadoc" /> <echo message=" dist: pkg and javadoc" />
<echo message=" installer: build the GUI installer" /> <echo message=" installer: build the GUI installer" />
<echo message=" tarball: tar the full install into i2p.tar.bz2 (extracts to build a new clean install)" /> <echo message=" tarball: tar the full install into i2p.tar.bz2 (extracts to build a new clean install)" />
<echo message=" updater: tar the built i2p specific files into an i2pupdate.zip (extracts safely over existing installs)" /> <echo message=" updater: Package the built files in i2pupdate.zip (extracts safely over existing installs)" />
<echo message=" updater200: Updater compressed with pack200 (creates i2pupdate200.zip, 60% smaller)" />
<echo message=" updaterWithJavadoc: updater including the javadocs, for display in the console" /> <echo message=" updaterWithJavadoc: updater including the javadocs, for display in the console" />
<echo message=" updaterWithJetty: tar the built i2p specific files and jetty into an i2pupdate.zip (extracts safely over existing installs)" /> <echo message=" updaterWithJetty: Updater including Jetty" />
<echo message=" updaterWithJettyFixes: updater including local jetty patches" /> <echo message=" updaterWithJettyFixes: updater including local jetty patches" />
<echo message=" updaterWithGeoIP: updater including GeoIP Files" /> <echo message=" updaterWithGeoIP: updater including GeoIP Files" />
<echo message=" updaterWithJettyFixesAndGeoIP" /> <echo message=" updaterWithJettyFixesAndGeoIP" />
...@@ -199,7 +200,8 @@ ...@@ -199,7 +200,8 @@
<copy file="installer/lib/jbigi/jbigi.jar" todir="build" /> <copy file="installer/lib/jbigi/jbigi.jar" todir="build" />
<copy file="apps/addressbook/dist/addressbook.war" todir="build/" /> <copy file="apps/addressbook/dist/addressbook.war" todir="build/" />
</target> </target>
<target name="poupdate"> <!-- the apps need to compile the jsps to poupdate -->
<target name="poupdate" depends="buildRouter, buildStreaming, buildSystray, buildJetty" >
<ant dir="apps/routerconsole/java/" target="poupdate" /> <ant dir="apps/routerconsole/java/" target="poupdate" />
<ant dir="apps/i2psnark/java/" target="poupdate" /> <ant dir="apps/i2psnark/java/" target="poupdate" />
<ant dir="apps/i2ptunnel/java/" target="poupdate" /> <ant dir="apps/i2ptunnel/java/" target="poupdate" />
......
...@@ -38,8 +38,13 @@ public class I2PSessionDemultiplexer implements I2PSessionMuxedListener { ...@@ -38,8 +38,13 @@ public class I2PSessionDemultiplexer implements I2PSessionMuxedListener {
l.messageAvailable(session, msgId, size, proto, fromport, toport); l.messageAvailable(session, msgId, size, proto, fromport, toport);
else { else {
// no listener, throw it out // no listener, throw it out
_log.error("No listener found for proto: " + proto + " port: " + toport + "msg id: " + msgId + if (_listeners.isEmpty()) {
" from pool of " + _listeners.size() + " listeners"); if (_log.shouldLog(Log.WARN))
_log.warn("No listeners for incoming message");
} else {
_log.error("No listener found for proto: " + proto + " port: " + toport + " msg id: " + msgId +
" from pool of " + _listeners.size() + " listeners");
}
try { try {
session.receiveMessage(msgId); session.receiveMessage(msgId);
} catch (I2PSessionException ise) {} } catch (I2PSessionException ise) {}
......
...@@ -176,23 +176,30 @@ JXQAnA28vDmMMMH/WPbC5ixmJeGGNUiR ...@@ -176,23 +176,30 @@ JXQAnA28vDmMMMH/WPbC5ixmJeGGNUiR
/** /**
* Duplicate keys or names rejected, * Duplicate keys or names rejected,
* except that duplicate empty names are allowed * except that duplicate empty names are allowed
* @param key 172 character base64 string
* @param name non-null but "" ok
* @since 0.7.12 * @since 0.7.12
* @return true if successful * @return true if successful
*/ */
public boolean addKey(String key, String name) { public boolean addKey(String key, String name) {
String oldName = _trustedKeys.get(key);
// already there?
if (name.equals(oldName))
return true;
if (oldName != null && !oldName.equals("")) {
_log.error("Key for " + name + " already stored for different name " + oldName + " : " + key);
return false;
}
SigningPublicKey signingPublicKey = new SigningPublicKey(); SigningPublicKey signingPublicKey = new SigningPublicKey();
try { try {
// fromBase64() won't reject a string that is too long // fromBase64() will throw a DFE if length is not right
if (key.length() != KEYSIZE_B64_BYTES)
throw new DataFormatException("x");
signingPublicKey.fromBase64(key); signingPublicKey.fromBase64(key);
} catch (DataFormatException dfe) { } catch (DataFormatException dfe) {
_log.error("Bad signing key for " + name + " : " + key); _log.error("Invalid signing key for " + name + " : " + key, dfe);
return false; return false;
} }
if (_trustedKeys.containsKey(signingPublicKey) || if ((!name.equals("")) && _trustedKeys.containsValue(name)) {
((!name.equals("")) && _trustedKeys.containsValue(name))) { _log.error("Key mismatch for " + name + ", spoof attempt? : " + key);
_log.error("Duplicate signing key for " + name + " : " + key);
return false; return false;
} }
_trustedKeys.put(signingPublicKey, name); _trustedKeys.put(signingPublicKey, name);
......
...@@ -29,6 +29,14 @@ class LogRecordFormatter { ...@@ -29,6 +29,14 @@ class LogRecordFormatter {
private final static int MAX_PRIORITY_LENGTH = 5; private final static int MAX_PRIORITY_LENGTH = 5;
public static String formatRecord(LogManager manager, LogRecord rec) { public static String formatRecord(LogManager manager, LogRecord rec) {
return formatRecord(manager, rec, true);
}
/**
* @param showDate if false, skip any date in the format (use when writing to wrapper log)
* @since 0.8.2
*/
static String formatRecord(LogManager manager, LogRecord rec, boolean showDate) {
int size = 128 + rec.getMessage().length(); int size = 128 + rec.getMessage().length();
if (rec.getThrowable() != null) if (rec.getThrowable() != null)
size += 512; size += 512;
...@@ -37,7 +45,10 @@ class LogRecordFormatter { ...@@ -37,7 +45,10 @@ class LogRecordFormatter {
for (int i = 0; i < format.length; ++i) { for (int i = 0; i < format.length; ++i) {
switch (format[i]) { switch (format[i]) {
case LogManager.DATE: case LogManager.DATE:
buf.append(getWhen(manager, rec)); if (showDate)
buf.append(getWhen(manager, rec));
else if (i+1 < format.length && format[i+1] == ' ')
i++; // skip following space
break; break;
case LogManager.CLASS: case LogManager.CLASS:
buf.append(getWhere(rec)); buf.append(getWhere(rec));
......
...@@ -17,8 +17,6 @@ import java.io.OutputStreamWriter; ...@@ -17,8 +17,6 @@ import java.io.OutputStreamWriter;
import java.io.Writer; import java.io.Writer;
import java.util.Queue; import java.util.Queue;
import net.i2p.I2PAppContext;
/** /**
* Log writer thread that pulls log records from the LogManager, writes them to * Log writer thread that pulls log records from the LogManager, writes them to
* the current logfile, and rotates the logs as necessary. This also periodically * the current logfile, and rotates the logs as necessary. This also periodically
...@@ -112,7 +110,7 @@ class LogWriter implements Runnable { ...@@ -112,7 +110,7 @@ class LogWriter implements Runnable {
} }
private void writeRecord(LogRecord rec) { private void writeRecord(LogRecord rec) {
String val = LogRecordFormatter.formatRecord(_manager, rec); String val = LogRecordFormatter.formatRecord(_manager, rec, true);
writeRecord(val); writeRecord(val);
// we always add to the console buffer, but only sometimes write to stdout // we always add to the console buffer, but only sometimes write to stdout
...@@ -121,7 +119,11 @@ class LogWriter implements Runnable { ...@@ -121,7 +119,11 @@ class LogWriter implements Runnable {
_manager.getBuffer().addCritical(val); _manager.getBuffer().addCritical(val);
if (_manager.getDisplayOnScreenLevel() <= rec.getPriority()) { if (_manager.getDisplayOnScreenLevel() <= rec.getPriority()) {
if (_manager.displayOnScreen()) { if (_manager.displayOnScreen()) {
System.out.print(val); // wrapper log already does time stamps, so reformat without the date
if (System.getProperty("wrapper.version") != null)
System.out.print(LogRecordFormatter.formatRecord(_manager, rec, false));
else
System.out.print(val);
} }
} }
} }
...@@ -199,7 +201,7 @@ class LogWriter implements Runnable { ...@@ -199,7 +201,7 @@ class LogWriter implements Runnable {
File f = new File(pattern); File f = new File(pattern);
File base = null; File base = null;
if (!f.isAbsolute()) if (!f.isAbsolute())
base = I2PAppContext.getGlobalContext().getLogDir(); base = _manager.getContext().getLogDir();
if ( (pattern.indexOf('#') < 0) && (pattern.indexOf('@') <= 0) ) { if ( (pattern.indexOf('#') < 0) && (pattern.indexOf('@') <= 0) ) {
if (base != null) if (base != null)
......
2010-12-11 zzz
* Build: Fix 'ant distclean poupdate' again
* I2CP: Change a log error to a warning (ticket #353)
* i2psnark:
- Restore text (ticket #273)
- Fix several HTML errors (ticket #273)
- Fix HTML error causing info links to be unclickable in dillo (tiicket #273)
- Fix alt text duplicated or looking bad in text browsers (ticket #273)
- Fix Opera button errors (ticket #332)
- Fix POST resubmission errors (ticket #334)
- Catch FetchAndAdd copy error (ticket #352)
- Set permissions on downloaded torrent files
- Hide some columns when not running
- Lots of spacing cleanups
- Rename images so users don't end up with unused files
- Remove ~15 unused images
- Clean up theme selection speed-coding exercise
- Indent fixes
* Log: Don't double-timestamp CRITS in wrapper.log
* News: XML fixes (ticket #350)
* Plugins: Better handling of signing keys (Ticket #351)
* TunnelPoolManager: Fix rare startup NPE (http://forum.i2p/viewtopic.php?t=5192)
2010-12-10 Mathiasdm
* I2PTunnel: Fixed up security fix.
2010-12-07 Mathiasdm 2010-12-07 Mathiasdm
* I2PTunnel: Security fix: change server reply * I2PTunnel: Security fix: change server reply
to return 'I2PServer' instead of the actual servername. to return 'I2PServer' instead of the actual servername.
......
...@@ -8,7 +8,6 @@ Deploy the Jetty archive, a clean checkout lacks it ...@@ -8,7 +8,6 @@ Deploy the Jetty archive, a clean checkout lacks it
Change revision in: Change revision in:
history.txt history.txt
installer/resources/initialNews.xml
installer/install.xml installer/install.xml
installer/resources/news.xml installer/resources/news.xml
router/java/src/net/i2p/router/RouterVersion.java router/java/src/net/i2p/router/RouterVersion.java
...@@ -21,7 +20,7 @@ Review the complete diff from the last release: ...@@ -21,7 +20,7 @@ Review the complete diff from the last release:
Verify that no untrusted revisions were inadvertently 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.8.(xx-1) | cut -d ' ' -f 2 | sort | uniq -c
NOTE: Most tasks below here are now automated by 'ant release' NOTE: Most tasks below here are now automated by 'ant release'
......
<div lang="en"> <div lang="en">
<h4><ul><li>Congratulations on getting I2P installed!</li></ul></h4> <h3>Congratulations on getting I2P installed!</h3>
<p> <p>
<b>Welcome to I2P!</b> <b>Welcome to I2P!</b>
Please <b>have patience</b> as I2P boots up and finds peers. Please <b>have patience</b> as I2P boots up and finds peers.
......
<div lang="de"> <div lang="de">
<h4><ul><li>Wir gratulieren zur erfolgreichen Installation von I2P!</li></ul></h4> <h3>Wir gratulieren zur erfolgreichen Installation von I2P!</h3>
<p> <p>
<b>Willkommen im I2P!</b> <b>Willkommen im I2P!</b>
Hab noch <b>etwas Geduld</b>, w&auml;hrend I2P startet und weitere I2P-Router findet. Hab noch <b>etwas Geduld</b>, w&auml;hrend I2P startet und weitere I2P-Router findet.
......
<div lang="es"> <div lang="es">
<h4><ul><li>&iexcl;Felicidades!, has instalado el enrutador I2P con &eacute;xito.</li></ul></h4> <h3>&iexcl;Felicidades!, has instalado el enrutador I2P con &eacute;xito.</h3>
<p> <p>
<b>&iexcl;Bienvenido a I2P!</b><br> <b>&iexcl;Bienvenido a I2P!</b><br>
&iexcl;Ten todav&iacute;a <b>paciencia</b> mientras I2P est&eacute; arrancando y encontrando otros enrutadores I2P! &iexcl;Ten todav&iacute;a <b>paciencia</b> mientras I2P est&eacute; arrancando y encontrando otros enrutadores I2P!
......
<div lang="nl"> <div lang="nl">
<h4><ul><li>Gefeliciteerd met de installatie van I2P!</li></ul></h4> <h3>Gefeliciteerd met de installatie van I2P!</h3>
<p> <p>
<b>Welkom bij I2P!</b> <b>Welkom bij I2P!</b>
Heb <b>wat geduld</b> terwijl I2P opstart en peers zoekt. Heb <b>wat geduld</b> terwijl I2P opstart en peers zoekt.
......
<div lang="pt"> <div lang="pt">
<h4><ul><li>Parabéns, você instalou o roteador I2P com êxito!</li></ul></h4> <h3>Parabéns, você instalou o roteador I2P com êxito!</h3>
<p> <p>
<b>Bem-vindo ao I2P!</b><br> <b>Bem-vindo ao I2P!</b><br>
Seja <b>paciente</b> enquanto I2P ainda está iniciando-se e enquanto continuam sendo encontrados outros roteadores I2P! Seja <b>paciente</b> enquanto I2P ainda está iniciando-se e enquanto continuam sendo encontrados outros roteadores I2P!
......
<div lang="ru"> <div lang="ru">
<h4><ul><li>Поздравляем с успешным завершением установки I2P!</li></ul></h4> <h3>Поздравляем с успешным завершением установки I2P!</h3>
<p> <p>
<b>Добро пожаловать в I2P!</b> Немного терпения! I2P-маршрутизатору потребуется пара минут для запуска модулей и первого подключения к сети I2P. <b>Добро пожаловать в I2P!</b> Немного терпения! I2P-маршрутизатору потребуется пара минут для запуска модулей и первого подключения к сети I2P.
</p> </p>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<i2p.release version="0.8.1" date="2010/11/15" minVersion="0.6" /> <i2p.release version="0.8.1" date="2010/11/15" minVersion="0.6" />
--> -->
<div lang="en"> <div lang="en">
<h4><ul><li>2010-11-15: <b>0.8.1 <a href="http://www.i2p2.i2p/release-0.8.1.html">Released</a></b></li></ul></h4> <h3>2010-11-15: <b>0.8.1 <a href="http://www.i2p2.i2p/release-0.8.1.html">Released</a></b></h3>
<p> <p>
The 0.8.1 release contains the usual collection of bug fixes, The 0.8.1 release contains the usual collection of bug fixes,
and a newly colorful i2psnark theme by dr|zed. and a newly colorful i2psnark theme by dr|zed.
......
installer/resources/themes/snark/ubergine/images/details_nolink.png

805 B

installer/resources/themes/snark/ubergine/images/eta.png

561 B | W: | H:

installer/resources/themes/snark/ubergine/images/eta.png

1.27 KiB | W: | H:

installer/resources/themes/snark/ubergine/images/eta.png
installer/resources/themes/snark/ubergine/images/eta.png
installer/resources/themes/snark/ubergine/images/eta.png
installer/resources/themes/snark/ubergine/images/eta.png
  • 2-up
  • Swipe
  • Onion skin
installer/resources/themes/snark/ubergine/images/head_eta.png

1.27 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment