mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 21:46:11 +05:00
mod update and fix build
This commit is contained in:
@@ -94,7 +94,7 @@ func (bt *BTServer) configure() {
|
||||
bt.config.DisableTCP = settings.BTsets.DisableTCP
|
||||
bt.config.DisableUTP = settings.BTsets.DisableUTP
|
||||
// https://github.com/anacrolix/torrent/issues/703
|
||||
bt.config.DisableWebtorrent = true
|
||||
// bt.config.DisableWebtorrent = true
|
||||
bt.config.NoDefaultPortForwarding = settings.BTsets.DisableUPNP
|
||||
bt.config.NoDHT = settings.BTsets.DisableDHT
|
||||
bt.config.DisablePEX = settings.BTsets.DisablePEX
|
||||
@@ -108,10 +108,13 @@ func (bt *BTServer) configure() {
|
||||
bt.config.EstablishedConnsPerTorrent = settings.BTsets.ConnectionsLimit
|
||||
bt.config.TotalHalfOpenConns = 500
|
||||
// Encryption/Obfuscation
|
||||
bt.config.HeaderObfuscationPolicy = torrent.HeaderObfuscationPolicy{
|
||||
RequirePreferred: settings.BTsets.ForceEncrypt,
|
||||
Preferred: true,
|
||||
bt.config.EncryptionPolicy = torrent.EncryptionPolicy{
|
||||
ForceEncryption: settings.BTsets.ForceEncrypt,
|
||||
}
|
||||
// bt.config.HeaderObfuscationPolicy = torrent.HeaderObfuscationPolicy{
|
||||
// RequirePreferred: settings.BTsets.ForceEncrypt,
|
||||
// Preferred: true,
|
||||
// }
|
||||
if settings.BTsets.DownloadRateLimit > 0 {
|
||||
bt.config.DownloadRateLimiter = utils.Limit(settings.BTsets.DownloadRateLimit * 1024)
|
||||
}
|
||||
|
||||
@@ -30,11 +30,11 @@ func (s *Storage) OpenTorrent(info *metainfo.Info, infoHash metainfo.Hash) (stor
|
||||
ch := NewCache(s.capacity, s)
|
||||
ch.Init(info, infoHash)
|
||||
s.caches[infoHash] = ch
|
||||
// return ch, nil
|
||||
return storage2.TorrentImpl{
|
||||
Piece: ch.Piece,
|
||||
Close: ch.Close,
|
||||
}, nil
|
||||
return ch, nil
|
||||
// return storage2.TorrentImpl{
|
||||
// Piece: ch.Piece,
|
||||
// Close: ch.Close,
|
||||
// }, nil
|
||||
}
|
||||
|
||||
func (s *Storage) CloseHash(hash metainfo.Hash) {
|
||||
|
||||
Reference in New Issue
Block a user