From 90bbdf9adb2fef4c4946687be5671acb7b8e4a59 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Sun, 3 May 2020 18:42:03 +1000 Subject: [PATCH] cmd/torrent: Add download -pex flag For testing with https://github.com/anacrolix/torrent/issues/402. --- cmd/torrent/main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/torrent/main.go b/cmd/torrent/main.go index 02e58997..221f6a01 100644 --- a/cmd/torrent/main.go +++ b/cmd/torrent/main.go @@ -148,6 +148,7 @@ var flags = struct { UtpPeers bool Ipv4 bool Ipv6 bool + Pex bool tagflag.StartPos Torrent []string `arity:"+" help:"torrent file path or magnet uri"` }{ @@ -159,6 +160,7 @@ var flags = struct { UtpPeers: true, Ipv4: true, Ipv6: true, + Pex: true, } func stdoutAndStderrAreSameFile() bool { @@ -221,6 +223,7 @@ func downloadErr(args []string, parent *tagflag.Parser) error { clientConfig.Seed = flags.Seed clientConfig.PublicIp4 = flags.PublicIP clientConfig.PublicIp6 = flags.PublicIP + clientConfig.DisablePEX = !flags.Pex if flags.PackedBlocklist != "" { blocklist, err := iplist.MMapPackedFile(flags.PackedBlocklist) if err != nil { -- 2.48.1