diff --git a/LICENSE.txt b/LICENSE.txt index ff288844e4..6a6ba534cf 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -244,6 +244,7 @@ Applications: - All other flag icons: public domain, courtesy mjames@gmail.com http://www.famfamfam.com/ Silk icons: See licenses/LICENSE-SilkIcons.txt FatCow icons: See licenses/LICENSE-FatCowIcons.txt + Fugue Icons: See licenses/LICENSE-FugueIcons.txt GeoIP Data: This product includes GeoLite data created by MaxMind, available from http://www.maxmind.com/ diff --git a/apps/i2psnark/java/build.xml b/apps/i2psnark/java/build.xml index 3ecde03938..523d9f3660 100644 --- a/apps/i2psnark/java/build.xml +++ b/apps/i2psnark/java/build.xml @@ -276,7 +276,7 @@ - diff --git a/apps/i2psnark/java/src/org/klomp/snark/Peer.java b/apps/i2psnark/java/src/org/klomp/snark/Peer.java index 1cf1d9aaae..73588d12a9 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/Peer.java +++ b/apps/i2psnark/java/src/org/klomp/snark/Peer.java @@ -173,7 +173,7 @@ public class Peer implements Comparable if (state != null) { String r = state.getRequests(); if (r != null) - return sock.toString() + "
Requests: " + r; + return sock.toString() + "
Requests: " + r + ""; } return sock.toString(); } diff --git a/apps/i2psnark/java/src/org/klomp/snark/SnarkManager.java b/apps/i2psnark/java/src/org/klomp/snark/SnarkManager.java index c1b70f0025..ecb6708395 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/SnarkManager.java +++ b/apps/i2psnark/java/src/org/klomp/snark/SnarkManager.java @@ -795,14 +795,17 @@ public class SnarkManager implements CompleteListener, ClientApp { updateConfig(); } + public boolean getUniversalTheming() { + return _context.getBooleanProperty(RC_PROP_UNIVERSAL_THEMING); + } + /** * Get current theme. * @return String -- the current theme */ public String getTheme() { String theme = _config.getProperty(PROP_THEME); - boolean universalTheming = _context.getBooleanProperty(RC_PROP_UNIVERSAL_THEMING); - if (universalTheming) { + if (getUniversalTheming()) { // Fetch routerconsole theme (or use our default if it doesn't exist) theme = _context.getProperty(RC_PROP_THEME, DEFAULT_THEME); // Ensure that theme exists @@ -1246,7 +1249,7 @@ public class SnarkManager implements CompleteListener, ClientApp { if (theme != null) { if(!theme.equals(_config.getProperty(PROP_THEME))) { _config.setProperty(PROP_THEME, theme); - addMessage(_t("{0} theme loaded, return to main i2psnark page to view.", theme)); + addMessage(_t("{0} theme loaded.", theme)); changed = true; } } diff --git a/apps/i2psnark/java/src/org/klomp/snark/dht/DHTNodes.java b/apps/i2psnark/java/src/org/klomp/snark/dht/DHTNodes.java index 8207090698..55778eea2c 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/dht/DHTNodes.java +++ b/apps/i2psnark/java/src/org/klomp/snark/dht/DHTNodes.java @@ -138,7 +138,7 @@ class DHTNodes { * @since 0.9.4 */ public void renderStatusHTML(StringBuilder buf) { - buf.append(_kad.toString().replace("\n", "
\n")); + buf.append(_kad.toString().replace("\n", "

\n")); } /** */ diff --git a/apps/i2psnark/java/src/org/klomp/snark/dht/DHTTracker.java b/apps/i2psnark/java/src/org/klomp/snark/dht/DHTTracker.java index 784d8e6bff..9b8fb32c52 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/dht/DHTTracker.java +++ b/apps/i2psnark/java/src/org/klomp/snark/dht/DHTTracker.java @@ -140,7 +140,7 @@ class DHTTracker { * Debug info, HTML formatted */ public void renderStatusHTML(StringBuilder buf) { - buf.append("DHT tracker: ").append(_torrentCount).append(" torrents ") + buf.append("DHT tracker: ").append(_torrentCount).append(" torrents ") .append(_peerCount).append(" peers ") .append(DataHelper.formatDuration(_expireTime)).append(" expiration
"); } diff --git a/apps/i2psnark/java/src/org/klomp/snark/dht/KRPC.java b/apps/i2psnark/java/src/org/klomp/snark/dht/KRPC.java index 1ebf975109..46d4476dce 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/dht/KRPC.java +++ b/apps/i2psnark/java/src/org/klomp/snark/dht/KRPC.java @@ -682,17 +682,17 @@ public class KRPC implements I2PSessionMuxedListener, DHT { public String renderStatusHTML() { long uptime = Math.max(1000, _context.clock().now() - _started); StringBuilder buf = new StringBuilder(256); - buf.append("
DHT DEBUG
TX: ").append(_txPkts.get()).append(" pkts / ") + buf.append("

DHT DEBUG


TX: ").append(_txPkts.get()).append(" pkts / ") .append(DataHelper.formatSize2(_txBytes.get())).append("B / ") .append(DataHelper.formatSize2(_txBytes.get() * 1000 / uptime)).append("Bps
" + - "RX: ").append(_rxPkts.get()).append(" pkts / ") + "RX: ").append(_rxPkts.get()).append(" pkts / ") .append(DataHelper.formatSize2(_rxBytes.get())).append("B / ") .append(DataHelper.formatSize2(_rxBytes.get() * 1000 / uptime)).append("Bps
" + - "DHT Peers: ").append( _knownNodes.size()).append("
" + - "Blacklisted: ").append(_blacklist.size()).append("
" + - "Sent tokens: ").append(_outgoingTokens.size()).append("
" + - "Rcvd tokens: ").append(_incomingTokens.size()).append("
" + - "Pending queries: ").append(_sentQueries.size()).append("
"); + "DHT Peers: ").append( _knownNodes.size()).append("
" + + "Blacklisted: ").append(_blacklist.size()).append("
" + + "Sent tokens: ").append(_outgoingTokens.size()).append("
" + + "Rcvd tokens: ").append(_incomingTokens.size()).append("
" + + "Pending queries: ").append(_sentQueries.size()).append("


"); _tracker.renderStatusHTML(buf); _knownNodes.renderStatusHTML(buf); return buf.toString(); diff --git a/apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java b/apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java index 1612ff2fab..2584e01e55 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java +++ b/apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java @@ -62,7 +62,7 @@ public class I2PSnarkServlet extends BasicServlet { private String _themePath; private String _imgPath; private String _lastAnnounceURL; - + private static final String DEFAULT_NAME = "i2psnark"; public static final String PROP_CONFIG_FILE = "i2psnark.configFile"; private static final String WARBASE = "/.resources/"; @@ -264,7 +264,7 @@ public class I2PSnarkServlet extends BasicServlet { sendRedirect(req, resp, peerString); return; } - + setHTMLHeaders(resp); PrintWriter out = resp.getWriter(); out.write(DOCTYPE + "\n" + @@ -283,7 +283,7 @@ public class I2PSnarkServlet extends BasicServlet { if ("2".equals(peerParam)) out.write(" | Debug Mode"); out.write("\n"); - + // we want it to go to the base URI so we don't refresh with some funky action= value int delay = 0; if (!isConfigure) { @@ -291,7 +291,8 @@ public class I2PSnarkServlet extends BasicServlet { if (delay > 0) { String jsPfx = _context.isRouterContext() ? "" : ".resources"; String downMsg = _context.isRouterContext() ? _t("Router is down") : _t("I2PSnark has stopped"); - //out.write("\n"); + // fallback to metarefresh when javascript is disabled + out.write("\n"); out.write("\n" + "\n"); buf.append("\n
\n"); - + if (parent) // always true - buf.append("
"); + buf.append("
\n
"); // for stop/start/check if (showStopStart || showPriority) { buf.append("
\n"); @@ -2936,17 +2986,17 @@ public class I2PSnarkServlet extends BasicServlet { //buf.append("").append(_t("Maggot link")).append(": ") // .append(MAGGOT).append(hex).append(':').append(hex).append(""); - buf.append(""); + buf.append(""); toThemeImg(buf, "size"); - buf.append("") + buf.append("") .append(_t("Size")) .append(": ") .append(formatSize(snark.getTotalLength())); int pieces = snark.getPieces(); double completion = (pieces - snark.getNeeded()) / (double) pieces; - buf.append(" "); + buf.append(" "); toThemeImg(buf, "head_rx"); - buf.append(" "); + buf.append(""); if (completion < 1.0) buf.append(_t("Completion")) .append(": ") @@ -2954,16 +3004,16 @@ public class I2PSnarkServlet extends BasicServlet { else buf.append(_t("Complete")).append(""); // up ratio - buf.append(" "); + buf.append(" "); toThemeImg(buf, "head_tx"); - buf.append(" ") + buf.append("") .append(_t("Upload ratio")) .append(": "); long uploaded = snark.getUploaded(); if (uploaded > 0) { double ratio = uploaded / ((double) snark.getTotalLength()); buf.append((new DecimalFormat("0.000")).format(ratio)); - buf.append(" x"); + buf.append(" x"); } else { buf.append('0'); } @@ -2974,18 +3024,18 @@ public class I2PSnarkServlet extends BasicServlet { needed = snark.getRemainingLength(); } if (needed > 0) { - buf.append(" "); + buf.append(" "); toThemeImg(buf, "head_rx"); - buf.append(" ") + buf.append("") .append(_t("Remaining")) .append(": ") .append(formatSize(needed)); } long skipped = snark.getSkippedLength(); if (skipped > 0) { - buf.append(" "); + buf.append(" "); toThemeImg(buf, "head_rx"); - buf.append(" ") + buf.append("") .append(_t("Skipped")) .append(": ") .append(formatSize(skipped)); @@ -2993,35 +3043,35 @@ public class I2PSnarkServlet extends BasicServlet { if (meta != null) { List> files = meta.getFiles(); int fileCount = files != null ? files.size() : 1; - buf.append(" "); + buf.append(" "); toThemeImg(buf, "file"); - buf.append(" ") + buf.append("") .append(_t("Files")) .append(": ") .append(fileCount); } - buf.append(" "); + buf.append(" "); toThemeImg(buf, "file"); - buf.append(" ") + buf.append("") .append(_t("Pieces")) .append(": ") .append(pieces); - buf.append(" "); + buf.append(" "); toThemeImg(buf, "file"); - buf.append(" ") + buf.append("") .append(_t("Piece size")) .append(": ") .append(formatSize(snark.getPieceLength(0))) - .append("\n"); + .append("\n"); // buttons if (showStopStart) { - buf.append(""); + buf.append(""); if (snark.isChecking()) { - buf.append("").append(_t("Checking")).append("… ") + buf.append("").append(_t("Checking")).append("… ") .append((new DecimalFormat("0.00%")).format(snark.getCheckingProgress())) - .append("   ") - .append(_t("Refresh page for results")).append(""); + .append(" ") + .append(_t("Refresh page for results")).append(""); } else if (snark.isStarting()) { buf.append("").append(_t("Starting")).append("…"); } else if (snark.isAllocating()) { @@ -3033,30 +3083,38 @@ public class I2PSnarkServlet extends BasicServlet { buf.append(_t("Stop")).append("\" name=\"stop\" class=\"stoptorrent\">\n"); else buf.append(_t("Start")).append("\" name=\"start\" class=\"starttorrent\">\n"); - buf.append("   \n"); + buf.append("\" class=\"disabled\" disabled=\"disabled\" title=\"") + .append(_t("Stop the torrent in order to check file integrity")) + .append("\">\n"); else - buf.append("\" class=\"reload\">\n"); + buf.append("\" class=\"reload\" title=\"") + .append(_t("Check integrity of the downloaded file(s)")) + .append("\">\n"); } buf.append("\n"); } } else { // snark == null // shouldn't happen - buf.append("Not found
resource=\"").append(r.toString()) - .append("\"
base=\"").append(base) - .append("\"
torrent=\"").append(torrentName) - .append("\"\n"); + buf.append("\n"); } buf.append("
") + .append(_t("Resource Not found")) + .append("
").append(_t("Resource")).append(":").append(r.toString()) + .append("
").append(_t("Base")).append(":").append(base) + .append("
").append(_t("Torrent")).append(":").append(torrentName) + .append("
\n"); if (snark != null && !r.exists()) { // fixup TODO - buf.append("

Does not exist
resource=\"").append(r.toString()) - .append("\"
base=\"").append(base) - .append("\"
torrent=\"").append(torrentName) - .append("\"

"); + buf.append("
") + .append(_t("Resource Does Not Exist")) + .append("
").append(_t("Resource")).append(":").append(r.toString()) + .append("
").append(_t("Base")).append(":").append(base) + .append("
").append(_t("Torrent")).append(":").append(torrentName) + .append("
"); return buf.toString(); } @@ -3064,7 +3122,7 @@ public class I2PSnarkServlet extends BasicServlet { if (r.isDirectory()) { ls = r.listFiles(); } // if r is not a directory, we are only showing torrent info section - + if (ls == null) { // We are only showing the torrent info section buf.append(""); @@ -3141,7 +3199,7 @@ public class I2PSnarkServlet extends BasicServlet { buf.append(""); } - tx = _t("Status"); + tx = _t("Download Status"); toThemeImg(buf, "status", tx, showRemainingSort ? _t("Sort by {0}", _t("Remaining")) : tx); if (showRemainingSort) @@ -3153,7 +3211,7 @@ public class I2PSnarkServlet extends BasicServlet { buf.append(""); } - tx = _t("Priority"); + tx = _t("Download Priority"); toThemeImg(buf, "priority", tx, showSort ? _t("Sort by {0}", tx) : tx); if (showSort) @@ -3174,18 +3232,18 @@ public class I2PSnarkServlet extends BasicServlet { boolean showSaveButton = false; boolean rowEven = true; for (Sorters.FileAndIndex fai : fileList) - { + { //String encoded = encodePath(ls[i].getName()); // bugfix for I2P - Backport from Jetty 6 (zero file lengths and last-modified times) // http://jira.codehaus.org/browse/JETTY-361?page=com.atlassian.jira.plugin.system.issuetabpanels%3Achangehistory-tabpanel#issue-tabs // See resource.diff attachment //Resource item = addPath(encoded); File item = fai.file; - + String rowClass = (rowEven ? "snarkTorrentEven" : "snarkTorrentOdd"); rowEven = !rowEven; buf.append(""); - + // Get completeness and status string boolean complete = false; String status = ""; @@ -3218,7 +3276,8 @@ public class I2PSnarkServlet extends BasicServlet { else status = toImg("clock_red"); status += " " + - (100 * (length - remaining) / length) + "% " + _t("complete") + + ("") + + (100 * (length - remaining) / length) + "% " + ("") + _t("complete") + ("") + " (" + DataHelper.formatSize2(remaining) + "B " + _t("remaining") + ")"; } @@ -3262,20 +3321,26 @@ public class I2PSnarkServlet extends BasicServlet { if (showPriority) { buf.append(""); if ((!complete) && (!item.isDirectory())) { - buf.append("\n") + .append("\n 0) buf.append("checked=\"checked\""); - buf.append('>').append(_t("High")); + buf.append('>') + .append(_t("High")).append(""); - buf.append("\n") + .append("\n').append(_t("Normal")); + buf.append('>') + .append(_t("Normal")).append(""); - buf.append("\n") + .append("\n').append(_t("Skip")); + buf.append('>') + .append(_t("Skip")).append(""); showSaveButton = true; } buf.append(""); @@ -3283,14 +3348,14 @@ public class I2PSnarkServlet extends BasicServlet { buf.append("\n"); } if (showSaveButton) { - buf.append(" " + - "") + buf.append("" + + "") .append(toImg("clock_red")).append(_t("Set all high")).append("\n" + "") .append(toImg("clock")).append(_t("Set all normal")).append("\n" + "") - .append(toImg("cancel")).append(_t("Skip all")).append("\n" + - "

\n" + + "\n" + "\n"); } @@ -3345,10 +3410,11 @@ public class I2PSnarkServlet extends BasicServlet { else if (mime.equals("text/plain") || mime.equals("text/x-sfv") || mime.equals("application/rtf") || - mime.equals("application/epub+zip") || - mime.equals("application/x-mobipocket-ebook") || plc.endsWith(".azw4")) icon = "page"; + else if (mime.equals("application/epub+zip") || + mime.equals("application/x-mobipocket-ebook")) + icon = "ebook"; else if (mime.equals("application/java-archive") || plc.endsWith(".deb")) icon = "package"; @@ -3374,7 +3440,7 @@ public class I2PSnarkServlet extends BasicServlet { icon = "compress"; else if (plc.endsWith(".exe")) icon = "application"; - else if (plc.endsWith(".iso")) + else if (plc.endsWith(".iso") || plc.endsWith(".nrg")) icon = "cd"; else if (mime.equals("application/x-bittorrent")) icon = "magnet"; @@ -3382,7 +3448,7 @@ public class I2PSnarkServlet extends BasicServlet { icon = "page_white"; return icon; } - + /** * Icon file in the .war. Always 16x16. * @@ -3402,7 +3468,7 @@ public class I2PSnarkServlet extends BasicServlet { private String toImg(String icon, String altText) { return "\"""; } - + /** * Image file in the theme. * @@ -3412,7 +3478,7 @@ public class I2PSnarkServlet extends BasicServlet { private String toThemeImg(String image) { return toThemeImg(image, "", ""); } - + /** * Image file in the theme. * diff --git a/apps/i2psnark/resources/icons/basket_put.png b/apps/i2psnark/resources/icons/basket_put.png index be62faaaab..01fc586107 100644 Binary files a/apps/i2psnark/resources/icons/basket_put.png and b/apps/i2psnark/resources/icons/basket_put.png differ diff --git a/apps/i2psnark/resources/icons/cancel.png b/apps/i2psnark/resources/icons/cancel.png index c149c2bc01..d6921565df 100644 Binary files a/apps/i2psnark/resources/icons/cancel.png and b/apps/i2psnark/resources/icons/cancel.png differ diff --git a/apps/i2psnark/resources/icons/cd.png b/apps/i2psnark/resources/icons/cd.png index ef4322357c..fae703d7a3 100644 Binary files a/apps/i2psnark/resources/icons/cd.png and b/apps/i2psnark/resources/icons/cd.png differ diff --git a/apps/i2psnark/resources/icons/compress.png b/apps/i2psnark/resources/icons/compress.png index 8606ff0fd2..183511d3ff 100644 Binary files a/apps/i2psnark/resources/icons/compress.png and b/apps/i2psnark/resources/icons/compress.png differ diff --git a/apps/i2psnark/resources/icons/ebook.png b/apps/i2psnark/resources/icons/ebook.png new file mode 100644 index 0000000000..8af80d3e88 Binary files /dev/null and b/apps/i2psnark/resources/icons/ebook.png differ diff --git a/apps/i2psnark/resources/icons/film.png b/apps/i2psnark/resources/icons/film.png index b0ce7bb198..91c2126e77 100644 Binary files a/apps/i2psnark/resources/icons/film.png and b/apps/i2psnark/resources/icons/film.png differ diff --git a/apps/i2psnark/resources/icons/folder.png b/apps/i2psnark/resources/icons/folder.png index 784e8fa482..87ff12017c 100644 Binary files a/apps/i2psnark/resources/icons/folder.png and b/apps/i2psnark/resources/icons/folder.png differ diff --git a/apps/i2psnark/resources/icons/html.png b/apps/i2psnark/resources/icons/html.png index 55d1072eaf..98cff2a2eb 100644 Binary files a/apps/i2psnark/resources/icons/html.png and b/apps/i2psnark/resources/icons/html.png differ diff --git a/apps/i2psnark/resources/icons/music.png b/apps/i2psnark/resources/icons/music.png index a8b3ede3df..e6dc2de8c8 100644 Binary files a/apps/i2psnark/resources/icons/music.png and b/apps/i2psnark/resources/icons/music.png differ diff --git a/apps/i2psnark/resources/icons/package.png b/apps/i2psnark/resources/icons/package.png index da3c2a2d74..a9ad768c2a 100644 Binary files a/apps/i2psnark/resources/icons/package.png and b/apps/i2psnark/resources/icons/package.png differ diff --git a/apps/i2psnark/resources/icons/page.png b/apps/i2psnark/resources/icons/page.png index 03ddd799fa..8c1184dffe 100644 Binary files a/apps/i2psnark/resources/icons/page.png and b/apps/i2psnark/resources/icons/page.png differ diff --git a/apps/i2psnark/resources/icons/page_white.png b/apps/i2psnark/resources/icons/page_white.png index 8b8b1ca000..0847f096db 100644 Binary files a/apps/i2psnark/resources/icons/page_white.png and b/apps/i2psnark/resources/icons/page_white.png differ diff --git a/apps/i2psnark/resources/icons/page_white_acrobat.png b/apps/i2psnark/resources/icons/page_white_acrobat.png index 8f8095e46f..641a419720 100644 Binary files a/apps/i2psnark/resources/icons/page_white_acrobat.png and b/apps/i2psnark/resources/icons/page_white_acrobat.png differ diff --git a/apps/i2psnark/resources/icons/photo.png b/apps/i2psnark/resources/icons/photo.png index 6c2aaaaaf3..607c25d102 100644 Binary files a/apps/i2psnark/resources/icons/photo.png and b/apps/i2psnark/resources/icons/photo.png differ diff --git a/apps/i2psnark/resources/icons/plugin.png b/apps/i2psnark/resources/icons/plugin.png index 6187b15aec..3ca4d1b594 100644 Binary files a/apps/i2psnark/resources/icons/plugin.png and b/apps/i2psnark/resources/icons/plugin.png differ diff --git a/apps/i2psnark/resources/icons/tick.png b/apps/i2psnark/resources/icons/tick.png index a9925a06ab..a7d7a96be3 100644 Binary files a/apps/i2psnark/resources/icons/tick.png and b/apps/i2psnark/resources/icons/tick.png differ diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClientBase.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClientBase.java index 399269c5a9..5f4d28eb54 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClientBase.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClientBase.java @@ -743,7 +743,7 @@ public abstract class I2PTunnelHTTPClientBase extends I2PTunnelClientBase implem if (first) { first = false; - out.write("

"); + out.write("

\n
\n

"); out.write(_t("Click a link below for an address helper from a jump service")); out.write("

\n"); } else { @@ -759,7 +759,7 @@ public abstract class I2PTunnelHTTPClientBase extends I2PTunnelClientBase implem } } } - out.write("
"); + out.write("\n\n"); writeFooter(out); } @@ -791,7 +791,7 @@ public abstract class I2PTunnelHTTPClientBase extends I2PTunnelClientBase implem StringBuilder buf = new StringBuilder(128); buf.append("

I2P HTTP Proxy Server
Generated on: ") .append(new Date().toString()) - .append("

\n"); + .append("\n\n\n"); return buf.toString(); } diff --git a/apps/i2ptunnel/jsp/editClient.jsp b/apps/i2ptunnel/jsp/editClient.jsp index c28f6fb130..72ffd56254 100644 --- a/apps/i2ptunnel/jsp/editClient.jsp +++ b/apps/i2ptunnel/jsp/editClient.jsp @@ -23,8 +23,7 @@ <% if (editBean.allowCSS()) { %> - - + <% } %> - + <% if (editBean.isInitialized()) { @@ -41,19 +39,18 @@ input.default { width: 1px; height: 1px; visibility: hidden; } %> -
-
+
<% String tunnelTypeName; String tunnelType; if (curTunnel >= 0) { tunnelTypeName = editBean.getTunnelType(curTunnel); tunnelType = editBean.getInternalType(curTunnel); - %>

<%=intl._t("Edit proxy settings")%>

<% + %>

<%=intl._t("Edit proxy settings")%> (<%=editBean.getTunnelName(curTunnel)%>)

<% } else { tunnelTypeName = editBean.getTypeName(request.getParameter("type")); tunnelType = net.i2p.data.DataHelper.stripHTML(request.getParameter("type")); - %>

<%=intl._t("New proxy settings")%>

<% + %>

<%=intl._t("New proxy settings")%>

<% } %> @@ -79,70 +76,88 @@ input.default { width: 1px; height: 1px; visibility: hidden; } <% } %> -
- -
-
-
-
- - -
-
- - <%=tunnelTypeName%> -
-
- - -
- -
-
-
- -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + <% - if ("streamrclient".equals(tunnelType)) { - out.write("Host:"); + if ("streamrclient".equals(tunnelType)) { %> + <% } else { %> - <%=intl._t("Reachable by")%>(R): - + + <% } /* streamrclient */ %> - + + <% if ("client".equals(tunnelType) || "ircclient".equals(tunnelType)) { - %>
-
+ + + + + <% } /* tunnel types */ %> -
-
-
- <% if ("httpclient".equals(tunnelType) || "connectclient".equals(tunnelType) || "sockstunnel".equals(tunnelType) || "socksirctunnel".equals(tunnelType)) { - %>
- - -
+ %> + + + + + + + <% if ("httpclient".equals(tunnelType)) { - %>
- - -
+ %> + + + + + + + <% } // httpclient %> -
- - class="tickbox" /> - <%=intl._t("(Check the Box for 'YES')")%> -
+ + + + + + <% } else if ("client".equals(tunnelType) || "ircclient".equals(tunnelType) || "streamrclient".equals(tunnelType)) { - %>
-
+ + + + + + <% } %> + <% if (!"streamrclient".equals(tunnelType)) { %> -
- - class="tickbox" /> - <%=intl._t("(Share tunnels with other clients and irc/httpclients? Change requires restart of client proxy)")%> -
+ + + + + + + <% } // !streamrclient %> -
- - class="tickbox" /> - <%=intl._t("(Check the Box for 'YES')")%> -
+ <% if ("ircclient".equals(tunnelType)) { %> -
- - class="tickbox" /> - <%=intl._t("(Check the Box for 'YES')")%> -
+ + + + + + + <% } // ircclient %> - - - +
+ <%=intl._t("Name")%> + + <%=intl._t("Type")%> +
+ + + <%=tunnelTypeName%> +
+ <%=intl._t("Description")%> + + <%=intl._t("Auto Start Tunnel")%> +
+ + + +
<% if ("streamrclient".equals(tunnelType)) { %> - + <%=intl._t("Target")%> <% } else { %> - + <%=intl._t("Access Point")%> <% } /* streamrclient */ %> - -
-
+ <%=intl._t("Port")%>: <% String value = editBean.getClientPort(curTunnel); if (value == null || "".equals(value.trim())) { - out.write(" ("); + out.write(" ("); out.write(intl._t("required")); - out.write(")"); + out.write(")"); } %> - - - -
-
+ <%=intl._t("Host")%>: + <% String targetHost = editBean.getTargetHost(curTunnel); if (targetHost == null || "".equals(targetHost.trim())) { - out.write(" ("); + out.write(" ("); out.write(intl._t("required")); - out.write(")"); - } + out.write(")"); + } %> - - + + + + <%=intl._t("Reachable by")%>: + + +
<%=intl._t("Use SSL?")%> - - class="tickbox" /> - +
+ +
+ <%=intl._t("Outproxies")%> +
+  (<%=intl._t("comma separated eg. proxy1.i2p,proxy2.i2p")%>) +
+ <%=intl._t("SSL Outproxies")%> +
+ +
+ <%=intl._t("Use Outproxy Plugin")%> + +
+ + +
+ <%=intl._t("Tunnel Destination")%> +
<% String value2 = editBean.getClientDestination(curTunnel); if (value2 == null || "".equals(value2.trim())) { - out.write(" ("); + out.write(" ("); out.write(intl._t("required")); - out.write(")"); - } + out.write(")"); + } %> - - - (<%=intl._t("name, name:port, or destination")%> + + + (<%=intl._t("name, name:port, or destination")%> <% if ("streamrclient".equals(tunnelType)) { /* deferred resolution unimplemented in streamr client */ %> - <%=intl._t("b32 not recommended")%> <% } %> ) - - +
+ <%=intl._t("Shared Client")%> +
+ +
+ <%=intl._t("Enable DCC")%> +
+ +
-
-
-

<%=intl._t("Advanced networking options")%>


- <%=intl._t("(NOTE: when this client proxy is configured to share tunnels, then these options are for all the shared proxy clients!)")%> -
+

<%=intl._t("Advanced Networking Options")%>

-
-
-
- -
- -
-
- + + + +<% if (!"streamrclient".equals(tunnelType)) { %> <% // no shared client tunnels for streamr %> + + + + <% } // !streamrclient %> + + + + + + + + + + + + + + + + + + + + + + + + + + <% if (!"streamrclient".equals(tunnelType)) { %> -
- -
+ + + + + + + + -
-
-
+ + <% } // !streamrclient %> -
- -
-
- - readonly="readonly" <% } %> /> -
-
- - readonly="readonly" <% } %> /> -
- + + + + + + + + + + + <% if (!"streamrclient".equals(tunnelType)) { // streamr client sends pings so it will never be idle %> -
-
-
-
- -
-
- - class="tickbox" /> -
+ + + + + + + + <% } // !streamrclient %> - -
-
-
- -
- -
-
- - class="tickbox" /> -
-
- - -
-
- - -
- -
-
-
- -
- -
-
- - class="tickbox" /> -
-
- -
+ <%=intl._t("Note: When this client proxy is configured to share tunnels, then these options are for all the shared proxy clients!")%> +
+ <%=intl._t("Tunnel Options")%> +
+ <%=intl._t("Length")%> + + <%=intl._t("Variance")%> +
- -
- +
- -
- + %> +
+ <%=intl._t("Count")%> + + <%=intl._t("Backup Count")%> +
- -
- + +
- - -
-
-
+ %> +
+ <%=intl._t("Profile")%> + + <%=intl._t("Delay Connect")%> +
+ - -
- - class="tickbox" /> - (<%=intl._t("for request/response connections")%>) -
+ +
+ +
+ <%=intl._t("Router I2CP Address")%> +
+ <%=intl._t("Host")%>: + readonly="readonly" <% } %> /> + + <%=intl._t("Port")%>: + readonly="readonly" <% } %> /> +
+ <%=intl._t("Delay tunnel open until required")%> +
+ +
- - - - -
class="tickbox" /><%=intl._t("Enable")%> class="tickbox" /><%=intl._t("Disable")%>
-
-
- - -
- -
-
-
+ + + + <%=intl._t("Reduce tunnel quantity when idle")%> + + + + + + + + + + + + <%=intl._t("Reduced tunnel count")%>: + + + + + <%=intl._t("Idle period")%>: + + minutes + + + + + + <%=intl._t("Close tunnels when idle")%> + + + + + + + + + + <%=intl._t("Idle period")%>: + + minutes + + + + + + <%=intl._t("New Keys on Reopen")%>: + + + + + + + + <% if ("client".equals(tunnelType) || "ircclient".equals(tunnelType) || "socksirctunnel".equals(tunnelType) || "sockstunnel".equals(tunnelType)) { %> -
- -
-
- - class="tickbox" /> -
-
- - -
- <% - String destb64 = editBean.getDestinationBase64(curTunnel); - if (destb64.length() > 0) { - %>
- - -
-
- - <%=editBean.getDestHashBase32(curTunnel)%> -
- <% } // if destb64 %> -
-
-
+ + + <%=intl._t("Persistent private key")%> + + + + + + + + <%=intl._t("File")%>: + + + + <% + String destb64 = editBean.getDestinationBase64(curTunnel); + if (destb64.length() > 0) { + %> + + + + <%=intl._t("Local destination")%> + + + + + + + + + + + <%=intl._t("Local Base 32")%>: + <%=editBean.getDestHashBase32(curTunnel)%> + + + <% } // if destb64 %> <% } %> <% if ("httpclient".equals(tunnelType)) { %> -
- -
-
- - class="tickbox" /> -

-
- -
-
- - class="tickbox" /> -

-
- -
-
- - class="tickbox" /> -

-
- -
-
- - class="tickbox" /> -
-
-
-
+ + + + <%=intl._t("HTTP Filtering")%> + + + + + + + + + + + + + + + + + + + + + <% } // if httpclient %> - + <% if (true /* editBean.isAdvanced() */ ) { int currentSigType = editBean.getSigType(curTunnel, tunnelType); %> -
- -
-
-
- - class="tickbox" /> -
+ + + <%=intl._t("Signature type")%> (<%=intl._t("Experts only!")%>) + + + + + + + + + + <% if (editBean.isSigTypeAvailable(1)) { %> -
- - class="tickbox" /> -
+ + + + + + <% } + if (editBean.isSigTypeAvailable(2)) { %> -
- - class="tickbox" /> -
+ + + + + <% } if (editBean.isSigTypeAvailable(3)) { %> -
- - class="tickbox" /> -
+ + + + + + <% } if (editBean.isSigTypeAvailable(7)) { %> -
- - class="tickbox" /> -
+ + + + + + <% } // isAvailable %> -
- -
-
-
+ <% } // isAdvanced %> <% if ("httpclient".equals(tunnelType) || "connectclient".equals(tunnelType) || "sockstunnel".equals(tunnelType) || "socksirctunnel".equals(tunnelType)) { %> -
- -
-
- - class="tickbox" /> -
-
- - -
-
- - -
-
-
-
-
- -
-
- - class="tickbox" /> -
-
- - -
-
- - -
-
-
-
+ + + <%=intl._t("Local Authorization")%> + + + + + + + + + + + <%=intl._t("Username")%>: + + + + <%=intl._t("Password")%>: + + + + + + + <%=intl._t("Outproxy Authorization")%> + + + + + + + + + + + <%=intl._t("Username")%>: + + + + + <%=intl._t("Password")%>: + + + + <% } // httpclient || connect || socks || socksirc %> <% if ("httpclient".equals(tunnelType)) { %> -
- -
-
- -
-
-
-
+ + + + <%=intl._t("Jump URL List")%> + + + + + + + + <% } // httpclient %> -
- - -
- - -
-
-
- -
- - + + + + + +
+ + <% } else { - %>Tunnels are not initialized yet, please reload in two minutes.<% + %>
<%=intl._t("Tunnels are not initialized yet, please reload in two minutes.")%>
<% } // isInitialized() %> diff --git a/apps/i2ptunnel/jsp/editServer.jsp b/apps/i2ptunnel/jsp/editServer.jsp index c93ceb6ac1..dc64441314 100644 --- a/apps/i2ptunnel/jsp/editServer.jsp +++ b/apps/i2ptunnel/jsp/editServer.jsp @@ -23,8 +23,7 @@ <% if (editBean.allowCSS()) { %> - - + <% } %> - + <% if (editBean.isInitialized()) { @@ -41,19 +39,19 @@ input.default { width: 1px; height: 1px; visibility: hidden; } %>
-
-
+
+ <% String tunnelTypeName; String tunnelType; if (curTunnel >= 0) { tunnelTypeName = editBean.getTunnelType(curTunnel); tunnelType = editBean.getInternalType(curTunnel); - %>

<%=intl._t("Edit server settings")%>

<% + %>

<%=intl._t("Edit Server Settings")%> (<%=editBean.getTunnelName(curTunnel)%>)

<% } else { tunnelTypeName = editBean.getTypeName(request.getParameter("type")); tunnelType = net.i2p.data.DataHelper.stripHTML(request.getParameter("type")); - %>

<%=intl._t("New server settings")%>

<% + %>

<%=intl._t("New Server Settings")%>

<% } %> @@ -79,103 +77,115 @@ input.default { width: 1px; height: 1px; visibility: hidden; } <% } %> -
- -
-
-
-
- - -
-
- - <%=tunnelTypeName%> -
-
- - -
-
- - class="tickbox" /> - <%=intl._t("(Check the Box for 'YES')")%> -
- -
-
-
- -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + <% if (!"streamrserver".equals(tunnelType)) { %> -
- - -
+ <% } /* !streamrserver */ %> -
-
+ <% if (!"streamrserver".equals(tunnelType)) { %> -
- - class="tickbox" /> -
+ + + + <% if ("httpbidirserver".equals(tunnelType)) { %> -
-
-
-
- -
-
-
+ + + + + + + <% } /* httpbidirserver */ %> <% if ("httpbidirserver".equals(tunnelType) || "streamrserver".equals(tunnelType)) { %> -
- + +
<% } /* httpbidirserver || streamrserver */ %> + + -
-
-
- <% if (("httpserver".equals(tunnelType)) || ("httpbidirserver".equals(tunnelType))) { - %>
- - - <%=intl._t("(leave blank for outproxies)")%> -
+ %> + + + + + + + + + <% } - %>
-
+ + + + + + -
- - -
+ + + + + + + <% /****** @@ -238,7 +266,7 @@ input.default { width: 1px; height: 1px; visibility: hidden; } - + <% } // sig @@ -248,7 +276,8 @@ input.default { width: 1px; height: 1px; visibility: hidden; } String b64 = editBean.getDestinationBase64(curTunnel); if (!"".equals(b64)) { %> -
+
+ <% b64 = b64.replace("=", "%3d"); String name = editBean.getSpoofedHost(curTunnel); @@ -257,46 +286,50 @@ input.default { width: 1px; height: 1px; visibility: hidden; } // mysite.i2p is set in the installed i2ptunnel.config if (name != null && !name.equals("") && !name.equals("mysite.i2p") && !name.contains(" ") && name.endsWith(".i2p")) { %> - <% } else { %> - - <%=intl._t("Set name with .i2p suffix to enable QR code generation")%> - <%=intl._t("Set name with .i2p suffix to enable registration authentication")%> + <% } // name %> - + + <% } // b64 %> - - +
+ <%=intl._t("Name")%> + + <%=intl._t("Type")%> +
+ + + <%=tunnelTypeName%> +
+ <%=intl._t("Description")%> + + <%=intl._t("Auto Start Tunnel")%> +
+ + + +
<% if ("streamrserver".equals(tunnelType)) { %> - + <%=intl._t("Access Point")%> <% } else { %> - + <%=intl._t("Target")%> <% } %> - +
+ <%=intl._t("Host")%>: + + + <%=intl._t("Port")%>: <% String value = editBean.getTargetPort(curTunnel); if (value == null || "".equals(value.trim())) { - out.write(" ("); + out.write(" ("); out.write(intl._t("required")); - out.write(")"); - } + out.write(")"); + } %> - - - + +
+ <% } /* !streamrserver */ %> - +
+ <%=intl._t("Access Point")%> +
+ <%=intl._t("Port")%>: + <% String value4 = editBean.getClientPort(curTunnel); if (value4 == null || "".equals(value4.trim())) { - out.write(" ("); + out.write(" ("); out.write(intl._t("required")); - out.write(")"); + out.write(")"); } %> - - - + + + + <%=intl._t("Reachable by")%>: + - + +
+ <%=intl._t("Website Hostname")%> +
+ + <%=intl._t("(leave blank for outproxies)")%> +
+ <%=intl._t("Private key file")%> +
<% String value3 = editBean.getPrivateKeyFile(curTunnel); if (value3 == null || "".equals(value3.trim())) { - out.write(" ("); + out.write(" ("); out.write(intl._t("required")); - out.write(")"); + out.write(")"); } %> - - - + +
+ <%=intl._t("Local destination")%> +
+ +
" href="/imagegen/qr?s=320&t=<%=name%>&c=http%3a%2f%2f<%=name%>%2f%3fi2paddresshelper%3d<%=b64%>" target="_top"><%=intl._t("Generate QR Code")%> - <%=intl._t("Add to local addressbook")%> -      - <%=intl._t("Registration Authentication")%> + <%=intl._t("Registration Authentication")%> + + <%=intl._t("Note: In order to enable QR code generation or registration authentication, configure the Name field above with .i2p suffix eg. mynewserver.i2p")%> +
-
-
-

<%=intl._t("Advanced networking options")%>

-
+

<%=intl._t("Advanced Networking Options")%>

-
-
-
- -
- -
-
- + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <% if (!"streamrserver".equals(tunnelType)) { %> -
- + +
+ + + + + + -
-
-
<% } /* !streamrserver */ %> -
- -
-
- - readonly="readonly" <% } %> /> -
-
- - readonly="readonly" <% } %> /> -
- -
-
-
- -
- -
-
- - class="tickbox" /> -
-
- - -
-
- - - <%=intl._t("(Tunnel must be stopped first)")%> -
- -
-
-
- -
- -
-
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -
-
- -
-
- - -
-
- - -
-
- - -
-
-
-
- -
-
- -
-
- -
-
- -
-
-
-
- -
-
- -
-
+ + + + + + + + + + + <% if (("httpserver".equals(tunnelType)) || ("httpbidirserver".equals(tunnelType))) { - %>
-
- -
-
- - -
-
- - -
-
-
-
- -
-
- -
-
- -
-
-
-
- -
-
- -
-
- <% } // httpserver - %>
-
-
- -
- -
-
- - class="tickbox" /> -
-
- - -
-
- - -
+ %> + + + + + + + + + + + + + <% } // httpserver + %> + + + + + + + + + + + + + + + + + + + + + + + + + + -
-
-
- <% /***************** %>
+ + + + + + <% } // isAdvanced %> <% @@ -758,35 +823,34 @@ input.default { width: 1px; height: 1px; visibility: hidden; } } // ab64 %>

<% } // currentSigType %> - -
- - -
- - - -
-
-
+ + + + + + + + + +
+ <%=intl._t("Tunnel Options")%> +
+ <%=intl._t("Length")%> + + <%=intl._t("Variance")%> +
- -
- +
- -
- + %> +
+ <%=intl._t("Count")%> + + <%=intl._t("Backup Count")%> +
- -
- + +
- - -
-
-
- + %> +
+ <%=intl._t("Profile")%> +
- + +
+ <%=intl._t("Router I2CP Address")%> +
+ <%=intl._t("Host")%>: + readonly="readonly" <% } %> /> + + <%=intl._t("Port")%>: + readonly="readonly" <% } %> /> +
+ <%=intl._t("Encrypt Leaseset")%> +
+ +
+ <%=intl._t("Encryption Key")%> + + <%=intl._t("Generate New Key")%> (<%=intl._t("Tunnel must be stopped first")%>) +
+ + + +
+ <%=intl._t("Restricted Access List")%> +
<% /* can't use
+ <%=intl._t("Access List")%> (<%=intl._t("Specify clients, 1 per line")%>) +
+ +
+ <%=intl._t("Server Access Options")%> +
+ + + +
+ + + " value="<%=editBean.getUserAgents(curTunnel)%>" class="freetext" /> +
+ + + +
+ <%=intl._t("Server Throttling")%> +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <% if (("httpserver".equals(tunnelType)) || ("httpbidirserver".equals(tunnelType))) { + %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <% } // httpserver + %> + + +
+ <%=intl._t("Inbound connection limits (0=unlimited)")%> +
<%=intl._t("Per Minute")%><%=intl._t("Per Hour")%><%=intl._t("Per Day")%>
<%=intl._t("Per Client")%> + + + + + +
<%=intl._t("Total")%> + + + + + +
<%=intl._t("Max concurrent connections (0=unlimited)")%>
+ +
+ <%=intl._t("POST limits (0=unlimited)")%> +
+ <%=intl._t("Per Period")%> + + <%=intl._t("Ban Duration")%> +
+ <%=intl._t("Per Client")%> + + + + + + <%=intl._t("minutes")%> +
+ <%=intl._t("Total")%> + + + + + + <%=intl._t("minutes")%> +
+ <%=intl._t("POST limit period")%> + + + + <%=intl._t("minutes")%> +
+
+ <%=intl._t("Reduce tunnel quantity when idle")%> +
+ +
+ <%=intl._t("Reduced tunnel count")%>: + + + <%=intl._t("Idle period")%>: + + <%=intl._t("minutes")%> +
+ <%=intl._t("Signature type")%> (<%=intl._t("Experts only! Changes B32!")%>) +
+ + + <% if (editBean.isSigTypeAvailable(1)) { %> -
- - class="tickbox" /> -
+ + + <% } if (editBean.isSigTypeAvailable(2)) { %> -
- - class="tickbox" /> -
+ + + <% } if (editBean.isSigTypeAvailable(3)) { %> -
- - class="tickbox" /> -
+ + + <% } if (editBean.isSigTypeAvailable(7)) { %> -
- - class="tickbox" /> -
+ + + <% } // isAvailable %> - - -
-
-
+ +
+ <%=intl._t("Custom options")%> +
+ +
- - - - - + + +
+
- + <% } else { - %>Tunnels are not initialized yet, please reload in two minutes.<% + %>
<%=intl._t("Tunnels are not initialized yet, please reload in two minutes.")%>
<% } // isInitialized() %> diff --git a/apps/i2ptunnel/jsp/index.jsp b/apps/i2ptunnel/jsp/index.jsp index f0faf2c946..1c6758c9b3 100644 --- a/apps/i2ptunnel/jsp/index.jsp +++ b/apps/i2ptunnel/jsp/index.jsp @@ -29,46 +29,42 @@ <% if (indexBean.allowCSS()) { %> - - + <% } %> - - -
-
-

<%=intl._t("Status Messages")%>

-
- -
-
-
+
+

<%=intl._t("Status Messages")%>

+ + + + -
-
-
- + + +
+
<%=intl._t("Refresh")%> - - - +
+
+ <% if (indexBean.isInitialized()) { String nextNonce = net.i2p.i2ptunnel.web.IndexBean.getNextNonce(); %> -
-
-