cmd/torrent: Add --port-forward

This commit is contained in:
Matt Joiner 2022-03-09 20:56:06 +11:00
parent a450bbe6b2
commit 859d31facb
No known key found for this signature in database
GPG Key ID: 6B990B8185E7F782
1 changed files with 2 additions and 0 deletions

View File

@ -186,6 +186,7 @@ type DownloadCmd struct {
Quiet bool `help:"discard client logging"`
Stats bool `help:"print stats at termination"`
Dht bool `default:"true"`
PortForward bool `default:"true"`
TcpPeers bool `default:"true"`
UtpPeers bool `default:"true"`
@ -234,6 +235,7 @@ func downloadErr(flags downloadFlags) error {
clientConfig.PublicIp6 = flags.PublicIP
clientConfig.DisablePEX = !flags.Pex
clientConfig.DisableWebtorrent = !flags.Webtorrent
clientConfig.NoDefaultPortForwarding = !flags.PortForward
if flags.PackedBlocklist != "" {
blocklist, err := iplist.MMapPackedFile(flags.PackedBlocklist)
if err != nil {