Change the default client port

This commit is contained in:
Matt Joiner 2019-07-19 16:19:21 +10:00
parent 3c0588d661
commit 958ff01eab
3 changed files with 3 additions and 0 deletions

View File

@ -36,6 +36,7 @@ func TestingConfig() *ClientConfig {
cfg.DisableTrackers = true
cfg.NoDefaultPortForwarding = true
cfg.DisableAcceptRateLimiting = true
cfg.ListenPort = 0
return cfg
}

View File

@ -164,6 +164,7 @@ func NewDefaultClientConfig() *ClientConfig {
},
CryptoSelector: mse.DefaultCryptoSelector,
CryptoProvides: mse.AllSupportedCrypto,
ListenPort: 42069,
}
cc.ConnTracker.SetNoMaxEntries()
cc.ConnTracker.Timeout = func(conntrack.Entry) time.Duration { return 0 }

View File

@ -189,6 +189,7 @@ func TestDownloadOnDemand(t *testing.T) {
cfg.DisableTCP = true
cfg.DefaultStorage = storage.NewMMap(filepath.Join(layout.BaseDir, "download"))
cfg.ListenHost = torrent.LoopbackListenHost
cfg.ListenPort = 0
leecher, err := torrent.NewClient(cfg)
require.NoError(t, err)
testutil.ExportStatusWriter(leecher, "l")()