Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ func Default() Config {
BaseDownloadDir: filepath.Join(home, "Downloads", "torrents"),
MaxUploadBps: 0,
MaxDownloadBps: 0,
PortRangeStart: 42069,
PortRangeEnd: 42069,
PortRangeStart: 42000,
PortRangeEnd: 43000,
}
}

Expand Down
5 changes: 5 additions & 0 deletions internal/engine/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ func Run(id string) error {

clientCfg := torrent.NewDefaultClientConfig()
clientCfg.DataDir = tc.SavePath
// OS-assigned unless a port is claimed from the pool below. The
// library default (42069) would otherwise apply in the ephemeral
// fallback and no-range cases, colliding with whichever torrent holds
// that port -- the exact collision the pool exists to prevent.
clientCfg.ListenPort = 0

// Claim a distinct port from the configured range so this process's
// inbound listener never collides with another concurrently-running
Expand Down
Loading