From 82387df0b5210b48aec71b5680cb9de0008a05d6 Mon Sep 17 00:00:00 2001 From: YouROK <8yourok8@mail.ru> Date: Tue, 20 Jul 2021 11:47:39 +0300 Subject: [PATCH 1/7] add def value --- server/settings/btsets.go | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/server/settings/btsets.go b/server/settings/btsets.go index 100d4e1..b2f50ad 100644 --- a/server/settings/btsets.go +++ b/server/settings/btsets.go @@ -28,20 +28,20 @@ type BTSets struct { EnableDebug bool // print logs // BT Config - AcceptPeerCon bool - AnnTorrentsToDht bool - EnableIPv6 bool - DisableTCP bool - DisableUTP bool - DisableUPNP bool - DisableDHT bool - DisablePEX bool - DisableUpload bool - DownloadRateLimit int // in kb, 0 - inf - UploadRateLimit int // in kb, 0 - inf - ConnectionsLimit int + AcceptPeerCon bool `default:"true"` + AnnTorrentsToDht bool `default:"true"` + EnableIPv6 bool + DisableTCP bool + DisableUTP bool + DisableUPNP bool + DisableDHT bool + DisablePEX bool + DisableUpload bool + DownloadRateLimit int // in kb, 0 - inf + UploadRateLimit int // in kb, 0 - inf + ConnectionsLimit int //DhtConnectionLimit int // 0 - inf - PeersListenPort int + PeersListenPort int //Strategy int // 0 - RequestStrategyDuplicateRequestTimeout, 1 - RequestStrategyFuzzing, 2 - RequestStrategyFastest } From 5a32cf1697f650ab5bde8fc5fdc1ac4f39b1a58d Mon Sep 17 00:00:00 2001 From: YouROK <8yourok8@mail.ru> Date: Tue, 20 Jul 2021 11:48:01 +0300 Subject: [PATCH 2/7] add double disable prior --- server/torr/storage/torrstor/piece.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/torr/storage/torrstor/piece.go b/server/torr/storage/torrstor/piece.go index 8080c08..ac2c925 100644 --- a/server/torr/storage/torrstor/piece.go +++ b/server/torr/storage/torrstor/piece.go @@ -77,5 +77,7 @@ func (p *Piece) Release() { } p.cache.torrent.Piece(p.Id).SetPriority(torrent.PiecePriorityNone) + // fix remove pieces hash p.cache.torrent.Piece(p.Id).UpdateCompletion() + p.cache.torrent.Piece(p.Id).SetPriority(torrent.PiecePriorityNone) } From 82a2f1aebeb5de7f1c86f8d8674f316c39612e16 Mon Sep 17 00:00:00 2001 From: YouROK <8yourok8@mail.ru> Date: Tue, 20 Jul 2021 11:48:47 +0300 Subject: [PATCH 3/7] add static libstdc++ --- server/cmd/preconfig_and.go | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 server/cmd/preconfig_and.go diff --git a/server/cmd/preconfig_and.go b/server/cmd/preconfig_and.go new file mode 100644 index 0000000..bdcb357 --- /dev/null +++ b/server/cmd/preconfig_and.go @@ -0,0 +1,6 @@ +// +build android + +package main + +// #cgo LDFLAGS: -static-libstdc++ +import "C" From 52db3351e4ff5d0c5a933d4c9c498bdc09452bbb Mon Sep 17 00:00:00 2001 From: YouROK <8yourok8@mail.ru> Date: Tue, 20 Jul 2021 11:50:40 +0300 Subject: [PATCH 4/7] remove unused --- web/dest/index.html | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 web/dest/index.html diff --git a/web/dest/index.html b/web/dest/index.html deleted file mode 100644 index 891be02..0000000 --- a/web/dest/index.html +++ /dev/null @@ -1,30 +0,0 @@ -TorrServer
\ No newline at end of file From ded5964f3b41b0577eed8f70bb8a33a436677ea6 Mon Sep 17 00:00:00 2001 From: YouROK <8yourok8@mail.ru> Date: Tue, 20 Jul 2021 11:50:53 +0300 Subject: [PATCH 5/7] MatriX.102 --- server/version/version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/version/version.go b/server/version/version.go index c5f7114..11a3980 100644 --- a/server/version/version.go +++ b/server/version/version.go @@ -1,3 +1,3 @@ package version -const Version = "MatriX.101" +const Version = "MatriX.102" From 17b58156a75e3ab806ab53a34a5618a1bb5c0a69 Mon Sep 17 00:00:00 2001 From: YouROK <8yourok8@mail.ru> Date: Tue, 20 Jul 2021 12:18:04 +0300 Subject: [PATCH 6/7] add mount mod dir --- docker-all.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-all.sh b/docker-all.sh index 5d8a878..580869b 100755 --- a/docker-all.sh +++ b/docker-all.sh @@ -6,5 +6,5 @@ ROOT=${PWD} echo "Build web" go run gen_web.go -sudo docker run --rm -v "$PWD":/usr/src/torr -w /usr/src/torr golang:1.16 ./build-all.sh +sudo docker run --rm -v "$PWD":/usr/src/torr -v ~/go/pkg/mod:/go/pkg/mod -w /usr/src/torr golang:1.16 ./build-all.sh sudo chmod 0777 ./dist/* \ No newline at end of file From fd17748dfa7f5dd5075d23d56ace989367df28fe Mon Sep 17 00:00:00 2001 From: YouROK <8yourok8@mail.ru> Date: Tue, 20 Jul 2021 12:19:11 +0300 Subject: [PATCH 7/7] update web --- server/web/pages/template/route.go | 78 +++++++++++++++--------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/server/web/pages/template/route.go b/server/web/pages/template/route.go index 36bda6e..9a3a236 100644 --- a/server/web/pages/template/route.go +++ b/server/web/pages/template/route.go @@ -14,6 +14,21 @@ func RouteWebPages(route *gin.RouterGroup) { }) + route.GET("/mstile-150x150.png", func(c *gin.Context) { + c.Data(200, "image/png", Mstile150x150png) + }) + + + route.GET("/static/js/2.e12df9f6.chunk.js.map", func(c *gin.Context) { + c.Data(200, "application/json", Staticjs2e12df9f6chunkjsmap) + }) + + + route.GET("/android-chrome-192x192.png", func(c *gin.Context) { + c.Data(200, "image/png", Androidchrome192x192png) + }) + + route.GET("/static/js/2.e12df9f6.chunk.js.LICENSE.txt", func(c *gin.Context) { c.Data(200, "text/plain; charset=utf-8", Staticjs2e12df9f6chunkjsLICENSEtxt) }) @@ -24,48 +39,13 @@ func RouteWebPages(route *gin.RouterGroup) { }) - route.GET("/android-chrome-512x512.png", func(c *gin.Context) { - c.Data(200, "image/png", Androidchrome512x512png) - }) - - - route.GET("/browserconfig.xml", func(c *gin.Context) { - c.Data(200, "application/xml", Browserconfigxml) - }) - - - route.GET("/site.webmanifest", func(c *gin.Context) { - c.Data(200, "application/manifest+json", Sitewebmanifest) - }) - - - route.GET("/static/js/2.e12df9f6.chunk.js", func(c *gin.Context) { - c.Data(200, "application/javascript", Staticjs2e12df9f6chunkjs) - }) - - - route.GET("/favicon-32x32.png", func(c *gin.Context) { - c.Data(200, "image/png", Favicon32x32png) - }) - - - route.GET("/mstile-150x150.png", func(c *gin.Context) { - c.Data(200, "image/png", Mstile150x150png) - }) - - - route.GET("/static/js/main.e6ffbb4b.chunk.js", func(c *gin.Context) { - c.Data(200, "application/javascript", Staticjsmaine6ffbb4bchunkjs) - }) - - route.GET("/static/js/runtime-main.8bda5920.js.map", func(c *gin.Context) { c.Data(200, "application/json", Staticjsruntimemain8bda5920jsmap) }) - route.GET("/android-chrome-192x192.png", func(c *gin.Context) { - c.Data(200, "image/png", Androidchrome192x192png) + route.GET("/browserconfig.xml", func(c *gin.Context) { + c.Data(200, "application/xml", Browserconfigxml) }) @@ -89,8 +69,23 @@ func RouteWebPages(route *gin.RouterGroup) { }) - route.GET("/static/js/2.e12df9f6.chunk.js.map", func(c *gin.Context) { - c.Data(200, "application/json", Staticjs2e12df9f6chunkjsmap) + route.GET("/static/js/main.e6ffbb4b.chunk.js", func(c *gin.Context) { + c.Data(200, "application/javascript", Staticjsmaine6ffbb4bchunkjs) + }) + + + route.GET("/android-chrome-512x512.png", func(c *gin.Context) { + c.Data(200, "image/png", Androidchrome512x512png) + }) + + + route.GET("/site.webmanifest", func(c *gin.Context) { + c.Data(200, "application/manifest+json", Sitewebmanifest) + }) + + + route.GET("/static/js/2.e12df9f6.chunk.js", func(c *gin.Context) { + c.Data(200, "application/javascript", Staticjs2e12df9f6chunkjs) }) @@ -98,4 +93,9 @@ func RouteWebPages(route *gin.RouterGroup) { c.Data(200, "application/json", Staticjsmaine6ffbb4bchunkjsmap) }) + + route.GET("/favicon-32x32.png", func(c *gin.Context) { + c.Data(200, "image/png", Favicon32x32png) + }) + } \ No newline at end of file