mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-20 14:06:09 +05:00
add dht limit
This commit is contained in:
@@ -88,6 +88,9 @@ func (bt *BTServer) configure() {
|
|||||||
bt.config.PeerID = utils.PeerIDRandom(peerID)
|
bt.config.PeerID = utils.PeerIDRandom(peerID)
|
||||||
bt.config.HTTPUserAgent = userAgent
|
bt.config.HTTPUserAgent = userAgent
|
||||||
bt.config.EstablishedConnsPerTorrent = settings.Get().ConnectionsLimit
|
bt.config.EstablishedConnsPerTorrent = settings.Get().ConnectionsLimit
|
||||||
|
if settings.Get().DhtConnectionLimit > 0 {
|
||||||
|
bt.config.ConnTracker.SetMaxEntries(settings.Get().DhtConnectionLimit)
|
||||||
|
}
|
||||||
|
|
||||||
bt.config.TorrentPeersHighWater = 3000
|
bt.config.TorrentPeersHighWater = 3000
|
||||||
bt.config.HalfOpenConnsPerTorrent = 50
|
bt.config.HalfOpenConnsPerTorrent = 50
|
||||||
|
|||||||
Reference in New Issue
Block a user