]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Change the default client port
authorMatt Joiner <anacrolix@gmail.com>
Fri, 19 Jul 2019 06:19:21 +0000 (16:19 +1000)
committerMatt Joiner <anacrolix@gmail.com>
Fri, 19 Jul 2019 06:19:21 +0000 (16:19 +1000)
client_test.go
config.go
fs/torrentfs_test.go

index a1db9db07c242a7e3df113fc1ceb8d06c4b75b6a..e0854867ebbad8a1b18f503867bc3f69f6324424 100644 (file)
@@ -36,6 +36,7 @@ func TestingConfig() *ClientConfig {
        cfg.DisableTrackers = true
        cfg.NoDefaultPortForwarding = true
        cfg.DisableAcceptRateLimiting = true
+       cfg.ListenPort = 0
        return cfg
 }
 
index 5582456a0a91fec91457afaa9bd91097510266c9..f4c190fb62f1f98d9d767190ce1d1b47fcc80f88 100644 (file)
--- 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 }
index 4a37a351928d51aa0368004e641f073f2c5d8531..582f9c2d5ff2b64ed023387da531545bf9dcf9f2 100644 (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")()