cosmetics

This commit is contained in:
nikk gitanes
2022-01-12 04:41:17 +03:00
parent fa5f0943cd
commit 366d2d327a
6 changed files with 11 additions and 13 deletions

View File

@@ -12,7 +12,7 @@ import (
type BTSets struct { type BTSets struct {
// Cache // Cache
CacheSize int64 // in byte, def 96 MB CacheSize int64 // in byte, def 64 MB
ReaderReadAHead int // in percent, 5%-100%, [...S__X__E...] [S-E] not clean ReaderReadAHead int // in percent, 5%-100%, [...S__X__E...] [S-E] not clean
PreloadCache int // in percent PreloadCache int // in percent
@@ -123,9 +123,9 @@ func SetDefault() {
sets.EnableDebug = false sets.EnableDebug = false
sets.CacheSize = 64 * 1024 * 1024 // 64 MB sets.CacheSize = 64 * 1024 * 1024 // 64 MB
sets.PreloadCache = 50 sets.PreloadCache = 50
sets.ConnectionsLimit = 23 sets.ConnectionsLimit = 25
sets.RetrackersMode = 1 sets.RetrackersMode = 1
sets.TorrentDisconnectTimeout = 30 sets.TorrentDisconnectTimeout = 30
sets.ReaderReadAHead = 95 // 95% preload sets.ReaderReadAHead = 95 // 95%
BTsets = sets BTsets = sets
} }

View File

@@ -12,6 +12,7 @@ import (
"server/settings" "server/settings"
"server/torr/storage/torrstor" "server/torr/storage/torrstor"
"server/torr/utils" "server/torr/utils"
"server/version"
) )
type BTServer struct { type BTServer struct {
@@ -59,11 +60,12 @@ func (bt *BTServer) configure() {
bt.storage = torrstor.NewStorage(settings.BTsets.CacheSize) bt.storage = torrstor.NewStorage(settings.BTsets.CacheSize)
bt.config.DefaultStorage = bt.storage bt.config.DefaultStorage = bt.storage
userAgent := "qBittorrent/4.3.2" userAgent := "qBittorrent/4.3.9"
peerID := "-qB4320-" peerID := "-qB4390-"
upnpID := "TorrServer" upnpID := "TorrServer/" + version.Version
cliVers := userAgent //"uTorrent/2210(25302)" cliVers := userAgent
// bt.config.AcceptPeerConnections = 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 == false bt.config.DisableIPv6 = settings.BTsets.EnableIPv6 == false

View File

@@ -4,8 +4,7 @@ export default {
UseDisk: false, UseDisk: false,
UploadRateLimit: 0, UploadRateLimit: 0,
TorrentsSavePath: '', TorrentsSavePath: '',
ConnectionsLimit: 23, ConnectionsLimit: 25,
DhtConnectionLimit: 0,
DisableDHT: false, DisableDHT: false,
DisablePEX: false, DisablePEX: false,
DisableTCP: false, DisableTCP: false,

View File

@@ -96,7 +96,6 @@
"ConnectionsLimit": "Connections Limit", "ConnectionsLimit": "Connections Limit",
"ConnectionsLimitHint": "20-25 recommended", "ConnectionsLimitHint": "20-25 recommended",
"DHT": "DHT (Distributed Hash Table)", "DHT": "DHT (Distributed Hash Table)",
"DhtConnectionLimit": "DHT Connection Limit",
"Disk": "Disk", "Disk": "Disk",
"DLNA": "DLNA Media Server", "DLNA": "DLNA Media Server",
"DontAddRetrackers": "Don`t add retrackers", "DontAddRetrackers": "Don`t add retrackers",

View File

@@ -96,7 +96,6 @@
"ConnectionsLimit": "Торрент-соединения", "ConnectionsLimit": "Торрент-соединения",
"ConnectionsLimitHint": "рекомендуется 20-25", "ConnectionsLimitHint": "рекомендуется 20-25",
"DHT": "DHT (Distributed Hash Table)", "DHT": "DHT (Distributed Hash Table)",
"DhtConnectionLimit": "Лимит подключений DHT",
"Disk": "ПЗУ / Накопитель", "Disk": "ПЗУ / Накопитель",
"DLNA": "DLNA-медиасервер", "DLNA": "DLNA-медиасервер",
"DontAddRetrackers": "Ничего не делать", "DontAddRetrackers": "Ничего не делать",

View File

@@ -96,7 +96,6 @@
"ConnectionsLimit": "Обмеження з'єдань", "ConnectionsLimit": "Обмеження з'єдань",
"ConnectionsLimitHint": "рекомендовано 20-25", "ConnectionsLimitHint": "рекомендовано 20-25",
"DHT": "DHT (Distributed Hash Table)", "DHT": "DHT (Distributed Hash Table)",
"DhtConnectionLimit": "Обмеження з'єдань DHT",
"Disk": "ПЗП / Носій", "Disk": "ПЗП / Носій",
"DLNA": "DLNA-медиасервер", "DLNA": "DLNA-медиасервер",
"DontAddRetrackers": "Нічого не робити", "DontAddRetrackers": "Нічого не робити",