mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 13:36:09 +05:00
Update btserver.go
This commit is contained in:
@@ -89,9 +89,6 @@ func (bt *BTServer) configure(ctx context.Context) {
|
|||||||
upnpID := "TorrServer/" + version.Version
|
upnpID := "TorrServer/" + version.Version
|
||||||
cliVers := userAgent
|
cliVers := userAgent
|
||||||
|
|
||||||
// Don't announce to trackers. This only leaves DHT to discover peers.
|
|
||||||
bt.config.DisableTrackers = true
|
|
||||||
bt.config.PeriodicallyAnnounceTorrentsToDht = true // no peers from DHT with false
|
|
||||||
// bt.config.AlwaysWantConns = true
|
// bt.config.AlwaysWantConns = true
|
||||||
bt.config.Debug = settings.BTsets.EnableDebug
|
bt.config.Debug = settings.BTsets.EnableDebug
|
||||||
bt.config.DisableIPv6 = !settings.BTsets.EnableIPv6
|
bt.config.DisableIPv6 = !settings.BTsets.EnableIPv6
|
||||||
@@ -207,12 +204,6 @@ func (bt *BTServer) RemoveTorrent(hash torrent.InfoHash) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func isPrivateIP(ip net.IP) bool {
|
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() {
|
if ip.IsLoopback() || ip.IsPrivate() || ip.IsLinkLocalUnicast() || ip.IsLinkLocalMulticast() {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user