i2psnark: Note UDP announce URLs
- Add alt postman b32 - StringBuilder cleanup
This commit is contained in:
@ -1997,11 +1997,9 @@ public class I2PSnarkServlet extends BasicServlet {
|
||||
if (isValid) {
|
||||
// Link to local details page - note that trailing slash on a single-file torrent
|
||||
// gets us to the details page instead of the file.
|
||||
StringBuilder buf = new StringBuilder(128);
|
||||
buf.append("<a href=\"").append(encodedBaseName)
|
||||
out.append("<a href=\"").append(encodedBaseName)
|
||||
.append("/\" title=\"").append(_t("Torrent details"))
|
||||
.append("\">");
|
||||
out.append(buf);
|
||||
}
|
||||
String icon;
|
||||
if (isMultiFile)
|
||||
@ -2432,11 +2430,13 @@ public class I2PSnarkServlet extends BasicServlet {
|
||||
// temporarily hardcoded for postman* and anonymity, requires bytemonsoon patch for lookup by info_hash
|
||||
if (announce != null && (announce.startsWith("http://YRgrgTLG") || announce.startsWith("http://8EoJZIKr") ||
|
||||
announce.startsWith("http://lnQ6yoBT") || announce.startsWith("http://tracker2.postman.i2p/") ||
|
||||
announce.startsWith("http://6a4kxkg5wp33p25qqhgwl6sj4yh4xuf5b3p3qldwgclebchm3eea.b32.i2p/") ||
|
||||
announce.startsWith("http://ahsplxkbhemefwvvml7qovzl5a2b5xo5i7lyai7ntdunvcyfdtna.b32.i2p/"))) {
|
||||
for (Tracker t : _manager.getTrackers()) {
|
||||
String aURL = t.announceURL;
|
||||
if (!(aURL.startsWith(announce) || // vvv hack for non-b64 announce in list vvv
|
||||
(announce.startsWith("http://lnQ6yoBT") && aURL.startsWith("http://tracker2.postman.i2p/")) ||
|
||||
(announce.startsWith("http://6a4kxkg5wp33p25qqhgwl6sj4yh4xuf5b3p3qldwgclebchm3eea.b32.i2p/") && aURL.startsWith("http://tracker2.postman.i2p/")) ||
|
||||
(announce.startsWith("http://ahsplxkbhemefwvvml7qovzl5a2b5xo5i7lyai7ntdunvcyfdtna.b32.i2p/") && aURL.startsWith("http://tracker2.postman.i2p/"))))
|
||||
continue;
|
||||
String baseURL = urlEncode(t.baseURL);
|
||||
@ -2514,6 +2514,8 @@ public class I2PSnarkServlet extends BasicServlet {
|
||||
int colon = announce.indexOf(':');
|
||||
if (colon > 0)
|
||||
announce = announce.substring(0, colon);
|
||||
if (isUDP)
|
||||
announce = "UDP " + announce;
|
||||
if (announce.length() > 67)
|
||||
announce = DataHelper.escapeHTML(announce.substring(0, 40)) + "…" +
|
||||
DataHelper.escapeHTML(announce.substring(announce.length() - 8));
|
||||
|
Reference in New Issue
Block a user