Compare commits

...

26 Commits

Author SHA1 Message Date
idk
62d5fab1bb This adds instructions for generating git bundles and torrents of git bundles at release time and explains the git bundling concept and why it's useful for git-over-i2p 2020-12-11 14:59:39 -05:00
idk
804e2f39f9 append full version to git bundle generation when generating from the ant target 2020-12-11 13:51:40 -05:00
zzz
0ad7e52b71 Router (proposal 156):
- Change router ECIES SKM to use N pattern, remove Elligator2, to match proposal changes
- Allow encrypted messages to ECIES routers
- Allow ECIES routers to become floodfill
- Add XDH factory to VM comm system for tests
2020-12-11 10:08:41 -05:00
zzz
e15110bbe1 Build: Fix i2pcontrol unset property in manifest 2020-12-11 09:00:12 -05:00
idk
2cffda6974 update the HACKING.md to reflect better and/or git-based instructions, also a test commit for git migration. 2020-12-10 13:42:02 -05:00
zzz
2300f6c226 i2psnark: Add web seeds in TrackerClient
list web seeds in UI
2020-12-06 14:25:43 +00:00
zzz
1ed8a1b6f3 i2psnark: Close RAF on error 2020-12-06 14:13:10 +00:00
zzz
c4ed7719e8 i2psnark: Preserve file attribute strings in metainfo 2020-12-06 14:00:02 +00:00
zzz
a98fe45204 Streaming: Add Retry-After header to throttle response 2020-12-06 13:26:55 +00:00
zzz
5a3e26453f Transport: Block SIP ports 2020-12-06 13:11:46 +00:00
zzz
c259000cdb Console: fixup param name 2020-12-06 13:09:57 +00:00
zzz
d683f0d9eb Util: Change DoH to the RFC 8484 protocol 2020-12-06 12:54:20 +00:00
zzz
48b8886224 i2psnark: Add WebSeed support - WIP - not hooked in yet 2020-12-06 12:43:55 +00:00
zzz
1097220d31 i2psnark: Move URIUtil from war to jar (prep for WebSeed) 2020-12-06 12:37:19 +00:00
zzz
fdeae72d38 i2psnark: Fix up standalone build 2020-12-06 12:31:22 +00:00
zzz
f870bc2ccd console: Move web resources to war 2020-12-06 12:05:53 +00:00
zzz
ec3bfa3cb7 susimail: Move web resources to war 2020-12-06 12:03:27 +00:00
zzz
c3f7c5d154 susidns: Move web resources to war 2020-12-06 12:02:11 +00:00
zzz
127b93c1e2 i2ptunnel: Move web resources to war 2020-12-06 11:59:54 +00:00
zzz
cd019f258f i2psnark: Move web resources to war 2020-12-06 11:59:11 +00:00
zzz
889b7361fe imagegen: Move CSS to war 2020-12-06 11:55:40 +00:00
zzz
99f6d4aba4 MiniDNS javadoc fix 2020-12-05 14:27:56 +00:00
zzz
69deddcbc7 Add DNS library to support RFC 8484 DoH (ticket #2201)
WIP - not yet hooked in

This is a portion of release 1.0.0 of MiniDNS from https://github.com/MiniDNS/minidns/ 2020-07-18
Only contains the minidns-core portion of the library.
Removed tests, most util classes, and DnsRootServer class.
Unmodified, as a base for future checkins.
Total size of zipped classes is about 75 KB.

This software may be used under the terms of (at your choice)
- LGPL version 2 (or later)
- Apache Software licence
- WTFPL
2020-12-05 14:21:08 +00:00
zzz
58020b4b58 Console: Swap some columns on ssu /peers for consistency
Format send window and slow start threshold values
2020-12-05 12:56:58 +00:00
zzz
df43e72a08 PRNG: Drop unused exception and interface 2020-12-05 12:51:24 +00:00
zzz
326e2c630c Debian: Files for 0.9.48
refresh patches
update release docs
2020-12-02 14:53:38 +00:00
685 changed files with 8347 additions and 643 deletions

View File

@@ -94,6 +94,12 @@ Public domain except as listed below:
Copyright (C) 2016 Southern Storm Software, Pty Ltd.
See licenses/LICENSE-Noise.txt
MiniDNS library 1.0.0
This software may be used under the terms of (at your choice)
- LGPL version 2 (or later) (see licenses/LICENSE-LGPL2.1.txt)
- Apache Software licence (see licenses/LICENSE-Apache2.0.txt)
- DWTFYWTPL
Router (router.jar):
Public domain except as listed below:

View File

@@ -80,7 +80,7 @@
<!-- set if unset -->
<property name="workspace.changes.tr" value="" />
<!-- ideal for linux: 24x24, but transparency doesn't work -->
<copy tofile="${build}/desktopgui/resources/images/logo.png" file="../../installer/resources/themes/console/images/itoopie_xsm.png" />
<copy tofile="${build}/desktopgui/resources/images/logo.png" file="../../apps/routerconsole/jsp/themes/console/images/itoopie_xsm.png" />
<copy todir="${build}/desktopgui/resources/images" file="images/itoopie_black_24.png" />
<copy todir="${build}/desktopgui/resources/images" file="images/itoopie_white_24.png" />
<jar basedir="${build}" excludes="messages-src/**" destfile="${dist}/${jar}">

View File

@@ -93,6 +93,8 @@
</target>
<target name="jar" depends="compile">
<!-- set if unset -->
<property name="workspace.changes.tr" value="" />
<jar destfile="build/i2pcontrol.jar" basedir="./build/obj" includes="**/*.class" >
<manifest>
<attribute name="Implementation-Version" value="${full.version}" />
@@ -107,6 +109,8 @@
</target>
<target name="socketJar" depends="compileSocketJar">
<!-- set if unset -->
<property name="workspace.changes.tr" value="" />
<jar destfile="build/i2pcontrol.jar" basedir="./build/obj" includes="**/*.class" >
<manifest>
<attribute name="Implementation-Version" value="${full.version}" />
@@ -121,6 +125,8 @@
</target>
<target name="war" depends="compile" >
<!-- set if unset -->
<property name="workspace.changes.tr" value="" />
<war destfile="build/jsonrpc.war" webxml="web.xml" >
<classes dir="./build/obj" excludes="net/i2p/i2pcontrol/I2PControlController.class net/i2p/i2pcontrol/HostCheckHandler.class net/i2p/i2pcontrol/SocketController*.class" />
<manifest>

View File

@@ -250,51 +250,51 @@
<!-- add css, image, and js files for standalone snark to the war -->
<target name="standalone_war" depends="war">
<mkdir dir="build/standalone-resources/.resources/themes/snark" />
<copy todir="build/standalone-resources/.resources/themes/snark" >
<fileset dir="../../../installer/resources/themes/snark/" />
<mkdir dir="build/standalone-resources/.resources/themes/" />
<copy todir="build/standalone-resources/.resources/themes/" >
<fileset dir="../resources/themes/" />
</copy>
<replace dir="build/standalone-resources/.resources/themes/snark"
<replace dir="build/standalone-resources/.resources/themes"
summary="true"
token="url(/themes/console/dark/images/"
value="url(/i2psnark/.resources/themes/snark/dark/images/" >
value="url(/i2psnark/.resources/themes/dark/images/" >
<include name="**/*.css" />
</replace>
<replace dir="build/standalone-resources/.resources/themes/snark"
<replace dir="build/standalone-resources/.resources/themes"
summary="true"
token="url(../../console/light/images/"
value="url(/i2psnark/.resources/themes/snark/light/images/" >
value="url(/i2psnark/.resources/themes/light/images/" >
<include name="**/*.css" />
</replace>
<replace dir="build/standalone-resources/.resources/themes/snark"
<replace dir="build/standalone-resources/.resources/themes"
summary="true"
token="url(/themes/console/light/images/"
value="url(/i2psnark/.resources/themes/snark/light/images/" >
value="url(/i2psnark/.resources/themes/light/images/" >
<include name="**/*.css" />
</replace>
<replace dir="build/standalone-resources/.resources/themes/snark"
<replace dir="build/standalone-resources/.resources/themes"
summary="true"
token="url(/themes/console/images/transparent.gif"
value="url(/i2psnark/.resources/themes/snark/ubergine/images/transparent.gif" >
value="url(/i2psnark/.resources/themes/ubergine/images/transparent.gif" >
<include name="**/*.css" />
</replace>
<replace dir="build/standalone-resources/.resources/themes/snark"
<replace dir="build/standalone-resources/.resources/themes"
summary="true"
token="url(/themes/console/images/info/"
value="url(/i2psnark/.resources/themes/snark/ubergine/images/" >
value="url(/i2psnark/.resources/themes/ubergine/images/" >
<include name="**/*.css" />
</replace>
<!-- Rather than pulling in all the console theme images, let's just specify the ones we need -->
<copy file="../../../installer/resources/themes/console/images/transparent.gif"
todir="build/standalone-resources/.resources/themes/snark/ubergine/images" />
<copy file="../../../installer/resources/themes/console/dark/images/header.png"
todir="build/standalone-resources/.resources/themes/snark/dark/images" />
<copy file="../../../installer/resources/themes/console/light/images/header.png"
todir="build/standalone-resources/.resources/themes/snark/light/images" />
<copy file="../../../installer/resources/themes/console/images/info/errortriangle.png"
todir="build/standalone-resources/.resources/themes/snark/ubergine/images" />
<copy file="../../routerconsole/jsp/themes/console/images/transparent.gif"
todir="build/standalone-resources/.resources/themes/ubergine/images" />
<copy file="../../routerconsole/jsp/themes/console/dark/images/header.png"
todir="build/standalone-resources/.resources/themes/dark/images" />
<copy file="../../routerconsole/jsp/themes/console/light/images/header.png"
todir="build/standalone-resources/.resources/themes/light/images" />
<copy file="../../routerconsole/jsp/themes/console/images/info/errortriangle.png"
todir="build/standalone-resources/.resources/themes/ubergine/images" />
<mkdir dir="build/standalone-resources/.resources/js" />
<copy file="../../routerconsole/jsp/js/ajax.js" todir="build/standalone-resources/.resources/js" />

View File

@@ -58,7 +58,7 @@ public class MetaInfo
private final String name_utf8;
private final List<List<String>> files;
private final List<List<String>> files_utf8;
private final BitField paddingFileBitfield;
private final List<String> attributes;
private final List<Long> lengths;
private final int piece_length;
private final byte[] piece_hashes;
@@ -104,7 +104,7 @@ public class MetaInfo
this.url_list = url_list;
// TODO BEP 52 hybrid torrent with piece layers, meta version and file tree
this.paddingFileBitfield = null;
this.attributes = null;
// TODO if we add a parameter for other keys
//if (other != null) {
@@ -281,7 +281,7 @@ public class MetaInfo
files = null;
files_utf8 = null;
lengths = null;
paddingFileBitfield = null;
attributes = null;
}
else
{
@@ -299,7 +299,7 @@ public class MetaInfo
List<List<String>> m_files = new ArrayList<List<String>>(size);
List<List<String>> m_files_utf8 = null;
List<Long> m_lengths = new ArrayList<Long>(size);
BitField paddingBitfield = null;
List<String> m_attributes = null;
long l = 0;
for (int i = 0; i < list.size(); i++)
{
@@ -361,18 +361,23 @@ public class MetaInfo
val = desc.get("attr");
if (val != null) {
String s = val.getString();
if (s.contains("p")) {
if (paddingBitfield == null)
paddingBitfield = new BitField(size);
paddingBitfield.set(i);
if (m_attributes == null) {
m_attributes = new ArrayList<String>(size);
for (int j = 0; j < i; j++) {
m_attributes.add("");
}
m_attributes.add(s);
}
} else {
if (m_attributes != null)
m_attributes.add("");
}
}
files = Collections.unmodifiableList(m_files);
files_utf8 = m_files_utf8 != null ? Collections.unmodifiableList(m_files_utf8) : null;
lengths = Collections.unmodifiableList(m_lengths);
length = l;
paddingFileBitfield = paddingBitfield;
attributes = m_attributes;
}
info_hash = calculateInfoHash();
@@ -477,9 +482,9 @@ public class MetaInfo
* @since 0.9.48
*/
public boolean isPaddingFile(int filenum) {
if (paddingFileBitfield == null)
if (attributes == null)
return false;
return paddingFileBitfield.get(filenum);
return attributes.get(filenum).indexOf('p') >= 0;
}
/**
@@ -749,6 +754,12 @@ public class MetaInfo
file.put("path.utf-8", new BEValue(beufiles));
}
file.put("length", new BEValue(lengths.get(i)));
String attr = null;
if (attributes != null) {
attr = attributes.get(i);
if (attr.length() > 0)
file.put("attr", new BEValue(DataHelper.getASCII(attr)));
}
l.add(new BEValue(file));
}
info.put("files", new BEValue(l));

View File

@@ -42,14 +42,14 @@ import org.klomp.snark.bencode.InvalidBEncodingException;
public class Peer implements Comparable<Peer>
{
private final Log _log = I2PAppContext.getGlobalContext().logManager().getLog(Peer.class);
protected final Log _log = I2PAppContext.getGlobalContext().logManager().getLog(getClass());
// Identifying property, the peer id of the other side.
private final PeerID peerID;
private final byte[] my_id;
private final byte[] infohash;
/** will start out null in magnet mode */
private MetaInfo metainfo;
protected MetaInfo metainfo;
private Map<String, BEValue> handshakeMap;
// The data in/output streams set during the handshake and used by
@@ -61,8 +61,11 @@ public class Peer implements Comparable<Peer>
private final AtomicLong downloaded = new AtomicLong();
private final AtomicLong uploaded = new AtomicLong();
// Keeps state for in/out connections. Non-null when the handshake
// was successful, the connection setup and runs
/** `
* Keeps state for in/out connections. Non-null when the handshake
* was successful, the connection setup and runs.
* Do not access directly. All actions should be through Peer methods.
*/
volatile PeerState state;
/** shared across all peers on this torrent */
@@ -77,8 +80,8 @@ public class Peer implements Comparable<Peer>
final static long CHECK_PERIOD = PeerCoordinator.CHECK_PERIOD; // 40 seconds
final static int RATE_DEPTH = PeerCoordinator.RATE_DEPTH; // make following arrays RATE_DEPTH long
private long uploaded_old[] = {-1,-1,-1};
private long downloaded_old[] = {-1,-1,-1};
private final long uploaded_old[] = {-1,-1,-1};
private final long downloaded_old[] = {-1,-1,-1};
private static final byte[] HANDSHAKE = DataHelper.getASCII("BitTorrent protocol");
// See BEP 4 for definitions
@@ -341,7 +344,6 @@ public class Peer implements Comparable<Peer>
private byte[] handshake(InputStream in, OutputStream out)
throws IOException
{
din = new DataInputStream(in);
dout = new DataOutputStream(out);
// Handshake write - header
@@ -366,6 +368,7 @@ public class Peer implements Comparable<Peer>
_log.debug("Wrote my shared hash and ID to " + toString());
// Handshake read - header
din = new DataInputStream(in);
byte b = din.readByte();
if (b != HANDSHAKE.length)
throw new IOException("Handshake failure, expected 19, got "
@@ -789,4 +792,12 @@ public class Peer implements Comparable<Peer>
void setTotalCommentsSent(int count) {
_totalCommentsSent = count;
}
/**
* @return false
* @since 0.9.49
*/
public boolean isWebPeer() {
return false;
}
}

View File

@@ -26,6 +26,7 @@ import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Deque;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
@@ -152,6 +153,10 @@ class PeerCoordinator implements PeerListener
private static final long COMMENT_REQ_INTERVAL = 12*60*60*1000L;
private static final long COMMENT_REQ_DELAY = 60*60*1000L;
private static final int MAX_COMMENT_NOT_REQ = 10;
/** hostname to expire time, sync on this */
private Map<String, Long> _webPeerBans;
private static final long WEBPEER_BAN_TIME = 30*60*1000L;
/**
* @param metainfo null if in magnet mode
@@ -916,6 +921,7 @@ class PeerCoordinator implements PeerListener
// As connections are already up, new Pieces will
// not have their PeerID list populated, so do that.
for (Peer p : peers) {
// TODO don't access state directly
PeerState s = p.state;
if (s != null) {
BitField bf = s.bitfield;
@@ -1299,6 +1305,7 @@ class PeerCoordinator implements PeerListener
if (++seeds >= 4)
break;
} else {
// TODO don't access state directly
PeerState state = pr.state;
if (state == null) continue;
BitField bf = state.bitfield;
@@ -1336,6 +1343,7 @@ class PeerCoordinator implements PeerListener
// Temporary? So PeerState never calls wantPiece() directly for now...
Piece piece = wantPiece(peer, havePieces, true);
if (piece != null) {
// TODO padding
return new PartialPiece(piece, metainfo.getPieceLength(piece.getId()), _util.getTempDir());
}
if (_log.shouldLog(Log.DEBUG))
@@ -1452,6 +1460,10 @@ class PeerCoordinator implements PeerListener
if (bev.getMap().get(ExtensionHandler.TYPE_PEX) != null) {
List<Peer> pList = peerList();
pList.remove(peer);
for (Iterator<Peer> iter = pList.iterator(); iter.hasNext(); ) {
if (iter.next().isWebPeer())
iter.remove();
}
if (!pList.isEmpty())
ExtensionHandler.sendPEX(peer, pList);
}
@@ -1749,5 +1761,43 @@ class PeerCoordinator implements PeerListener
public I2PSnarkUtil getUtil() {
return _util;
}
/**
* Ban a web peer for this torrent, for while or permanently.
* @param host the host name
* @since 0.9.49
*/
public synchronized void banWebPeer(String host, boolean isPermanent) {
if (_webPeerBans == null)
_webPeerBans = new HashMap<String, Long>(4);
Long time;
if (isPermanent) {
time = Long.valueOf(Long.MAX_VALUE);
} else {
long now = _util.getContext().clock().now();
time = Long.valueOf(now + WEBPEER_BAN_TIME);
}
Long old = _webPeerBans.put(host, time);
if (old != null && old.longValue() > time)
_webPeerBans.put(host, old);
}
/**
* Is a web peer banned?
* @param host the host name
* @since 0.9.49
*/
public synchronized boolean isWebPeerBanned(String host) {
if (_webPeerBans == null)
return false;
Long time = _webPeerBans.get(host);
if (time == null)
return false;
long now = _util.getContext().clock().now();
boolean rv = time.longValue() > now;
if (!rv)
_webPeerBans.remove(host);
return rv;
}
}

View File

@@ -227,6 +227,10 @@ public class PeerID implements Comparable<PeerID>
{
if (_toStringCache != null)
return _toStringCache;
if (id != null && DataHelper.eq(id, 0, WebPeer.IDBytes, 0, WebPeer.IDBytes.length)) {
_toStringCache = "WebSeed@" + Base32.encode(destHash) + ".b32.i2p";
return _toStringCache;
}
if (id == null || address == null)
return "unkn@" + Base64.encode(destHash).substring(0, 6);
int nonZero = 0;

View File

@@ -1388,6 +1388,7 @@ public class Storage implements Closeable
//rafs[i].write(bs, off + written, len);
pp.write(raf, written, len);
} catch (IOException ioe) {
try { tf.closeRAF(); } catch (IOException ioe2) {}
// get the file name in the logs
IOException ioe2 = new IOException("Error writing " + tf.RAFfile.getAbsolutePath());
ioe2.initCause(ioe);
@@ -1494,6 +1495,7 @@ public class Storage implements Closeable
raf.seek(start);
raf.readFully(bs, read, len);
} catch (IOException ioe) {
try { tf.closeRAF(); } catch (IOException ioe2) {}
// get the file name in the logs
IOException ioe2 = new IOException("Error reading " + tf.RAFfile.getAbsolutePath());
ioe2.initCause(ioe);

View File

@@ -407,6 +407,8 @@ public class TrackerClient implements Runnable {
return;
}
int webPeers = getWebPeers();
// Local DHT tracker announce
DHT dht = _util.getDHT();
if (dht != null && (meta == null || !meta.isPrivate()))
@@ -438,7 +440,7 @@ public class TrackerClient implements Runnable {
}
// we could try and total the unique peers but that's too hard for now
snark.setTrackerSeenPeers(maxSeenPeers);
snark.setTrackerSeenPeers(maxSeenPeers + webPeers);
if (stop)
return;
@@ -720,6 +722,62 @@ public class TrackerClient implements Runnable {
return rv;
}
/**
* @return valid web peers from metainfo
* @since 0.9.49
*/
private int getWebPeers() {
if (meta == null)
return 0;
// prevent connecting out to a webseed for comments only
if (coordinator.getNeededLength() <= 0)
return 0;
List<String> urls = meta.getWebSeedURLs();
if (urls == null || urls.isEmpty())
return 0;
// Uncomment to skip multifile torrents
//if (meta.getLengths() != null)
// return 0;
List<Peer> peers = new ArrayList<Peer>(urls.size());
for (String url : urls) {
Hash h = getHostHash(url);
if (h == null)
continue;
try {
PeerID pID = new PeerID(h.getData(), _util);
byte[] id = new byte[20];
System.arraycopy(WebPeer.IDBytes, 0, id, 0, 12);
System.arraycopy(h.getData(), 0, id, 12, 8);
pID.setID(id);
URI uri = new URI(url);
String host = uri.getHost();
if (host == null)
continue;
if (coordinator.isWebPeerBanned(host)) {
if (_log.shouldWarn())
_log.warn("Skipping banned webseed " + url);
continue;
}
peers.add(new WebPeer(coordinator, uri, pID, snark.getMetaInfo()));
} catch (InvalidBEncodingException ibe) {
} catch (URISyntaxException use) {
}
}
if (peers.isEmpty())
return 0;
Random r = _util.getContext().random();
if (peers.size() > 1)
Collections.shuffle(peers, r);
Iterator<Peer> it = peers.iterator();
while ((!stop) && it.hasNext() && coordinator.needOutboundPeers()) {
Peer cur = it.next();
if (coordinator.addPeer(cur) && it.hasNext()) {
int delay = r.nextInt(DELAY_RAND) + DELAY_MIN;
try { Thread.sleep(delay); } catch (InterruptedException ie) {}
}
}
return peers.size();
}
/**
* Creates a thread for each tracker in parallel if tunnel is still open

View File

@@ -16,7 +16,7 @@
// ========================================================================
//
package org.klomp.snark.web;
package org.klomp.snark;
import java.io.UnsupportedEncodingException;
import java.net.URI;
@@ -35,9 +35,9 @@ import net.i2p.data.DataHelper;
* see UrlEncoded
*
* I2P modded from Jetty 8.1.15
* @since 0.9.15
* @since 0.9.15, moved from web in 0.9.49
*/
class URIUtil
public class URIUtil
{
/** Encode a URI path.

View File

@@ -0,0 +1,667 @@
package org.klomp.snark;
import java.io.ByteArrayOutputStream;
import java.io.ByteArrayInputStream;
import java.io.DataInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URI;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import net.i2p.I2PAppContext;
import net.i2p.client.streaming.I2PSocket;
import net.i2p.client.streaming.I2PSocketEepGet;
import net.i2p.client.streaming.I2PSocketManager;
import net.i2p.data.DataHelper;
import net.i2p.data.Destination;
import net.i2p.util.EepGet;
import net.i2p.util.Log;
/**
* BEP 19.
* Does not have an associated PeerState.
* All request tracking is done here.
* @since 0.9.49
*/
class WebPeer extends Peer implements EepGet.StatusListener {
private final PeerCoordinator _coordinator;
private final URI _uri;
// as received from coordinator
private final List<Request> outstandingRequests = new ArrayList<Request>();
private final boolean isMultiFile;
// needed?
private Request lastRequest;
private PeerListener listener;
private BitField bitfield;
private Thread thread;
private boolean connected;
private long lastRcvd;
private int maxRequests;
// to be recognized by the UI
public static final byte[] IDBytes = DataHelper.getASCII("WebSeedBEP19");
private static final long HEADER_TIMEOUT = 60*1000;
private static final long TOTAL_TIMEOUT = 10*60*1000;
private static final long INACTIVITY_TIMEOUT = 2*60*1000;
private static final long TARGET_FETCH_TIME = 2*60*1000;
// 128 KB
private static final int ABSOLUTE_MIN_REQUESTS = 8;
// 2 MB
private static final int ABSOLUTE_MAX_REQUESTS = 128;
private final int MIN_REQUESTS;
private final int MAX_REQUESTS;
/**
* Outgoing connection.
* Creates a disconnected peer given a PeerID, your own id and the
* relevant MetaInfo.
* @param uri must be http with .i2p host
* @param metainfo non-null
*/
public WebPeer(PeerCoordinator coord, URI uri, PeerID peerID, MetaInfo metainfo) {
super(peerID, null, null, metainfo);
// no use asking for more than the number of chunks in a piece
MAX_REQUESTS = Math.max(1, Math.min(ABSOLUTE_MAX_REQUESTS, metainfo.getPieceLength(0) / PeerState.PARTSIZE));
MIN_REQUESTS = Math.min(ABSOLUTE_MIN_REQUESTS, MAX_REQUESTS);
maxRequests = MIN_REQUESTS;
isMultiFile = metainfo.getLengths() != null;
_coordinator = coord;
// We'll assume the base path is already encoded, because
// it would have failed the checks in TrackerClient.getHostHash()
_uri = uri;
}
@Override
public String toString() {
return "WebSeed " + _uri;
}
/**
* @return socket debug string (for debug printing)
*/
@Override
public synchronized String getSocket() {
return toString() + ' ' + outstandingRequests.toString();
}
/**
* The hash code of a Peer is the hash code of the peerID.
*/
@Override
public int hashCode() {
return super.hashCode();
}
/**
* Two Peers are equal when they have the same PeerID.
* All other properties are ignored.
*/
@Override
public boolean equals(Object o) {
if (o instanceof WebPeer) {
WebPeer p = (WebPeer)o;
// TODO
return getPeerID().equals(p.getPeerID());
}
return false;
}
/**
* Runs the connection to the other peer. This method does not
* return until the connection is terminated.
*
* @param ignore our bitfield, ignore
* @param uploadOnly if we are complete with skipped files, i.e. a partial seed
*/
@Override
public void runConnection(I2PSnarkUtil util, PeerListener listener, BitField ignore,
MagnetState mState, boolean uploadOnly) {
if (uploadOnly)
return;
int fails = 0;
int successes = 0;
long dl = 0;
boolean notify = true;
ByteArrayOutputStream out = null;
// current requests per-loop
List<Request> requests = new ArrayList<Request>(8);
try {
if (!util.connected()) {
boolean ok = util.connect();
if (!ok)
return;
}
// This breaks out of the loop after any failure. TrackerClient will requeue eventually.
loop:
while (true) {
I2PSocketManager mgr = util.getSocketManager();
if (mgr == null)
return;
if (notify) {
synchronized(this) {
this.listener = listener;
bitfield = new BitField(metainfo.getPieces());
bitfield.setAll();
thread = Thread.currentThread();
connected = true;
}
listener.connected(this);
boolean want = listener.gotBitField(this, bitfield);
if (!want)
return;
listener.gotChoke(this, false);
notify = false;
}
synchronized(this) {
// clear out previous requests
if (!requests.isEmpty()) {
outstandingRequests.removeAll(requests);
requests.clear();
}
addRequest();
if (_log.shouldDebug())
_log.debug("Requests: " + outstandingRequests);
while (outstandingRequests.isEmpty()) {
if (_coordinator.getNeededLength() <= 0) {
if (_log.shouldDebug())
_log.debug("Complete: " + this);
break loop;
}
if (_log.shouldDebug())
_log.debug("No requests, sleeping: " + this);
connected = false;
out = null;
try {
this.wait();
} catch (InterruptedException ie) {
if (_log.shouldWarn())
_log.warn("Interrupted: " + this, ie);
break loop;
}
}
connected = true;
// Add current requests from outstandingRequests list and add to requests list.
// Do not remove from outstandingRequests until success.
lastRequest = outstandingRequests.get(0);
requests.add(lastRequest);
int piece = lastRequest.getPiece();
// Glue together additional requests if consecutive for a single piece.
// This will never glue together requests from different pieces,
// and the coordinator generally won't give us consecutive pieces anyway.
// Servers generally won't support multiple byte ranges anymore.
for (int i = 1; i < outstandingRequests.size(); i++) {
if (i >= maxRequests)
break;
Request r = outstandingRequests.get(i);
if (r.getPiece() == piece &&
lastRequest.off + lastRequest.len == r.off) {
requests.add(r);
lastRequest = r;
} else {
// all requests for a piece should be together, but not in practice
// as orphaned requests can get in-between
//break;
}
}
}
// total values
Request first = requests.get(0);
Request last = requests.get(requests.size() - 1);
int piece = first.getPiece();
int off = first.off;
long toff = (((long) piece) * metainfo.getPieceLength(0)) + off;
int tlen = (last.off - first.off) + last.len;
long start = System.currentTimeMillis();
///// TODO direct to file, not in-memory
if (out == null)
out = new ByteArrayOutputStream(tlen);
else
out.reset();
int filenum = -1;
// Loop for each file if multifile and crosses file boundaries.
// Once only for single file.
while (out.size() < tlen) {
// need these three things:
// url to fetch
String url;
// offset in fetched file
long foff;
// length to fetch, will be adjusted if crossing a file boundary
int flen = tlen - out.size();
if (isMultiFile) {
// multifile
List<Long> lengths = metainfo.getLengths();
long limit = 0;
if (filenum < 0) {
// find the first file number and limit
// inclusive
long fstart = 0;
// exclusive
long fend = 0;
foff = 0; // keep compiler happy, will always be re-set
for (int f = 0; f < lengths.size(); f++) {
long filelen = lengths.get(f).longValue();
fend = fstart + filelen;
if (toff < fend) {
filenum = f;
foff = toff - fstart;
limit = fend - toff;
break;
}
fstart += filelen;
}
if (filenum < 0)
throw new IllegalStateException(lastRequest.toString());
} else {
// next file
filenum++;
foff = 0;
limit = lengths.get(filenum).longValue();
}
if (limit > 0 && flen > limit)
flen = (int) limit;
if (metainfo.isPaddingFile(filenum)) {
for (int i = 0; i < flen; i++) {
out.write((byte) 0);
}
if (_log.shouldDebug())
_log.debug("Skipped padding file " + filenum);
continue;
}
// build url
String uri = _uri.toString();
StringBuilder buf = new StringBuilder(uri.length() + 128);
buf.append(uri);
if (!uri.endsWith("/"))
buf.append('/');
// See BEP 19 rules
URIUtil.encodePath(buf, metainfo.getName());
List<String> path = metainfo.getFiles().get(filenum);
for (int i = 0; i < path.size(); i++) {
buf.append('/');
URIUtil.encodePath(buf, path.get(i));
}
url = buf.toString();
} else {
// single file
// See BEP 19 rules
String uri = _uri.toString();
if (uri.endsWith("/"))
url = uri + URIUtil.encodePath(metainfo.getName());
else
url = uri;
foff = toff;
flen = tlen;
}
// do the fetch
EepGet get = new I2PSocketEepGet(util.getContext(), mgr, 0, flen, flen, null, out, url);
get.addHeader("User-Agent", I2PSnarkUtil.EEPGET_USER_AGENT);
get.addHeader("Range", "bytes=" + foff + '-' + (foff + flen - 1));
get.addStatusListener(this);
int osz = out.size();
if (_log.shouldDebug())
_log.debug("Fetching piece: " + piece + " offset: " + off + " file offset: " + foff + " len: " + flen + " from " + url);
if (get.fetch(HEADER_TIMEOUT, TOTAL_TIMEOUT, INACTIVITY_TIMEOUT)) {
int resp = get.getStatusCode();
if (resp != 200 && resp != 206) {
fail(url, resp);
return;
}
int sz = out.size() - osz;
if (sz != flen) {
if (_log.shouldWarn())
_log.warn("Fetch of " + url + " received: " + sz + " expected: " + flen);
return;
}
} else {
if (out.size() > 0) {
// save any complete chunks received
DataInputStream dis = new DataInputStream(new ByteArrayInputStream(out.toByteArray()));
for (Iterator<Request> iter = requests.iterator(); iter.hasNext(); ) {
Request req = iter.next();
if (dis.available() < req.len)
break;
req.read(dis);
iter.remove();
if (_log.shouldWarn())
_log.warn("Saved chunk " + req + " recvd before failure");
}
}
int resp = get.getStatusCode();
fail(url, resp);
return;
}
successes++;
dl += flen;
if (!isMultiFile)
break;
} // for each file
// all data received successfully, now process it
if (_log.shouldDebug())
_log.debug("Fetch of piece: " + piece + " chunks: " + requests.size() + " offset: " + off + " torrent offset: " + toff + " len: " + tlen + " successful");
DataInputStream dis = new DataInputStream(new ByteArrayInputStream(out.toByteArray()));
for (Request req : requests) {
req.read(dis);
}
PartialPiece pp = last.getPartialPiece();
synchronized(pp) {
// Last chunk needed for this piece?
if (pp.getLength() == pp.getDownloaded()) {
if (listener.gotPiece(this, pp)) {
if (_log.shouldDebug())
_log.debug("Got " + piece + ": " + this);
} else {
if (_log.shouldWarn())
_log.warn("Got BAD " + piece + " from " + this);
return;
}
} else {
// piece not complete
}
}
long time = lastRcvd - start;
if (time < TARGET_FETCH_TIME)
maxRequests = Math.min(MAX_REQUESTS, 2 * maxRequests);
else if (time > 2 * TARGET_FETCH_TIME)
maxRequests = Math.max(MIN_REQUESTS, maxRequests / 2);
} // request loop
} catch(IOException eofe) {
if (_log.shouldWarn())
_log.warn(toString(), eofe);
} finally {
List<Request> pcs = returnPartialPieces();
synchronized(this) {
connected = false;
outstandingRequests.clear();
}
requests.clear();
if (!pcs.isEmpty())
listener.savePartialPieces(this, pcs);
listener.disconnected(this);
disconnect();
if (_log.shouldWarn())
_log.warn("Completed, successful fetches: " + successes + " downloaded: " + dl + " for " + this);
}
}
private void fail(String url, int resp) {
if (_log.shouldWarn())
_log.warn("Fetch of " + url + " failed, rc: " + resp);
if (resp == 301 || resp == 308 ||
resp == 401 || resp == 403 || resp == 404 || resp == 410 || resp == 414 || resp == 416 || resp == 451) {
// ban forever
_coordinator.banWebPeer(_uri.getHost(), true);
if (_log.shouldWarn())
_log.warn("Permanently banning the webseed " + url);
} else if (resp == 429 || resp == 503) {
// ban for a while
_coordinator.banWebPeer(_uri.getHost(), false);
if (_log.shouldWarn())
_log.warn("Temporarily banning the webseed " + url);
}
}
@Override
public int getMaxPipeline() {
return maxRequests;
}
@Override
public boolean isConnected() {
synchronized(this) {
return connected;
}
}
@Override
synchronized void disconnect() {
if (thread != null)
thread.interrupt();
}
@Override
public void have(int piece) {}
@Override
void cancel(int piece) {}
@Override
void request() {
addRequest();
}
@Override
public boolean isInterested() {
return false;
}
@Deprecated
@Override
public void setInteresting(boolean interest) {}
@Override
public boolean isInteresting() {
return true;
}
@Override
public void setChoking(boolean choke) {}
@Override
public boolean isChoking() {
return false;
}
@Override
public boolean isChoked() {
return false;
}
@Override
public long getInactiveTime() {
if (lastRcvd <= 0)
return -1;
long now = System.currentTimeMillis();
return now - lastRcvd;
}
@Override
public long getMaxInactiveTime() {
return PeerCoordinator.MAX_INACTIVE;
}
@Override
public void keepAlive() {}
@Override
public void retransmitRequests() {}
@Override
public int completed() {
return metainfo.getPieces();
}
@Override
public boolean isCompleted() {
return true;
}
/**
* @return true
* @since 0.9.49
*/
@Override
public boolean isWebPeer() {
return false;
}
// private methods below here implementing parts of PeerState
private synchronized void addRequest() {
boolean more_pieces = true;
while (more_pieces) {
more_pieces = outstandingRequests.size() < getMaxPipeline();
// We want something and we don't have outstanding requests?
if (more_pieces && lastRequest == null) {
// we have nothing in the queue right now
more_pieces = requestNextPiece();
} else if (more_pieces) {
// We want something
int pieceLength;
boolean isLastChunk;
pieceLength = metainfo.getPieceLength(lastRequest.getPiece());
isLastChunk = lastRequest.off + lastRequest.len == pieceLength;
// Last part of a piece?
if (isLastChunk) {
more_pieces = requestNextPiece();
} else {
PartialPiece nextPiece = lastRequest.getPartialPiece();
int nextBegin = lastRequest.off + PeerState.PARTSIZE;
int maxLength = pieceLength - nextBegin;
int nextLength = maxLength > PeerState.PARTSIZE ? PeerState.PARTSIZE
: maxLength;
Request req = new Request(nextPiece,nextBegin, nextLength);
outstandingRequests.add(req);
lastRequest = req;
this.notifyAll();
}
}
}
}
/**
* Starts requesting first chunk of next piece. Returns true if
* something has been added to the requests, false otherwise.
*/
private synchronized boolean requestNextPiece() {
// Check for adopting an orphaned partial piece
PartialPiece pp = listener.getPartialPiece(this, bitfield);
if (pp != null) {
// Double-check that r not already in outstandingRequests
if (!getRequestedPieces().contains(Integer.valueOf(pp.getPiece()))) {
Request r = pp.getRequest();
outstandingRequests.add(r);
lastRequest = r;
this.notifyAll();
return true;
} else {
if (_log.shouldLog(Log.WARN))
_log.warn("Got dup from coord: " + pp);
pp.release();
}
}
// failsafe
// However this is bad as it thrashes the peer when we change our mind
// Ticket 691 cause here?
if (outstandingRequests.isEmpty())
lastRequest = null;
/*
// If we are not in the end game, we may run out of things to request
// because we are asking other peers. Set not-interesting now rather than
// wait for those other requests to be satisfied via havePiece()
if (interesting && lastRequest == null) {
interesting = false;
out.sendInterest(false);
if (_log.shouldLog(Log.DEBUG))
_log.debug(peer + " nothing more to request, now uninteresting");
}
*/
return false;
}
/**
* @return all pieces we are currently requesting, or empty Set
*/
private synchronized Set<Integer> getRequestedPieces() {
Set<Integer> rv = new HashSet<Integer>(outstandingRequests.size() + 1);
for (Request req : outstandingRequests) {
rv.add(Integer.valueOf(req.getPiece()));
}
return rv;
}
/**
* @return index in outstandingRequests or -1
*/
private synchronized int getFirstOutstandingRequest(int piece) {
for (int i = 0; i < outstandingRequests.size(); i++) {
if (outstandingRequests.get(i).getPiece() == piece)
return i;
}
return -1;
}
private synchronized List<Request> returnPartialPieces() {
Set<Integer> pcs = getRequestedPieces();
List<Request> rv = new ArrayList<Request>(pcs.size());
for (Integer p : pcs) {
Request req = getLowestOutstandingRequest(p.intValue());
if (req != null) {
PartialPiece pp = req.getPartialPiece();
synchronized(pp) {
int dl = pp.getDownloaded();
if (req.off != dl)
req = new Request(pp, dl);
}
rv.add(req);
}
}
outstandingRequests.clear();
return rv;
}
private synchronized Request getLowestOutstandingRequest(int piece) {
Request rv = null;
int lowest = Integer.MAX_VALUE;
for (Request r : outstandingRequests) {
if (r.getPiece() == piece && r.off < lowest) {
lowest = r.off;
rv = r;
}
}
return rv;
}
// EepGet status listeners to maintain the state for the web page
public void bytesTransferred(long alreadyTransferred, int currentWrite, long bytesTransferred, long bytesRemaining, String url) {
lastRcvd = System.currentTimeMillis();
downloaded(currentWrite);
listener.downloaded(this, currentWrite);
}
public void attemptFailed(String url, long bytesTransferred, long bytesRemaining, int currentAttempt, int numRetries, Exception cause) {}
public void transferComplete(long alreadyTransferred, long bytesTransferred, long bytesRemaining, String url, String outputFile, boolean notModified) {}
public void transferFailed(String url, long bytesTransferred, long bytesRemaining, int currentAttempt) {}
public void headerReceived(String url, int attemptNum, String key, String val) {}
public void attempting(String url) {}
// End of EepGet status listeners
}

View File

@@ -42,6 +42,8 @@ import net.i2p.util.Log;
import net.i2p.util.SecureFile;
import net.i2p.util.SystemVersion;
import org.klomp.snark.URIUtil;
/* ------------------------------------------------------------ */
/**

View File

@@ -51,6 +51,7 @@ import org.klomp.snark.SnarkManager;
import org.klomp.snark.Storage;
import org.klomp.snark.Tracker;
import org.klomp.snark.TrackerClient;
import org.klomp.snark.URIUtil;
import org.klomp.snark.dht.DHT;
import org.klomp.snark.comments.Comment;
import org.klomp.snark.comments.CommentSet;
@@ -201,10 +202,7 @@ public class I2PSnarkServlet extends BasicServlet {
return;
}
if (_context.isRouterContext())
_themePath = "/themes/snark/" + _manager.getTheme() + '/';
else
_themePath = _contextPath + WARBASE + "themes/snark/" + _manager.getTheme() + '/';
_themePath = _contextPath + WARBASE + "themes/" + _manager.getTheme() + '/';
_imgPath = _themePath + "images/";
req.setCharacterEncoding("UTF-8");
@@ -1995,33 +1993,38 @@ public class I2PSnarkServlet extends BasicServlet {
out.write(_t("Peer attached to swarm"));
out.write("\"></td><td colspan=\"5\">");
PeerID pid = peer.getPeerID();
String ch = pid != null ? pid.toString().substring(0, 4) : "????";
String client;
if ("AwMD".equals(ch))
client = _t("I2PSnark");
else if ("LUJJ".equals(ch))
client = "BiglyBT" + getAzVersion(pid.getID());
else if ("LUFa".equals(ch))
client = "Vuze" + getAzVersion(pid.getID());
else if ("LVhE".equals(ch))
client = "XD" + getAzVersion(pid.getID());
else if ("ZV".equals(ch.substring(2,4)) || "VUZP".equals(ch))
client = "Robert" + getRobtVersion(pid.getID());
else if (ch.startsWith("LV")) // LVCS 1.0.2?; LVRS 1.0.4
client = "Transmission" + getAzVersion(pid.getID());
else if ("LUtU".equals(ch))
client = "KTorrent" + getAzVersion(pid.getID());
else if ("CwsL".equals(ch))
client = "I2PSnarkXL";
else if ("BFJT".equals(ch))
client = "I2PRufus";
else if ("TTMt".equals(ch))
client = "I2P-BT";
else
client = _t("Unknown") + " (" + ch + ')';
out.write(client + "&nbsp;<tt title=\"");
out.write(_t("Destination (identity) of peer"));
out.write("\">" + peer.toString().substring(5, 9)+ "</tt>");
String ch = pid != null ? pid.toString() : "????";
if (ch.startsWith("WebSeed@")) {
out.write(ch);
} else {
ch = ch.substring(0, 4);
String client;
if ("AwMD".equals(ch))
client = _t("I2PSnark");
else if ("LUJJ".equals(ch))
client = "BiglyBT" + getAzVersion(pid.getID());
else if ("LUFa".equals(ch))
client = "Vuze" + getAzVersion(pid.getID());
else if ("LVhE".equals(ch))
client = "XD" + getAzVersion(pid.getID());
else if ("ZV".equals(ch.substring(2,4)) || "VUZP".equals(ch))
client = "Robert" + getRobtVersion(pid.getID());
else if (ch.startsWith("LV")) // LVCS 1.0.2?; LVRS 1.0.4
client = "Transmission" + getAzVersion(pid.getID());
else if ("LUtU".equals(ch))
client = "KTorrent" + getAzVersion(pid.getID());
else if ("CwsL".equals(ch))
client = "I2PSnarkXL";
else if ("BFJT".equals(ch))
client = "I2PRufus";
else if ("TTMt".equals(ch))
client = "I2P-BT";
else
client = _t("Unknown") + " (" + ch + ')';
out.write(client + "&nbsp;<tt title=\"");
out.write(_t("Destination (identity) of peer"));
out.write("\">" + peer.toString().substring(5, 9)+ "</tt>");
}
if (showDebug) {
long t = peer.getInactiveTime();
if (t >= 5000)
@@ -3179,9 +3182,34 @@ public class I2PSnarkServlet extends BasicServlet {
}
buf.append("</td></tr>\n");
}
}
if (meta != null) {
List<String> weblist = meta.getWebSeedURLs();
if (weblist != null) {
List<String> wlist = new ArrayList<String>(weblist.size());
// strip non-i2p web seeds
for (String s : weblist) {
if (isI2PTracker(s))
wlist.add(s);
}
if (!wlist.isEmpty()) {
buf.append("<tr><td>");
toThemeImg(buf, "details");
buf.append("</td><td><b>")
.append(_t("Web Seeds")).append("</b></td><td>");
boolean more = false;
for (String s : wlist) {
buf.append("<span class=\"info_tracker\">");
if (more)
buf.append(' ');
else
more = true;
buf.append(getShortTrackerLink(DataHelper.stripHTML(s), snark.getInfoHash()));
buf.append("</span> ");
}
buf.append("</td></tr>\n");
}
}
String com = meta.getComment();
if (com != null && com.length() > 0) {
if (com.length() > 1024)

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 240 B

After

Width:  |  Height:  |  Size: 240 B

View File

Before

Width:  |  Height:  |  Size: 593 B

After

Width:  |  Height:  |  Size: 593 B

View File

Before

Width:  |  Height:  |  Size: 152 B

After

Width:  |  Height:  |  Size: 152 B

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

Before

Width:  |  Height:  |  Size: 824 B

After

Width:  |  Height:  |  Size: 824 B

View File

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 496 B

After

Width:  |  Height:  |  Size: 496 B

View File

Before

Width:  |  Height:  |  Size: 450 B

After

Width:  |  Height:  |  Size: 450 B

View File

Before

Width:  |  Height:  |  Size: 650 B

After

Width:  |  Height:  |  Size: 650 B

View File

Before

Width:  |  Height:  |  Size: 773 B

After

Width:  |  Height:  |  Size: 773 B

View File

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

Before

Width:  |  Height:  |  Size: 279 B

After

Width:  |  Height:  |  Size: 279 B

View File

Before

Width:  |  Height:  |  Size: 380 B

After

Width:  |  Height:  |  Size: 380 B

View File

Before

Width:  |  Height:  |  Size: 421 B

After

Width:  |  Height:  |  Size: 421 B

View File

Before

Width:  |  Height:  |  Size: 254 B

After

Width:  |  Height:  |  Size: 254 B

View File

Before

Width:  |  Height:  |  Size: 437 B

After

Width:  |  Height:  |  Size: 437 B

View File

Before

Width:  |  Height:  |  Size: 409 B

After

Width:  |  Height:  |  Size: 409 B

View File

Before

Width:  |  Height:  |  Size: 354 B

After

Width:  |  Height:  |  Size: 354 B

View File

Before

Width:  |  Height:  |  Size: 265 B

After

Width:  |  Height:  |  Size: 265 B

View File

Before

Width:  |  Height:  |  Size: 346 B

After

Width:  |  Height:  |  Size: 346 B

View File

Before

Width:  |  Height:  |  Size: 977 B

After

Width:  |  Height:  |  Size: 977 B

View File

Before

Width:  |  Height:  |  Size: 372 B

After

Width:  |  Height:  |  Size: 372 B

View File

Before

Width:  |  Height:  |  Size: 433 B

After

Width:  |  Height:  |  Size: 433 B

View File

Before

Width:  |  Height:  |  Size: 326 B

After

Width:  |  Height:  |  Size: 326 B

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 244 B

After

Width:  |  Height:  |  Size: 244 B

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 328 B

After

Width:  |  Height:  |  Size: 328 B

View File

Before

Width:  |  Height:  |  Size: 372 B

After

Width:  |  Height:  |  Size: 372 B

View File

Before

Width:  |  Height:  |  Size: 513 B

After

Width:  |  Height:  |  Size: 513 B

View File

Before

Width:  |  Height:  |  Size: 456 B

After

Width:  |  Height:  |  Size: 456 B

View File

Before

Width:  |  Height:  |  Size: 313 B

After

Width:  |  Height:  |  Size: 313 B

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 254 B

After

Width:  |  Height:  |  Size: 254 B

View File

Before

Width:  |  Height:  |  Size: 599 B

After

Width:  |  Height:  |  Size: 599 B

View File

Before

Width:  |  Height:  |  Size: 227 B

After

Width:  |  Height:  |  Size: 227 B

View File

Before

Width:  |  Height:  |  Size: 746 B

After

Width:  |  Height:  |  Size: 746 B

View File

Before

Width:  |  Height:  |  Size: 782 B

After

Width:  |  Height:  |  Size: 782 B

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

Before

Width:  |  Height:  |  Size: 236 B

After

Width:  |  Height:  |  Size: 236 B

View File

Before

Width:  |  Height:  |  Size: 595 B

After

Width:  |  Height:  |  Size: 595 B

View File

Before

Width:  |  Height:  |  Size: 758 B

After

Width:  |  Height:  |  Size: 758 B

View File

Before

Width:  |  Height:  |  Size: 152 B

After

Width:  |  Height:  |  Size: 152 B

View File

Before

Width:  |  Height:  |  Size: 434 B

After

Width:  |  Height:  |  Size: 434 B

View File

Before

Width:  |  Height:  |  Size: 552 B

After

Width:  |  Height:  |  Size: 552 B

View File

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

Before

Width:  |  Height:  |  Size: 443 B

After

Width:  |  Height:  |  Size: 443 B

View File

Before

Width:  |  Height:  |  Size: 268 B

After

Width:  |  Height:  |  Size: 268 B

View File

@@ -2238,15 +2238,15 @@ hr.debug:last-child {
}
.priorityHigh {
background: url(/themes/snark/dark/images/icons/clock_red.png) left 24px center no-repeat;
background: url(images/icons/clock_red.png) left 24px center no-repeat;
}
.priorityNormal {
background: url(/themes/snark/dark/images/icons/clock.png) left 24px center no-repeat;
background: url(images/icons/clock.png) left 24px center no-repeat;
}
.prioritySkip {
background: url(/themes/snark/dark/images/icons/cancel.png) left 22px center no-repeat;
background: url(images/icons/cancel.png) left 22px center no-repeat;
}
/* configs */

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 240 B

After

Width:  |  Height:  |  Size: 240 B

View File

Before

Width:  |  Height:  |  Size: 593 B

After

Width:  |  Height:  |  Size: 593 B

View File

Before

Width:  |  Height:  |  Size: 152 B

After

Width:  |  Height:  |  Size: 152 B

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 496 B

After

Width:  |  Height:  |  Size: 496 B

View File

Before

Width:  |  Height:  |  Size: 450 B

After

Width:  |  Height:  |  Size: 450 B

View File

Before

Width:  |  Height:  |  Size: 650 B

After

Width:  |  Height:  |  Size: 650 B

View File

Before

Width:  |  Height:  |  Size: 207 B

After

Width:  |  Height:  |  Size: 207 B

View File

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

Before

Width:  |  Height:  |  Size: 279 B

After

Width:  |  Height:  |  Size: 279 B

View File

Before

Width:  |  Height:  |  Size: 421 B

After

Width:  |  Height:  |  Size: 421 B

View File

Before

Width:  |  Height:  |  Size: 254 B

After

Width:  |  Height:  |  Size: 254 B

View File

Before

Width:  |  Height:  |  Size: 251 B

After

Width:  |  Height:  |  Size: 251 B

View File

Before

Width:  |  Height:  |  Size: 437 B

After

Width:  |  Height:  |  Size: 437 B

Some files were not shown because too many files have changed in this diff Show More