From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sigma.offblast.org ([199.191.58.44]) by ttr; Fri Jan 31 23:28:37 EST 2014 Received: from iota.offblast.org ([66.109.99.211]) by sigma; Fri Jan 31 23:28:34 EST 2014 Date: Fri, 31 Jan 2014 20:28:00 -0800 From: Nick Owens To: 9front@9front.org Subject: ip/torrent and private trackers Message-ID: <20140201042800.GA28628@iota.offblast.org> List-ID: <9front.9front.org> X-Glyph: ➈ X-Bullshit: plugin rich-client NoSQL control MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/9DWx/yDrRhgMJTb" Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) --/9DWx/yDrRhgMJTb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable ip/torrent in certain circumstances will never make progress. specifically, sl reported that no progress was made while contacting the tracker at bakabt.me. investigation revealed that the tracker was actually returing an error message: d14:failure reason95:use of this client is not allowed on our tracker, please see http://www.bakabt.me/whitelist.phpe see http://www.bakabt.me/whitelist.php for the whitelist. in short, they don't like our peerid, -NF9001-. i have just made a request on their forum to whitelist the id, but the alternative is to spoof the peerid. the patch below allows you to specify the 8 character peerid with the -i argument when invoking ip/torrent. setting my peerid to '-TR282Z-', which is transmission 2.82+, allowed me to connect to bakabt's tracker. additionally, i'll patch ip/torrent to report errors from the tracker, so that this situation is less confusing to the user. diff -r 20c2c6fccfee sys/src/cmd/ip/torrent.c --- a/sys/src/cmd/ip/torrent.c Sat Jan 11 16:07:35 2014 +0100 +++ b/sys/src/cmd/ip/torrent.c Fri Jan 31 03:28:25 2014 -0800 @@ -1174,13 +1174,14 @@ { int sflag, pflag, vflag, cflag, fd, i, n; Dict *alist, *wlist, *info, *torrent, *d, *l; - char *p, *s, *e; + char *p, *s, *e, *pid; File **fp, *f; vlong len; =20 fmtinstall('H', Hfmt); alist =3D wlist =3D nil; sflag =3D pflag =3D vflag =3D cflag =3D 0; + pid =3D nil; ARGBEGIN { case 'm': mntweb =3D EARGF(usage()); @@ -1206,6 +1207,9 @@ case 'd': debug++; break; + case 'i': + pid =3D EARGF(usage()); + break; default: usage(); } ARGEND; @@ -1339,7 +1343,10 @@ case -1: sysfatal("fork: %r"); case 0: - memmove(peerid, "-NF9001-", 8); + if(pid) + memmove(peerid, pid, 8); + else + memmove(peerid, "-NF9001-", 8); for(i=3D8; i