diff --git a/CHANGES.txt b/CHANGES.txt index 73ff52d..04e300a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,15 +2,22 @@ - Add more configuration, customization, and registration info to help page - Change default sig type to EdDSA - Add variables for $VERSION and $SITENAME - - Add custom CSS to docroot/tracker.css to allow customization + - Add custom CSS to docroot/tracker.css to allow customization and include + alternative tracker-purple.css + - Add favicon.png to docroot + - Add custom icon for homepage + - Add auto page reload for tracker stats (ajax with meta refresh fallback) + - Add footer to /tracker with ZzzOT version and github link + - Add config options to hide version footer on /tracker or change footer text - Tidy CHANGES.txt and add to plugin/ - Changes for new installs only: - Enhance presentation of help page - - Modify docroot/index.html post-install to contain b32 + - Modify docroot/index.html post-install to contain b32 footer - Only display warning about moving help.html if necessary - Add rewrite rules for /tracker, /tracker/, /tracker/index.html, /help and /help/ to jetty.xml - - Replace jetty.servlet.DeaultServlet with I2PDefaultServlet in BaseContext.xml + - Replace jetty.servlet.DefaultServlet with I2PDefaultServlet in BaseContext.xml + (requires I2P 0.9.31 or newer) 2017-05-21 [0.16.0] - Fix scrape response (requires I2P 0.9.30-8) (ticket #1994) diff --git a/README.txt b/README.txt index b80bcc1..11a896d 100644 --- a/README.txt +++ b/README.txt @@ -2,6 +2,7 @@ ZzzOT I2P Open Tracker Plugin ----------------------------- This is a very simple in-memory open tracker, wrapped into an I2P plugin. +A compiled version of the plugin is available at http://stats.i2p/i2p/plugins/ The plugin starts a new http server tunnel, eepsite, and Jetty server running at port 7662. The tracker status is available at http://127.0.0.1:7662/tracker/ diff --git a/build.xml b/build.xml index ce1efa7..f897984 100644 --- a/build.xml +++ b/build.xml @@ -16,7 +16,7 @@ - + @@ -24,6 +24,8 @@ + + @@ -83,6 +85,8 @@ + + diff --git a/plugin/clients.config b/plugin/clients.config index 99f61b4..e4eb47a 100644 --- a/plugin/clients.config +++ b/plugin/clients.config @@ -2,7 +2,7 @@ clientApp.0.main=net.i2p.zzzot.ZzzOTController clientApp.0.name=ZzzOT clientApp.0.args=-d $PLUGIN start clientApp.0.stopargs=-d $PLUGIN stop -clientApp.0.delay=40 +clientApp.0.delay=0 clientApp.0.startOnLoad=true # we also use i2p.jar and i2ptunnel.jar, they are in the standard router classpath clientApp.0.classpath=$PLUGIN/lib/zzzot.jar,$I2P/lib/i2psnark.jar diff --git a/plugin/templates/help.html b/plugin/templates/help.html index 72474fa..fe4f7f7 100644 --- a/plugin/templates/help.html +++ b/plugin/templates/help.html @@ -4,10 +4,11 @@ ZZZOT OPENTRACKER | HELP + diff --git a/scripts/favicon.png b/scripts/favicon.png new file mode 100644 index 0000000..ae712dc Binary files /dev/null and b/scripts/favicon.png differ diff --git a/scripts/plugin.config b/scripts/plugin.config index c615440..7923df6 100644 --- a/scripts/plugin.config +++ b/scripts/plugin.config @@ -1,8 +1,10 @@ name=zzzot -signer=zzz-plugin@mail.i2p +signer=z3d@mail.i2p consoleLinkName=ZzzOT -consoleLinkURL=http://127.0.0.1:7662/tracker/index.jsp -description=Open tracker +consoleLinkURL=http://127.0.0.1:7662/tracker/ +consoleLinkTooltip=BitTorrent OpenTracker +icon-code=iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAABm1BMVEUAAAAZGRkZGRkaGhoZGRkZGRkZGRkZGRkYGBgZGRkYGBgZGRkYGBgZGRkZGRkXFxcYGBgZGRkZGRkZGRkZGRkAAAAZGRnziRYTExPzfhbzbhbzdxbzgxbzlRYLCwvzjhbzcxbMzMzzkBb~~~~~~Pl0dHRdXV3GxsYnJyfe3t7OycbBwcGcnJyHh4cjEgP39~f96dSurq5~f397e3tra2tlZWU7OzseHh7haRSGSAsOBwGpqKeWlpbgpnRUVFRNTU00NDTxmynPbRJwNgpXLwdEJQY4IAUVCwLy8vL83sK7u7uysrL7yqf6v5Tdr4H4t3H4rGz2pEvnjUnqnkQvLy~zii30gyjxdCLqdhXLexK9bhGQTQ1-QAtlLgn-9u~Pxr7Uvqr71KbYuJz6yZn5v4T3pVv3s1rkmVr1nzr1kzLy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locYBSciTVf0cVOTs7qOAjqLCTnCwLLZzepENbn79-JYP39IEwttBThrZ5IwNx2FNIM7z8gvZ5jMMX8NDIEAXcRgHGbYi0O~LFfwGFpGmcRnznTyGbMJv7Ft4mabRAxsJL7VSxpFtrsPwIww3QhM9zSjxir1AyD70sRpMwFZuYYdpYI~vY~uIwE5SpoepAQS64iLw-98E7rMsQvnXKEgFvAQubSLb9MHwI1yQhKrzKy37EhblJrJNLwzfmz6~0upYDJDIPmSTsQ-0aGIRsOKzkVYGg8H3yB7jX4KUOSzzCPjD0rm99hnZ4sbDNspaPAcO-PSnLTLYa-ckbmjP7FxEpk-bXt7k8c-~GffeCV1wC-fBAX~x8z7dX3HmJ-uGl3Eny5734gIjilXruAMlzOEoLzA0vDSVeBhZ8DRk5DtLYXNpkZWKdFsJiAZu4RQrssrKvGTCQsH4si7FB1iZZ1JoDuBhq9OvcxRPskLTtNRN4Zz5~aMzx~wXPBbFdhj3Ryt58GMHd-nFtpkP0SzOSWX3TxtnbRBPR1m5X6nhyEciaonEO17UDG5H8rzhqNjyyHIO44FhuViAbt6X8Uhn5ZYHqG8WmER4GuN-dWhEYq4Ull7txXG2izdd3nobbZ8sF8LJBGZE4JcY6CrYavsAt98lcA0kLb8ZCofDw8sSor4DLqfbVutbZd76Nvrc~6P51tt~v97-t1i3~38A57d5M52iLPcAAAAASUVORK5CYII= +description=BitTorrent OpenTracker author=zzz updateURL=http://stats.i2p/i2p/plugins/zzzot-update.xpi2p updateURL.su3=http://stats.i2p/i2p/plugins/zzzot-update.su3 diff --git a/scripts/tracker-purple.css b/scripts/tracker-purple.css index 695ebb2..a640ad9 100644 --- a/scripts/tracker-purple.css +++ b/scripts/tracker-purple.css @@ -14,8 +14,7 @@ html, body { @supports (background-blend-mode: overlay) { html, body { - background: repeating-linear-gradient(45deg, #333, #111 2px, #111 3px), repeating-linear-gradient(135deg, #444, #333 2px, #222 3px); - background: repeating-linear-gradient(45deg, #313, #000 2px, #000 3px), repeating-linear-gradient(135deg, #414, #313 2px, #212 3px); /* purple */ + background: repeating-linear-gradient(45deg, #313, #000 2px, #000 3px), repeating-linear-gradient(135deg, #414, #313 2px, #212 3px); background-blend-mode: overlay, normal; background-size: 100% 100%, 100% 100%; background-attachment: fixed; @@ -42,8 +41,7 @@ html, body { text-align: center; border: 1px solid #535; box-shadow: inset 0 0 0 1px #111, inset 0 0 2px 1px #444, 0 0 2px 2px #000; - background: #181818; - background: repeating-linear-gradient(to right, rgba(255, 255, 255, .05), rgba(0, 0, 0, .08) 2px), repeating-linear-gradient(to bottom, #222, #111 2px); + background: #180618; background: repeating-linear-gradient(to right, rgba(255, 200, 255, .05), rgba(0, 0, 0, .08) 2px), repeating-linear-gradient(to bottom, #212, #101 2px); /* purple */ background-blend-mode: overlay; will-change: transform; @@ -134,6 +132,19 @@ hr { background: linear-gradient(to right, rgba(0, 0, 0, 0), #535, rgba(0, 0, 0, 0)); } +::selection, +::-moz-selection { + text-shadow: none; + background: #515; + color: #fff; +} + +#totals { + padding-top: 6px; + line-height: 140%; + text-shadow: 0 1px 1px #000; +} + #footer { padding: 4px; position: absolute; @@ -152,10 +163,27 @@ hr { #footer.version { font-size: 9.5pt; - font-weight: normal; +} + +#footer.version a { + margin: 0 1px 0 2px; +} + +#footer.version::before { + margin-left: -10px; + content: ""; + display: inline-block; + margin-top: 1px; + width: 20px; + height: 18px; + vertical-align: middle; + background: url(/favicon.png) left top no-repeat; + background-size: 16px 16px; + filter: hue-rotate(-110deg) saturate(.4) brightness(1.4); } #initializing::before { + margin-left: -20px; content: ""; display: inline-block; width: 28px; @@ -163,7 +191,7 @@ hr { vertical-align: text-bottom; background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABRhJREFUeNq0Vd1vk1UYP+f9bruPrmu70W1lrLKJzE0o+BEFt4yLRZJpgl4YZ6IXhiuT/Slcqlw6Qy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ICvdUj987HR7slZPZSg7xHPbKAtpIFyzISksEEGqFYKQL8mMFPkVAEJTlD/i8+az6FqSC9fTbjArAQSD6HdgbfW3qoLyypRead30y56aSOdOxnWJbBJrLI13cMaBDKyEqlV6fjY9m7m323l/deLuU19iLIv5gF9k3OoD7R/aQv7JmfhvuIpFHHTKP0itrulHVs5BSs63ZlVHDQCwgoZTmINMhaAMyks+4/N7IQDg+ujfcIXH17FQsUs5UnOLVjF0wHZDBPVngkJHZqKVXH5SAl2Tz5TcMQD41JKJQQEQ3Fy/c6j06OYijwyGd8cLyojKw7ui2MAQKMLwyoM0jQO9JrldTN/7IU1bGlFqo1QDr3RUsoNTZxQRsLG5dvT7lGytMipMTewzFK0MwT/7egvOKUbP1pdv56spaEu5eBu815O44gtmrFN/9aulR42eluAiyAJD6GZbl9+ThaB8fGwlQf49CPR7WGFys69u4VNxy1+7dN9eTa9Q0meJfADX2uWsO4/wnDQPC3JdxmEOsztlHm8lYGcI8COdOAI4DooBOFjAgC1gBXAVcg3znucabQE808DzHvwIMALq5vhJjsCXwAAAAAElFTkSuQmCC") center center no-repeat; background-size: 16px 16px; - filter: hue-rotate(180deg) saturate(.6); + filter: hue-rotate(90deg) saturate(.6); animation: spin linear 3s forwards infinite; } diff --git a/scripts/tracker.css b/scripts/tracker.css index d21639f..c17a617 100644 --- a/scripts/tracker.css +++ b/scripts/tracker.css @@ -13,7 +13,8 @@ html, body { @supports (background-blend-mode: overlay) { html, body { - background: repeating-linear-gradient(45deg, #333, #111 2px, #111 3px), repeating-linear-gradient(135deg, #444, #333 2px, #222 3px); + background: repeating-linear-gradient(45deg, #333, #111 2px, #111 3px), + repeating-linear-gradient(135deg, #444, #333 2px, #222 3px); background-blend-mode: overlay, normal; background-size: 100% 100%, 100% 100%; background-attachment: fixed; @@ -41,7 +42,8 @@ html, body { border: 1px solid #555; box-shadow: inset 0 0 0 1px #111, inset 0 0 2px 1px #444, 0 0 2px 2px #000; background: #181818; - background: repeating-linear-gradient(to right, rgba(255, 255, 255, .05), rgba(0, 0, 0, .08) 2px), repeating-linear-gradient(to bottom, #222, #111 2px); + background: repeating-linear-gradient(to right, rgba(255, 255, 255, .05), rgba(0, 0, 0, .08) 2px), + repeating-linear-gradient(to bottom, #222, #111 2px); background-blend-mode: overlay; will-change: transform; } @@ -75,7 +77,9 @@ code { @supports (-webkit-text-stroke-width: 1px) { #sitename, #sitename:hover, #sitename:focus { background: #731; - background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, .2), rgba(0, 0, 0, .5) 2px), linear-gradient(to bottom, rgba(255, 96, 0, .2), rgba(0, 0, 0, .9) 100%), linear-gradient(to bottom, #210, #310 15%, #fff 50%, #310 80%); + background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, .2), rgba(0, 0, 0, .5) 2px), + linear-gradient(to bottom, rgba(255, 96, 0, .2), rgba(0, 0, 0, .9) 100%), + linear-gradient(to bottom, #210, #310 15%, #fff 50%, #310 80%); -moz-background-clip: text !important; -webkit-background-clip: text !important; background-clip: text !important; @@ -85,23 +89,42 @@ code { filter: drop-shadow(0 0 2px #000); -webkit-text-stroke-color: #999; -webkit-text-stroke-width: 0.02em; + animation: ease-in-out spinwash 60s 15s alternate infinite; } + #sitename:hover, #sitename:focus { background: #951; - background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, .2), rgba(0, 0, 0, .3) 2px), linear-gradient(to bottom, rgba(255, 255, 255, .2), rgba(0, 0, 0, .7) 100%), linear-gradient(to bottom, #930, #d50 15%, #fff 50%, #930 80%, #000 100%, #ff0 150%); + background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, .2), rgba(0, 0, 0, .3) 2px), + linear-gradient(to bottom, rgba(255, 255, 255, .2), rgba(0, 0, 0, .7) 100%), + linear-gradient(to bottom, #930, #d50 15%, #fff 50%, #930 80%, #000 100%, #ff0 150%); filter: drop-shadow(0 0 2px #b00); -webkit-text-stroke-color: #bbb; + animation: none; } } +@keyframes spinwash { + from { + filter: hue-rotate(0) drop-shadow(0 0 2px #000); + } + to { + filter: hue-rotate(360deg) drop-shadow(0 0 2px #000); + } +} + a, a:visited { - color: #f60; + font-weight: bold; + color: #c4ad9d; text-decoration: none; outline: none; } a:hover, a:focus { - color: #f90; + color: #e88b44; +} + +a:active { + color: #f60; } hr { @@ -110,7 +133,21 @@ hr { color: transparent; border: none; background: #555; - background: linear-gradient(to right, rgba(0, 0, 0, 0), #555, rgba(0, 0, 0, 0)); + background: linear-gradient(to right, rgba(0,0,0,0) 35%, rgba(255,255,255,.3), rgba(0,0,0,0) 65%), + linear-gradient(to right, rgba(0, 0, 0, 0), #605555, rgba(0, 0, 0, 0)); +} + +::selection, +::-moz-selection { + text-shadow: none; + background: #431; + color: #fff; +} + +#totals { + padding-top: 6px; + line-height: 140%; + text-shadow: 0 1px 1px #000; } #footer { @@ -130,11 +167,33 @@ hr { } #footer.version { + padding: 4px; + line-height: 19px; font-size: 9.5pt; - font-weight: normal; + -moz-user-select: none; + -webkit-user-select: none; + user-select: none; +} + +#footer.version a { + margin: 0 1px 0 2px; +} + +#footer.version::before { + margin-left: -10px; + content: ""; + display: inline-block; + margin-top: 1px; + width: 20px; + height: 18px; + vertical-align: middle; + background: url(/favicon.png) left top no-repeat; + background-size: 16px 16px; + mix-blend-mode: luminosity; } #initializing::before { + margin-left: -20px; content: ""; display: inline-block; width: 28px; @@ -178,6 +237,8 @@ hr { font-size: 10pt; } #footer.version { + margin-top: 0; + line-height: 18px; font-size: 8.5pt; } #initializing::before { diff --git a/src/java/net/i2p/zzzot/ZzzOTController.java b/src/java/net/i2p/zzzot/ZzzOTController.java index c4255c1..afd5fba 100644 --- a/src/java/net/i2p/zzzot/ZzzOTController.java +++ b/src/java/net/i2p/zzzot/ZzzOTController.java @@ -67,13 +67,19 @@ public class ZzzOTController implements ClientApp { private static volatile ZzzOTController _controller; // you wouldn't run two instances in the same JVM, would you? private static String _sitename; + private static String _showfooter; + private static String _footertext; private ClientAppState _state = UNINITIALIZED; private static final String NAME = "ZzzOT"; private static final String DEFAULT_SITENAME = "ZZZOT"; private static final String PROP_SITENAME = "sitename"; - private static final String VERSION = "0.16.1"; + private static final String VERSION = "0.17.0"; + private static final String DEFAULT_SHOWFOOTER = "true"; + private static final String PROP_SHOWFOOTER = "showfooter"; + private static final String DEFAULT_FOOTERTEXT = "Running ZZZOT " + VERSION; + private static final String PROP_FOOTERTEXT = "footertext"; private static final String CONFIG_FILE = "zzzot.config"; private static final String BACKUP_SUFFIX = ".jetty8"; private static final String[] xmlFiles = { @@ -102,6 +108,8 @@ public class ZzzOTController implements ClientApp { } _zzzot = new ZzzOT(ctx, props); _sitename = props.getProperty(PROP_SITENAME, DEFAULT_SITENAME); + _showfooter = props.getProperty(PROP_SHOWFOOTER, DEFAULT_SHOWFOOTER); + _footertext = props.getProperty(PROP_FOOTERTEXT, DEFAULT_FOOTERTEXT); _state = INITIALIZED; } @@ -194,7 +202,7 @@ public class ZzzOTController implements ClientApp { if (dest != null) { List msgs = tun.clearMessages(); for (Object s : msgs) { - _log.error("NOTICE: ZzzOT Tunnel message: " + s); + _log.logAlways(Log.INFO, "NOTICE: ZzzOT Tunnel message: " + s); } } _tunnel = tun; @@ -357,7 +365,7 @@ public class ZzzOTController implements ClientApp { String b64 = dest.toBase64(); try { // help.html - String html = FileUtil.readTextFile(fileTmpl.getAbsolutePath(), 400, true); + String html = FileUtil.readTextFile(fileTmpl.getAbsolutePath(), 500, true); if (html == null) throw new IOException(fileTmpl.getAbsolutePath() + " open failed"); // replace $HOME in path @@ -382,7 +390,7 @@ public class ZzzOTController implements ClientApp { os.write(html.getBytes("UTF-8")); os.close(); // index.html - String html2 = FileUtil.readTextFile(index_in.getAbsolutePath(), 19, true); + String html2 = FileUtil.readTextFile(index_in.getAbsolutePath(), 50, true); if (html2 == null) throw new IOException(fileTmpl.getAbsolutePath() + " open failed"); html2 = html2.replace("$B32", b32); @@ -477,6 +485,16 @@ public class ZzzOTController implements ClientApp { return VERSION; } + /** @since 0.17.0 */ + public static String shouldShowFooter() { + return _showfooter; + } + + /** @since 0.17.0 */ + public static String footerText() { + return _footertext; + } + /** @since 0.12.0 */ private synchronized void changeState(ClientAppState state) { _state = state; diff --git a/src/jsp/index.jsp b/src/jsp/index.jsp index 93bf475..d7aa6a6 100644 --- a/src/jsp/index.jsp +++ b/src/jsp/index.jsp @@ -7,6 +7,7 @@ <%=ZzzOTController.getSiteName()%> OPENTRACKER | STATS +
@@ -16,7 +17,7 @@ Torrents torrents = ZzzOTController.getTorrents(); if (torrents != null) { %> -

+

Torrents: <%=torrents.size()%>
Peers: <%=torrents.countPeers()%>

@@ -27,13 +28,20 @@ <% } %> -Running ZZZOT <%=ZzzOTController.getVersion()%> +<% + String showfooter = ZzzOTController.shouldShowFooter(); + if (showfooter == "true") { +%> +<%=ZzzOTController.footerText()%> +<% + } +%>