* i2psnark:

- Drop incoming connections on HTTP port
   - Define port 6881 in one place
   - Don't let random DHT port be 6881
   - Exception tweak
This commit is contained in:
zzz
2013-10-24 20:52:37 +00:00
parent 80fdf4e917
commit 9d3925eb20
6 changed files with 25 additions and 11 deletions

View File

@@ -58,7 +58,7 @@ class PeerID implements Comparable
{
this.id = id;
this.address = address;
this.port = 6881;
this.port = TrackerClient.PORT;
this.destHash = address.calculateHash().getData();
hash = calculateHash();
util = null;
@@ -92,7 +92,7 @@ class PeerID implements Comparable
if (address == null)
throw new InvalidBEncodingException("Invalid destination [" + bevalue.getString() + "]");
port = 6881;
port = TrackerClient.PORT;
this.destHash = address.calculateHash().getData();
hash = calculateHash();
util = null;
@@ -106,7 +106,7 @@ class PeerID implements Comparable
public PeerID(byte[] dest_hash, I2PSnarkUtil util) throws InvalidBEncodingException
{
// id and address remain null
port = 6881;
port = TrackerClient.PORT;
if (dest_hash.length != 32)
throw new InvalidBEncodingException("bad hash length");
destHash = dest_hash;