From: Matt Joiner Date: Fri, 19 Jul 2019 06:19:21 +0000 (+1000) Subject: Change the default client port X-Git-Tag: v1.5.0~5 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=958ff01eab644c303b42ea5259e0523e0533d343;p=btrtrc.git Change the default client port --- diff --git a/client_test.go b/client_test.go index a1db9db0..e0854867 100644 --- a/client_test.go +++ b/client_test.go @@ -36,6 +36,7 @@ func TestingConfig() *ClientConfig { cfg.DisableTrackers = true cfg.NoDefaultPortForwarding = true cfg.DisableAcceptRateLimiting = true + cfg.ListenPort = 0 return cfg } diff --git a/config.go b/config.go index 5582456a..f4c190fb 100644 --- a/config.go +++ b/config.go @@ -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 } diff --git a/fs/torrentfs_test.go b/fs/torrentfs_test.go index 4a37a351..582f9c2d 100644 --- a/fs/torrentfs_test.go +++ b/fs/torrentfs_test.go @@ -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")()