revert to old engine

This commit is contained in:
nikk gitanes
2021-07-20 07:44:44 +03:00
parent 8355ad3794
commit 2ec43233fb
16 changed files with 98 additions and 878 deletions

View File

@@ -28,8 +28,6 @@ type BTSets struct {
EnableDebug bool // print logs
// BT Config
AcceptPeerCon bool
AnnTorrentsToDht bool
EnableIPv6 bool
DisableTCP bool
DisableUTP bool
@@ -40,9 +38,9 @@ type BTSets struct {
DownloadRateLimit int // in kb, 0 - inf
UploadRateLimit int // in kb, 0 - inf
ConnectionsLimit int
//DhtConnectionLimit int // 0 - inf
DhtConnectionLimit int // 0 - inf
PeersListenPort int
//Strategy int // 0 - RequestStrategyDuplicateRequestTimeout, 1 - RequestStrategyFuzzing, 2 - RequestStrategyFastest
Strategy int // 0 - RequestStrategyDuplicateRequestTimeout, 1 - RequestStrategyFuzzing, 2 - RequestStrategyFastest
}
func (v *BTSets) String() string {
@@ -121,14 +119,12 @@ func loadBTSets() {
func SetDefault() {
sets := new(BTSets)
sets.AcceptPeerCon = true
sets.AnnTorrentsToDht = true
sets.EnableDebug = false
sets.DisableUTP = true
sets.CacheSize = 96 * 1024 * 1024 // 96 MB
sets.PreloadCache = 0
sets.ConnectionsLimit = 23
//sets.DhtConnectionLimit = 500
sets.DhtConnectionLimit = 500
sets.RetrackersMode = 1
sets.TorrentDisconnectTimeout = 30
sets.ReaderReadAHead = 95 // 95% preload