mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-20 05:56:10 +05:00
Merge branch 'master' into old-engine
This commit is contained in:
@@ -89,14 +89,14 @@ func (bt *BTServer) configure(ctx context.Context) {
|
||||
upnpID := "TorrServer/" + version.Version
|
||||
cliVers := userAgent
|
||||
|
||||
// bt.config.AcceptPeerConnections = false
|
||||
// bt.config.AlwaysWantConns = true
|
||||
bt.config.Debug = settings.BTsets.EnableDebug
|
||||
bt.config.DisableIPv6 = settings.BTsets.EnableIPv6 == false
|
||||
bt.config.DisableIPv6 = !settings.BTsets.EnableIPv6
|
||||
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 // TODO: check memory usage
|
||||
// bt.config.DisableWebseeds = true
|
||||
bt.config.NoDefaultPortForwarding = settings.BTsets.DisableUPNP
|
||||
bt.config.NoDHT = settings.BTsets.DisableDHT
|
||||
bt.config.DisablePEX = settings.BTsets.DisablePEX
|
||||
@@ -207,12 +207,6 @@ func (bt *BTServer) RemoveTorrent(hash torrent.InfoHash) {
|
||||
}
|
||||
|
||||
func isPrivateIP(ip net.IP) bool {
|
||||
// log.Println(ip, "IsLoopback:", ip.IsLoopback())
|
||||
// log.Println(ip, "IsPrivate:", ip.IsPrivate())
|
||||
// log.Println(ip, "IsLinkLocalUnicast:", ip.IsLinkLocalUnicast())
|
||||
// log.Println(ip, "IsLinkLocalMulticast:", ip.IsLinkLocalMulticast())
|
||||
// log.Println(ip, "IsGlobalUnicast:", ip.IsGlobalUnicast())
|
||||
|
||||
if ip.IsLoopback() || ip.IsPrivate() || ip.IsLinkLocalUnicast() || ip.IsLinkLocalMulticast() {
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user