From d239cc1209d084c0c2976ddfbffbcf722198a382 Mon Sep 17 00:00:00 2001 From: damiva <96115589+damiva@users.noreply.github.com> Date: Sun, 26 Nov 2023 14:30:48 +0300 Subject: [PATCH 01/76] Update build-all.sh fixed arch - arm7 (now it is soft-float) added arch - arm7h (it is hard-float) added platform netbsd/arm7h --- build-all.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/build-all.sh b/build-all.sh index 3312131..0502724 100755 --- a/build-all.sh +++ b/build-all.sh @@ -4,6 +4,7 @@ PLATFORMS=( 'linux/amd64' 'linux/arm64' 'linux/arm7' + 'linux/arm7h' 'linux/arm5' 'linux/386' 'windows/amd64' @@ -12,6 +13,7 @@ PLATFORMS=( 'darwin/arm64' 'freebsd/amd64' 'freebsd/arm7' + 'netbsd/arm7h' 'linux/mips' 'linux/mipsle' 'linux/mips64' @@ -21,9 +23,14 @@ PLATFORMS=( type setopt >/dev/null 2>&1 set_goarm() { - if [[ "$1" =~ arm([5,7]) ]]; then + if [[ "$1" =~ arm([5-7])(h)? ]]; then + if [[ "${BASH_REMATCH[2]}" == "h" ]]; then + GOARM="hardfloat" + else + GOARM="softfloat" + fi GOARCH="arm" - GOARM="${BASH_REMATCH[1]}" + GOARM="${BASH_REMATCH[1]},$GOARM" GO_ARM="GOARM=${GOARM}" else GOARM="" @@ -118,4 +125,4 @@ if [[ "${FAILURES}" != "" ]]; then echo "" echo "failed on: ${FAILURES}" exit 1 -fi \ No newline at end of file +fi From 5ecae9bf68176fd3b31fc9fda2d526f5dfb2587b Mon Sep 17 00:00:00 2001 From: damiva <96115589+damiva@users.noreply.github.com> Date: Sun, 26 Nov 2023 14:38:40 +0300 Subject: [PATCH 02/76] Update build-all.sh --- build-all.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-all.sh b/build-all.sh index 0502724..2c72b3d 100755 --- a/build-all.sh +++ b/build-all.sh @@ -13,7 +13,7 @@ PLATFORMS=( 'darwin/arm64' 'freebsd/amd64' 'freebsd/arm7' - 'netbsd/arm7h' + 'netbsd/arm7' 'linux/mips' 'linux/mipsle' 'linux/mips64' From 4a3e23b831dfa3f9a0fab23cdf9d90b34c6e3739 Mon Sep 17 00:00:00 2001 From: yourok <8yourok8@mail.ru> Date: Mon, 27 Nov 2023 19:21:45 +0300 Subject: [PATCH 03/76] update web --- server/web/pages/template/html.go | 20 +++++++++---------- .../pages/template/pages/asset-manifest.json | 14 ++++++------- server/web/pages/template/pages/index.html | 2 +- server/web/pages/template/route.go | 20 +++++++++---------- 4 files changed, 28 insertions(+), 28 deletions(-) diff --git a/server/web/pages/template/html.go b/server/web/pages/template/html.go index 3ecfb73..c212482 100644 --- a/server/web/pages/template/html.go +++ b/server/web/pages/template/html.go @@ -118,20 +118,20 @@ var Mstile150x150png []byte //go:embed pages/site.webmanifest var Sitewebmanifest []byte -//go:embed pages/static/js/2.56a11991.chunk.js -var Staticjs256a11991chunkjs []byte +//go:embed pages/static/js/2.ddcd1461.chunk.js +var Staticjs2ddcd1461chunkjs []byte -//go:embed pages/static/js/2.56a11991.chunk.js.LICENSE.txt -var Staticjs256a11991chunkjsLICENSEtxt []byte +//go:embed pages/static/js/2.ddcd1461.chunk.js.LICENSE.txt +var Staticjs2ddcd1461chunkjsLICENSEtxt []byte -//go:embed pages/static/js/2.56a11991.chunk.js.map -var Staticjs256a11991chunkjsmap []byte +//go:embed pages/static/js/2.ddcd1461.chunk.js.map +var Staticjs2ddcd1461chunkjsmap []byte -//go:embed pages/static/js/main.5883b760.chunk.js -var Staticjsmain5883b760chunkjs []byte +//go:embed pages/static/js/main.4dafb19b.chunk.js +var Staticjsmain4dafb19bchunkjs []byte -//go:embed pages/static/js/main.5883b760.chunk.js.map -var Staticjsmain5883b760chunkjsmap []byte +//go:embed pages/static/js/main.4dafb19b.chunk.js.map +var Staticjsmain4dafb19bchunkjsmap []byte //go:embed pages/static/js/runtime-main.f542387e.js var Staticjsruntimemainf542387ejs []byte diff --git a/server/web/pages/template/pages/asset-manifest.json b/server/web/pages/template/pages/asset-manifest.json index b4d22d4..8d8974f 100644 --- a/server/web/pages/template/pages/asset-manifest.json +++ b/server/web/pages/template/pages/asset-manifest.json @@ -1,17 +1,17 @@ { "files": { - "main.js": "/static/js/main.5883b760.chunk.js", - "main.js.map": "/static/js/main.5883b760.chunk.js.map", + "main.js": "/static/js/main.4dafb19b.chunk.js", + "main.js.map": "/static/js/main.4dafb19b.chunk.js.map", "runtime-main.js": "/static/js/runtime-main.f542387e.js", "runtime-main.js.map": "/static/js/runtime-main.f542387e.js.map", - "static/js/2.56a11991.chunk.js": "/static/js/2.56a11991.chunk.js", - "static/js/2.56a11991.chunk.js.map": "/static/js/2.56a11991.chunk.js.map", + "static/js/2.ddcd1461.chunk.js": "/static/js/2.ddcd1461.chunk.js", + "static/js/2.ddcd1461.chunk.js.map": "/static/js/2.ddcd1461.chunk.js.map", "index.html": "/index.html", - "static/js/2.56a11991.chunk.js.LICENSE.txt": "/static/js/2.56a11991.chunk.js.LICENSE.txt" + "static/js/2.ddcd1461.chunk.js.LICENSE.txt": "/static/js/2.ddcd1461.chunk.js.LICENSE.txt" }, "entrypoints": [ "static/js/runtime-main.f542387e.js", - "static/js/2.56a11991.chunk.js", - "static/js/main.5883b760.chunk.js" + "static/js/2.ddcd1461.chunk.js", + "static/js/main.4dafb19b.chunk.js" ] } \ No newline at end of file diff --git a/server/web/pages/template/pages/index.html b/server/web/pages/template/pages/index.html index 7e057d9..00ba2a6 100644 --- a/server/web/pages/template/pages/index.html +++ b/server/web/pages/template/pages/index.html @@ -1 +1 @@ -TorrServer MatriX
\ No newline at end of file +TorrServer MatriX
\ No newline at end of file diff --git a/server/web/pages/template/route.go b/server/web/pages/template/route.go index 1f77d16..f5916d1 100644 --- a/server/web/pages/template/route.go +++ b/server/web/pages/template/route.go @@ -161,24 +161,24 @@ func RouteWebPages(route *gin.RouterGroup) { c.Data(200, "application/manifest+json", Sitewebmanifest) }) - route.GET("/static/js/2.56a11991.chunk.js", func(c *gin.Context) { - c.Data(200, "application/javascript; charset=utf-8", Staticjs256a11991chunkjs) + route.GET("/static/js/2.ddcd1461.chunk.js", func(c *gin.Context) { + c.Data(200, "application/javascript; charset=utf-8", Staticjs2ddcd1461chunkjs) }) - route.GET("/static/js/2.56a11991.chunk.js.LICENSE.txt", func(c *gin.Context) { - c.Data(200, "text/plain; charset=utf-8", Staticjs256a11991chunkjsLICENSEtxt) + route.GET("/static/js/2.ddcd1461.chunk.js.LICENSE.txt", func(c *gin.Context) { + c.Data(200, "text/plain; charset=utf-8", Staticjs2ddcd1461chunkjsLICENSEtxt) }) - route.GET("/static/js/2.56a11991.chunk.js.map", func(c *gin.Context) { - c.Data(200, "application/json", Staticjs256a11991chunkjsmap) + route.GET("/static/js/2.ddcd1461.chunk.js.map", func(c *gin.Context) { + c.Data(200, "application/json", Staticjs2ddcd1461chunkjsmap) }) - route.GET("/static/js/main.5883b760.chunk.js", func(c *gin.Context) { - c.Data(200, "application/javascript; charset=utf-8", Staticjsmain5883b760chunkjs) + route.GET("/static/js/main.4dafb19b.chunk.js", func(c *gin.Context) { + c.Data(200, "application/javascript; charset=utf-8", Staticjsmain4dafb19bchunkjs) }) - route.GET("/static/js/main.5883b760.chunk.js.map", func(c *gin.Context) { - c.Data(200, "application/json", Staticjsmain5883b760chunkjsmap) + route.GET("/static/js/main.4dafb19b.chunk.js.map", func(c *gin.Context) { + c.Data(200, "application/json", Staticjsmain4dafb19bchunkjsmap) }) route.GET("/static/js/runtime-main.f542387e.js", func(c *gin.Context) { From 38ce5de184335b1e283e0c9aa856bd13c50c767f Mon Sep 17 00:00:00 2001 From: yourok <8yourok8@mail.ru> Date: Mon, 27 Nov 2023 19:21:53 +0300 Subject: [PATCH 04/76] MatriX.128 --- 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 dc7537a..3fac317 100644 --- a/server/version/version.go +++ b/server/version/version.go @@ -6,7 +6,7 @@ import ( // "github.com/anacrolix/torrent" ) -const Version = "MatriX.127.2" +const Version = "MatriX.128" func GetTorrentVersion() string { bi, ok := debug.ReadBuildInfo() From 8cbe03e94d2750b7e683a6bcdebb5f7268902343 Mon Sep 17 00:00:00 2001 From: YouROK <8YouROK8@mail.ru> Date: Mon, 27 Nov 2023 21:35:23 +0300 Subject: [PATCH 05/76] Revert "Update build-all.sh to fix and add some platforms" --- build-all.sh | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/build-all.sh b/build-all.sh index 2c72b3d..3312131 100755 --- a/build-all.sh +++ b/build-all.sh @@ -4,7 +4,6 @@ PLATFORMS=( 'linux/amd64' 'linux/arm64' 'linux/arm7' - 'linux/arm7h' 'linux/arm5' 'linux/386' 'windows/amd64' @@ -13,7 +12,6 @@ PLATFORMS=( 'darwin/arm64' 'freebsd/amd64' 'freebsd/arm7' - 'netbsd/arm7' 'linux/mips' 'linux/mipsle' 'linux/mips64' @@ -23,14 +21,9 @@ PLATFORMS=( type setopt >/dev/null 2>&1 set_goarm() { - if [[ "$1" =~ arm([5-7])(h)? ]]; then - if [[ "${BASH_REMATCH[2]}" == "h" ]]; then - GOARM="hardfloat" - else - GOARM="softfloat" - fi + if [[ "$1" =~ arm([5,7]) ]]; then GOARCH="arm" - GOARM="${BASH_REMATCH[1]},$GOARM" + GOARM="${BASH_REMATCH[1]}" GO_ARM="GOARM=${GOARM}" else GOARM="" @@ -125,4 +118,4 @@ if [[ "${FAILURES}" != "" ]]; then echo "" echo "failed on: ${FAILURES}" exit 1 -fi +fi \ No newline at end of file From 27222d86d14f4d6d8dac3bc3af09c6c43ce97845 Mon Sep 17 00:00:00 2001 From: nikk gitanes Date: Tue, 28 Nov 2023 00:08:09 +0300 Subject: [PATCH 06/76] Update index.jsx --- web/src/components/About/index.jsx | 1 - 1 file changed, 1 deletion(-) diff --git a/web/src/components/About/index.jsx b/web/src/components/About/index.jsx index 20fc7cf..291e149 100644 --- a/web/src/components/About/index.jsx +++ b/web/src/components/About/index.jsx @@ -88,7 +88,6 @@ export default function AboutDialog() { - From 098eabcb44d64648b7ff3582bb013f1b0101d4f0 Mon Sep 17 00:00:00 2001 From: nikk gitanes Date: Tue, 28 Nov 2023 11:52:50 +0300 Subject: [PATCH 07/76] Update go.mod --- server/go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/go.mod b/server/go.mod index 5f40be3..f8150fc 100644 --- a/server/go.mod +++ b/server/go.mod @@ -2,7 +2,7 @@ module server go 1.20 -replace github.com/anacrolix/torrent v1.53.1 => github.com/tsynik/torrent v1.2.11 +replace github.com/anacrolix/torrent v1.53.1 => github.com/tsynik/torrent v1.2.12 require ( github.com/agnivade/levenshtein v1.1.1 From 97a23caf56024e854bce3a63848d1d9d3a57c324 Mon Sep 17 00:00:00 2001 From: nikk gitanes Date: Tue, 28 Nov 2023 11:57:43 +0300 Subject: [PATCH 08/76] Update go.sum --- server/go.sum | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/go.sum b/server/go.sum index 2173d83..879b7ed 100644 --- a/server/go.sum +++ b/server/go.sum @@ -355,8 +355,8 @@ github.com/swaggo/swag v1.16.2/go.mod h1:6YzXnDcpr0767iOejs318CwYkCQqyGer6BizOg0 github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tinylib/msgp v1.1.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tsynik/torrent v1.2.11 h1:viD8HWicqyCCEyHVTM10UILmbvG1v+eZroPqFaLEbbY= -github.com/tsynik/torrent v1.2.11/go.mod h1:AjuETm1Xae+Vk31UrvrSrb29bBunwMKGZLXK6T+AgPo= +github.com/tsynik/torrent v1.2.12 h1:yXCf+gMPm6r3ZldIEtd4vP1PTYkv36XvOOSdlyXXUpk= +github.com/tsynik/torrent v1.2.12/go.mod h1:AjuETm1Xae+Vk31UrvrSrb29bBunwMKGZLXK6T+AgPo= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= From b439f21958e3b22fc544cf0541e73ec69dbd8a7c Mon Sep 17 00:00:00 2001 From: nikk Date: Sun, 3 Dec 2023 21:23:48 +0300 Subject: [PATCH 09/76] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f6d3d8e..2d9ea9f 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ curl -s https://raw.githubusercontent.com/YouROK/TorrServer/master/installTorrSe #### macOS -Run in console +Run in Terminal.app ```bash curl -s https://raw.githubusercontent.com/YouROK/TorrServer/master/installTorrServerMac.sh -o installTorrserverMac.sh && chmod 755 installTorrServerMac.sh && sudo ./installTorrServerMac.sh From 7eea61e160b9afb17002e516b2a684588bc098aa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 Dec 2023 09:32:18 +0300 Subject: [PATCH 10/76] Bump golang.org/x/crypto from 0.15.0 to 0.17.0 in /server (#332) Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.15.0 to 0.17.0. - [Commits](https://github.com/golang/crypto/compare/v0.15.0...v0.17.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- server/go.mod | 4 ++-- server/go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/server/go.mod b/server/go.mod index f8150fc..488972c 100644 --- a/server/go.mod +++ b/server/go.mod @@ -80,11 +80,11 @@ require ( github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/ugorji/go/codec v1.2.11 // indirect golang.org/x/arch v0.6.0 // indirect - golang.org/x/crypto v0.15.0 // indirect + golang.org/x/crypto v0.17.0 // indirect golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect golang.org/x/net v0.18.0 // indirect golang.org/x/sync v0.5.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/sys v0.15.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/tools v0.15.0 // indirect google.golang.org/protobuf v1.31.0 // indirect diff --git a/server/go.sum b/server/go.sum index 879b7ed..cd1badf 100644 --- a/server/go.sum +++ b/server/go.sum @@ -382,8 +382,8 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= -golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= +golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= +golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20220428152302-39d4317da171/go.mod h1:lgLbSvA5ygNOMpwM/9anMpWVlVJ7Z+cHWq/eFuinpGE= golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= @@ -453,8 +453,8 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= From cf57af2cf18adee69af184d937898470f8b89aed Mon Sep 17 00:00:00 2001 From: yourok <8yourok8@mail.ru> Date: Fri, 22 Dec 2023 17:03:45 +0300 Subject: [PATCH 11/76] add cache control --- gen_web.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gen_web.go b/gen_web.go index eb33a8d..8ae0d4a 100644 --- a/gen_web.go +++ b/gen_web.go @@ -82,11 +82,16 @@ func writeRoute(fname string, fmap map[string]string) { embedStr := `package template import ( + "crypto/md5" + "fmt" "github.com/gin-gonic/gin" ) func RouteWebPages(route *gin.RouterGroup) { route.GET("/", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Indexhtml)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "text/html; charset=utf-8", Indexhtml) }) ` @@ -108,6 +113,9 @@ func RouteWebPages(route *gin.RouterGroup) { } embedStr += ` route.GET("` + link + `", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(` + fmap[link] + `)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "` + fmime + `", ` + fmap[link] + `) }) ` From c1b67bd580b67d8cc130f539ba76f1272a0c1f4a Mon Sep 17 00:00:00 2001 From: nikk gitanes Date: Sat, 23 Dec 2023 14:11:14 +0300 Subject: [PATCH 12/76] fix uninstall on MacOS --- README.md | 2 +- installTorrServerMac.sh | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 2d9ea9f..8b7b69e 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ curl -s https://raw.githubusercontent.com/YouROK/TorrServer/master/installTorrSe Run in Terminal.app ```bash -curl -s https://raw.githubusercontent.com/YouROK/TorrServer/master/installTorrServerMac.sh -o installTorrserverMac.sh && chmod 755 installTorrServerMac.sh && sudo ./installTorrServerMac.sh +curl -s https://raw.githubusercontent.com/YouROK/TorrServer/master/installTorrServerMac.sh -o installTorrserverMac.sh && chmod 755 installTorrServerMac.sh && sudo bash ./installTorrServerMac.sh ``` Alternative install script for Intel Macs: diff --git a/installTorrServerMac.sh b/installTorrServerMac.sh index 93ccb0b..9d8f039 100755 --- a/installTorrServerMac.sh +++ b/installTorrServerMac.sh @@ -32,10 +32,10 @@ function killRunning() { } function cleanup() { - sudo rm -f /Library/LaunchAgents/*torrserver* 1>/dev/null 2>&1 - sudo rm -f /Library/LaunchDaemons/*torrserver* 1>/dev/null 2>&1 - sudo rm -f $HOME/Library/LaunchAgents/*torrserver* 1>/dev/null 2>&1 - sudo rm -f $HOME/Library/LaunchDaemons/*torrserver* 1>/dev/null 2>&1 + sudo rm -f /Library/LaunchAgents/*torrserver* + sudo rm -f /Library/LaunchDaemons/*torrserver* + sudo rm -f $HOME/Library/LaunchAgents/*torrserver* + sudo rm -f $HOME/Library/LaunchDaemons/*torrserver* killRunning } @@ -54,7 +54,6 @@ function uninstall() { echo "" } [[ $lang == "en" ]] && read -p ' Are you shure you want to delete TorrServer? (Yes/No) ' answer_del Date: Sat, 23 Dec 2023 14:47:33 +0300 Subject: [PATCH 13/76] update mac install cmd --- README.md | 2 +- installTorrServerMac.sh | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8b7b69e..e2b1fb7 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ curl -s https://raw.githubusercontent.com/YouROK/TorrServer/master/installTorrSe Run in Terminal.app ```bash -curl -s https://raw.githubusercontent.com/YouROK/TorrServer/master/installTorrServerMac.sh -o installTorrserverMac.sh && chmod 755 installTorrServerMac.sh && sudo bash ./installTorrServerMac.sh +curl -s https://raw.githubusercontent.com/YouROK/TorrServer/master/installTorrServerMac.sh -o installTorrserverMac.sh && chmod 755 installTorrServerMac.sh && bash ./installTorrServerMac.sh ``` Alternative install script for Intel Macs: diff --git a/installTorrServerMac.sh b/installTorrServerMac.sh index 9d8f039..d02c669 100755 --- a/installTorrServerMac.sh +++ b/installTorrServerMac.sh @@ -79,6 +79,7 @@ function installTorrServer() { echo " Устанавливаем TorrServer $(getLatestRelease)…" echo "" } + user=$(whoami) binName="TorrServer-darwin-${architecture}" [[ ! -d "$dirInstall" ]] && mkdir -p ${dirInstall} && chmod a+rw ${dirInstall} urlBin="https://github.com/YouROK/TorrServer/releases/download/$(getLatestRelease)/${binName}" @@ -178,6 +179,7 @@ EOF sysPath="${HOME}/Library/LaunchAgents" [[ ! -d "$sysPath" ]] && mkdir -p ${sysPath} cp "$dirInstall/$serviceName.plist" $sysPath + sudo chown $user "$sysPath/$serviceName.plist" chmod 0644 "$sysPath/$serviceName.plist" launchctl load -w "$sysPath/$serviceName.plist" 1>/dev/null 2>&1 else From 6e0568a73049d4eb9792dc82e9cd8b4ac96b29a2 Mon Sep 17 00:00:00 2001 From: nikk gitanes Date: Sun, 24 Dec 2023 16:55:39 +0300 Subject: [PATCH 14/76] modules update --- server/go.mod | 34 ++++++++--------- server/go.sum | 103 ++++++++++++++++---------------------------------- 2 files changed, 50 insertions(+), 87 deletions(-) diff --git a/server/go.mod b/server/go.mod index 488972c..c314b43 100644 --- a/server/go.mod +++ b/server/go.mod @@ -2,7 +2,7 @@ module server go 1.20 -replace github.com/anacrolix/torrent v1.53.1 => github.com/tsynik/torrent v1.2.12 +replace github.com/anacrolix/torrent v1.53.2 => github.com/tsynik/torrent v1.2.13 require ( github.com/agnivade/levenshtein v1.1.1 @@ -11,11 +11,11 @@ require ( github.com/anacrolix/log v0.14.5 github.com/anacrolix/missinggo v1.3.0 github.com/anacrolix/publicip v0.3.0 - github.com/anacrolix/torrent v1.53.1 - github.com/gin-contrib/cors v1.4.0 + github.com/anacrolix/torrent v1.53.2 + github.com/gin-contrib/cors v1.5.0 github.com/gin-contrib/location v0.0.2 github.com/gin-gonic/gin v1.9.1 - github.com/kljensen/snowball v0.8.0 + github.com/kljensen/snowball v0.9.0 github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 github.com/pkg/errors v0.9.1 github.com/swaggo/files v1.0.1 @@ -23,13 +23,13 @@ require ( github.com/swaggo/swag v1.16.2 go.etcd.io/bbolt v1.3.8 golang.org/x/image v0.14.0 - golang.org/x/time v0.4.0 + golang.org/x/time v0.5.0 gopkg.in/vansante/go-ffprobe.v2 v2.1.1 ) require ( github.com/KyleBanks/depth v1.2.1 // indirect - github.com/RoaringBitmap/roaring v1.6.0 // indirect + github.com/RoaringBitmap/roaring v1.7.0 // indirect github.com/alecthomas/atomic v0.1.0-alpha2 // indirect github.com/alexflint/go-scalar v1.2.0 // indirect github.com/anacrolix/chansync v0.3.0 // indirect @@ -44,7 +44,7 @@ require ( github.com/anacrolix/upnp v0.1.3 // indirect github.com/anacrolix/utp v0.2.0 // indirect github.com/benbjohnson/immutable v0.4.3 // indirect - github.com/bits-and-blooms/bitset v1.11.0 // indirect + github.com/bits-and-blooms/bitset v1.12.0 // indirect github.com/bradfitz/iter v0.0.0-20191230175014-e8f45d346db8 // indirect github.com/bytedance/sonic v1.10.2 // indirect github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect @@ -55,10 +55,10 @@ require ( github.com/frankban/quicktest v1.14.6 // indirect github.com/gabriel-vasile/mimetype v1.4.3 // indirect github.com/gin-contrib/sse v0.1.0 // indirect - github.com/go-openapi/jsonpointer v0.20.0 // indirect - github.com/go-openapi/jsonreference v0.20.2 // indirect - github.com/go-openapi/spec v0.20.9 // indirect - github.com/go-openapi/swag v0.22.4 // indirect + github.com/go-openapi/jsonpointer v0.20.2 // indirect + github.com/go-openapi/jsonreference v0.20.4 // indirect + github.com/go-openapi/spec v0.20.13 // indirect + github.com/go-openapi/swag v0.22.6 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect github.com/go-playground/validator/v10 v10.16.0 // indirect @@ -74,19 +74,19 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/mschoch/smat v0.2.0 // indirect - github.com/pelletier/go-toml/v2 v2.1.0 // indirect + github.com/pelletier/go-toml/v2 v2.1.1 // indirect github.com/rs/dnscache v0.0.0-20230804202142-fc85eb664529 // indirect github.com/ryszard/goskiplist v0.0.0-20150312221310-2dfbae5fcf46 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect - github.com/ugorji/go/codec v1.2.11 // indirect + github.com/ugorji/go/codec v1.2.12 // indirect golang.org/x/arch v0.6.0 // indirect golang.org/x/crypto v0.17.0 // indirect - golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect - golang.org/x/net v0.18.0 // indirect + golang.org/x/exp v0.0.0-20231219180239-dc181d75b848 // indirect + golang.org/x/net v0.19.0 // indirect golang.org/x/sync v0.5.0 // indirect golang.org/x/sys v0.15.0 // indirect golang.org/x/text v0.14.0 // indirect - golang.org/x/tools v0.15.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + golang.org/x/tools v0.16.1 // indirect + google.golang.org/protobuf v1.32.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/server/go.sum b/server/go.sum index cd1badf..7d1ad2d 100644 --- a/server/go.sum +++ b/server/go.sum @@ -9,8 +9,8 @@ github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6Xge github.com/RoaringBitmap/roaring v0.4.7/go.mod h1:8khRDP4HmeXns4xIj9oGrKSz7XTQiJx2zgh7AcNke4w= github.com/RoaringBitmap/roaring v0.4.17/go.mod h1:D3qVegWTmfCaX4Bl5CrBE9hfrSrrXIr8KVNvRsDi1NI= github.com/RoaringBitmap/roaring v0.4.23/go.mod h1:D0gp8kJQgE1A4LQ5wFLggQEyvDi06Mq5mKs52e1TwOo= -github.com/RoaringBitmap/roaring v1.6.0 h1:dc7kRiroETgJcHhWX6BerXkZz2b3JgLGg9nTURJL/og= -github.com/RoaringBitmap/roaring v1.6.0/go.mod h1:plvDsJQpxOC5bw8LRteu/MLWHsHez/3y6cubLI4/1yE= +github.com/RoaringBitmap/roaring v1.7.0 h1:OZF303tJCER1Tj3x+aArx/S5X7hrT186ri6JjrGvG68= +github.com/RoaringBitmap/roaring v1.7.0/go.mod h1:6AXUsoIEzDTFFQCe1RbGA6uFONMhvejWj5rqITANK90= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8= @@ -87,9 +87,8 @@ github.com/benbjohnson/immutable v0.4.3/go.mod h1:qJIKKSmdqz1tVzNtst1DZzvaqOU1on github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= -github.com/bits-and-blooms/bitset v1.11.0 h1:RMyy2mBBShArUAhfVRZJ2xyBO58KCBCtZFShw3umo6k= -github.com/bits-and-blooms/bitset v1.11.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= +github.com/bits-and-blooms/bitset v1.12.0 h1:U/q1fAF7xXRhFCrhROzIfffYnu+dlS38vCZtmFVPHmA= +github.com/bits-and-blooms/bitset v1.12.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/bradfitz/iter v0.0.0-20140124041915-454541ec3da2/go.mod h1:PyRFw1Lt2wKX4ZVSQ2mk+PeDa1rxyObEDlApuIsUKuo= github.com/bradfitz/iter v0.0.0-20190303215204-33e6a9893b0c/go.mod h1:PyRFw1Lt2wKX4ZVSQ2mk+PeDa1rxyObEDlApuIsUKuo= github.com/bradfitz/iter v0.0.0-20191230175014-e8f45d346db8 h1:GKTyiRCL6zVf5wWaqKnf+7Qs6GbEPfd4iMOitWzXJx8= @@ -129,15 +128,14 @@ github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7z github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/gabriel-vasile/mimetype v1.4.3 h1:in2uUcidCuFcDKtdcBxlR0rJ1+fsokWf+uqxgUFjbI0= github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcPfT7nKyLpA0lbSSk= -github.com/gin-contrib/cors v1.4.0 h1:oJ6gwtUl3lqV0WEIwM/LxPF1QZ5qe2lGWdY2+bz7y0g= -github.com/gin-contrib/cors v1.4.0/go.mod h1:bs9pNM0x/UsmHPBWT2xZz9ROh8xYjYkiURUfmBoMlcs= +github.com/gin-contrib/cors v1.5.0 h1:DgGKV7DDoOn36DFkNtbHrjoRiT5ExCe+PC9/xp7aKvk= +github.com/gin-contrib/cors v1.5.0/go.mod h1:TvU7MAZ3EwrPLI2ztzTt3tqgvBCq+wn8WpZmfADjupI= github.com/gin-contrib/gzip v0.0.6 h1:NjcunTcGAj5CO1gn4N8jHOSIeRFHIbn51z6K+xaN4d4= github.com/gin-contrib/location v0.0.2 h1:QZKh1+K/LLR4KG/61eIO3b7MLuKi8tytQhV6texLgP4= github.com/gin-contrib/location v0.0.2/go.mod h1:NGoidiRlf0BlA/VKSVp+g3cuSMeTmip/63PhEjRhUAc= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= -github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk= github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= @@ -150,37 +148,26 @@ github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2 github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= -github.com/go-openapi/jsonpointer v0.20.0 h1:ESKJdU9ASRfaPNOPRx12IUyA1vn3R9GiE3KYD14BXdQ= -github.com/go-openapi/jsonpointer v0.20.0/go.mod h1:6PGzBjjIIumbLYysB73Klnms1mwnU4G3YHOECG3CedA= -github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= -github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= -github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= -github.com/go-openapi/spec v0.20.9 h1:xnlYNQAwKd2VQRRfwTEI0DcK+2cbuvI/0c7jx3gA8/8= -github.com/go-openapi/spec v0.20.9/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA= -github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= -github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-openapi/jsonpointer v0.20.2 h1:mQc3nmndL8ZBzStEo3JYF8wzmeWffDH4VbXz58sAx6Q= +github.com/go-openapi/jsonpointer v0.20.2/go.mod h1:bHen+N0u1KEO3YlmqOjTT9Adn1RfD91Ar825/PuiRVs= +github.com/go-openapi/jsonreference v0.20.4 h1:bKlDxQxQJgwpUSgOENiMPzCTBVuc7vTdXSSgNeAhojU= +github.com/go-openapi/jsonreference v0.20.4/go.mod h1:5pZJyJP2MnYCpoeoMAql78cCHauHj0V9Lhc506VOpw4= +github.com/go-openapi/spec v0.20.13 h1:XJDIN+dLH6vqXgafnl5SUIMnzaChQ6QTo0/UPMbkIaE= +github.com/go-openapi/spec v0.20.13/go.mod h1:8EOhTpBoFiask8rrgwbLC3zmJfz4zsCUueRuPM6GNkw= +github.com/go-openapi/swag v0.22.6 h1:dnqg1XfHXL9aBxSbktBqFR5CxVyVI+7fYWhAf1JOeTw= +github.com/go-openapi/swag v0.22.6/go.mod h1:Gl91UqO+btAM0plGGxHqJcQZ1ZTy6jbmridBTsDy8A0= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= -github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= -github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= -github.com/go-playground/validator/v10 v10.10.0/go.mod h1:74x4gJWsvQexRdW8Pn3dXSGrTK4nAUsbPlLADvpJkos= github.com/go-playground/validator/v10 v10.16.0 h1:x+plE831WK4vaKHO/jpgUGsvLKIqRRkz6M78GuJAfGE= github.com/go-playground/validator/v10 v10.16.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/goccy/go-json v0.9.7/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= @@ -198,7 +185,6 @@ github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:x github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180124185431-e89373fe6b4a/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -209,7 +195,6 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -240,13 +225,12 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.2.6 h1:ndNyv040zDGIDh8thGkXYjnFtiN02M1PVVF+JE/48xc= github.com/klauspost/cpuid/v2 v2.2.6/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= -github.com/kljensen/snowball v0.8.0 h1:WU4cExxK6sNW33AiGdbn4e8RvloHrhkAssu2mVJ11kg= -github.com/kljensen/snowball v0.8.0/go.mod h1:OGo5gFWjaeXqCu4iIrMl5OYip9XUJHGOU5eSkPjVg2A= +github.com/kljensen/snowball v0.9.0 h1:OpXkQBcic6vcPG+dChOGLIA/GNuVg47tbbIJ2s7Keas= +github.com/kljensen/snowball v0.9.0/go.mod h1:OGo5gFWjaeXqCu4iIrMl5OYip9XUJHGOU5eSkPjVg2A= github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= @@ -255,16 +239,11 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= -github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= @@ -280,14 +259,12 @@ github.com/mschoch/smat v0.2.0 h1:8imxQsjDm8yFEAVBe7azKmKSgzSkZXDuKkSq9374khM= github.com/mschoch/smat v0.2.0/go.mod h1:kc9mz7DoBKqDyiRL7VZN8KvXQMWeTaVnttLRXOlotKw= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= -github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= -github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= -github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI= +github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= @@ -318,8 +295,8 @@ github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4 github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= -github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rs/dnscache v0.0.0-20230804202142-fc85eb664529 h1:18kd+8ZUlt/ARXhljq+14TwAoKa61q6dX8jtwOf6DH8= github.com/rs/dnscache v0.0.0-20230804202142-fc85eb664529/go.mod h1:qe5TWALJ8/a1Lqznoc5BDHpYX/8HU60Hm2AwRmqzxqA= github.com/ryszard/goskiplist v0.0.0-20150312221310-2dfbae5fcf46 h1:GHRpF1pTW19a8tTFrMLUcfWwyC0pnifVo2ClaLq+hP8= @@ -338,7 +315,6 @@ github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= @@ -355,16 +331,14 @@ github.com/swaggo/swag v1.16.2/go.mod h1:6YzXnDcpr0767iOejs318CwYkCQqyGer6BizOg0 github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tinylib/msgp v1.1.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tsynik/torrent v1.2.12 h1:yXCf+gMPm6r3ZldIEtd4vP1PTYkv36XvOOSdlyXXUpk= -github.com/tsynik/torrent v1.2.12/go.mod h1:AjuETm1Xae+Vk31UrvrSrb29bBunwMKGZLXK6T+AgPo= +github.com/tsynik/torrent v1.2.13 h1:PyOTz6dpzsoIT0IhiEmg6H5VD+mFqF93Q2L9iFyqPtQ= +github.com/tsynik/torrent v1.2.13/go.mod h1:NDxg14AwVqi3PWt1oStYLnyUxHYHX3qGKBAZVh/6Jk8= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= -github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= -github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= -github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= +github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE= +github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/willf/bitset v1.1.9/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= github.com/willf/bitset v1.1.10/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= @@ -380,14 +354,13 @@ golang.org/x/arch v0.6.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20220428152302-39d4317da171/go.mod h1:lgLbSvA5ygNOMpwM/9anMpWVlVJ7Z+cHWq/eFuinpGE= -golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= -golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= +golang.org/x/exp v0.0.0-20231219180239-dc181d75b848 h1:+iq7lrkxmFNBM7xx+Rae2W6uyPfhPeDWD+n+JgppptE= +golang.org/x/exp v0.0.0-20231219180239-dc181d75b848/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= golang.org/x/image v0.14.0 h1:tNgSxAFe3jC4uYqvZdTr84SZoM1KfwdC9SKIFrLjFn4= golang.org/x/image v0.14.0/go.mod h1:HUYqC05R2ZcZ3ejNQsIHQDQiwWM4JBqmm6MKANTp4LE= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -414,8 +387,8 @@ golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20220524220425-1d687d428aca/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= +golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -445,8 +418,6 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -466,8 +437,8 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/time v0.4.0 h1:Z81tqI5ddIoXDPvVQ7/7CC9TnLM7ubaFG2qXYd5BbYY= -golang.org/x/time v0.4.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -477,8 +448,8 @@ golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3 golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.8-0.20211029000441-d6a9af8af023/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.15.0 h1:zdAyfUGbYmuVokhzVmghFl2ZJh5QhcfebBgmVPFYA+8= -golang.org/x/tools v0.15.0/go.mod h1:hpksKq4dtpQWS1uQ61JkdqWM3LscIS6Slf+VVkm+wQk= +golang.org/x/tools v0.16.1 h1:TLyB3WofjdOEepBHAU20JdNC1Zbg87elYofWYAY5oZA= +golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -497,17 +468,13 @@ google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= @@ -518,11 +485,7 @@ gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= From 37438744c6da49c355da528c054ae0c9210ade29 Mon Sep 17 00:00:00 2001 From: nikk gitanes Date: Sun, 24 Dec 2023 21:46:38 +0300 Subject: [PATCH 15/76] update missinggo --- server/go.mod | 4 +- server/torr/stream.go | 2 +- server/web/api/m3u.go | 2 +- server/web/pages/template/route.go | 160 +++++++++++++++++++++++++++-- 4 files changed, 154 insertions(+), 14 deletions(-) diff --git a/server/go.mod b/server/go.mod index c314b43..a8b2299 100644 --- a/server/go.mod +++ b/server/go.mod @@ -9,7 +9,7 @@ require ( github.com/alexflint/go-arg v1.4.3 github.com/anacrolix/dms v1.6.0 github.com/anacrolix/log v0.14.5 - github.com/anacrolix/missinggo v1.3.0 + github.com/anacrolix/missinggo/v2 v2.7.3 github.com/anacrolix/publicip v0.3.0 github.com/anacrolix/torrent v1.53.2 github.com/gin-contrib/cors v1.5.0 @@ -36,8 +36,8 @@ require ( github.com/anacrolix/dht/v2 v2.21.0 // indirect github.com/anacrolix/ffprobe v1.1.0 // indirect github.com/anacrolix/generics v0.0.0-20230911070922-5dd7545c6b13 // indirect + github.com/anacrolix/missinggo v1.3.0 // indirect github.com/anacrolix/missinggo/perf v1.0.0 // indirect - github.com/anacrolix/missinggo/v2 v2.7.3 // indirect github.com/anacrolix/multiless v0.3.1-0.20221221005021-2d12701f83f7 // indirect github.com/anacrolix/stm v0.5.0 // indirect github.com/anacrolix/sync v0.5.1 // indirect diff --git a/server/torr/stream.go b/server/torr/stream.go index 665b98f..6ad9ffc 100644 --- a/server/torr/stream.go +++ b/server/torr/stream.go @@ -10,7 +10,7 @@ import ( "time" "github.com/anacrolix/dms/dlna" - "github.com/anacrolix/missinggo/httptoo" + "github.com/anacrolix/missinggo/v2/httptoo" "github.com/anacrolix/torrent" mt "server/mimetype" diff --git a/server/web/api/m3u.go b/server/web/api/m3u.go index b01ad27..726ad83 100644 --- a/server/web/api/m3u.go +++ b/server/web/api/m3u.go @@ -11,7 +11,7 @@ import ( "strings" "time" - "github.com/anacrolix/missinggo/httptoo" + "github.com/anacrolix/missinggo/v2/httptoo" sets "server/settings" "server/torr" diff --git a/server/web/pages/template/route.go b/server/web/pages/template/route.go index f5916d1..93e9503 100644 --- a/server/web/pages/template/route.go +++ b/server/web/pages/template/route.go @@ -1,191 +1,331 @@ package template import ( + "crypto/md5" + "fmt" "github.com/gin-gonic/gin" ) func RouteWebPages(route *gin.RouterGroup) { route.GET("/", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Indexhtml)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "text/html; charset=utf-8", Indexhtml) }) route.GET("/apple-splash-1125-2436.jpg", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Applesplash11252436jpg)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/jpeg", Applesplash11252436jpg) }) route.GET("/apple-splash-1136-640.jpg", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Applesplash1136640jpg)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/jpeg", Applesplash1136640jpg) }) route.GET("/apple-splash-1170-2532.jpg", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Applesplash11702532jpg)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/jpeg", Applesplash11702532jpg) }) route.GET("/apple-splash-1242-2208.jpg", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Applesplash12422208jpg)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/jpeg", Applesplash12422208jpg) }) route.GET("/apple-splash-1242-2688.jpg", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Applesplash12422688jpg)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/jpeg", Applesplash12422688jpg) }) route.GET("/apple-splash-1284-2778.jpg", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Applesplash12842778jpg)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/jpeg", Applesplash12842778jpg) }) route.GET("/apple-splash-1334-750.jpg", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Applesplash1334750jpg)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/jpeg", Applesplash1334750jpg) }) route.GET("/apple-splash-1536-2048.jpg", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Applesplash15362048jpg)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/jpeg", Applesplash15362048jpg) }) route.GET("/apple-splash-1620-2160.jpg", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Applesplash16202160jpg)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/jpeg", Applesplash16202160jpg) }) route.GET("/apple-splash-1668-2224.jpg", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Applesplash16682224jpg)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/jpeg", Applesplash16682224jpg) }) route.GET("/apple-splash-1668-2388.jpg", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Applesplash16682388jpg)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/jpeg", Applesplash16682388jpg) }) route.GET("/apple-splash-1792-828.jpg", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Applesplash1792828jpg)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/jpeg", Applesplash1792828jpg) }) route.GET("/apple-splash-2048-1536.jpg", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Applesplash20481536jpg)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/jpeg", Applesplash20481536jpg) }) route.GET("/apple-splash-2048-2732.jpg", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Applesplash20482732jpg)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/jpeg", Applesplash20482732jpg) }) route.GET("/apple-splash-2160-1620.jpg", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Applesplash21601620jpg)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/jpeg", Applesplash21601620jpg) }) route.GET("/apple-splash-2208-1242.jpg", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Applesplash22081242jpg)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/jpeg", Applesplash22081242jpg) }) route.GET("/apple-splash-2224-1668.jpg", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Applesplash22241668jpg)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/jpeg", Applesplash22241668jpg) }) route.GET("/apple-splash-2388-1668.jpg", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Applesplash23881668jpg)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/jpeg", Applesplash23881668jpg) }) route.GET("/apple-splash-2436-1125.jpg", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Applesplash24361125jpg)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/jpeg", Applesplash24361125jpg) }) route.GET("/apple-splash-2532-1170.jpg", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Applesplash25321170jpg)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/jpeg", Applesplash25321170jpg) }) route.GET("/apple-splash-2688-1242.jpg", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Applesplash26881242jpg)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/jpeg", Applesplash26881242jpg) }) route.GET("/apple-splash-2732-2048.jpg", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Applesplash27322048jpg)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/jpeg", Applesplash27322048jpg) }) route.GET("/apple-splash-2778-1284.jpg", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Applesplash27781284jpg)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/jpeg", Applesplash27781284jpg) }) route.GET("/apple-splash-640-1136.jpg", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Applesplash6401136jpg)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/jpeg", Applesplash6401136jpg) }) route.GET("/apple-splash-750-1334.jpg", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Applesplash7501334jpg)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/jpeg", Applesplash7501334jpg) }) route.GET("/apple-splash-828-1792.jpg", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Applesplash8281792jpg)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/jpeg", Applesplash8281792jpg) }) route.GET("/asset-manifest.json", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Assetmanifestjson)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "application/json", Assetmanifestjson) }) route.GET("/browserconfig.xml", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Browserconfigxml)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "application/xml; charset=utf-8", Browserconfigxml) }) route.GET("/dlnaicon-120.png", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Dlnaicon120png)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/png", Dlnaicon120png) }) route.GET("/dlnaicon-48.png", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Dlnaicon48png)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/png", Dlnaicon48png) }) route.GET("/favicon-16x16.png", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Favicon16x16png)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/png", Favicon16x16png) }) route.GET("/favicon-32x32.png", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Favicon32x32png)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/png", Favicon32x32png) }) route.GET("/favicon.ico", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Faviconico)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/vnd.microsoft.icon", Faviconico) }) route.GET("/icon.png", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Iconpng)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/png", Iconpng) }) route.GET("/index.html", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Indexhtml)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "text/html; charset=utf-8", Indexhtml) }) route.GET("/logo.png", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Logopng)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/png", Logopng) }) route.GET("/mstile-150x150.png", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Mstile150x150png)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/png", Mstile150x150png) }) route.GET("/site.webmanifest", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Sitewebmanifest)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "application/manifest+json", Sitewebmanifest) }) - route.GET("/static/js/2.ddcd1461.chunk.js", func(c *gin.Context) { - c.Data(200, "application/javascript; charset=utf-8", Staticjs2ddcd1461chunkjs) + route.GET("/static/js/2.56a11991.chunk.js", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Staticjs256a11991chunkjs)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) + c.Data(200, "application/javascript; charset=utf-8", Staticjs256a11991chunkjs) }) - route.GET("/static/js/2.ddcd1461.chunk.js.LICENSE.txt", func(c *gin.Context) { - c.Data(200, "text/plain; charset=utf-8", Staticjs2ddcd1461chunkjsLICENSEtxt) + route.GET("/static/js/2.56a11991.chunk.js.LICENSE.txt", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Staticjs256a11991chunkjsLICENSEtxt)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) + c.Data(200, "text/plain; charset=utf-8", Staticjs256a11991chunkjsLICENSEtxt) }) - route.GET("/static/js/2.ddcd1461.chunk.js.map", func(c *gin.Context) { - c.Data(200, "application/json", Staticjs2ddcd1461chunkjsmap) + route.GET("/static/js/2.56a11991.chunk.js.map", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Staticjs256a11991chunkjsmap)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) + c.Data(200, "application/json", Staticjs256a11991chunkjsmap) }) - route.GET("/static/js/main.4dafb19b.chunk.js", func(c *gin.Context) { - c.Data(200, "application/javascript; charset=utf-8", Staticjsmain4dafb19bchunkjs) + route.GET("/static/js/main.572b1543.chunk.js", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Staticjsmain572b1543chunkjs)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) + c.Data(200, "application/javascript; charset=utf-8", Staticjsmain572b1543chunkjs) }) - route.GET("/static/js/main.4dafb19b.chunk.js.map", func(c *gin.Context) { - c.Data(200, "application/json", Staticjsmain4dafb19bchunkjsmap) + route.GET("/static/js/main.572b1543.chunk.js.map", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Staticjsmain572b1543chunkjsmap)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) + c.Data(200, "application/json", Staticjsmain572b1543chunkjsmap) }) route.GET("/static/js/runtime-main.f542387e.js", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Staticjsruntimemainf542387ejs)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "application/javascript; charset=utf-8", Staticjsruntimemainf542387ejs) }) route.GET("/static/js/runtime-main.f542387e.js.map", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Staticjsruntimemainf542387ejsmap)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "application/json", Staticjsruntimemainf542387ejsmap) }) } From 3c6a9155c3275ec3bfebcce1f4185afcd41fe569 Mon Sep 17 00:00:00 2001 From: yourok <8yourok8@mail.ru> Date: Mon, 25 Dec 2023 19:28:12 +0300 Subject: [PATCH 16/76] update web --- server/web/pages/template/html.go | 8 +- .../pages/template/pages/asset-manifest.json | 6 +- server/web/pages/template/pages/index.html | 2 +- server/web/pages/template/route.go | 148 +++++++++++++++++- 4 files changed, 152 insertions(+), 12 deletions(-) diff --git a/server/web/pages/template/html.go b/server/web/pages/template/html.go index c212482..911f85c 100644 --- a/server/web/pages/template/html.go +++ b/server/web/pages/template/html.go @@ -127,11 +127,11 @@ var Staticjs2ddcd1461chunkjsLICENSEtxt []byte //go:embed pages/static/js/2.ddcd1461.chunk.js.map var Staticjs2ddcd1461chunkjsmap []byte -//go:embed pages/static/js/main.4dafb19b.chunk.js -var Staticjsmain4dafb19bchunkjs []byte +//go:embed pages/static/js/main.c9f57604.chunk.js +var Staticjsmainc9f57604chunkjs []byte -//go:embed pages/static/js/main.4dafb19b.chunk.js.map -var Staticjsmain4dafb19bchunkjsmap []byte +//go:embed pages/static/js/main.c9f57604.chunk.js.map +var Staticjsmainc9f57604chunkjsmap []byte //go:embed pages/static/js/runtime-main.f542387e.js var Staticjsruntimemainf542387ejs []byte diff --git a/server/web/pages/template/pages/asset-manifest.json b/server/web/pages/template/pages/asset-manifest.json index 8d8974f..8b5f5eb 100644 --- a/server/web/pages/template/pages/asset-manifest.json +++ b/server/web/pages/template/pages/asset-manifest.json @@ -1,7 +1,7 @@ { "files": { - "main.js": "/static/js/main.4dafb19b.chunk.js", - "main.js.map": "/static/js/main.4dafb19b.chunk.js.map", + "main.js": "/static/js/main.c9f57604.chunk.js", + "main.js.map": "/static/js/main.c9f57604.chunk.js.map", "runtime-main.js": "/static/js/runtime-main.f542387e.js", "runtime-main.js.map": "/static/js/runtime-main.f542387e.js.map", "static/js/2.ddcd1461.chunk.js": "/static/js/2.ddcd1461.chunk.js", @@ -12,6 +12,6 @@ "entrypoints": [ "static/js/runtime-main.f542387e.js", "static/js/2.ddcd1461.chunk.js", - "static/js/main.4dafb19b.chunk.js" + "static/js/main.c9f57604.chunk.js" ] } \ No newline at end of file diff --git a/server/web/pages/template/pages/index.html b/server/web/pages/template/pages/index.html index 00ba2a6..5fc101c 100644 --- a/server/web/pages/template/pages/index.html +++ b/server/web/pages/template/pages/index.html @@ -1 +1 @@ -TorrServer MatriX
\ No newline at end of file +TorrServer MatriX
\ No newline at end of file diff --git a/server/web/pages/template/route.go b/server/web/pages/template/route.go index f5916d1..9e5df69 100644 --- a/server/web/pages/template/route.go +++ b/server/web/pages/template/route.go @@ -1,191 +1,331 @@ package template import ( + "crypto/md5" + "fmt" "github.com/gin-gonic/gin" ) func RouteWebPages(route *gin.RouterGroup) { route.GET("/", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Indexhtml)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "text/html; charset=utf-8", Indexhtml) }) route.GET("/apple-splash-1125-2436.jpg", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Applesplash11252436jpg)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/jpeg", Applesplash11252436jpg) }) route.GET("/apple-splash-1136-640.jpg", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Applesplash1136640jpg)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/jpeg", Applesplash1136640jpg) }) route.GET("/apple-splash-1170-2532.jpg", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Applesplash11702532jpg)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/jpeg", Applesplash11702532jpg) }) route.GET("/apple-splash-1242-2208.jpg", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Applesplash12422208jpg)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/jpeg", Applesplash12422208jpg) }) route.GET("/apple-splash-1242-2688.jpg", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Applesplash12422688jpg)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/jpeg", Applesplash12422688jpg) }) route.GET("/apple-splash-1284-2778.jpg", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Applesplash12842778jpg)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/jpeg", Applesplash12842778jpg) }) route.GET("/apple-splash-1334-750.jpg", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Applesplash1334750jpg)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/jpeg", Applesplash1334750jpg) }) route.GET("/apple-splash-1536-2048.jpg", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Applesplash15362048jpg)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/jpeg", Applesplash15362048jpg) }) route.GET("/apple-splash-1620-2160.jpg", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Applesplash16202160jpg)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/jpeg", Applesplash16202160jpg) }) route.GET("/apple-splash-1668-2224.jpg", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Applesplash16682224jpg)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/jpeg", Applesplash16682224jpg) }) route.GET("/apple-splash-1668-2388.jpg", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Applesplash16682388jpg)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/jpeg", Applesplash16682388jpg) }) route.GET("/apple-splash-1792-828.jpg", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Applesplash1792828jpg)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/jpeg", Applesplash1792828jpg) }) route.GET("/apple-splash-2048-1536.jpg", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Applesplash20481536jpg)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/jpeg", Applesplash20481536jpg) }) route.GET("/apple-splash-2048-2732.jpg", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Applesplash20482732jpg)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/jpeg", Applesplash20482732jpg) }) route.GET("/apple-splash-2160-1620.jpg", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Applesplash21601620jpg)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/jpeg", Applesplash21601620jpg) }) route.GET("/apple-splash-2208-1242.jpg", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Applesplash22081242jpg)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/jpeg", Applesplash22081242jpg) }) route.GET("/apple-splash-2224-1668.jpg", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Applesplash22241668jpg)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/jpeg", Applesplash22241668jpg) }) route.GET("/apple-splash-2388-1668.jpg", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Applesplash23881668jpg)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/jpeg", Applesplash23881668jpg) }) route.GET("/apple-splash-2436-1125.jpg", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Applesplash24361125jpg)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/jpeg", Applesplash24361125jpg) }) route.GET("/apple-splash-2532-1170.jpg", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Applesplash25321170jpg)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/jpeg", Applesplash25321170jpg) }) route.GET("/apple-splash-2688-1242.jpg", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Applesplash26881242jpg)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/jpeg", Applesplash26881242jpg) }) route.GET("/apple-splash-2732-2048.jpg", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Applesplash27322048jpg)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/jpeg", Applesplash27322048jpg) }) route.GET("/apple-splash-2778-1284.jpg", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Applesplash27781284jpg)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/jpeg", Applesplash27781284jpg) }) route.GET("/apple-splash-640-1136.jpg", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Applesplash6401136jpg)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/jpeg", Applesplash6401136jpg) }) route.GET("/apple-splash-750-1334.jpg", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Applesplash7501334jpg)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/jpeg", Applesplash7501334jpg) }) route.GET("/apple-splash-828-1792.jpg", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Applesplash8281792jpg)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/jpeg", Applesplash8281792jpg) }) route.GET("/asset-manifest.json", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Assetmanifestjson)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "application/json", Assetmanifestjson) }) route.GET("/browserconfig.xml", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Browserconfigxml)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "application/xml; charset=utf-8", Browserconfigxml) }) route.GET("/dlnaicon-120.png", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Dlnaicon120png)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/png", Dlnaicon120png) }) route.GET("/dlnaicon-48.png", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Dlnaicon48png)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/png", Dlnaicon48png) }) route.GET("/favicon-16x16.png", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Favicon16x16png)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/png", Favicon16x16png) }) route.GET("/favicon-32x32.png", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Favicon32x32png)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/png", Favicon32x32png) }) route.GET("/favicon.ico", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Faviconico)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/vnd.microsoft.icon", Faviconico) }) route.GET("/icon.png", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Iconpng)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/png", Iconpng) }) route.GET("/index.html", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Indexhtml)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "text/html; charset=utf-8", Indexhtml) }) route.GET("/logo.png", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Logopng)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/png", Logopng) }) route.GET("/mstile-150x150.png", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Mstile150x150png)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "image/png", Mstile150x150png) }) route.GET("/site.webmanifest", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Sitewebmanifest)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "application/manifest+json", Sitewebmanifest) }) route.GET("/static/js/2.ddcd1461.chunk.js", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Staticjs2ddcd1461chunkjs)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "application/javascript; charset=utf-8", Staticjs2ddcd1461chunkjs) }) route.GET("/static/js/2.ddcd1461.chunk.js.LICENSE.txt", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Staticjs2ddcd1461chunkjsLICENSEtxt)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "text/plain; charset=utf-8", Staticjs2ddcd1461chunkjsLICENSEtxt) }) route.GET("/static/js/2.ddcd1461.chunk.js.map", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Staticjs2ddcd1461chunkjsmap)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "application/json", Staticjs2ddcd1461chunkjsmap) }) - route.GET("/static/js/main.4dafb19b.chunk.js", func(c *gin.Context) { - c.Data(200, "application/javascript; charset=utf-8", Staticjsmain4dafb19bchunkjs) + route.GET("/static/js/main.c9f57604.chunk.js", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Staticjsmainc9f57604chunkjs)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) + c.Data(200, "application/javascript; charset=utf-8", Staticjsmainc9f57604chunkjs) }) - route.GET("/static/js/main.4dafb19b.chunk.js.map", func(c *gin.Context) { - c.Data(200, "application/json", Staticjsmain4dafb19bchunkjsmap) + route.GET("/static/js/main.c9f57604.chunk.js.map", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Staticjsmainc9f57604chunkjsmap)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) + c.Data(200, "application/json", Staticjsmainc9f57604chunkjsmap) }) route.GET("/static/js/runtime-main.f542387e.js", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Staticjsruntimemainf542387ejs)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "application/javascript; charset=utf-8", Staticjsruntimemainf542387ejs) }) route.GET("/static/js/runtime-main.f542387e.js.map", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Staticjsruntimemainf542387ejsmap)) + c.Header("Cache-Control", "public, max-age=31536000") + c.Header("ETag", etag) c.Data(200, "application/json", Staticjsruntimemainf542387ejsmap) }) } From 2aaed8cdb29b1b7796d6a2cbf25b7e2c78ed10a9 Mon Sep 17 00:00:00 2001 From: nikk gitanes Date: Tue, 2 Jan 2024 13:08:36 +0300 Subject: [PATCH 17/76] modules update --- server/go.mod | 8 ++++---- server/go.sum | 17 +++++++++-------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/server/go.mod b/server/go.mod index a8b2299..c2ddaac 100644 --- a/server/go.mod +++ b/server/go.mod @@ -16,7 +16,7 @@ require ( github.com/gin-contrib/location v0.0.2 github.com/gin-gonic/gin v1.9.1 github.com/kljensen/snowball v0.9.0 - github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 + github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c github.com/pkg/errors v0.9.1 github.com/swaggo/files v1.0.1 github.com/swaggo/gin-swagger v1.6.0 @@ -44,7 +44,7 @@ require ( github.com/anacrolix/upnp v0.1.3 // indirect github.com/anacrolix/utp v0.2.0 // indirect github.com/benbjohnson/immutable v0.4.3 // indirect - github.com/bits-and-blooms/bitset v1.12.0 // indirect + github.com/bits-and-blooms/bitset v1.13.0 // indirect github.com/bradfitz/iter v0.0.0-20191230175014-e8f45d346db8 // indirect github.com/bytedance/sonic v1.10.2 // indirect github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect @@ -58,7 +58,7 @@ require ( github.com/go-openapi/jsonpointer v0.20.2 // indirect github.com/go-openapi/jsonreference v0.20.4 // indirect github.com/go-openapi/spec v0.20.13 // indirect - github.com/go-openapi/swag v0.22.6 // indirect + github.com/go-openapi/swag v0.22.7 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect github.com/go-playground/validator/v10 v10.16.0 // indirect @@ -81,7 +81,7 @@ require ( github.com/ugorji/go/codec v1.2.12 // indirect golang.org/x/arch v0.6.0 // indirect golang.org/x/crypto v0.17.0 // indirect - golang.org/x/exp v0.0.0-20231219180239-dc181d75b848 // indirect + golang.org/x/exp v0.0.0-20231226003508-02704c960a9b // indirect golang.org/x/net v0.19.0 // indirect golang.org/x/sync v0.5.0 // indirect golang.org/x/sys v0.15.0 // indirect diff --git a/server/go.sum b/server/go.sum index 7d1ad2d..b568e76 100644 --- a/server/go.sum +++ b/server/go.sum @@ -87,8 +87,9 @@ github.com/benbjohnson/immutable v0.4.3/go.mod h1:qJIKKSmdqz1tVzNtst1DZzvaqOU1on github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bits-and-blooms/bitset v1.12.0 h1:U/q1fAF7xXRhFCrhROzIfffYnu+dlS38vCZtmFVPHmA= github.com/bits-and-blooms/bitset v1.12.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= +github.com/bits-and-blooms/bitset v1.13.0 h1:bAQ9OPNFYbGHV6Nez0tmNI0RiEu7/hxlYJRUA0wFAVE= +github.com/bits-and-blooms/bitset v1.13.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/bradfitz/iter v0.0.0-20140124041915-454541ec3da2/go.mod h1:PyRFw1Lt2wKX4ZVSQ2mk+PeDa1rxyObEDlApuIsUKuo= github.com/bradfitz/iter v0.0.0-20190303215204-33e6a9893b0c/go.mod h1:PyRFw1Lt2wKX4ZVSQ2mk+PeDa1rxyObEDlApuIsUKuo= github.com/bradfitz/iter v0.0.0-20191230175014-e8f45d346db8 h1:GKTyiRCL6zVf5wWaqKnf+7Qs6GbEPfd4iMOitWzXJx8= @@ -154,8 +155,8 @@ github.com/go-openapi/jsonreference v0.20.4 h1:bKlDxQxQJgwpUSgOENiMPzCTBVuc7vTdX github.com/go-openapi/jsonreference v0.20.4/go.mod h1:5pZJyJP2MnYCpoeoMAql78cCHauHj0V9Lhc506VOpw4= github.com/go-openapi/spec v0.20.13 h1:XJDIN+dLH6vqXgafnl5SUIMnzaChQ6QTo0/UPMbkIaE= github.com/go-openapi/spec v0.20.13/go.mod h1:8EOhTpBoFiask8rrgwbLC3zmJfz4zsCUueRuPM6GNkw= -github.com/go-openapi/swag v0.22.6 h1:dnqg1XfHXL9aBxSbktBqFR5CxVyVI+7fYWhAf1JOeTw= -github.com/go-openapi/swag v0.22.6/go.mod h1:Gl91UqO+btAM0plGGxHqJcQZ1ZTy6jbmridBTsDy8A0= +github.com/go-openapi/swag v0.22.7 h1:JWrc1uc/P9cSomxfnsFSVWoE1FW6bNbrVPmpQYpCcR8= +github.com/go-openapi/swag v0.22.7/go.mod h1:Gl91UqO+btAM0plGGxHqJcQZ1ZTy6jbmridBTsDy8A0= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= @@ -267,8 +268,8 @@ github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOS github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= -github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= +github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= +github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -359,8 +360,8 @@ golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20220428152302-39d4317da171/go.mod h1:lgLbSvA5ygNOMpwM/9anMpWVlVJ7Z+cHWq/eFuinpGE= -golang.org/x/exp v0.0.0-20231219180239-dc181d75b848 h1:+iq7lrkxmFNBM7xx+Rae2W6uyPfhPeDWD+n+JgppptE= -golang.org/x/exp v0.0.0-20231219180239-dc181d75b848/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= +golang.org/x/exp v0.0.0-20231226003508-02704c960a9b h1:kLiC65FbiHWFAOu+lxwNPujcsl8VYyTYYEZnsOO1WK4= +golang.org/x/exp v0.0.0-20231226003508-02704c960a9b/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= golang.org/x/image v0.14.0 h1:tNgSxAFe3jC4uYqvZdTr84SZoM1KfwdC9SKIFrLjFn4= golang.org/x/image v0.14.0/go.mod h1:HUYqC05R2ZcZ3ejNQsIHQDQiwWM4JBqmm6MKANTp4LE= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -417,11 +418,11 @@ golang.org/x/sys v0.0.0-20200413165638-669c56c373c4/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= From ba3b8f0f025d7d001ed0d976e97007190cea934b Mon Sep 17 00:00:00 2001 From: nikk gitanes Date: Sat, 6 Jan 2024 02:54:39 +0300 Subject: [PATCH 18/76] don't allow remove torrents in readOnly DB mode --- server/torr/apihelper.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/torr/apihelper.go b/server/torr/apihelper.go index 1384ec0..247adc7 100644 --- a/server/torr/apihelper.go +++ b/server/torr/apihelper.go @@ -139,6 +139,9 @@ func SetTorrent(hashHex, title, poster, data string) *Torrent { } func RemTorrent(hashHex string) { + if sets.ReadOnly { + return + } hash := metainfo.NewHashFromHex(hashHex) if sets.BTsets.UseDisk && hashHex != "" && hashHex != "/" { name := filepath.Join(sets.BTsets.TorrentsSavePath, hashHex) From a7b145bf17b5c0a768b1dd6267961024aae4417c Mon Sep 17 00:00:00 2001 From: nikk gitanes Date: Sat, 6 Jan 2024 02:57:18 +0300 Subject: [PATCH 19/76] mod update --- server/go.mod | 10 +++++----- server/go.sum | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/server/go.mod b/server/go.mod index c2ddaac..1072be4 100644 --- a/server/go.mod +++ b/server/go.mod @@ -22,7 +22,7 @@ require ( github.com/swaggo/gin-swagger v1.6.0 github.com/swaggo/swag v1.16.2 go.etcd.io/bbolt v1.3.8 - golang.org/x/image v0.14.0 + golang.org/x/image v0.15.0 golang.org/x/time v0.5.0 gopkg.in/vansante/go-ffprobe.v2 v2.1.1 ) @@ -79,12 +79,12 @@ require ( github.com/ryszard/goskiplist v0.0.0-20150312221310-2dfbae5fcf46 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/ugorji/go/codec v1.2.12 // indirect - golang.org/x/arch v0.6.0 // indirect + golang.org/x/arch v0.7.0 // indirect golang.org/x/crypto v0.17.0 // indirect - golang.org/x/exp v0.0.0-20231226003508-02704c960a9b // indirect + golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc // indirect golang.org/x/net v0.19.0 // indirect - golang.org/x/sync v0.5.0 // indirect - golang.org/x/sys v0.15.0 // indirect + golang.org/x/sync v0.6.0 // indirect + golang.org/x/sys v0.16.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/tools v0.16.1 // indirect google.golang.org/protobuf v1.32.0 // indirect diff --git a/server/go.sum b/server/go.sum index b568e76..04e55e9 100644 --- a/server/go.sum +++ b/server/go.sum @@ -350,8 +350,8 @@ go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= -golang.org/x/arch v0.6.0 h1:S0JTfE48HbRj80+4tbvZDYsJ3tGv6BUU3XxyZ7CirAc= -golang.org/x/arch v0.6.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys= +golang.org/x/arch v0.7.0 h1:pskyeJh/3AmoQ8CPE95vxHLqp1G1GfGNXTmcl9NEKTc= +golang.org/x/arch v0.7.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -360,10 +360,10 @@ golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20220428152302-39d4317da171/go.mod h1:lgLbSvA5ygNOMpwM/9anMpWVlVJ7Z+cHWq/eFuinpGE= -golang.org/x/exp v0.0.0-20231226003508-02704c960a9b h1:kLiC65FbiHWFAOu+lxwNPujcsl8VYyTYYEZnsOO1WK4= -golang.org/x/exp v0.0.0-20231226003508-02704c960a9b/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= -golang.org/x/image v0.14.0 h1:tNgSxAFe3jC4uYqvZdTr84SZoM1KfwdC9SKIFrLjFn4= -golang.org/x/image v0.14.0/go.mod h1:HUYqC05R2ZcZ3ejNQsIHQDQiwWM4JBqmm6MKANTp4LE= +golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc h1:ao2WRsKSzW6KuUY9IWPwWahcHCgR0s52IfwutMfEbdM= +golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= +golang.org/x/image v0.15.0 h1:kOELfmgrmJlw4Cdb7g/QGuB3CvDrXbqEIww/pNtNBm8= +golang.org/x/image v0.15.0/go.mod h1:HUYqC05R2ZcZ3ejNQsIHQDQiwWM4JBqmm6MKANTp4LE= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -400,8 +400,8 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= -golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= +golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -425,8 +425,8 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= -golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= +golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= From 068de3c56557045472860e74a18d74ba238a53b9 Mon Sep 17 00:00:00 2001 From: yourok <8yourok8@mail.ru> Date: Mon, 8 Jan 2024 18:24:48 +0300 Subject: [PATCH 20/76] disable close torrent on reading it --- server/torr/apihelper.go | 3 --- server/torr/torrent.go | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/torr/apihelper.go b/server/torr/apihelper.go index 247adc7..1384ec0 100644 --- a/server/torr/apihelper.go +++ b/server/torr/apihelper.go @@ -139,9 +139,6 @@ func SetTorrent(hashHex, title, poster, data string) *Torrent { } func RemTorrent(hashHex string) { - if sets.ReadOnly { - return - } hash := metainfo.NewHashFromHex(hashHex) if sets.BTsets.UseDisk && hashHex != "" && hashHex != "/" { name := filepath.Join(sets.BTsets.TorrentsSavePath, hashHex) diff --git a/server/torr/torrent.go b/server/torr/torrent.go index 694602e..a67a87d 100644 --- a/server/torr/torrent.go +++ b/server/torr/torrent.go @@ -266,6 +266,9 @@ func (t *Torrent) drop() { } func (t *Torrent) Close() { + if t.cache != nil && t.cache.Readers() > 0 { + return + } t.Stat = state.TorrentClosed t.bt.mu.Lock() From d4bcf8169058b949b83291fe6e4bca5a02daad60 Mon Sep 17 00:00:00 2001 From: yourok <8yourok8@mail.ru> Date: Mon, 8 Jan 2024 18:58:37 +0300 Subject: [PATCH 21/76] change icon --- web/src/components/TorrentList/AddFirstTorrent.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/web/src/components/TorrentList/AddFirstTorrent.jsx b/web/src/components/TorrentList/AddFirstTorrent.jsx index 68f509c..a5b6550 100644 --- a/web/src/components/TorrentList/AddFirstTorrent.jsx +++ b/web/src/components/TorrentList/AddFirstTorrent.jsx @@ -16,10 +16,11 @@ export default function AddFirstTorrent() { <> handleClickOpen(true)} isButton>
{t('NoTorrentsAdded')}
From 6ac8e1b84e67581f900fc8277070c5a5b686ab62 Mon Sep 17 00:00:00 2001 From: yourok <8yourok8@mail.ru> Date: Mon, 8 Jan 2024 19:16:00 +0300 Subject: [PATCH 22/76] fix remove cache on disk on reading torrent --- server/torr/apihelper.go | 21 +++++++++++---------- server/torr/btserver.go | 5 +++-- server/torr/torrent.go | 5 +++-- 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/server/torr/apihelper.go b/server/torr/apihelper.go index 1384ec0..87e5fcb 100644 --- a/server/torr/apihelper.go +++ b/server/torr/apihelper.go @@ -140,18 +140,19 @@ func SetTorrent(hashHex, title, poster, data string) *Torrent { func RemTorrent(hashHex string) { hash := metainfo.NewHashFromHex(hashHex) - if sets.BTsets.UseDisk && hashHex != "" && hashHex != "/" { - name := filepath.Join(sets.BTsets.TorrentsSavePath, hashHex) - ff, _ := os.ReadDir(name) - for _, f := range ff { - os.Remove(filepath.Join(name, f.Name())) - } - err := os.Remove(name) - if err != nil { - log.TLogln("Error remove cache:", err) + if bts.RemoveTorrent(hash) { + if sets.BTsets.UseDisk && hashHex != "" && hashHex != "/" { + name := filepath.Join(sets.BTsets.TorrentsSavePath, hashHex) + ff, _ := os.ReadDir(name) + for _, f := range ff { + os.Remove(filepath.Join(name, f.Name())) + } + err := os.Remove(name) + if err != nil { + log.TLogln("Error remove cache:", err) + } } } - bts.RemoveTorrent(hash) RemTorrentDB(hash) } diff --git a/server/torr/btserver.go b/server/torr/btserver.go index 0878695..1c73417 100644 --- a/server/torr/btserver.go +++ b/server/torr/btserver.go @@ -200,10 +200,11 @@ func (bt *BTServer) ListTorrents() map[metainfo.Hash]*Torrent { return list } -func (bt *BTServer) RemoveTorrent(hash torrent.InfoHash) { +func (bt *BTServer) RemoveTorrent(hash torrent.InfoHash) bool { if torr, ok := bt.torrents[hash]; ok { - torr.Close() + return torr.Close() } + return false } func isPrivateIP(ip net.IP) bool { diff --git a/server/torr/torrent.go b/server/torr/torrent.go index a67a87d..6d95a20 100644 --- a/server/torr/torrent.go +++ b/server/torr/torrent.go @@ -265,9 +265,9 @@ func (t *Torrent) drop() { } } -func (t *Torrent) Close() { +func (t *Torrent) Close() bool { if t.cache != nil && t.cache.Readers() > 0 { - return + return false } t.Stat = state.TorrentClosed @@ -276,6 +276,7 @@ func (t *Torrent) Close() { t.bt.mu.Unlock() t.drop() + return true } func (t *Torrent) Status() *state.TorrentStatus { From ed8620fe479dbe8ba7aadcec02eddde1c46454f7 Mon Sep 17 00:00:00 2001 From: yourok <8yourok8@mail.ru> Date: Mon, 8 Jan 2024 19:19:14 +0300 Subject: [PATCH 23/76] revert ro on remove --- server/torr/apihelper.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/torr/apihelper.go b/server/torr/apihelper.go index 87e5fcb..1eba48a 100644 --- a/server/torr/apihelper.go +++ b/server/torr/apihelper.go @@ -139,6 +139,9 @@ func SetTorrent(hashHex, title, poster, data string) *Torrent { } func RemTorrent(hashHex string) { + if sets.ReadOnly { + return + } hash := metainfo.NewHashFromHex(hashHex) if bts.RemoveTorrent(hash) { if sets.BTsets.UseDisk && hashHex != "" && hashHex != "/" { From 8aec83c485d017fba00fb2e7874f8fe9fc0856fc Mon Sep 17 00:00:00 2001 From: yourok <8yourok8@mail.ru> Date: Sat, 13 Jan 2024 12:02:27 +0300 Subject: [PATCH 24/76] add docker file --- docker/Dockerfile | 6 ++++ docker/README.md | 86 +++++++++++++++++++++++++++++++++++++++++++++++ docker/start.sh | 61 +++++++++++++++++++++++++++++++++ 3 files changed, 153 insertions(+) create mode 100644 docker/Dockerfile create mode 100644 docker/README.md create mode 100755 docker/start.sh diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 0000000..d5edf75 --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,6 @@ +FROM alpine +LABEL maintainer "yourok" +RUN apk add --no-cache wget +COPY start.sh /start.sh +ENTRYPOINT /start.sh + diff --git a/docker/README.md b/docker/README.md new file mode 100644 index 0000000..4193afb --- /dev/null +++ b/docker/README.md @@ -0,0 +1,86 @@ +## TorrServer + +After starting the container, the latest server is downloaded from GitHub.\ +If you need update server to latest, repull container + +Source code: https://github.com/YouROK/TorrServer + +-------- + +Author of docker file and scripts [butaford (aka Pavel)](https://github.com/butaford) + +-------- + +### Support platforms +* TorrServer-linux-386 +* TorrServer-linux-amd64 +* TorrServer-linux-arm5 +* TorrServer-linux-arm64 +* TorrServer-linux-arm7 + +-------- +### Support env +TS_PORT: TS web port\ +TS_PATH: config path and other\ +TS_LOGPATHDIR: log path\ +TS_LOGFILE: log file name\ +TS_WEBLOGFILE: web log file name\ +TS_RDB: read only config\ +TS_HTTPAUTH: auth for server, accs.db should be in the TS_PATH\ +TS_DONTKILL: don't kill server by signal\ +TS_TORRENTSDIR: torrents listen directory\ +TS_TORRENTADDR: torrents peer listen port\ +TS_PUBIPV4: the IP addresses as our peers should see them. May differ from the local interfaces due to NAT or other network configurations\ +TS_PUBIPV6: the IP addresses as our peers should see them. May differ from the local interfaces due to NAT or other network configurations\ +TS_SEARCHWA: disable auth for search torrents if auth is enable + +-------- +### Docker run example +``` +docker run -p 8090:8090 \ +-e TS_PORT=8090 \ +-e TS_PATH="/opt/torrserver/config" \ +-e TS_LOGPATHDIR="/opt/torrserver/log/" \ +-e TS_LOGFILE="ts.log" \ +-e TS_WEBLOGFILE="tsweb.log" \ +-e TS_RDB=true \ +-e TS_HTTPAUTH=true \ +-e TS_DONTKILL=true \ +-e TS_TORRENTSDIR="/opt/torrserver/torrents" \ +-e TS_TORRENTADDR=32000 \ +-e TS_PUBIPV4=publicIP \ +-e TS_PUBIPV6=publicIP \ +-e TS_SEARCHWA=true \ +yourok/torrserver +``` + +-------- +### Docker compose example +``` +version: '3.6' +services: + torrserver: + container_name: torrserver + image: yourok/torrserver + restart: unless-stopped + environment: + - TS_PORT=8090 + - TS_PATH=/opt/torrserver/config + - TS_LOGPATHDIR=/opt/torrserver/log + - TS_LOGFILE=ts.log + - TS_WEBLOGFILE=tsweb.log + - TS_RDB=false + - TS_HTTPAUTH=true + - TS_DONTKILL=true + - TS_TORRENTSDIR=/opt/torrserver/torrents + - TS_TORRENTADDR=:32000 + - TS_PUBIPV4=publicIP + - TS_PUBIPV6=publicIP + - TS_SEARCHWA=true + ports: + - 8090:8090 + volumes: + - ./torrserver/config:/opt/torrserver/config + - ./torrserver/log:/opt/torrserver/log + - ./torrserver/torrents:/opt/torrserver/torrents +``` diff --git a/docker/start.sh b/docker/start.sh new file mode 100755 index 0000000..6524ac8 --- /dev/null +++ b/docker/start.sh @@ -0,0 +1,61 @@ +#!/bin/sh + +case $(uname -m) in + i386) architecture="386" ;; + i686) architecture="386" ;; + x86_64) architecture="amd64" ;; + aarch64) architecture="arm64" ;; + armv7|armv7l) architecture="arm7" ;; + armv6|armv6l) architecture="arm5" ;; +# armv5|armv5l) architecture="arm5" ;; + *) echo "Unsupported Arch. Can't continue."; exit 1 ;; +esac + +binName="TorrServer-linux-${architecture}" + +mkdir -p /opt/torrserver +cd /opt/torrserver + +wget "https://github.com/YouROK/TorrServer/releases/latest/download/$binName" +chmod +x $binName + +FLAGS="" + +echo "TS_PORT:$TS_PORT" +echo "TS_PATH:$TS_PATH" +echo "TS_LOGPATHDIR:$TS_LOGPATHDIR" +echo "TS_LOGFILE:$TS_LOGPATHDIR/$TS_LOGFILE" +echo "TS_WEBLOGFILE:$TS_LOGPATHDIR/$TS_WEBLOGFILE" +echo "TS_RDB:$TS_RDB" +echo "TS_HTTPAUTH:$TS_HTTPAUTH" +echo "TS_DONTKILL:$TS_DONTKILL" +echo "TS_TORRENTSDIR:$TS_TORRENTSDIR" +echo "TS_TORRENTADDR:$TS_TORRENTADDR" +echo "TS_PUBIPV4:$TS_PUBIPV4" +echo "TS_PUBIPV6:$TS_PUBIPV6" +echo "TS_SEARCHWA:$TS_SEARCHWA" + +#sets start flags +[ ! -z "$TS_PORT" ] && FLAGS="${FLAGS} --port ${TS_PORT}" +[ ! -z "$TS_PATH" ] && FLAGS="${FLAGS} --path ${TS_PATH}" +[ ! -z "$TS_LOGFILE" ] && FLAGS="${FLAGS} --logpath $TS_LOGPATHDIR/${TS_LOGFILE}" +[ ! -z "$TS_WEBLOGFILE" ] && FLAGS="${FLAGS} --weblogpath $TS_LOGPATHDIR/${TS_WEBLOGFILE}" +[ ! -z "$TS_RDB" ] && FLAGS="${FLAGS} --rdb" +[ ! -z "$TS_HTTPAUTH" ] && FLAGS="${FLAGS} --httpauth" +[ ! -z "$TS_DONTKILL" ] && FLAGS="${FLAGS} --dontkill" +[ ! -z "$TS_TORRENTSDIR" ] && FLAGS="${FLAGS} --torrentsdir ${TS_TORRENTSDIR}" +[ ! -z "$TS_TORRENTADDR" ] && FLAGS="${FLAGS} --torrentaddr ${TS_TORRENTADDR}" +[ ! -z "$TS_PUBIPV4" ] && FLAGS="${FLAGS} --pubipv4 ${TS_PUBIPV4}" +[ ! -z "$TS_PUBIPV6" ] && FLAGS="${FLAGS} --pubipv6 ${TS_PUBIPV6}" +[ ! -z "$TS_SEARCHWA" ] && FLAGS="${FLAGS} --searchwa" + +#make directories +[ ! -z "$TS_PATH" ] && [ ! -d "$TS_PATH" ] && mkdir -p $TS_PATH +[ ! -z "$TS_LOGPATHDIR" ] && [ ! -d "$TS_LOGPATHDIR" ] && mkdir -p $TS_LOGPATHDIR +[ ! -z "$TS_TORRENTSDIR" ] && [ ! -d "$TS_TORRENTSDIR" ] && mkdir $TS_TORRENTSDIR + +echo "Running with: ${FLAGS}" +export GODEBUG=madvdontneed=1 + +/opt/torrserver/${binName} ${FLAGS} + From 9bb2426751c734018651ec1cdd5c0a2318cb05a8 Mon Sep 17 00:00:00 2001 From: yourok <8yourok8@mail.ru> Date: Sat, 13 Jan 2024 12:02:41 +0300 Subject: [PATCH 25/76] update --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e2b1fb7..6aa993b 100644 --- a/README.md +++ b/README.md @@ -245,9 +245,8 @@ local:127.0.0.1 - [QIWI](https://qiwi.com/n/YOUROK85) - [YooMoney](https://yoomoney.ru/to/410013733697114/200) -- [PayPal](https://www.paypal.me/yourok) - SberBank Card: **5484 4000 2285 7839** -- YooMoney Card: **4048 4150 1812 8179** + ## Thanks to everyone who tested and helped @@ -264,4 +263,5 @@ local:127.0.0.1 - [lieranderl (Evgeni)](https://github.com/lieranderl) - [cocool97](https://github.com/cocool97) - [shadeov](https://github.com/shadeov) +- [butaford](https://github.com/butaford) Pavel for make docker file and scripts - and others From e4c09c5b65bb658a9e1bf18cb5cc1e0486a51daa Mon Sep 17 00:00:00 2001 From: yourok <8yourok8@mail.ru> Date: Sat, 13 Jan 2024 12:04:46 +0300 Subject: [PATCH 26/76] update --- docker/start.sh | 45 +++++++++++++++++---------------------------- 1 file changed, 17 insertions(+), 28 deletions(-) mode change 100755 => 100644 docker/start.sh diff --git a/docker/start.sh b/docker/start.sh old mode 100755 new mode 100644 index 6524ac8..c15a220 --- a/docker/start.sh +++ b/docker/start.sh @@ -16,38 +16,27 @@ binName="TorrServer-linux-${architecture}" mkdir -p /opt/torrserver cd /opt/torrserver -wget "https://github.com/YouROK/TorrServer/releases/latest/download/$binName" +rm -f ${binName}* + +wget -O $binName "https://github.com/YouROK/TorrServer/releases/latest/download/$binName" chmod +x $binName FLAGS="" -echo "TS_PORT:$TS_PORT" -echo "TS_PATH:$TS_PATH" -echo "TS_LOGPATHDIR:$TS_LOGPATHDIR" -echo "TS_LOGFILE:$TS_LOGPATHDIR/$TS_LOGFILE" -echo "TS_WEBLOGFILE:$TS_LOGPATHDIR/$TS_WEBLOGFILE" -echo "TS_RDB:$TS_RDB" -echo "TS_HTTPAUTH:$TS_HTTPAUTH" -echo "TS_DONTKILL:$TS_DONTKILL" -echo "TS_TORRENTSDIR:$TS_TORRENTSDIR" -echo "TS_TORRENTADDR:$TS_TORRENTADDR" -echo "TS_PUBIPV4:$TS_PUBIPV4" -echo "TS_PUBIPV6:$TS_PUBIPV6" -echo "TS_SEARCHWA:$TS_SEARCHWA" - #sets start flags -[ ! -z "$TS_PORT" ] && FLAGS="${FLAGS} --port ${TS_PORT}" -[ ! -z "$TS_PATH" ] && FLAGS="${FLAGS} --path ${TS_PATH}" -[ ! -z "$TS_LOGFILE" ] && FLAGS="${FLAGS} --logpath $TS_LOGPATHDIR/${TS_LOGFILE}" -[ ! -z "$TS_WEBLOGFILE" ] && FLAGS="${FLAGS} --weblogpath $TS_LOGPATHDIR/${TS_WEBLOGFILE}" -[ ! -z "$TS_RDB" ] && FLAGS="${FLAGS} --rdb" -[ ! -z "$TS_HTTPAUTH" ] && FLAGS="${FLAGS} --httpauth" -[ ! -z "$TS_DONTKILL" ] && FLAGS="${FLAGS} --dontkill" -[ ! -z "$TS_TORRENTSDIR" ] && FLAGS="${FLAGS} --torrentsdir ${TS_TORRENTSDIR}" -[ ! -z "$TS_TORRENTADDR" ] && FLAGS="${FLAGS} --torrentaddr ${TS_TORRENTADDR}" -[ ! -z "$TS_PUBIPV4" ] && FLAGS="${FLAGS} --pubipv4 ${TS_PUBIPV4}" -[ ! -z "$TS_PUBIPV6" ] && FLAGS="${FLAGS} --pubipv6 ${TS_PUBIPV6}" -[ ! -z "$TS_SEARCHWA" ] && FLAGS="${FLAGS} --searchwa" +[ ! -z "$TS_PORT" ] && echo "TS_PORT: $TS_PORT" && FLAGS="${FLAGS} --port ${TS_PORT}" +[ ! -z "$TS_PATH" ] && echo "TS_PATH: $TS_PATH" && FLAGS="${FLAGS} --path ${TS_PATH}" +[ ! -z "$TS_LOGPATHDIR" ] && echo "TS_LOGPATHDIR: $TS_LOGPATHDIR" && FLAGS="${FLAGS}" +[ ! -z "$TS_LOGFILE" ] && echo "TS_LOGFILE: $TS_LOGPATHDIR/$TS_LOGFILE" && FLAGS="${FLAGS} --logpath $TS_LOGPATHDIR/${TS_LOGFILE}" +[ ! -z "$TS_WEBLOGFILE" ] && echo "TS_WEBLOGFILE: $TS_LOGPATHDIR/$TS_WEBLOGFILE" && FLAGS="${FLAGS} --weblogpath $TS_LOGPATHDIR/${TS_WEBLOGFILE}" +[ ! -z "$TS_RDB" ] | [ "$TS_RDB" = "true" ] && echo "TS_RDB: $TS_RDB" && FLAGS="${FLAGS} --rdb" +[ ! -z "$TS_HTTPAUTH" ] && echo "TS_HTTPAUTH: $TS_HTTPAUTH" && FLAGS="${FLAGS} --httpauth" +[ ! -z "$TS_DONTKILL" ] && echo "TS_DONTKILL: $TS_DONTKILL" && FLAGS="${FLAGS} --dontkill" +[ ! -z "$TS_TORRENTSDIR" ] && echo "TS_TORRENTSDIR: $TS_TORRENTSDIR" && FLAGS="${FLAGS} --torrentsdir ${TS_TORRENTSDIR}" +[ ! -z "$TS_TORRENTADDR" ] && echo "TS_TORRENTADDR: $TS_TORRENTADDR" && FLAGS="${FLAGS} --torrentaddr ${TS_TORRENTADDR}" +[ ! -z "$TS_PUBIPV4" ] && echo "TS_PUBIPV4: $TS_PUBIPV4" && FLAGS="${FLAGS} --pubipv4 ${TS_PUBIPV4}" +[ ! -z "$TS_PUBIPV6" ] && echo "TS_PUBIPV6: $TS_PUBIPV6" && FLAGS="${FLAGS} --pubipv6 ${TS_PUBIPV6}" +[ ! -z "$TS_SEARCHWA" ]&& echo "TS_SEARCHWA: $TS_SEARCHWA" && FLAGS="${FLAGS} --searchwa" #make directories [ ! -z "$TS_PATH" ] && [ ! -d "$TS_PATH" ] && mkdir -p $TS_PATH @@ -58,4 +47,4 @@ echo "Running with: ${FLAGS}" export GODEBUG=madvdontneed=1 /opt/torrserver/${binName} ${FLAGS} - +rm -f /opt/torrserver/${binName} From 681fc5c343f6d2782dee0c015d2ba2dfd210f88f Mon Sep 17 00:00:00 2001 From: yourok <8yourok8@mail.ru> Date: Sat, 13 Jan 2024 12:05:32 +0300 Subject: [PATCH 27/76] update --- docker/start.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/docker/start.sh b/docker/start.sh index c15a220..4a1c7a3 100644 --- a/docker/start.sh +++ b/docker/start.sh @@ -47,4 +47,3 @@ echo "Running with: ${FLAGS}" export GODEBUG=madvdontneed=1 /opt/torrserver/${binName} ${FLAGS} -rm -f /opt/torrserver/${binName} From 5fedc85ababec0a3bb5ba69659b91a5141b1c7b3 Mon Sep 17 00:00:00 2001 From: nikk gitanes Date: Tue, 23 Jan 2024 05:01:24 +0300 Subject: [PATCH 28/76] update go version, libs and readme --- README.md | 26 +++++++++++++------------- server/go.mod | 20 ++++++++++---------- server/go.sum | 32 ++++++++++++++++---------------- 3 files changed, 39 insertions(+), 39 deletions(-) diff --git a/README.md b/README.md index 6aa993b..00001bb 100644 --- a/README.md +++ b/README.md @@ -171,7 +171,7 @@ Synology NAS packages repo source: https://grigi.lt #### Server -- Install [Golang](https://golang.org/doc/install) 1.18+ +- Install [Golang](https://golang.org/doc/install) 1.20+ - Go to the TorrServer source directory - Run build script under linux or macOS `build-all.sh` @@ -250,18 +250,18 @@ local:127.0.0.1 ## Thanks to everyone who tested and helped -- [anacrolix (Matt Joiner)](https://github.com/anacrolix) +- [anacrolix](https://github.com/anacrolix) Matt Joiner - [tsynik](https://github.com/tsynik) -- [dancheskus](https://github.com/dancheskus) -- [kolsys](https://github.com/kolsys) -- [vladlenas](https://github.com/vladlenas) -- [Nemiroff (Tw1cker)](https://github.com/Nemiroff) -- [spawnlmg (SpAwN_LMG)](https://github.com/spawnlmg) -- [TopperBG (Dimitar Maznekov)](https://github.com/TopperBG) -- [FaintGhost (Zhang Yaowei)](https://github.com/FaintGhost) -- [Anton111111 (Anton Potekhin)](https://github.com/Anton111111) -- [lieranderl (Evgeni)](https://github.com/lieranderl) -- [cocool97](https://github.com/cocool97) -- [shadeov](https://github.com/shadeov) +- [dancheskus](https://github.com/dancheskus) for web GUI +- [kolsys](https://github.com/kolsys) for MSX support code +- [vladlenas](https://github.com/vladlenas) for NAS builds +- [Nemiroff](https://github.com/Nemiroff) Tw1cker +- [spawnlmg](https://github.com/spawnlmg) SpAwN_LMG for testing +- [TopperBG](https://github.com/TopperBG) Dimitar Maznekov for Bulgarian translation +- [FaintGhost](https://github.com/FaintGhost) Zhang Yaowei for Simplified Chinese translation +- [Anton111111](https://github.com/Anton111111) Anton Potekhin for sleep on Windows fixes +- [lieranderl](https://github.com/lieranderl) Evgeni for SSL support code +- [cocool97](https://github.com/cocool97) for openapi API documentation +- [shadeov](https://github.com/shadeov) for README improvements - [butaford](https://github.com/butaford) Pavel for make docker file and scripts - and others diff --git a/server/go.mod b/server/go.mod index 1072be4..a35e8db 100644 --- a/server/go.mod +++ b/server/go.mod @@ -2,7 +2,7 @@ module server go 1.20 -replace github.com/anacrolix/torrent v1.53.2 => github.com/tsynik/torrent v1.2.13 +replace github.com/anacrolix/torrent v1.53.3 => github.com/tsynik/torrent v1.2.13 require ( github.com/agnivade/levenshtein v1.1.1 @@ -11,7 +11,7 @@ require ( github.com/anacrolix/log v0.14.5 github.com/anacrolix/missinggo/v2 v2.7.3 github.com/anacrolix/publicip v0.3.0 - github.com/anacrolix/torrent v1.53.2 + github.com/anacrolix/torrent v1.53.3 github.com/gin-contrib/cors v1.5.0 github.com/gin-contrib/location v0.0.2 github.com/gin-gonic/gin v1.9.1 @@ -32,7 +32,7 @@ require ( github.com/RoaringBitmap/roaring v1.7.0 // indirect github.com/alecthomas/atomic v0.1.0-alpha2 // indirect github.com/alexflint/go-scalar v1.2.0 // indirect - github.com/anacrolix/chansync v0.3.0 // indirect + github.com/anacrolix/chansync v0.4.0 // indirect github.com/anacrolix/dht/v2 v2.21.0 // indirect github.com/anacrolix/ffprobe v1.1.0 // indirect github.com/anacrolix/generics v0.0.0-20230911070922-5dd7545c6b13 // indirect @@ -57,11 +57,11 @@ require ( github.com/gin-contrib/sse v0.1.0 // indirect github.com/go-openapi/jsonpointer v0.20.2 // indirect github.com/go-openapi/jsonreference v0.20.4 // indirect - github.com/go-openapi/spec v0.20.13 // indirect - github.com/go-openapi/swag v0.22.7 // indirect + github.com/go-openapi/spec v0.20.14 // indirect + github.com/go-openapi/swag v0.22.8 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect - github.com/go-playground/validator/v10 v10.16.0 // indirect + github.com/go-playground/validator/v10 v10.17.0 // indirect github.com/goccy/go-json v0.10.2 // indirect github.com/google/btree v1.1.2 // indirect github.com/huandu/xstrings v1.4.0 // indirect @@ -80,13 +80,13 @@ require ( github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/ugorji/go/codec v1.2.12 // indirect golang.org/x/arch v0.7.0 // indirect - golang.org/x/crypto v0.17.0 // indirect - golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc // indirect - golang.org/x/net v0.19.0 // indirect + golang.org/x/crypto v0.18.0 // indirect + golang.org/x/exp v0.0.0-20240119083558-1b970713d09a // indirect + golang.org/x/net v0.20.0 // indirect golang.org/x/sync v0.6.0 // indirect golang.org/x/sys v0.16.0 // indirect golang.org/x/text v0.14.0 // indirect - golang.org/x/tools v0.16.1 // indirect + golang.org/x/tools v0.17.0 // indirect google.golang.org/protobuf v1.32.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/server/go.sum b/server/go.sum index 04e55e9..fbcde88 100644 --- a/server/go.sum +++ b/server/go.sum @@ -28,8 +28,8 @@ github.com/alexflint/go-arg v1.4.3/go.mod h1:3PZ/wp/8HuqRZMUUgu7I+e1qcpUbvmS258m github.com/alexflint/go-scalar v1.1.0/go.mod h1:LoFvNMqS1CPrMVltza4LvnGKhaSpc3oyLEBUZVhhS2o= github.com/alexflint/go-scalar v1.2.0 h1:WR7JPKkeNpnYIOfHRa7ivM21aWAdHD0gEWHCx+WQBRw= github.com/alexflint/go-scalar v1.2.0/go.mod h1:LoFvNMqS1CPrMVltza4LvnGKhaSpc3oyLEBUZVhhS2o= -github.com/anacrolix/chansync v0.3.0 h1:lRu9tbeuw3wl+PhMu/r+JJCRu5ArFXIluOgdF0ao6/U= -github.com/anacrolix/chansync v0.3.0/go.mod h1:DZsatdsdXxD0WiwcGl0nJVwyjCKMDv+knl1q2iBjA2k= +github.com/anacrolix/chansync v0.4.0 h1:Md0HM7zYCAO4KwNwgcIRgxNsMxiRuk7D1Ha0Uo+2y60= +github.com/anacrolix/chansync v0.4.0/go.mod h1:DZsatdsdXxD0WiwcGl0nJVwyjCKMDv+knl1q2iBjA2k= github.com/anacrolix/dht/v2 v2.21.0 h1:8nzI+faaynY9jOKmVgdmBZVrTo8B7ZE/LKEgN3Vl/Bs= github.com/anacrolix/dht/v2 v2.21.0/go.mod h1:SDGC+sEs1pnO2sJGYuhvIis7T8749dDHNfcjtdH4e3g= github.com/anacrolix/dms v1.6.0 h1:v2g1Y+Fc/ICSEc+7M6B92oFcfcqa5LXYPhE4Hcm5tVA= @@ -153,10 +153,10 @@ github.com/go-openapi/jsonpointer v0.20.2 h1:mQc3nmndL8ZBzStEo3JYF8wzmeWffDH4VbX github.com/go-openapi/jsonpointer v0.20.2/go.mod h1:bHen+N0u1KEO3YlmqOjTT9Adn1RfD91Ar825/PuiRVs= github.com/go-openapi/jsonreference v0.20.4 h1:bKlDxQxQJgwpUSgOENiMPzCTBVuc7vTdXSSgNeAhojU= github.com/go-openapi/jsonreference v0.20.4/go.mod h1:5pZJyJP2MnYCpoeoMAql78cCHauHj0V9Lhc506VOpw4= -github.com/go-openapi/spec v0.20.13 h1:XJDIN+dLH6vqXgafnl5SUIMnzaChQ6QTo0/UPMbkIaE= -github.com/go-openapi/spec v0.20.13/go.mod h1:8EOhTpBoFiask8rrgwbLC3zmJfz4zsCUueRuPM6GNkw= -github.com/go-openapi/swag v0.22.7 h1:JWrc1uc/P9cSomxfnsFSVWoE1FW6bNbrVPmpQYpCcR8= -github.com/go-openapi/swag v0.22.7/go.mod h1:Gl91UqO+btAM0plGGxHqJcQZ1ZTy6jbmridBTsDy8A0= +github.com/go-openapi/spec v0.20.14 h1:7CBlRnw+mtjFGlPDRZmAMnq35cRzI91xj03HVyUi/Do= +github.com/go-openapi/spec v0.20.14/go.mod h1:8EOhTpBoFiask8rrgwbLC3zmJfz4zsCUueRuPM6GNkw= +github.com/go-openapi/swag v0.22.8 h1:/9RjDSQ0vbFR+NyjGMkFTsA1IA0fmhKSThmfGZjicbw= +github.com/go-openapi/swag v0.22.8/go.mod h1:6QT22icPLEqAM/z/TChgb4WAveCHF92+2gF0CNjHpPI= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= @@ -166,8 +166,8 @@ github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+ github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= -github.com/go-playground/validator/v10 v10.16.0 h1:x+plE831WK4vaKHO/jpgUGsvLKIqRRkz6M78GuJAfGE= -github.com/go-playground/validator/v10 v10.16.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= +github.com/go-playground/validator/v10 v10.17.0 h1:SmVVlfAOtlZncTxRuinDPomC2DkXJ4E5T9gDA0AIH74= +github.com/go-playground/validator/v10 v10.17.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= @@ -356,12 +356,12 @@ golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnf golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= -golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= +golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20220428152302-39d4317da171/go.mod h1:lgLbSvA5ygNOMpwM/9anMpWVlVJ7Z+cHWq/eFuinpGE= -golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc h1:ao2WRsKSzW6KuUY9IWPwWahcHCgR0s52IfwutMfEbdM= -golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= +golang.org/x/exp v0.0.0-20240119083558-1b970713d09a h1:Q8/wZp0KX97QFTc2ywcOE0YRjZPVIx+MXInMzdvQqcA= +golang.org/x/exp v0.0.0-20240119083558-1b970713d09a/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08= golang.org/x/image v0.15.0 h1:kOELfmgrmJlw4Cdb7g/QGuB3CvDrXbqEIww/pNtNBm8= golang.org/x/image v0.15.0/go.mod h1:HUYqC05R2ZcZ3ejNQsIHQDQiwWM4JBqmm6MKANTp4LE= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -388,8 +388,8 @@ golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20220524220425-1d687d428aca/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= -golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= +golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= +golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -449,8 +449,8 @@ golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3 golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.8-0.20211029000441-d6a9af8af023/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.16.1 h1:TLyB3WofjdOEepBHAU20JdNC1Zbg87elYofWYAY5oZA= -golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= +golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc= +golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= From f5a9a92034cd5e1706bd397439367d1a07b37c19 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 23 Jan 2024 05:02:15 +0300 Subject: [PATCH 29/76] Bump follow-redirects from 1.15.3 to 1.15.4 in /web (#341) Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.3 to 1.15.4. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.3...v1.15.4) --- updated-dependencies: - dependency-name: follow-redirects dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- web/yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/yarn.lock b/web/yarn.lock index d35d7f3..d8d09f9 100644 --- a/web/yarn.lock +++ b/web/yarn.lock @@ -6037,9 +6037,9 @@ flush-write-stream@^1.0.0, flush-write-stream@^1.0.2: readable-stream "^2.3.6" follow-redirects@^1.0.0, follow-redirects@^1.15.0: - version "1.15.3" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.3.tgz#fe2f3ef2690afce7e82ed0b44db08165b207123a" - integrity sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q== + version "1.15.4" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.4.tgz#cdc7d308bf6493126b17ea2191ea0ccf3e535adf" + integrity sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw== for-each@^0.3.3: version "0.3.3" From c819c70a604081323c710e259c007d6656580168 Mon Sep 17 00:00:00 2001 From: nikk gitanes Date: Tue, 23 Jan 2024 05:09:36 +0300 Subject: [PATCH 30/76] Update AddFirstTorrent.jsx --- web/src/components/TorrentList/AddFirstTorrent.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/components/TorrentList/AddFirstTorrent.jsx b/web/src/components/TorrentList/AddFirstTorrent.jsx index a5b6550..8ab750e 100644 --- a/web/src/components/TorrentList/AddFirstTorrent.jsx +++ b/web/src/components/TorrentList/AddFirstTorrent.jsx @@ -18,7 +18,7 @@ export default function AddFirstTorrent() { Date: Tue, 23 Jan 2024 05:33:50 +0300 Subject: [PATCH 31/76] update contributors --- README.md | 11 ++++++----- web/src/components/About/index.jsx | 4 +++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 00001bb..475e76a 100644 --- a/README.md +++ b/README.md @@ -252,15 +252,16 @@ local:127.0.0.1 - [anacrolix](https://github.com/anacrolix) Matt Joiner - [tsynik](https://github.com/tsynik) -- [dancheskus](https://github.com/dancheskus) for web GUI -- [kolsys](https://github.com/kolsys) for MSX support code +- [dancheskus](https://github.com/dancheskus) for react web GUI and PWA code +- [kolsys](https://github.com/kolsys) for initial Media Station X support +- [damiva](https://github.com/damiva) for Media Station X code updates - [vladlenas](https://github.com/vladlenas) for NAS builds - [Nemiroff](https://github.com/Nemiroff) Tw1cker - [spawnlmg](https://github.com/spawnlmg) SpAwN_LMG for testing -- [TopperBG](https://github.com/TopperBG) Dimitar Maznekov for Bulgarian translation -- [FaintGhost](https://github.com/FaintGhost) Zhang Yaowei for Simplified Chinese translation +- [TopperBG](https://github.com/TopperBG) Dimitar Maznekov for Bulgarian web translation +- [FaintGhost](https://github.com/FaintGhost) Zhang Yaowei for Simplified Chinese web translation - [Anton111111](https://github.com/Anton111111) Anton Potekhin for sleep on Windows fixes -- [lieranderl](https://github.com/lieranderl) Evgeni for SSL support code +- [lieranderl](https://github.com/lieranderl) Evgeni for adding SSL support code - [cocool97](https://github.com/cocool97) for openapi API documentation - [shadeov](https://github.com/shadeov) for README improvements - [butaford](https://github.com/butaford) Pavel for make docker file and scripts diff --git a/web/src/components/About/index.jsx b/web/src/components/About/index.jsx index 291e149..79ac6f9 100644 --- a/web/src/components/About/index.jsx +++ b/web/src/components/About/index.jsx @@ -85,12 +85,14 @@ export default function AboutDialog() { + - + + From e88586a178b4497f19545edb9f3a57e5a8011193 Mon Sep 17 00:00:00 2001 From: yourok <8yourok8@mail.ru> Date: Thu, 25 Jan 2024 20:34:14 +0300 Subject: [PATCH 32/76] update web --- server/web/pages/template/html.go | 8 ++++---- server/web/pages/template/pages/asset-manifest.json | 6 +++--- server/web/pages/template/pages/index.html | 2 +- server/web/pages/template/route.go | 12 ++++++------ 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/server/web/pages/template/html.go b/server/web/pages/template/html.go index 911f85c..5ebaa06 100644 --- a/server/web/pages/template/html.go +++ b/server/web/pages/template/html.go @@ -127,11 +127,11 @@ var Staticjs2ddcd1461chunkjsLICENSEtxt []byte //go:embed pages/static/js/2.ddcd1461.chunk.js.map var Staticjs2ddcd1461chunkjsmap []byte -//go:embed pages/static/js/main.c9f57604.chunk.js -var Staticjsmainc9f57604chunkjs []byte +//go:embed pages/static/js/main.30c42a09.chunk.js +var Staticjsmain30c42a09chunkjs []byte -//go:embed pages/static/js/main.c9f57604.chunk.js.map -var Staticjsmainc9f57604chunkjsmap []byte +//go:embed pages/static/js/main.30c42a09.chunk.js.map +var Staticjsmain30c42a09chunkjsmap []byte //go:embed pages/static/js/runtime-main.f542387e.js var Staticjsruntimemainf542387ejs []byte diff --git a/server/web/pages/template/pages/asset-manifest.json b/server/web/pages/template/pages/asset-manifest.json index 8b5f5eb..efadcd6 100644 --- a/server/web/pages/template/pages/asset-manifest.json +++ b/server/web/pages/template/pages/asset-manifest.json @@ -1,7 +1,7 @@ { "files": { - "main.js": "/static/js/main.c9f57604.chunk.js", - "main.js.map": "/static/js/main.c9f57604.chunk.js.map", + "main.js": "/static/js/main.30c42a09.chunk.js", + "main.js.map": "/static/js/main.30c42a09.chunk.js.map", "runtime-main.js": "/static/js/runtime-main.f542387e.js", "runtime-main.js.map": "/static/js/runtime-main.f542387e.js.map", "static/js/2.ddcd1461.chunk.js": "/static/js/2.ddcd1461.chunk.js", @@ -12,6 +12,6 @@ "entrypoints": [ "static/js/runtime-main.f542387e.js", "static/js/2.ddcd1461.chunk.js", - "static/js/main.c9f57604.chunk.js" + "static/js/main.30c42a09.chunk.js" ] } \ No newline at end of file diff --git a/server/web/pages/template/pages/index.html b/server/web/pages/template/pages/index.html index 5fc101c..3e665dc 100644 --- a/server/web/pages/template/pages/index.html +++ b/server/web/pages/template/pages/index.html @@ -1 +1 @@ -TorrServer MatriX
\ No newline at end of file +TorrServer MatriX
\ No newline at end of file diff --git a/server/web/pages/template/route.go b/server/web/pages/template/route.go index 9e5df69..e1af681 100644 --- a/server/web/pages/template/route.go +++ b/server/web/pages/template/route.go @@ -301,18 +301,18 @@ func RouteWebPages(route *gin.RouterGroup) { c.Data(200, "application/json", Staticjs2ddcd1461chunkjsmap) }) - route.GET("/static/js/main.c9f57604.chunk.js", func(c *gin.Context) { - etag := fmt.Sprintf("%x", md5.Sum(Staticjsmainc9f57604chunkjs)) + route.GET("/static/js/main.30c42a09.chunk.js", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Staticjsmain30c42a09chunkjs)) c.Header("Cache-Control", "public, max-age=31536000") c.Header("ETag", etag) - c.Data(200, "application/javascript; charset=utf-8", Staticjsmainc9f57604chunkjs) + c.Data(200, "application/javascript; charset=utf-8", Staticjsmain30c42a09chunkjs) }) - route.GET("/static/js/main.c9f57604.chunk.js.map", func(c *gin.Context) { - etag := fmt.Sprintf("%x", md5.Sum(Staticjsmainc9f57604chunkjsmap)) + route.GET("/static/js/main.30c42a09.chunk.js.map", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Staticjsmain30c42a09chunkjsmap)) c.Header("Cache-Control", "public, max-age=31536000") c.Header("ETag", etag) - c.Data(200, "application/json", Staticjsmainc9f57604chunkjsmap) + c.Data(200, "application/json", Staticjsmain30c42a09chunkjsmap) }) route.GET("/static/js/runtime-main.f542387e.js", func(c *gin.Context) { From 63c1543e764c41eaae78fbf3404f0b3edf8ea957 Mon Sep 17 00:00:00 2001 From: yourok <8yourok8@mail.ru> Date: Thu, 25 Jan 2024 20:34:20 +0300 Subject: [PATCH 33/76] MatriX.129 --- 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 3fac317..db892ff 100644 --- a/server/version/version.go +++ b/server/version/version.go @@ -6,7 +6,7 @@ import ( // "github.com/anacrolix/torrent" ) -const Version = "MatriX.128" +const Version = "MatriX.129" func GetTorrentVersion() string { bi, ok := debug.ReadBuildInfo() From 4b371212a7e3e3b34e4f001b8d6892e65e77446a Mon Sep 17 00:00:00 2001 From: nikk gitanes Date: Sat, 27 Jan 2024 08:10:17 +0300 Subject: [PATCH 34/76] change folder color --- web/src/components/TorrentList/AddFirstTorrent.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/components/TorrentList/AddFirstTorrent.jsx b/web/src/components/TorrentList/AddFirstTorrent.jsx index 8ab750e..4e8dad8 100644 --- a/web/src/components/TorrentList/AddFirstTorrent.jsx +++ b/web/src/components/TorrentList/AddFirstTorrent.jsx @@ -19,7 +19,7 @@ export default function AddFirstTorrent() { src='https://cdn.lordicon.com/jkzgajyr.json' trigger='loop' delay='2000' - colors={`primary:#121331,secondary:${primary}`} + colors={`primary:#575757,secondary:${primary}`} stroke='light' scale='60' /> From cd830f67c905deccda83a4760b613aa8ca0ce0fa Mon Sep 17 00:00:00 2001 From: YouROK <8YouROK8@mail.ru> Date: Sun, 28 Jan 2024 21:46:11 +0300 Subject: [PATCH 35/76] Update issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 36 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 20 +++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..11f839f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,36 @@ +--- +name: Bug report +about: Create a report to help us improve +title: "[BUG]" +labels: bug +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. Linux Ubuntu 22.04] + - TorrServer Version [e.g. MatriX.129] + +**Smartphone or tvbox on Android (please complete the following information):** + - Device: [e.g. Ugoos am6] + - OS: [e.g. Android 9] + - TorrServer Version [e.g. MatriX.129] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..6269982 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: "[Feature]" +labels: enhancement +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. From 9d03b777f53c77dfaed3fef401912b2f6b3e6007 Mon Sep 17 00:00:00 2001 From: nikk gitanes Date: Sat, 3 Feb 2024 01:12:40 +0300 Subject: [PATCH 36/76] fix api docs and cosmetics --- server/go.mod | 9 ++++--- server/go.sum | 20 +++++++-------- server/torr/btserver.go | 34 ++++++++----------------- server/torr/storage/torrstor/storage.go | 18 ++++++------- server/version/version.go | 2 +- server/web/api/ffprobe.go | 6 ++--- server/web/api/play.go | 6 ++--- 7 files changed, 41 insertions(+), 54 deletions(-) diff --git a/server/go.mod b/server/go.mod index a35e8db..24e2344 100644 --- a/server/go.mod +++ b/server/go.mod @@ -20,7 +20,7 @@ require ( github.com/pkg/errors v0.9.1 github.com/swaggo/files v1.0.1 github.com/swaggo/gin-swagger v1.6.0 - github.com/swaggo/swag v1.16.2 + github.com/swaggo/swag v1.16.3 go.etcd.io/bbolt v1.3.8 golang.org/x/image v0.15.0 golang.org/x/time v0.5.0 @@ -29,7 +29,7 @@ require ( require ( github.com/KyleBanks/depth v1.2.1 // indirect - github.com/RoaringBitmap/roaring v1.7.0 // indirect + github.com/RoaringBitmap/roaring v1.9.0 // indirect github.com/alecthomas/atomic v0.1.0-alpha2 // indirect github.com/alexflint/go-scalar v1.2.0 // indirect github.com/anacrolix/chansync v0.4.0 // indirect @@ -58,17 +58,18 @@ require ( github.com/go-openapi/jsonpointer v0.20.2 // indirect github.com/go-openapi/jsonreference v0.20.4 // indirect github.com/go-openapi/spec v0.20.14 // indirect - github.com/go-openapi/swag v0.22.8 // indirect + github.com/go-openapi/swag v0.22.9 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect github.com/go-playground/validator/v10 v10.17.0 // indirect github.com/goccy/go-json v0.10.2 // indirect github.com/google/btree v1.1.2 // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/huandu/xstrings v1.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/cpuid/v2 v2.2.6 // indirect - github.com/leodido/go-urn v1.2.4 // indirect + github.com/leodido/go-urn v1.3.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect diff --git a/server/go.sum b/server/go.sum index fbcde88..7855689 100644 --- a/server/go.sum +++ b/server/go.sum @@ -9,8 +9,8 @@ github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6Xge github.com/RoaringBitmap/roaring v0.4.7/go.mod h1:8khRDP4HmeXns4xIj9oGrKSz7XTQiJx2zgh7AcNke4w= github.com/RoaringBitmap/roaring v0.4.17/go.mod h1:D3qVegWTmfCaX4Bl5CrBE9hfrSrrXIr8KVNvRsDi1NI= github.com/RoaringBitmap/roaring v0.4.23/go.mod h1:D0gp8kJQgE1A4LQ5wFLggQEyvDi06Mq5mKs52e1TwOo= -github.com/RoaringBitmap/roaring v1.7.0 h1:OZF303tJCER1Tj3x+aArx/S5X7hrT186ri6JjrGvG68= -github.com/RoaringBitmap/roaring v1.7.0/go.mod h1:6AXUsoIEzDTFFQCe1RbGA6uFONMhvejWj5rqITANK90= +github.com/RoaringBitmap/roaring v1.9.0 h1:lwKhr90/j0jVXJyh5X+vQN1VVn77rQFfYnh6RDRGCcE= +github.com/RoaringBitmap/roaring v1.9.0/go.mod h1:6AXUsoIEzDTFFQCe1RbGA6uFONMhvejWj5rqITANK90= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8= @@ -155,8 +155,8 @@ github.com/go-openapi/jsonreference v0.20.4 h1:bKlDxQxQJgwpUSgOENiMPzCTBVuc7vTdX github.com/go-openapi/jsonreference v0.20.4/go.mod h1:5pZJyJP2MnYCpoeoMAql78cCHauHj0V9Lhc506VOpw4= github.com/go-openapi/spec v0.20.14 h1:7CBlRnw+mtjFGlPDRZmAMnq35cRzI91xj03HVyUi/Do= github.com/go-openapi/spec v0.20.14/go.mod h1:8EOhTpBoFiask8rrgwbLC3zmJfz4zsCUueRuPM6GNkw= -github.com/go-openapi/swag v0.22.8 h1:/9RjDSQ0vbFR+NyjGMkFTsA1IA0fmhKSThmfGZjicbw= -github.com/go-openapi/swag v0.22.8/go.mod h1:6QT22icPLEqAM/z/TChgb4WAveCHF92+2gF0CNjHpPI= +github.com/go-openapi/swag v0.22.9 h1:XX2DssF+mQKM2DHsbgZK74y/zj4mo9I99+89xUmuZCE= +github.com/go-openapi/swag v0.22.9/go.mod h1:3/OXnFfnMAwBD099SwYRk7GD3xOrr1iL7d/XNLXVVwE= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= @@ -196,8 +196,9 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= @@ -240,8 +241,8 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= -github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= -github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= +github.com/leodido/go-urn v1.3.0 h1:jX8FDLfW4ThVXctBNZ+3cIWnCSnrACDV73r76dy0aQQ= +github.com/leodido/go-urn v1.3.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= @@ -320,15 +321,14 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/swaggo/files v1.0.1 h1:J1bVJ4XHZNq0I46UU90611i9/YzdrF7x92oX1ig5IdE= github.com/swaggo/files v1.0.1/go.mod h1:0qXmMNH6sXNf+73t65aKeB+ApmgxdnkQzVTAj2uaMUg= github.com/swaggo/gin-swagger v1.6.0 h1:y8sxvQ3E20/RCyrXeFfg60r6H0Z+SwpTjMYsMm+zy8M= github.com/swaggo/gin-swagger v1.6.0/go.mod h1:BG00cCEy294xtVpyIAHG6+e2Qzj/xKlRdOqDkvq0uzo= -github.com/swaggo/swag v1.16.2 h1:28Pp+8DkQoV+HLzLx8RGJZXNGKbFqnuvSbAAtoxiY04= -github.com/swaggo/swag v1.16.2/go.mod h1:6YzXnDcpr0767iOejs318CwYkCQqyGer6BizOg03f+E= +github.com/swaggo/swag v1.16.3 h1:PnCYjPCah8FK4I26l2F/KQ4yz3sILcVUN3cTlBFA9Pg= +github.com/swaggo/swag v1.16.3/go.mod h1:DImHIuOFXKpMFAQjcC7FG4m3Dg4+QuUgUzJmKjI/gRk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tinylib/msgp v1.1.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= diff --git a/server/torr/btserver.go b/server/torr/btserver.go index 1c73417..30e0a64 100644 --- a/server/torr/btserver.go +++ b/server/torr/btserver.go @@ -88,14 +88,13 @@ func (bt *BTServer) configure(ctx context.Context) { upnpID := "TorrServer/" + version.Version cliVers := userAgent - // bt.config.AlwaysWantConns = true bt.config.Debug = settings.BTsets.EnableDebug 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 // TODO: check memory usage - // bt.config.DisableWebseeds = false + // bt.config.DisableWebtorrent = true // NE + // bt.config.DisableWebseeds = false // NE bt.config.NoDefaultPortForwarding = settings.BTsets.DisableUPNP bt.config.NoDHT = settings.BTsets.DisableDHT bt.config.DisablePEX = settings.BTsets.DisablePEX @@ -109,13 +108,13 @@ func (bt *BTServer) configure(ctx context.Context) { bt.config.EstablishedConnsPerTorrent = settings.BTsets.ConnectionsLimit bt.config.TotalHalfOpenConns = 500 // Encryption/Obfuscation - bt.config.EncryptionPolicy = torrent.EncryptionPolicy{ - ForceEncryption: settings.BTsets.ForceEncrypt, - } - // bt.config.HeaderObfuscationPolicy = torrent.HeaderObfuscationPolicy{ - // RequirePreferred: settings.BTsets.ForceEncrypt, - // Preferred: true, - // } + bt.config.EncryptionPolicy = torrent.EncryptionPolicy{ // OE + ForceEncryption: settings.BTsets.ForceEncrypt, // OE + } // OE + // bt.config.HeaderObfuscationPolicy = torrent.HeaderObfuscationPolicy{ // NE + // RequirePreferred: settings.BTsets.ForceEncrypt, // NE + // Preferred: true, // NE + // } // NE if settings.BTsets.DownloadRateLimit > 0 { bt.config.DownloadRateLimiter = utils.Limit(settings.BTsets.DownloadRateLimit * 1024) } @@ -130,21 +129,8 @@ func (bt *BTServer) configure(ctx context.Context) { log.Println("Set listen port", settings.BTsets.PeersListenPort) bt.config.ListenPort = settings.BTsets.PeersListenPort } else { - // lport := 32000 - // for { - // log.Println("Check listen port", lport) - // l, err := net.Listen("tcp", ":"+strconv.Itoa(lport)) - // if l != nil { - // l.Close() - // } - // if err == nil { - // break - // } - // lport++ - // } - // log.Println("Set listen port", lport) log.Println("Set listen port to random autoselect (0)") - bt.config.ListenPort = 0 // lport + bt.config.ListenPort = 0 } } diff --git a/server/torr/storage/torrstor/storage.go b/server/torr/storage/torrstor/storage.go index 31b23bb..195fbb7 100644 --- a/server/torr/storage/torrstor/storage.go +++ b/server/torr/storage/torrstor/storage.go @@ -25,20 +25,20 @@ func NewStorage(capacity int64) *Storage { } func (s *Storage) OpenTorrent(info *metainfo.Info, infoHash metainfo.Hash) (ts.TorrentImpl, error) { - // capFunc := func() (int64, bool) { - // return s.capacity, true - // } + // capFunc := func() (int64, bool) { // NE + // return s.capacity, true // NE + // } // NE s.mu.Lock() defer s.mu.Unlock() ch := NewCache(s.capacity, s) ch.Init(info, infoHash) s.caches[infoHash] = ch - return ch, nil - // return ts.TorrentImpl{ - // Piece: ch.Piece, - // Close: ch.Close, - // Capacity: &capFunc, - // }, nil + return ch, nil // OE + // return ts.TorrentImpl{ // NE + // Piece: ch.Piece, // NE + // Close: ch.Close, // NE + // Capacity: &capFunc, // NE + // }, nil // NE } func (s *Storage) CloseHash(hash metainfo.Hash) { diff --git a/server/version/version.go b/server/version/version.go index db892ff..4597419 100644 --- a/server/version/version.go +++ b/server/version/version.go @@ -6,7 +6,7 @@ import ( // "github.com/anacrolix/torrent" ) -const Version = "MatriX.129" +const Version = "MatriX.129.1" func GetTorrentVersion() string { bi, ok := debug.ReadBuildInfo() diff --git a/server/web/api/ffprobe.go b/server/web/api/ffprobe.go index 423a619..5a7f2ce 100644 --- a/server/web/api/ffprobe.go +++ b/server/web/api/ffprobe.go @@ -18,12 +18,12 @@ import ( // // @Tags API // -// @Param hash query string true "Torrent hash" -// @Param id query string true "File index in torrent" +// @Param hash path string true "Torrent hash" +// @Param id path string true "File index in torrent" // // @Produce json // @Success 200 "Data returned from ffprobe" -// @Router /ffp [get] +// @Router /ffp/{hash}/{id} [get] func ffp(c *gin.Context) { hash := c.Param("hash") indexStr := c.Param("id") diff --git a/server/web/api/play.go b/server/web/api/play.go index 5a573dc..3a4c946 100644 --- a/server/web/api/play.go +++ b/server/web/api/play.go @@ -19,13 +19,13 @@ import ( // // @Tags API // -// @Param hash query string true "Torrent hash" -// @Param id query string true "File index in torrent" +// @Param hash path string true "Torrent hash" +// @Param id path string true "File index in torrent" // @Param not_auth query bool false "Not authenticated" // // @Produce application/octet-stream // @Success 200 "Torrent data" -// @Router /play [get] +// @Router /play/{hash}/{id} [get] func play(c *gin.Context) { hash := c.Param("hash") indexStr := c.Param("id") From 83c7ed1f954a539510207d2165bdde43a2cb38b2 Mon Sep 17 00:00:00 2001 From: "Alexey D. Filimonov" Date: Thu, 1 Feb 2024 20:35:54 +0300 Subject: [PATCH 37/76] move Settings and Viewed to separate json files --- server/settings/db.go | 2 +- server/settings/dbreadcache.go | 60 ++++++++++++ server/settings/jsondb.go | 159 +++++++++++++++++++++++++++++++ server/settings/migrate.go | 94 +++++++++++++++++- server/settings/settings.go | 33 ++++++- server/settings/torrserverdb.go | 9 ++ server/settings/xpathdbrouter.go | 117 +++++++++++++++++++++++ 7 files changed, 465 insertions(+), 9 deletions(-) create mode 100644 server/settings/dbreadcache.go create mode 100644 server/settings/jsondb.go create mode 100644 server/settings/torrserverdb.go create mode 100644 server/settings/xpathdbrouter.go diff --git a/server/settings/db.go b/server/settings/db.go index 03ec985..01f0b5b 100644 --- a/server/settings/db.go +++ b/server/settings/db.go @@ -15,7 +15,7 @@ type TDB struct { db *bolt.DB } -func NewTDB() *TDB { +func NewTDB() TorrServerDB { db, err := bolt.Open(filepath.Join(Path, "config.db"), 0o666, &bolt.Options{Timeout: 5 * time.Second}) if err != nil { log.TLogln(err) diff --git a/server/settings/dbreadcache.go b/server/settings/dbreadcache.go new file mode 100644 index 0000000..4158a4c --- /dev/null +++ b/server/settings/dbreadcache.go @@ -0,0 +1,60 @@ +package settings + +type DBReadCache struct { + db TorrServerDB + listCache map[string][]string + dataCache map[[2]string][]byte +} + +func NewDBReadCache(db TorrServerDB) TorrServerDB { + cdb := &DBReadCache{ + db: db, + listCache: map[string][]string{}, + dataCache: map[[2]string][]byte{}, + } + return cdb +} + +func (v *DBReadCache) CloseDB() { + v.db.CloseDB() + v.db = nil + v.listCache = nil + v.dataCache = nil +} + +func (v *DBReadCache) Get(xPath, name string) []byte { + cacheKey := v.makeDataCacheKey(xPath, name) + if data, ok := v.dataCache[cacheKey]; ok { + return data + } + data := v.db.Get(xPath, name) + v.dataCache[cacheKey] = data + return data +} + +func (v *DBReadCache) Set(xPath, name string, value []byte) { + cacheKey := v.makeDataCacheKey(xPath, name) + v.dataCache[cacheKey] = value + delete(v.listCache, xPath) + v.db.Set(xPath, name, value) +} + +func (v *DBReadCache) List(xPath string) []string { + if names, ok := v.listCache[xPath]; ok { + return names + } + names := v.db.List(xPath) + v.listCache[xPath] = names + return names +} + +func (v *DBReadCache) Rem(xPath, name string) { + cacheKey := v.makeDataCacheKey(xPath, name) + delete(v.dataCache, cacheKey) + delete(v.listCache, xPath) + v.db.Rem(xPath, name) +} + +func (v *DBReadCache) makeDataCacheKey(xPath, name string) [2]string { + return [2]string{xPath, name} +} diff --git a/server/settings/jsondb.go b/server/settings/jsondb.go new file mode 100644 index 0000000..a4c4180 --- /dev/null +++ b/server/settings/jsondb.go @@ -0,0 +1,159 @@ +package settings + +import ( + "encoding/json" + "errors" + "fmt" + "io/fs" + "os" + "path/filepath" + "server/log" + "strings" + "sync" +) + +type JsonDB struct { + Path string + filenameDelimiter string + filenameExtension string + fileMode fs.FileMode + xPathDelimeter string +} + +var jsonDbLocks = make(map[string]*sync.Mutex) + +func NewJsonDB() TorrServerDB { + settingsDB := &JsonDB{ + Path: Path, + filenameDelimiter: ".", + filenameExtension: ".json", + fileMode: fs.FileMode(0o666), + xPathDelimeter: "/", + } + return settingsDB +} + +func (v *JsonDB) CloseDB() { + // Not necessary +} + +func (v *JsonDB) Set(xPath, name string, value []byte) { + var err error = nil + jsonObj := map[string]interface{}{} + + if err := json.Unmarshal(value, &jsonObj); err == nil { + if filename, err := v.xPathToFilename(xPath); err == nil { + v.lock(filename) + defer v.unlock(filename) + if root, err := v.readJsonFileAsMap(filename); err == nil { + root[name] = jsonObj + if err = v.writeMapAsJsonFile(filename, root); err == nil { + return + } + } + } + } + v.log(fmt.Sprintf("Set: error writing entry %s->%s", xPath, name), err) +} + +func (v *JsonDB) Get(xPath, name string) []byte { + var err error = nil + if filename, err := v.xPathToFilename(xPath); err == nil { + v.lock(filename) + defer v.unlock(filename) + if root, err := v.readJsonFileAsMap(filename); err == nil { + if jsonData, ok := root[name]; ok { + if byteData, err := json.Marshal(jsonData); err == nil { + return byteData + } + } else { + // We assume this is not 'error' but 'no entry' which is normal + return nil + } + } + } + v.log(fmt.Sprintf("Get: error reading entry %s->%s", xPath, name), err) + return nil +} + +func (v *JsonDB) List(xPath string) []string { + var err error = nil + if filename, err := v.xPathToFilename(xPath); err == nil { + v.lock(filename) + defer v.unlock(filename) + if root, err := v.readJsonFileAsMap(filename); err == nil { + nameList := make([]string, 0, len(root)) + for k := range root { + nameList = append(nameList, k) + } + return nameList + } + } + v.log(fmt.Sprintf("List: error reading entries in xPath %s", xPath), err) + return nil +} + +func (v *JsonDB) Rem(xPath, name string) { + var err error = nil + if filename, err := v.xPathToFilename(xPath); err == nil { + v.lock(filename) + defer v.unlock(filename) + if root, err := v.readJsonFileAsMap(filename); err == nil { + delete(root, name) + v.writeMapAsJsonFile(filename, root) + return + } + } + v.log(fmt.Sprintf("Rem: error removing entry %s->%s", xPath, name), err) +} + +func (v *JsonDB) lock(filename string) { + var mtx sync.Mutex + if mtx, ok := jsonDbLocks[filename]; !ok { + mtx = new(sync.Mutex) + jsonDbLocks[v.Path] = mtx + } + mtx.Lock() +} + +func (v *JsonDB) unlock(filename string) { + if mtx, ok := jsonDbLocks[filename]; ok { + mtx.Unlock() + } +} + +func (v *JsonDB) xPathToFilename(xPath string) (string, error) { + if pathComponents := strings.Split(xPath, v.xPathDelimeter); len(pathComponents) > 0 { + return strings.ToLower(strings.Join(pathComponents, v.filenameDelimiter) + v.filenameExtension), nil + } + return "", errors.New("xPath has no components") +} + +func (v *JsonDB) readJsonFileAsMap(filename string) (map[string]interface{}, error) { + var err error = nil + jsonData := map[string]interface{}{} + path := filepath.Join(v.Path, filename) + if fileData, err := os.ReadFile(path); err == nil { + err = json.Unmarshal(fileData, &jsonData) + } + return jsonData, err +} + +func (v *JsonDB) writeMapAsJsonFile(filename string, o map[string]interface{}) error { + var err error = nil + path := filepath.Join(v.Path, filename) + + if fileData, err := json.MarshalIndent(o, "", " "); err == nil { + err = os.WriteFile(path, fileData, v.fileMode) + } + return err +} + +func (v *JsonDB) log(s string, params ...interface{}) { + if len(params) > 0 { + log.TLogln(fmt.Sprintf("JsonDB: %s: %s", s, fmt.Sprint(params...))) + } else { + log.TLogln(fmt.Sprintf("JsonDB: %s", s)) + } + +} diff --git a/server/settings/migrate.go b/server/settings/migrate.go index e0c6ce1..2ae12f7 100644 --- a/server/settings/migrate.go +++ b/server/settings/migrate.go @@ -2,13 +2,16 @@ package settings import ( "encoding/binary" + "encoding/json" + "errors" "fmt" "os" "path/filepath" - - bolt "go.etcd.io/bbolt" + "reflect" "server/log" "server/web/api/utils" + + bolt "go.etcd.io/bbolt" ) var dbTorrentsName = []byte("Torrents") @@ -22,7 +25,8 @@ type torrentOldDB struct { Timestamp int64 } -func Migrate() { +// Migrate from torrserver.db to config.db +func Migrate1() { if _, err := os.Lstat(filepath.Join(Path, "torrserver.db")); os.IsNotExist(err) { return } @@ -100,3 +104,87 @@ func Migrate() { func b2i(v []byte) int64 { return int64(binary.BigEndian.Uint64(v)) } + +/* + === Migrate 2 === + +Migrate 'Settings' and 'Viewed' buckets from BBolt ('config.db') +to separate JSON files ('settings.json' and 'viewed.json') + +'Torrents' data continues to remain in the BBolt database ('config.db') +due to the fact that BLOBs are stored there + +To make user be able to roll settings back, no data is deleted from 'config.db' file. +*/ +func Migrate2(bboltDB, jsonDB TorrServerDB) error { + var err error = nil + + const XPATH_SETTINGS = "Settings" + const NAME_BITTORR = "BitTorr" + const XPATH_VIEWED = "Viewed" + + if BTsets != nil { + msg := "Migrate0002 MUST be called before initializing BTSets" + log.TLogln(msg) + os.Exit(1) + } + + isByteArraysEqualJson := func(a, b []byte) (bool, error) { + var objectA interface{} + var objectB interface{} + var err error = nil + if err = json.Unmarshal(a, &objectA); err == nil { + if err = json.Unmarshal(b, &objectB); err == nil { + return reflect.DeepEqual(objectA, objectB), nil + } else { + err = fmt.Errorf("Error unmashalling B: %s", err.Error()) + } + } else { + err = fmt.Errorf("Error unmashalling A: %s", err.Error()) + } + return false, err + } + + migrateXPath := func(xPath, name string) error { + if jsonDB.Get(xPath, name) == nil { + bboltDBBlob := bboltDB.Get(xPath, name) + if bboltDBBlob != nil { + log.TLogln(fmt.Sprintf("Attempting to migrate %s->%s from TDB to JsonDB", xPath, name)) + jsonDB.Set(xPath, name, bboltDBBlob) + jsonDBBlob := jsonDB.Get(xPath, name) + if isEqual, err := isByteArraysEqualJson(bboltDBBlob, jsonDBBlob); err == nil { + if isEqual { + log.TLogln(fmt.Sprintf("Migrated %s->%s successful", xPath, name)) + } else { + msg := fmt.Sprintf("Failed to migrate %s->%s TDB to JsonDB: equality check failed", xPath, name) + log.TLogln(msg) + return errors.New(msg) + } + } else { + msg := fmt.Sprintf("Failed to migrate %s->%s TDB to JsonDB: %s", xPath, name, err) + log.TLogln(msg) + return errors.New(msg) + } + } + } + return nil + } + + if err = migrateXPath(XPATH_SETTINGS, NAME_BITTORR); err != nil { + return err + } + + jsonDBViewedNames := jsonDB.List(XPATH_VIEWED) + if len(jsonDBViewedNames) <= 0 { + bboltDBViewedNames := bboltDB.List(XPATH_VIEWED) + if len(bboltDBViewedNames) > 0 { + for _, name := range bboltDBViewedNames { + err = migrateXPath(XPATH_VIEWED, name) + if err != nil { + break + } + } + } + } + return err +} diff --git a/server/settings/settings.go b/server/settings/settings.go index 8c5906b..34e9bf9 100644 --- a/server/settings/settings.go +++ b/server/settings/settings.go @@ -1,6 +1,7 @@ package settings import ( + "fmt" "os" "path/filepath" @@ -8,7 +9,7 @@ import ( ) var ( - tdb *TDB + tdb TorrServerDB Path string Port string Ssl bool @@ -24,13 +25,35 @@ var ( func InitSets(readOnly, searchWA bool) { ReadOnly = readOnly SearchWA = searchWA - tdb = NewTDB() - if tdb == nil { - log.TLogln("Error open db:", filepath.Join(Path, "config.db")) + + bboltDB := NewTDB() + if bboltDB == nil { + log.TLogln("Error open bboltDB:", filepath.Join(Path, "config.db")) + os.Exit(1) + } + + jsonDB := NewJsonDB() + if jsonDB == nil { + log.TLogln("Error open jsonDB") + os.Exit(1) + } + + dbRouter := NewXPathDBRouter() + // First registered DB becomes default route + dbRouter.RegisterRoute(jsonDB, "Settings") + dbRouter.RegisterRoute(jsonDB, "Viewed") + dbRouter.RegisterRoute(bboltDB, "Torrents") + + tdb = NewDBReadCache(dbRouter) + + // We migrate settings here, it must be done before loadBTSets() + if err := Migrate2(bboltDB, jsonDB); err != nil { + log.TLogln(fmt.Sprintf("Migrate2 failed")) os.Exit(1) } loadBTSets() - Migrate() + Migrate1() + } func CloseDB() { diff --git a/server/settings/torrserverdb.go b/server/settings/torrserverdb.go new file mode 100644 index 0000000..c9bb50e --- /dev/null +++ b/server/settings/torrserverdb.go @@ -0,0 +1,9 @@ +package settings + +type TorrServerDB interface { + CloseDB() + Get(xPath, name string) []byte + Set(xPath, name string, value []byte) + List(xPath string) []string + Rem(xPath, name string) +} diff --git a/server/settings/xpathdbrouter.go b/server/settings/xpathdbrouter.go new file mode 100644 index 0000000..fb6a07c --- /dev/null +++ b/server/settings/xpathdbrouter.go @@ -0,0 +1,117 @@ +package settings + +import ( + "errors" + "fmt" + "reflect" + "server/log" + "slices" + "sort" + "strings" +) + +type XPathDBRouter struct { + dbs []TorrServerDB + routes []string + route2db map[string]TorrServerDB + dbNames map[TorrServerDB]string +} + +func NewXPathDBRouter() *XPathDBRouter { + router := &XPathDBRouter{ + dbs: []TorrServerDB{}, + dbNames: map[TorrServerDB]string{}, + routes: []string{}, + route2db: map[string]TorrServerDB{}, + } + return router +} + +func (v *XPathDBRouter) RegisterRoute(db TorrServerDB, xPath string) error { + newRoute := v.xPathToRoute(xPath) + + if slices.Contains(v.routes, newRoute) { + return errors.New(fmt.Sprintf("route \"%s\" already in routing table", newRoute)) + } + + // First DB becomes Default DB with default route + if len(v.dbs) == 0 && len(newRoute) != 0 { + v.RegisterRoute(db, "") + } + + if !slices.Contains(v.dbs, db) { + v.dbs = append(v.dbs, db) + v.dbNames[db] = reflect.TypeOf(db).Elem().Name() + v.log(fmt.Sprintf("Registered new DB \"%s\", total %d DBs registered", v.getDBName(db), len(v.dbs))) + } + + v.route2db[newRoute] = db + v.routes = append(v.routes, newRoute) + + // Sort routes by length descending. + // It is important later to help selecting + // most suitable route in getDBForXPath(xPath) + sort.Slice(v.routes, func(iLeft, iRight int) bool { + return len(v.routes[iLeft]) > len(v.routes[iRight]) + }) + v.log(fmt.Sprintf("Registered new route \"%s\" for DB \"%s\", total %d routes", newRoute, v.getDBName(db), len(v.routes))) + return nil +} + +func (v *XPathDBRouter) xPathToRoute(xPath string) string { + return strings.ToLower(strings.TrimSpace(xPath)) +} + +func (v *XPathDBRouter) getDBForXPath(xPath string) TorrServerDB { + if len(v.dbs) == 0 { + return nil + } + lookup_route := v.xPathToRoute(xPath) + var db TorrServerDB = nil + // Expected v.routes sorted by length descending + for _, route_prefix := range v.routes { + if strings.HasPrefix(lookup_route, route_prefix) { + db = v.route2db[route_prefix] + break + } + } + return db +} + +func (v *XPathDBRouter) Get(xPath, name string) []byte { + return v.getDBForXPath(xPath).Get(xPath, name) +} + +func (v *XPathDBRouter) Set(xPath, name string, value []byte) { + v.getDBForXPath(xPath).Set(xPath, name, value) +} + +func (v *XPathDBRouter) List(xPath string) []string { + return v.getDBForXPath(xPath).List(xPath) +} + +func (v *XPathDBRouter) Rem(xPath, name string) { + v.getDBForXPath(xPath).Rem(xPath, name) +} + +func (v *XPathDBRouter) CloseDB() { + for _, db := range v.dbs { + db.CloseDB() + } + v.dbs = nil + v.routes = nil + v.route2db = nil + v.dbNames = nil +} + +func (v *XPathDBRouter) getDBName(db TorrServerDB) string { + return v.dbNames[db] +} + +func (v *XPathDBRouter) log(s string, params ...interface{}) { + if len(params) > 0 { + log.TLogln(fmt.Sprintf("XPathDBRouter: %s: %s", s, fmt.Sprint(params...))) + } else { + log.TLogln(fmt.Sprintf("XPathDBRouter: %s", s)) + } +} From efb17ee48d279e9ba711eb5fb1400127298a6c28 Mon Sep 17 00:00:00 2001 From: nikk gitanes Date: Sat, 3 Feb 2024 10:40:14 +0300 Subject: [PATCH 38/76] Update download.go --- server/web/api/download.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/web/api/download.go b/server/web/api/download.go index 9610643..06893d4 100644 --- a/server/web/api/download.go +++ b/server/web/api/download.go @@ -47,7 +47,7 @@ func (f *fileReader) Seek(offset int64, whence int) (int64, error) { // // @Tags API // -// @Param size path string true "Test file size" +// @Param size path string true "Test file size (in MB)" // // @Produce application/octet-stream // @Success 200 {file} file From 25cf543b07433ecf1d9858d8b4b77019802a3aa0 Mon Sep 17 00:00:00 2001 From: "Alexey D. Filimonov" Date: Sat, 3 Feb 2024 10:46:42 +0300 Subject: [PATCH 39/76] web: disable multiple .torrent file selection in Add new torrent file selection dialog (#347) --- web/src/components/Add/LeftSideComponent.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/web/src/components/Add/LeftSideComponent.jsx b/web/src/components/Add/LeftSideComponent.jsx index 7bb785a..8f4289c 100644 --- a/web/src/components/Add/LeftSideComponent.jsx +++ b/web/src/components/Add/LeftSideComponent.jsx @@ -39,7 +39,11 @@ export default function LeftSideComponent({ } const [isTorrentSourceActive, setIsTorrentSourceActive] = useState(false) - const { getRootProps, getInputProps, isDragActive } = useDropzone({ onDrop: handleCapture, accept: '.torrent' }) + const { getRootProps, getInputProps, isDragActive } = useDropzone({ + onDrop: handleCapture, + accept: '.torrent', + multiple: false, + }) const handleTorrentSourceChange = ({ target: { value } }) => setTorrentSource(value) From cf3af55fb2ce63e92d94a1aa1ff2f04f81d214c9 Mon Sep 17 00:00:00 2001 From: nikk gitanes Date: Sat, 3 Feb 2024 11:20:25 +0300 Subject: [PATCH 40/76] build api docs --- build-all.sh | 6 ++++++ server/docs/docs.go | 14 +++++++------- server/docs/swagger.json | 14 +++++++------- server/docs/swagger.yaml | 14 +++++++------- 4 files changed, 27 insertions(+), 21 deletions(-) diff --git a/build-all.sh b/build-all.sh index 3312131..0a3b8cf 100755 --- a/build-all.sh +++ b/build-all.sh @@ -54,6 +54,12 @@ echo "Build web" export NODE_OPTIONS=--openssl-legacy-provider $GOBIN run gen_web.go +#### Update api docs +echo "Build docs" +$GOBIN install github.com/swaggo/swag/cmd/swag@latest +cd "${ROOT}/server" || exit 1 +swag init -g web/server.go + #### Build server echo "Build server" cd "${ROOT}/server" || exit 1 diff --git a/server/docs/docs.go b/server/docs/docs.go index b898681..61cfc26 100644 --- a/server/docs/docs.go +++ b/server/docs/docs.go @@ -62,7 +62,7 @@ const docTemplate = `{ "parameters": [ { "type": "string", - "description": "Test file size", + "description": "Test file size (in MB)", "name": "size", "in": "path", "required": true @@ -98,7 +98,7 @@ const docTemplate = `{ } } }, - "/ffp": { + "/ffp/{hash}/{id}": { "get": { "description": "Gather informations using ffprobe.", "produces": [ @@ -113,14 +113,14 @@ const docTemplate = `{ "type": "string", "description": "Torrent hash", "name": "hash", - "in": "query", + "in": "path", "required": true }, { "type": "string", "description": "File index in torrent", "name": "id", - "in": "query", + "in": "path", "required": true } ], @@ -217,7 +217,7 @@ const docTemplate = `{ } } }, - "/play": { + "/play/{hash}/{id}": { "get": { "description": "Play given torrent referenced by hash.", "produces": [ @@ -232,14 +232,14 @@ const docTemplate = `{ "type": "string", "description": "Torrent hash", "name": "hash", - "in": "query", + "in": "path", "required": true }, { "type": "string", "description": "File index in torrent", "name": "id", - "in": "query", + "in": "path", "required": true }, { diff --git a/server/docs/swagger.json b/server/docs/swagger.json index c5645a4..b653dec 100644 --- a/server/docs/swagger.json +++ b/server/docs/swagger.json @@ -55,7 +55,7 @@ "parameters": [ { "type": "string", - "description": "Test file size", + "description": "Test file size (in MB)", "name": "size", "in": "path", "required": true @@ -91,7 +91,7 @@ } } }, - "/ffp": { + "/ffp/{hash}/{id}": { "get": { "description": "Gather informations using ffprobe.", "produces": [ @@ -106,14 +106,14 @@ "type": "string", "description": "Torrent hash", "name": "hash", - "in": "query", + "in": "path", "required": true }, { "type": "string", "description": "File index in torrent", "name": "id", - "in": "query", + "in": "path", "required": true } ], @@ -210,7 +210,7 @@ } } }, - "/play": { + "/play/{hash}/{id}": { "get": { "description": "Play given torrent referenced by hash.", "produces": [ @@ -225,14 +225,14 @@ "type": "string", "description": "Torrent hash", "name": "hash", - "in": "query", + "in": "path", "required": true }, { "type": "string", "description": "File index in torrent", "name": "id", - "in": "query", + "in": "path", "required": true }, { diff --git a/server/docs/swagger.yaml b/server/docs/swagger.yaml index cd69f0f..a185378 100644 --- a/server/docs/swagger.yaml +++ b/server/docs/swagger.yaml @@ -332,7 +332,7 @@ paths: get: description: Download the test file of given size (for speed testing purpose). parameters: - - description: Test file size + - description: Test file size (in MB) in: path name: size required: true @@ -360,17 +360,17 @@ paths: summary: Tests server status tags: - API - /ffp: + /ffp/{hash}/{id}: get: description: Gather informations using ffprobe. parameters: - description: Torrent hash - in: query + in: path name: hash required: true type: string - description: File index in torrent - in: query + in: path name: id required: true type: string @@ -438,17 +438,17 @@ paths: summary: Get MSX IMDB informations tags: - MSX - /play: + /play/{hash}/{id}: get: description: Play given torrent referenced by hash. parameters: - description: Torrent hash - in: query + in: path name: hash required: true type: string - description: File index in torrent - in: query + in: path name: id required: true type: string From 97b7f527ff3e4d4b3775156a3768fe0276094687 Mon Sep 17 00:00:00 2001 From: nikk gitanes Date: Sat, 3 Feb 2024 22:50:19 +0300 Subject: [PATCH 41/76] update msx doc --- server/docs/docs.go | 54 ++++++++++++++++++++-------------------- server/docs/swagger.json | 54 ++++++++++++++++++++-------------------- server/docs/swagger.yaml | 10 ++++---- server/web/msx/msx.go | 8 +++--- 4 files changed, 63 insertions(+), 63 deletions(-) diff --git a/server/docs/docs.go b/server/docs/docs.go index 61cfc26..b2c4f5b 100644 --- a/server/docs/docs.go +++ b/server/docs/docs.go @@ -148,32 +148,6 @@ const docTemplate = `{ } } }, - "/msx": { - "get": { - "description": "Multi usage endpoint.", - "produces": [ - "application/json" - ], - "tags": [ - "MSX" - ], - "summary": "Multi usage endpoint", - "parameters": [ - { - "type": "string", - "description": "Magnet/hash/link to torrent", - "name": "link", - "in": "query", - "required": true - } - ], - "responses": { - "200": { - "description": "Data returned according to query" - } - } - } - }, "/msx/imdb": { "get": { "description": "Get MSX IMDB informations.", @@ -191,7 +165,7 @@ const docTemplate = `{ } } }, - "/msx/imdb/:id": { + "/msx/imdb/{id}": { "get": { "description": "Get MSX IMDB informations.", "produces": [ @@ -217,6 +191,32 @@ const docTemplate = `{ } } }, + "/msx/{pth}": { + "get": { + "description": "Multi usage endpoint.", + "produces": [ + "application/json" + ], + "tags": [ + "MSX" + ], + "summary": "Multi usage endpoint", + "parameters": [ + { + "type": "string", + "description": "Route MSX pages", + "name": "link", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Data returned according to path" + } + } + } + }, "/play/{hash}/{id}": { "get": { "description": "Play given torrent referenced by hash.", diff --git a/server/docs/swagger.json b/server/docs/swagger.json index b653dec..52ef964 100644 --- a/server/docs/swagger.json +++ b/server/docs/swagger.json @@ -141,32 +141,6 @@ } } }, - "/msx": { - "get": { - "description": "Multi usage endpoint.", - "produces": [ - "application/json" - ], - "tags": [ - "MSX" - ], - "summary": "Multi usage endpoint", - "parameters": [ - { - "type": "string", - "description": "Magnet/hash/link to torrent", - "name": "link", - "in": "query", - "required": true - } - ], - "responses": { - "200": { - "description": "Data returned according to query" - } - } - } - }, "/msx/imdb": { "get": { "description": "Get MSX IMDB informations.", @@ -184,7 +158,7 @@ } } }, - "/msx/imdb/:id": { + "/msx/imdb/{id}": { "get": { "description": "Get MSX IMDB informations.", "produces": [ @@ -210,6 +184,32 @@ } } }, + "/msx/{pth}": { + "get": { + "description": "Multi usage endpoint.", + "produces": [ + "application/json" + ], + "tags": [ + "MSX" + ], + "summary": "Multi usage endpoint", + "parameters": [ + { + "type": "string", + "description": "Route MSX pages", + "name": "link", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Data returned according to path" + } + } + } + }, "/play/{hash}/{id}": { "get": { "description": "Play given torrent referenced by hash.", diff --git a/server/docs/swagger.yaml b/server/docs/swagger.yaml index a185378..fe094f3 100644 --- a/server/docs/swagger.yaml +++ b/server/docs/swagger.yaml @@ -393,12 +393,12 @@ paths: summary: Get HTML of magnet links tags: - Pages - /msx: + /msx/{pth}: get: description: Multi usage endpoint. parameters: - - description: Magnet/hash/link to torrent - in: query + - description: Route MSX pages + in: path name: link required: true type: string @@ -406,7 +406,7 @@ paths: - application/json responses: "200": - description: Data returned according to query + description: Data returned according to path summary: Multi usage endpoint tags: - MSX @@ -421,7 +421,7 @@ paths: summary: Get MSX IMDB informations tags: - MSX - /msx/imdb/:id: + /msx/imdb/{id}: get: description: Get MSX IMDB informations. parameters: diff --git a/server/web/msx/msx.go b/server/web/msx/msx.go index 6e0ff56..d5a74e2 100644 --- a/server/web/msx/msx.go +++ b/server/web/msx/msx.go @@ -43,11 +43,11 @@ func SetupRoute(r *gin.RouterGroup) { // // @Tags MSX // -// @Param link query string true "Magnet/hash/link to torrent" +// @Param link path string true "Route MSX pages" // // @Produce json -// @Success 200 "Data returned according to query" -// @Router /msx [get] +// @Success 200 "Data returned according to path" +// @Router /msx/{pth} [get] func msxPTH(c *gin.Context) { js := []string{"http://msx.benzac.de/js/tvx-plugin.min.js"} switch p := c.Param("pth"); p { @@ -114,7 +114,7 @@ func msxIMDB(c *gin.Context) { // // @Produce json // @Success 200 "JSON MSX IMDB informations" -// @Router /msx/imdb/:id [get] +// @Router /msx/imdb/{id} [get] func msxIMDBID(c *gin.Context) { idb.Lock() defer idb.Unlock() From b46f996a3df87668677f44bab4dc4067cf7de005 Mon Sep 17 00:00:00 2001 From: nikk gitanes Date: Tue, 6 Feb 2024 12:44:49 +0300 Subject: [PATCH 42/76] Squashed commit of the following: commit 218d84b7905d23dce3c8f842ed78b8eac8ea9580 Author: nikk gitanes Date: Mon Feb 5 01:10:19 2024 +0300 add read-only DB logging commit 826fde8e8444a9169afeb7f777e1803fcf6bd435 Author: nikk gitanes Date: Sat Feb 3 22:50:19 2024 +0300 update msx doc commit 98b7d61bd98269b0e456cb71a5d50a8f98203aba Merge: 490ee26 963c7da Author: nikk gitanes Date: Sat Feb 3 11:21:45 2024 +0300 Merge branch 'master' into jsondb commit 490ee26d3f14316cb1ad3b872ebe408a5aa2a91b Merge: 83c7ed1 efb17ee Author: nikk gitanes Date: Sat Feb 3 10:50:41 2024 +0300 Merge branch 'master' into jsondb --- server/settings/db.go | 8 -------- server/settings/dbreadcache.go | 10 ++++++++++ server/torr/apihelper.go | 3 +++ server/version/version.go | 2 +- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/server/settings/db.go b/server/settings/db.go index 01f0b5b..b2447b6 100644 --- a/server/settings/db.go +++ b/server/settings/db.go @@ -68,10 +68,6 @@ func (v *TDB) Get(xpath, name string) []byte { } func (v *TDB) Set(xpath, name string, value []byte) { - if ReadOnly { - return - } - spath := strings.Split(xpath, "/") if len(spath) == 0 { return @@ -139,10 +135,6 @@ func (v *TDB) List(xpath string) []string { } func (v *TDB) Rem(xpath, name string) { - if ReadOnly { - return - } - spath := strings.Split(xpath, "/") if len(spath) == 0 { return diff --git a/server/settings/dbreadcache.go b/server/settings/dbreadcache.go index 4158a4c..862faf2 100644 --- a/server/settings/dbreadcache.go +++ b/server/settings/dbreadcache.go @@ -1,5 +1,7 @@ package settings +import "server/log" + type DBReadCache struct { db TorrServerDB listCache map[string][]string @@ -33,6 +35,10 @@ func (v *DBReadCache) Get(xPath, name string) []byte { } func (v *DBReadCache) Set(xPath, name string, value []byte) { + if ReadOnly { + log.TLogln("DB.Set: Read-only DB mode!", name) + return + } cacheKey := v.makeDataCacheKey(xPath, name) v.dataCache[cacheKey] = value delete(v.listCache, xPath) @@ -49,6 +55,10 @@ func (v *DBReadCache) List(xPath string) []string { } func (v *DBReadCache) Rem(xPath, name string) { + if ReadOnly { + log.TLogln("DB.Rem: Read-only DB mode!", name) + return + } cacheKey := v.makeDataCacheKey(xPath, name) delete(v.dataCache, cacheKey) delete(v.listCache, xPath) diff --git a/server/torr/apihelper.go b/server/torr/apihelper.go index 1eba48a..ed169c5 100644 --- a/server/torr/apihelper.go +++ b/server/torr/apihelper.go @@ -140,6 +140,7 @@ func SetTorrent(hashHex, title, poster, data string) *Torrent { func RemTorrent(hashHex string) { if sets.ReadOnly { + log.TLogln("API RemTorrent: Read-only DB mode!", hashHex) return } hash := metainfo.NewHashFromHex(hashHex) @@ -192,6 +193,7 @@ func DropTorrent(hashHex string) { func SetSettings(set *sets.BTSets) { if sets.ReadOnly { + log.TLogln("API SetSettings: Read-only DB mode!") return } sets.SetBTSets(set) @@ -208,6 +210,7 @@ func SetSettings(set *sets.BTSets) { func SetDefSettings() { if sets.ReadOnly { + log.TLogln("API SetDefSettings: Read-only DB mode!") return } sets.SetDefaultConfig() diff --git a/server/version/version.go b/server/version/version.go index 4597419..ae97304 100644 --- a/server/version/version.go +++ b/server/version/version.go @@ -6,7 +6,7 @@ import ( // "github.com/anacrolix/torrent" ) -const Version = "MatriX.129.1" +const Version = "MatriX.129.JS" func GetTorrentVersion() string { bi, ok := debug.ReadBuildInfo() From b23e9a10d03fa65a0e8c0cbec3bdc3da2e23ed2c Mon Sep 17 00:00:00 2001 From: nikk gitanes Date: Tue, 6 Feb 2024 15:39:14 +0300 Subject: [PATCH 43/76] go1.20 compat slices --- server/go.mod | 2 +- server/go.sum | 8 ++++---- server/settings/xpathdbrouter.go | 3 ++- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/server/go.mod b/server/go.mod index 24e2344..4eeaf37 100644 --- a/server/go.mod +++ b/server/go.mod @@ -22,6 +22,7 @@ require ( github.com/swaggo/gin-swagger v1.6.0 github.com/swaggo/swag v1.16.3 go.etcd.io/bbolt v1.3.8 + golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3 golang.org/x/image v0.15.0 golang.org/x/time v0.5.0 gopkg.in/vansante/go-ffprobe.v2 v2.1.1 @@ -82,7 +83,6 @@ require ( github.com/ugorji/go/codec v1.2.12 // indirect golang.org/x/arch v0.7.0 // indirect golang.org/x/crypto v0.18.0 // indirect - golang.org/x/exp v0.0.0-20240119083558-1b970713d09a // indirect golang.org/x/net v0.20.0 // indirect golang.org/x/sync v0.6.0 // indirect golang.org/x/sys v0.16.0 // indirect diff --git a/server/go.sum b/server/go.sum index 7855689..18e4254 100644 --- a/server/go.sum +++ b/server/go.sum @@ -241,8 +241,8 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= -github.com/leodido/go-urn v1.3.0 h1:jX8FDLfW4ThVXctBNZ+3cIWnCSnrACDV73r76dy0aQQ= -github.com/leodido/go-urn v1.3.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI= +github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= +github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= @@ -360,8 +360,8 @@ golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20220428152302-39d4317da171/go.mod h1:lgLbSvA5ygNOMpwM/9anMpWVlVJ7Z+cHWq/eFuinpGE= -golang.org/x/exp v0.0.0-20240119083558-1b970713d09a h1:Q8/wZp0KX97QFTc2ywcOE0YRjZPVIx+MXInMzdvQqcA= -golang.org/x/exp v0.0.0-20240119083558-1b970713d09a/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08= +golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3 h1:/RIbNt/Zr7rVhIkQhooTxCxFcdWLGIKnZA4IXNFSrvo= +golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08= golang.org/x/image v0.15.0 h1:kOELfmgrmJlw4Cdb7g/QGuB3CvDrXbqEIww/pNtNBm8= golang.org/x/image v0.15.0/go.mod h1:HUYqC05R2ZcZ3ejNQsIHQDQiwWM4JBqmm6MKANTp4LE= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= diff --git a/server/settings/xpathdbrouter.go b/server/settings/xpathdbrouter.go index fb6a07c..6008bc8 100644 --- a/server/settings/xpathdbrouter.go +++ b/server/settings/xpathdbrouter.go @@ -5,9 +5,10 @@ import ( "fmt" "reflect" "server/log" - "slices" "sort" "strings" + + "golang.org/x/exp/slices" ) type XPathDBRouter struct { From c129b157d60a06bef0ab29e61476f93cc5864c43 Mon Sep 17 00:00:00 2001 From: nikk gitanes Date: Wed, 7 Feb 2024 21:55:57 +0300 Subject: [PATCH 44/76] go get github.com/anacrolix/log@backwards-compat use go1.20 compat anacrolix/log --- server/go.mod | 4 ++-- server/go.sum | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/server/go.mod b/server/go.mod index 4eeaf37..76dd90f 100644 --- a/server/go.mod +++ b/server/go.mod @@ -8,7 +8,7 @@ require ( github.com/agnivade/levenshtein v1.1.1 github.com/alexflint/go-arg v1.4.3 github.com/anacrolix/dms v1.6.0 - github.com/anacrolix/log v0.14.5 + github.com/anacrolix/log v0.14.6-0.20240207013547-dfa5cb14b878 github.com/anacrolix/missinggo/v2 v2.7.3 github.com/anacrolix/publicip v0.3.0 github.com/anacrolix/torrent v1.53.3 @@ -70,7 +70,7 @@ require ( github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/cpuid/v2 v2.2.6 // indirect - github.com/leodido/go-urn v1.3.0 // indirect + github.com/leodido/go-urn v1.4.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect diff --git a/server/go.sum b/server/go.sum index 18e4254..fcc9247 100644 --- a/server/go.sum +++ b/server/go.sum @@ -48,8 +48,8 @@ github.com/anacrolix/log v0.3.0/go.mod h1:lWvLTqzAnCWPJA08T2HCstZi0L1y2Wyvm3FJgw github.com/anacrolix/log v0.6.0/go.mod h1:lWvLTqzAnCWPJA08T2HCstZi0L1y2Wyvm3FJgwU9jwU= github.com/anacrolix/log v0.13.1/go.mod h1:D4+CvN8SnruK6zIFS/xPoRJmtvtnxs+CSfDQ+BFxZ68= github.com/anacrolix/log v0.14.2/go.mod h1:1OmJESOtxQGNMlUO5rcv96Vpp9mfMqXXbe2RdinFLdY= -github.com/anacrolix/log v0.14.5 h1:OkMjBquVSRb742LkecSGDGaGpNoSrw4syRIm0eRdmrg= -github.com/anacrolix/log v0.14.5/go.mod h1:1OmJESOtxQGNMlUO5rcv96Vpp9mfMqXXbe2RdinFLdY= +github.com/anacrolix/log v0.14.6-0.20240207013547-dfa5cb14b878 h1:qF2xGiWxd0botliWzEE8CyKkg3jhB9fCSjbmcgp+HkY= +github.com/anacrolix/log v0.14.6-0.20240207013547-dfa5cb14b878/go.mod h1:m0poRtlr41mriZlXBQ9SOVZ8yZBkLjOkDhd5Li5pITA= github.com/anacrolix/missinggo v1.1.0/go.mod h1:MBJu3Sk/k3ZfGYcS7z18gwfu72Ey/xopPFJJbTi5yIo= github.com/anacrolix/missinggo v1.1.2-0.20190815015349-b888af804467/go.mod h1:MBJu3Sk/k3ZfGYcS7z18gwfu72Ey/xopPFJJbTi5yIo= github.com/anacrolix/missinggo v1.2.1/go.mod h1:J5cMhif8jPmFoC3+Uvob3OXXNIhOUikzMt+uUjeM21Y= From 2b0fe55c49d86d72e2fc29cac6c5414edf548feb Mon Sep 17 00:00:00 2001 From: nikk gitanes Date: Wed, 7 Feb 2024 22:20:15 +0300 Subject: [PATCH 45/76] bump ver for tag --- 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 ae97304..aa19600 100644 --- a/server/version/version.go +++ b/server/version/version.go @@ -6,7 +6,7 @@ import ( // "github.com/anacrolix/torrent" ) -const Version = "MatriX.129.JS" +const Version = "MatriX.129.3" func GetTorrentVersion() string { bi, ok := debug.ReadBuildInfo() From 5659445972a2b30adf2d0f90817e028f660d2afe Mon Sep 17 00:00:00 2001 From: nikk gitanes Date: Fri, 9 Feb 2024 00:57:30 +0300 Subject: [PATCH 46/76] add -m option --- server/cmd/main.go | 9 +++++++++ server/settings/settings.go | 1 + server/torr/stream.go | 4 ++++ 3 files changed, 14 insertions(+) diff --git a/server/cmd/main.go b/server/cmd/main.go index de434cf..e4f1d41 100644 --- a/server/cmd/main.go +++ b/server/cmd/main.go @@ -7,6 +7,7 @@ import ( "os" "path/filepath" "runtime" + "strconv" "strings" "time" @@ -42,6 +43,7 @@ type args struct { PubIPv4 string `arg:"-4" help:"set public IPv4 addr"` PubIPv6 string `arg:"-6" help:"set public IPv6 addr"` SearchWA bool `arg:"-s" help:"search without auth"` + MaxSize string `arg:"-m" help:"max allowed stream size"` } func (args) Version() string { @@ -104,6 +106,13 @@ func main() { go watchTDir(params.TorrentsDir) } + if params.MaxSize != "" { + maxSize, err := strconv.ParseInt(params.MaxSize, 10, 64) + if err == nil { + settings.MaxSize = maxSize + } + } + server.Start(params.Port, params.SslPort, params.SslCert, params.SslKey, params.Ssl, params.RDB, params.SearchWA) log.TLogln(server.WaitServer()) log.Close() diff --git a/server/settings/settings.go b/server/settings/settings.go index 34e9bf9..13769f7 100644 --- a/server/settings/settings.go +++ b/server/settings/settings.go @@ -20,6 +20,7 @@ var ( PubIPv4 string PubIPv6 string TorAddr string + MaxSize int64 ) func InitSets(readOnly, searchWA bool) { diff --git a/server/torr/stream.go b/server/torr/stream.go index 6ad9ffc..240f771 100644 --- a/server/torr/stream.go +++ b/server/torr/stream.go @@ -47,6 +47,10 @@ func (t *Torrent) Stream(fileID int, req *http.Request, resp http.ResponseWriter if file == nil { return fmt.Errorf("file with id %v not found", fileID) } + if int64(sets.MaxSize) > 0 && file.Length() > int64(sets.MaxSize) { + log.Println("file", file.DisplayPath(), "size exceeded max allowed", sets.MaxSize, "bytes") + return fmt.Errorf("file size exceeded max allowed %d bytes", sets.MaxSize) + } reader := t.NewReader(file) From 253e4da7e9c97f7e26e9b57ce55b08d66d937464 Mon Sep 17 00:00:00 2001 From: nikk gitanes Date: Fri, 9 Feb 2024 01:08:59 +0300 Subject: [PATCH 47/76] Update main.go --- server/cmd/main.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/cmd/main.go b/server/cmd/main.go index e4f1d41..ad9e1f9 100644 --- a/server/cmd/main.go +++ b/server/cmd/main.go @@ -26,12 +26,12 @@ import ( ) type args struct { - Port string `arg:"-p" help:"web server port, default 8090"` + Port string `arg:"-p" help:"web server port (default 8090)"` Ssl bool `help:"enables https"` SslPort string `help:"web server ssl port, If not set, will be set to default 8091 or taken from db(if stored previously). Accepted if --ssl enabled."` SslCert string `help:"path to ssl cert file. If not set, will be taken from db(if stored previously) or default self-signed certificate/key will be generated. Accepted if --ssl enabled."` SslKey string `help:"path to ssl key file. If not set, will be taken from db(if stored previously) or default self-signed certificate/key will be generated. Accepted if --ssl enabled."` - Path string `arg:"-d" help:"database dir path"` + Path string `arg:"-d" help:"database and config dir path"` LogPath string `arg:"-l" help:"server log file path"` WebLogPath string `arg:"-w" help:"web access log file path"` RDB bool `arg:"-r" help:"start in read-only DB mode"` @@ -39,11 +39,11 @@ type args struct { DontKill bool `arg:"-k" help:"don't kill server on signal"` UI bool `arg:"-u" help:"open torrserver page in browser"` TorrentsDir string `arg:"-t" help:"autoload torrents from dir"` - TorrentAddr string `help:"Torrent client address, default :32000"` + TorrentAddr string `help:"Torrent client address, like 127.0.0.1:1337 (default :PeersListenPort)"` PubIPv4 string `arg:"-4" help:"set public IPv4 addr"` PubIPv6 string `arg:"-6" help:"set public IPv6 addr"` SearchWA bool `arg:"-s" help:"search without auth"` - MaxSize string `arg:"-m" help:"max allowed stream size"` + MaxSize string `arg:"-m" help:"max allowed stream size (in Bytes)"` } func (args) Version() string { From d1b29bd8482d46b6d3ff23e5ffc03048df0e4f83 Mon Sep 17 00:00:00 2001 From: nikk gitanes Date: Fri, 9 Feb 2024 12:48:54 +0300 Subject: [PATCH 48/76] update contributors --- README.md | 1 + web/src/components/About/index.jsx | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index 475e76a..f916edc 100644 --- a/README.md +++ b/README.md @@ -265,4 +265,5 @@ local:127.0.0.1 - [cocool97](https://github.com/cocool97) for openapi API documentation - [shadeov](https://github.com/shadeov) for README improvements - [butaford](https://github.com/butaford) Pavel for make docker file and scripts +- [filimonic](https://github.com/filimonic) Alexey D. Filimonov - and others diff --git a/web/src/components/About/index.jsx b/web/src/components/About/index.jsx index 79ac6f9..567c3a8 100644 --- a/web/src/components/About/index.jsx +++ b/web/src/components/About/index.jsx @@ -93,6 +93,7 @@ export default function AboutDialog() { + From 5e71af9751bf06fc2b67ed5a6f2613f55695213b Mon Sep 17 00:00:00 2001 From: "Alexey D. Filimonov" Date: Thu, 15 Feb 2024 09:14:58 +0300 Subject: [PATCH 49/76] Move `wipe` to server side. Add UI unsafe buttons (#355) * move 'remove all' function to server side ('wipe') * add UnsafeButton to RemoveAll and CloseServer webui --- server/web/api/torrents.go | 17 +++++++++++++++++ web/src/components/CloseServer.jsx | 9 ++++++--- web/src/components/RemoveAll.jsx | 22 ++++++---------------- web/src/components/UnsafeButton.jsx | 26 ++++++++++++++++++++++++++ 4 files changed, 55 insertions(+), 19 deletions(-) create mode 100644 web/src/components/UnsafeButton.jsx diff --git a/server/web/api/torrents.go b/server/web/api/torrents.go index d94a28a..34cef2a 100644 --- a/server/web/api/torrents.go +++ b/server/web/api/torrents.go @@ -72,6 +72,10 @@ func torrents(c *gin.Context) { { dropTorrent(req, c) } + case "wipe": + { + wipeTorrents(req, c) + } } } @@ -184,3 +188,16 @@ func dropTorrent(req torrReqJS, c *gin.Context) { torr.DropTorrent(req.Hash) c.Status(200) } + +func wipeTorrents(req torrReqJS, c *gin.Context) { + torrents := torr.ListTorrent() + for _, t := range torrents { + torr.RemTorrent(t.TorrentSpec.InfoHash.HexString()) + } + // TODO: remove (copied todo from remTorrent()) + if set.BTsets.EnableDLNA { + dlna.Stop() + dlna.Start() + } + c.Status(200) +} diff --git a/web/src/components/CloseServer.jsx b/web/src/components/CloseServer.jsx index 160c1d9..f652c4f 100644 --- a/web/src/components/CloseServer.jsx +++ b/web/src/components/CloseServer.jsx @@ -1,11 +1,12 @@ import { useState } from 'react' import { Button, DialogActions, DialogTitle, ListItemIcon, ListItemText } from '@material-ui/core' import { StyledDialog, StyledMenuButtonWrapper } from 'style/CustomMaterialUiStyles' -import { PowerSettingsNew as PowerSettingsNewIcon } from '@material-ui/icons' +import { PowerSettingsNew as PowerSettingsNewIcon, PowerOff as PowerOffIcon } from '@material-ui/icons' import { shutdownHost } from 'utils/Hosts' import { useTranslation } from 'react-i18next' import { isStandaloneApp } from 'utils/Utils' import useOnStandaloneAppOutsideClick from 'utils/useOnStandaloneAppOutsideClick' +import UnsafeButton from './UnsafeButton' export default function CloseServer({ isOffline, isLoading }) { const { t } = useTranslation() @@ -41,7 +42,9 @@ export default function CloseServer({ isOffline, isLoading }) { {t('Cancel')} - + diff --git a/web/src/components/RemoveAll.jsx b/web/src/components/RemoveAll.jsx index 8fccfc1..faa4874 100644 --- a/web/src/components/RemoveAll.jsx +++ b/web/src/components/RemoveAll.jsx @@ -6,29 +6,17 @@ import DeleteIcon from '@material-ui/icons/Delete' import { useState } from 'react' import { torrentsHost } from 'utils/Hosts' import { useTranslation } from 'react-i18next' +import UnsafeButton from './UnsafeButton' const fnRemoveAll = () => { fetch(torrentsHost(), { method: 'post', - body: JSON.stringify({ action: 'list' }), + body: JSON.stringify({ action: 'wipe' }), headers: { Accept: 'application/json, text/plain, */*', 'Content-Type': 'application/json', }, }) - .then(res => res.json()) - .then(json => { - json.forEach(torr => { - fetch(torrentsHost(), { - method: 'post', - body: JSON.stringify({ action: 'rem', hash: torr.hash }), - headers: { - Accept: 'application/json, text/plain, */*', - 'Content-Type': 'application/json', - }, - }) - }) - }) } export default function RemoveAll({ isOffline, isLoading }) { @@ -54,7 +42,9 @@ export default function RemoveAll({ isOffline, isLoading }) { {t('Cancel')} - + diff --git a/web/src/components/UnsafeButton.jsx b/web/src/components/UnsafeButton.jsx new file mode 100644 index 0000000..6edd730 --- /dev/null +++ b/web/src/components/UnsafeButton.jsx @@ -0,0 +1,26 @@ +import { Button } from '@material-ui/core'; +import { useEffect, useRef, useState } from 'react'; + +export default function UnsafeButton({ timeout, children, disabled, ...props }) { + const [timeLeft, setTimeLeft] = useState(timeout || 7) + const [buttonDisabled, setButtonDisabled] = useState(disabled || timeLeft > 0) + const handleTimerTick = () => { + const newTimeLeft = timeLeft - 1 + setTimeLeft(newTimeLeft) + if (newTimeLeft <= 0) { + setButtonDisabled(disabled) + } + } + const getTimerText = () => !disabled && timeLeft > 0 ? ` (${timeLeft})` : '' + useEffect(() => { + if (disabled || !timeLeft) { return } + const intervalId = setInterval(handleTimerTick, 1000) + return () => clearInterval(intervalId) + }, [timeLeft]) + + return ( + + ) +} From 27d569550f4564ecf06bd2de3a054ac2d9d85bb9 Mon Sep 17 00:00:00 2001 From: nikk gitanes Date: Thu, 15 Feb 2024 09:24:17 +0300 Subject: [PATCH 50/76] sync rel torrent versons --- server/go.mod | 59 ++++++++++++--- server/go.sum | 195 +++++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 227 insertions(+), 27 deletions(-) diff --git a/server/go.mod b/server/go.mod index 76dd90f..bd88e06 100644 --- a/server/go.mod +++ b/server/go.mod @@ -8,10 +8,10 @@ require ( github.com/agnivade/levenshtein v1.1.1 github.com/alexflint/go-arg v1.4.3 github.com/anacrolix/dms v1.6.0 - github.com/anacrolix/log v0.14.6-0.20240207013547-dfa5cb14b878 + github.com/anacrolix/log v0.15.0 github.com/anacrolix/missinggo/v2 v2.7.3 github.com/anacrolix/publicip v0.3.0 - github.com/anacrolix/torrent v1.53.3 + github.com/anacrolix/torrent v1.54.0 github.com/gin-contrib/cors v1.5.0 github.com/gin-contrib/location v0.0.2 github.com/gin-gonic/gin v1.9.1 @@ -22,7 +22,7 @@ require ( github.com/swaggo/gin-swagger v1.6.0 github.com/swaggo/swag v1.16.3 go.etcd.io/bbolt v1.3.8 - golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3 + golang.org/x/exp v0.0.0-20240213143201-ec583247a57a golang.org/x/image v0.15.0 golang.org/x/time v0.5.0 gopkg.in/vansante/go-ffprobe.v2 v2.1.1 @@ -31,19 +31,24 @@ require ( require ( github.com/KyleBanks/depth v1.2.1 // indirect github.com/RoaringBitmap/roaring v1.9.0 // indirect + github.com/ajwerner/btree v0.0.0-20211221152037-f427b3e689c0 // indirect github.com/alecthomas/atomic v0.1.0-alpha2 // indirect github.com/alexflint/go-scalar v1.2.0 // indirect github.com/anacrolix/chansync v0.4.0 // indirect github.com/anacrolix/dht/v2 v2.21.0 // indirect + github.com/anacrolix/envpprof v1.3.0 // indirect github.com/anacrolix/ffprobe v1.1.0 // indirect github.com/anacrolix/generics v0.0.0-20230911070922-5dd7545c6b13 // indirect + github.com/anacrolix/go-libutp v1.3.1 // indirect github.com/anacrolix/missinggo v1.3.0 // indirect github.com/anacrolix/missinggo/perf v1.0.0 // indirect + github.com/anacrolix/mmsg v1.0.0 // indirect github.com/anacrolix/multiless v0.3.1-0.20221221005021-2d12701f83f7 // indirect github.com/anacrolix/stm v0.5.0 // indirect github.com/anacrolix/sync v0.5.1 // indirect github.com/anacrolix/upnp v0.1.3 // indirect github.com/anacrolix/utp v0.2.0 // indirect + github.com/bahlo/generic-list-go v0.2.0 // indirect github.com/benbjohnson/immutable v0.4.3 // indirect github.com/bits-and-blooms/bitset v1.13.0 // indirect github.com/bradfitz/iter v0.0.0-20191230175014-e8f45d346db8 // indirect @@ -53,19 +58,23 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/edsrzf/mmap-go v1.1.0 // indirect - github.com/frankban/quicktest v1.14.6 // indirect github.com/gabriel-vasile/mimetype v1.4.3 // indirect github.com/gin-contrib/sse v0.1.0 // indirect + github.com/go-llsqlite/adapter v0.1.0 // indirect + github.com/go-llsqlite/crawshaw v0.5.1 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect github.com/go-openapi/jsonpointer v0.20.2 // indirect github.com/go-openapi/jsonreference v0.20.4 // indirect github.com/go-openapi/spec v0.20.14 // indirect github.com/go-openapi/swag v0.22.9 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect - github.com/go-playground/validator/v10 v10.17.0 // indirect + github.com/go-playground/validator/v10 v10.18.0 // indirect github.com/goccy/go-json v0.10.2 // indirect github.com/google/btree v1.1.2 // indirect - github.com/google/go-cmp v0.6.0 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/gorilla/websocket v1.5.1 // indirect github.com/huandu/xstrings v1.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect @@ -76,18 +85,46 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/mschoch/smat v0.2.0 // indirect + github.com/ncruces/go-strftime v0.1.9 // indirect github.com/pelletier/go-toml/v2 v2.1.1 // indirect + github.com/pion/datachannel v1.5.5 // indirect + github.com/pion/dtls/v2 v2.2.10 // indirect + github.com/pion/ice/v2 v2.3.13 // indirect + github.com/pion/interceptor v0.1.25 // indirect + github.com/pion/logging v0.2.2 // indirect + github.com/pion/mdns v0.0.12 // indirect + github.com/pion/randutil v0.1.0 // indirect + github.com/pion/rtcp v1.2.13 // indirect + github.com/pion/rtp v1.8.3 // indirect + github.com/pion/sctp v1.8.12 // indirect + github.com/pion/sdp/v3 v3.0.6 // indirect + github.com/pion/srtp/v2 v2.0.18 // indirect + github.com/pion/stun v0.6.1 // indirect + github.com/pion/transport/v2 v2.2.4 // indirect + github.com/pion/turn/v2 v2.1.5 // indirect + github.com/pion/webrtc/v3 v3.2.28 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect github.com/rs/dnscache v0.0.0-20230804202142-fc85eb664529 // indirect - github.com/ryszard/goskiplist v0.0.0-20150312221310-2dfbae5fcf46 // indirect + github.com/stretchr/testify v1.8.4 // indirect + github.com/tidwall/btree v1.7.0 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/ugorji/go/codec v1.2.12 // indirect + go.opentelemetry.io/otel v1.23.1 // indirect + go.opentelemetry.io/otel/metric v1.23.1 // indirect + go.opentelemetry.io/otel/trace v1.23.1 // indirect golang.org/x/arch v0.7.0 // indirect - golang.org/x/crypto v0.18.0 // indirect - golang.org/x/net v0.20.0 // indirect + golang.org/x/crypto v0.19.0 // indirect + golang.org/x/net v0.21.0 // indirect golang.org/x/sync v0.6.0 // indirect - golang.org/x/sys v0.16.0 // indirect + golang.org/x/sys v0.17.0 // indirect golang.org/x/text v0.14.0 // indirect - golang.org/x/tools v0.17.0 // indirect + golang.org/x/tools v0.18.0 // indirect google.golang.org/protobuf v1.32.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect + modernc.org/libc v1.41.0 // indirect + modernc.org/mathutil v1.6.0 // indirect + modernc.org/memory v1.7.2 // indirect + modernc.org/sqlite v1.29.1 // indirect + zombiezen.com/go/sqlite v1.1.2 // indirect ) diff --git a/server/go.sum b/server/go.sum index fcc9247..b557efc 100644 --- a/server/go.sum +++ b/server/go.sum @@ -15,6 +15,8 @@ github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWX github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8= github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo= +github.com/ajwerner/btree v0.0.0-20211221152037-f427b3e689c0 h1:byYvvbfSo3+9efR4IeReh77gVs4PnNDR3AMOE9NJ7a0= +github.com/ajwerner/btree v0.0.0-20211221152037-f427b3e689c0/go.mod h1:q37NoqncT41qKc048STsifIt69LfUJ8SrWWcz/yam5k= github.com/alecthomas/assert/v2 v2.0.0-alpha3 h1:pcHeMvQ3OMstAWgaeaXIAL8uzB9xMm2zlxt+/4ml8lk= github.com/alecthomas/atomic v0.1.0-alpha2 h1:dqwXmax66gXvHhsOS4pGPZKqYOlTkapELkLb3MNdlH8= github.com/alecthomas/atomic v0.1.0-alpha2/go.mod h1:zD6QGEyw49HIq19caJDc2NMXAy8rNi9ROrxtMXATfyI= @@ -38,18 +40,24 @@ github.com/anacrolix/envpprof v0.0.0-20180404065416-323002cec2fa/go.mod h1:KgHhU github.com/anacrolix/envpprof v1.0.0/go.mod h1:KgHhUaQMc8cC0+cEflSgCFNFbKwi5h54gqtVn8yhP7c= github.com/anacrolix/envpprof v1.1.0/go.mod h1:My7T5oSqVfEn4MD4Meczkw/f5lSIndGAKu/0SM/rkf4= github.com/anacrolix/envpprof v1.3.0 h1:WJt9bpuT7A/CDCxPOv/eeZqHWlle/Y0keJUvc6tcJDk= +github.com/anacrolix/envpprof v1.3.0/go.mod h1:7QIG4CaX1uexQ3tqd5+BRa/9e2D02Wcertl6Yh0jCB0= github.com/anacrolix/ffprobe v1.0.0/go.mod h1:BIw+Bjol6CWjm/CRWrVLk2Vy+UYlkgmBZ05vpSYqZPw= github.com/anacrolix/ffprobe v1.1.0 h1:eKBudnERW9zRJ0+ge6FzkQ0pWLyq142+FJrwRwSRMT4= github.com/anacrolix/ffprobe v1.1.0/go.mod h1:MXe+zG/RRa5OdIf5+VYYfS/CfsSqOH7RrvGIqJBzqhI= github.com/anacrolix/generics v0.0.0-20230113004304-d6428d516633/go.mod h1:ff2rHB/joTV03aMSSn/AZNnaIpUw0h3njetGsaXcMy8= github.com/anacrolix/generics v0.0.0-20230911070922-5dd7545c6b13 h1:qwOprPTDMM3BASJRf84mmZnTXRsPGGJ8xoHKQS7m3so= github.com/anacrolix/generics v0.0.0-20230911070922-5dd7545c6b13/go.mod h1:ff2rHB/joTV03aMSSn/AZNnaIpUw0h3njetGsaXcMy8= +github.com/anacrolix/go-libutp v1.3.1 h1:idJzreNLl+hNjGC3ZnUOjujEaryeOGgkwHLqSGoige0= +github.com/anacrolix/go-libutp v1.3.1/go.mod h1:heF41EC8kN0qCLMokLBVkB8NXiLwx3t8R8810MTNI5o= github.com/anacrolix/log v0.3.0/go.mod h1:lWvLTqzAnCWPJA08T2HCstZi0L1y2Wyvm3FJgwU9jwU= github.com/anacrolix/log v0.6.0/go.mod h1:lWvLTqzAnCWPJA08T2HCstZi0L1y2Wyvm3FJgwU9jwU= github.com/anacrolix/log v0.13.1/go.mod h1:D4+CvN8SnruK6zIFS/xPoRJmtvtnxs+CSfDQ+BFxZ68= github.com/anacrolix/log v0.14.2/go.mod h1:1OmJESOtxQGNMlUO5rcv96Vpp9mfMqXXbe2RdinFLdY= -github.com/anacrolix/log v0.14.6-0.20240207013547-dfa5cb14b878 h1:qF2xGiWxd0botliWzEE8CyKkg3jhB9fCSjbmcgp+HkY= -github.com/anacrolix/log v0.14.6-0.20240207013547-dfa5cb14b878/go.mod h1:m0poRtlr41mriZlXBQ9SOVZ8yZBkLjOkDhd5Li5pITA= +github.com/anacrolix/log v0.15.0 h1:QIhbW5NDUL6P1Aml+ZfdaXJ+QFAnrO0K1EpFYs/nh9M= +github.com/anacrolix/log v0.15.0/go.mod h1:m0poRtlr41mriZlXBQ9SOVZ8yZBkLjOkDhd5Li5pITA= +github.com/anacrolix/lsan v0.0.0-20211126052245-807000409a62 h1:P04VG6Td13FHMgS5ZBcJX23NPC/fiC4cp9bXwYujdYM= +github.com/anacrolix/lsan v0.0.0-20211126052245-807000409a62/go.mod h1:66cFKPCO7Sl4vbFnAaSq7e4OXtdMhRSBagJGWgmpJbM= +github.com/anacrolix/missinggo v0.0.0-20180725070939-60ef2fbf63df/go.mod h1:kwGiTUTZ0+p4vAz3VbAI5a30t2YbvemcmspjKwrAz5s= github.com/anacrolix/missinggo v1.1.0/go.mod h1:MBJu3Sk/k3ZfGYcS7z18gwfu72Ey/xopPFJJbTi5yIo= github.com/anacrolix/missinggo v1.1.2-0.20190815015349-b888af804467/go.mod h1:MBJu3Sk/k3ZfGYcS7z18gwfu72Ey/xopPFJJbTi5yIo= github.com/anacrolix/missinggo v1.2.1/go.mod h1:J5cMhif8jPmFoC3+Uvob3OXXNIhOUikzMt+uUjeM21Y= @@ -61,6 +69,9 @@ github.com/anacrolix/missinggo/v2 v2.2.0/go.mod h1:o0jgJoYOyaoYQ4E2ZMISVa9c88BbU github.com/anacrolix/missinggo/v2 v2.5.1/go.mod h1:WEjqh2rmKECd0t1VhQkLGTdIWXO6f6NLjp5GlMZ+6FA= github.com/anacrolix/missinggo/v2 v2.7.3 h1:Ee//CmZBMadeNiYB/hHo9ly2PFOEZ4Fhsbnug3rDAIE= github.com/anacrolix/missinggo/v2 v2.7.3/go.mod h1:mIEtp9pgaXqt8VQ3NQxFOod/eQ1H0D1XsZzKUQfwtac= +github.com/anacrolix/mmsg v0.0.0-20180515031531-a4a3ba1fc8bb/go.mod h1:x2/ErsYUmT77kezS63+wzZp8E3byYB0gzirM/WMBLfw= +github.com/anacrolix/mmsg v1.0.0 h1:btC7YLjOn29aTUAExJiVUhQOuf/8rhm+/nWCMAnL3Hg= +github.com/anacrolix/mmsg v1.0.0/go.mod h1:x8kRaJY/dCrY9Al0PEcj1mb/uFHwP6GCJ9fLl4thEPc= github.com/anacrolix/multiless v0.3.1-0.20221221005021-2d12701f83f7 h1:lOtCD+LzoD1g7bowhYJNR++uV+FyY5bTZXKwnPex9S8= github.com/anacrolix/multiless v0.3.1-0.20221221005021-2d12701f83f7/go.mod h1:zJv1JF9AqdZiHwxqPgjuOZDGWER6nyE48WBCi/OOrMM= github.com/anacrolix/publicip v0.3.0 h1:QK+lvqNzZDznqWMe5lbnjdXsKb7Mvhqy6osV3J+HwPY= @@ -68,12 +79,15 @@ github.com/anacrolix/publicip v0.3.0/go.mod h1:tF1kAG96Ao3t9Q8zyfA7Lso1wOEfHHEcZ github.com/anacrolix/stm v0.2.0/go.mod h1:zoVQRvSiGjGoTmbM0vSLIiaKjWtNPeTvXUSdJQA4hsg= github.com/anacrolix/stm v0.5.0 h1:9df1KBpttF0TzLgDq51Z+TEabZKMythqgx89f1FQJt8= github.com/anacrolix/stm v0.5.0/go.mod h1:MOwrSy+jCm8Y7HYfMAwPj7qWVu7XoVvjOiYwJmpeB/M= +github.com/anacrolix/sync v0.0.0-20180808010631-44578de4e778/go.mod h1:s735Etp3joe/voe2sdaXLcqDdJSay1O0OPnM0ystjqk= github.com/anacrolix/sync v0.3.0/go.mod h1:BbecHL6jDSExojhNtgTFSBcdGerzNc64tz3DCOj/I0g= github.com/anacrolix/sync v0.5.1 h1:FbGju6GqSjzVoTgcXTUKkF041lnZkG5P0C3T5RL3SGc= github.com/anacrolix/sync v0.5.1/go.mod h1:BbecHL6jDSExojhNtgTFSBcdGerzNc64tz3DCOj/I0g= github.com/anacrolix/tagflag v0.0.0-20180109131632-2146c8d41bf0/go.mod h1:1m2U/K6ZT+JZG0+bdMK6qauP49QT4wE5pmhJXOKKCHw= github.com/anacrolix/tagflag v1.0.0/go.mod h1:1m2U/K6ZT+JZG0+bdMK6qauP49QT4wE5pmhJXOKKCHw= github.com/anacrolix/tagflag v1.1.0/go.mod h1:Scxs9CV10NQatSmbyjqmqmeQNwGzlNe0CMUMIxqHIG8= +github.com/anacrolix/torrent v1.54.0 h1:sl+2J1pHjJWq6+5G861+Yc74k2XTc/m8ijaMQR/8+2k= +github.com/anacrolix/torrent v1.54.0/go.mod h1:is8GNob5qDeZ5Kq+pKPiE2xqYUi1ms7IgSB+CftZETk= github.com/anacrolix/upnp v0.1.3 h1:NlYEhE75adz2npEJKjbqyqnyW9qU4STookvSNXBJ5ao= github.com/anacrolix/upnp v0.1.3/go.mod h1:Qyhbqo69gwNWvEk1xNTXsS5j7hMHef9hdr984+9fIic= github.com/anacrolix/utp v0.2.0 h1:65Cdmr6q9WSw2KsM+rtJFu7rqDzLl2bdysf4KlNPcFI= @@ -81,6 +95,8 @@ github.com/anacrolix/utp v0.2.0/go.mod h1:HGk4GYQw1O/3T1+yhqT/F6EcBd+AAwlo9dYErN github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0 h1:jfIu9sQUG6Ig+0+Ap1h4unLjW6YQJpKZVmUzxsD4E/Q= github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0/go.mod h1:t2tdKJDJF9BV14lnkjHmOQgcvEKgtqs5a1N3LNdJhGE= +github.com/bahlo/generic-list-go v0.2.0 h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPnH1Wvgk= +github.com/bahlo/generic-list-go v0.2.0/go.mod h1:2KvAjgMlE5NNynlg/5iLrrCCZ2+5xWbdbCW3pNTGyYg= github.com/benbjohnson/immutable v0.2.0/go.mod h1:uc6OHo6PN2++n98KHLxW8ef4W42ylHiQSENghE1ezxI= github.com/benbjohnson/immutable v0.4.3 h1:GYHcksoJ9K6HyAUpGxwZURrbTkXA0Dh4otXGqbhdrjA= github.com/benbjohnson/immutable v0.4.3/go.mod h1:qJIKKSmdqz1tVzNtst1DZzvaqOU1onk1rc03IeM3Owk= @@ -123,10 +139,11 @@ github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1 github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/edsrzf/mmap-go v1.1.0 h1:6EUwBLQ/Mcr1EYLE4Tn1VdW1A4ckqCQWZBw8Hr0kjpQ= github.com/edsrzf/mmap-go v1.1.0/go.mod h1:19H/e8pUPLicwkyNgOykDXkJ9F0MHE+Z52B8EIth78Q= +github.com/frankban/quicktest v1.9.0/go.mod h1:ui7WezCLWMWxVWr1GETZY3smRy0G4KWq9vcPtJmFl7Y= github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= -github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/gabriel-vasile/mimetype v1.4.3 h1:in2uUcidCuFcDKtdcBxlR0rJ1+fsokWf+uqxgUFjbI0= github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcPfT7nKyLpA0lbSSk= github.com/gin-contrib/cors v1.5.0 h1:DgGKV7DDoOn36DFkNtbHrjoRiT5ExCe+PC9/xp7aKvk= @@ -147,8 +164,17 @@ github.com/glycerine/goconvey v0.0.0-20190315024820-982ee783a72e/go.mod h1:Ogl1T github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-llsqlite/adapter v0.1.0 h1:wGSQNsu/rtYeu/lqZNZQMjwUdEF3OW66xTLvsFwJQUw= +github.com/go-llsqlite/adapter v0.1.0/go.mod h1:DADrR88ONKPPeSGjFp5iEN55Arx3fi2qXZeKCYDpbmU= +github.com/go-llsqlite/crawshaw v0.5.1 h1:dIYQG2qHrGjWXVXvl00JxIHBuwD+h8VXgNubLiMoPNU= +github.com/go-llsqlite/crawshaw v0.5.1/go.mod h1:/YJdV7uBQaYDE0fwe4z3wwJIZBJxdYzd38ICggWqtaE= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-openapi/jsonpointer v0.20.2 h1:mQc3nmndL8ZBzStEo3JYF8wzmeWffDH4VbXz58sAx6Q= github.com/go-openapi/jsonpointer v0.20.2/go.mod h1:bHen+N0u1KEO3YlmqOjTT9Adn1RfD91Ar825/PuiRVs= github.com/go-openapi/jsonreference v0.20.4 h1:bKlDxQxQJgwpUSgOENiMPzCTBVuc7vTdXSSgNeAhojU= @@ -166,9 +192,10 @@ github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+ github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= -github.com/go-playground/validator/v10 v10.17.0 h1:SmVVlfAOtlZncTxRuinDPomC2DkXJ4E5T9gDA0AIH74= -github.com/go-playground/validator/v10 v10.17.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= +github.com/go-playground/validator/v10 v10.18.0 h1:BvolUXjp4zuvkZ5YN5t7ebzbhlUtPsPm2S9NAZ5nl9U= +github.com/go-playground/validator/v10 v10.18.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= @@ -186,6 +213,9 @@ github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:x github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180124185431-e89373fe6b4a/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -196,21 +226,27 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= -github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20190309154008-847fc94819f9/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20190910122728-9d188e94fb99/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= +github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbcucJdbSo= github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4= +github.com/huandu/xstrings v1.3.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/huandu/xstrings v1.4.0 h1:D17IlohoQq4UcpqD7fDk80P7l+lwAmlFaBHgOipl2FU= github.com/huandu/xstrings v1.4.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= @@ -233,6 +269,7 @@ github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgSh github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= @@ -260,15 +297,70 @@ github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE github.com/mschoch/smat v0.2.0 h1:8imxQsjDm8yFEAVBe7azKmKSgzSkZXDuKkSq9374khM= github.com/mschoch/smat v0.2.0/go.mod h1:kc9mz7DoBKqDyiRL7VZN8KvXQMWeTaVnttLRXOlotKw= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4= +github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls= github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8= +github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= +github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI= github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pion/datachannel v1.5.5 h1:10ef4kwdjije+M9d7Xm9im2Y3O6A6ccQb0zcqZcJew8= +github.com/pion/datachannel v1.5.5/go.mod h1:iMz+lECmfdCMqFRhXhcA/219B0SQlbpoR2V118yimL0= +github.com/pion/dtls/v2 v2.2.7/go.mod h1:8WiMkebSHFD0T+dIU+UeBaoV7kDhOW5oDCzZ7WZ/F9s= +github.com/pion/dtls/v2 v2.2.10 h1:u2Axk+FyIR1VFTPurktB+1zoEPGIW3bmyj3LEFrXjAA= +github.com/pion/dtls/v2 v2.2.10/go.mod h1:d9SYc9fch0CqK90mRk1dC7AkzzpwJj6u2GU3u+9pqFE= +github.com/pion/ice/v2 v2.3.13 h1:xOxP+4V9nSDlUaGFRf/LvAuGHDXRcjIdsbbXPK/w7c8= +github.com/pion/ice/v2 v2.3.13/go.mod h1:KXJJcZK7E8WzrBEYnV4UtqEZsGeWfHxsNqhVcVvgjxw= +github.com/pion/interceptor v0.1.25 h1:pwY9r7P6ToQ3+IF0bajN0xmk/fNw/suTgaTdlwTDmhc= +github.com/pion/interceptor v0.1.25/go.mod h1:wkbPYAak5zKsfpVDYMtEfWEy8D4zL+rpxCxPImLOg3Y= +github.com/pion/logging v0.2.2 h1:M9+AIj/+pxNsDfAT64+MAVgJO0rsyLnoJKCqf//DoeY= +github.com/pion/logging v0.2.2/go.mod h1:k0/tDVsRCX2Mb2ZEmTqNa7CWsQPc+YYCB7Q+5pahoms= +github.com/pion/mdns v0.0.12 h1:CiMYlY+O0azojWDmxdNr7ADGrnZ+V6Ilfner+6mSVK8= +github.com/pion/mdns v0.0.12/go.mod h1:VExJjv8to/6Wqm1FXK+Ii/Z9tsVk/F5sD/N70cnYFbk= +github.com/pion/randutil v0.1.0 h1:CFG1UdESneORglEsnimhUjf33Rwjubwj6xfiOXBa3mA= +github.com/pion/randutil v0.1.0/go.mod h1:XcJrSMMbbMRhASFVOlj/5hQial/Y8oH/HVo7TBZq+j8= +github.com/pion/rtcp v1.2.10/go.mod h1:ztfEwXZNLGyF1oQDttz/ZKIBaeeg/oWbRYqzBM9TL1I= +github.com/pion/rtcp v1.2.12/go.mod h1:sn6qjxvnwyAkkPzPULIbVqSKI5Dv54Rv7VG0kNxh9L4= +github.com/pion/rtcp v1.2.13 h1:+EQijuisKwm/8VBs8nWllr0bIndR7Lf7cZG200mpbNo= +github.com/pion/rtcp v1.2.13/go.mod h1:sn6qjxvnwyAkkPzPULIbVqSKI5Dv54Rv7VG0kNxh9L4= +github.com/pion/rtp v1.8.2/go.mod h1:pBGHaFt/yW7bf1jjWAoUjpSNoDnw98KTMg+jWWvziqU= +github.com/pion/rtp v1.8.3 h1:VEHxqzSVQxCkKDSHro5/4IUUG1ea+MFdqR2R3xSpNU8= +github.com/pion/rtp v1.8.3/go.mod h1:pBGHaFt/yW7bf1jjWAoUjpSNoDnw98KTMg+jWWvziqU= +github.com/pion/sctp v1.8.5/go.mod h1:SUFFfDpViyKejTAdwD1d/HQsCu+V/40cCs2nZIvC3s0= +github.com/pion/sctp v1.8.12 h1:2VX50pedElH+is6FI+OKyRTeN5oy4mrk2HjnGa3UCmY= +github.com/pion/sctp v1.8.12/go.mod h1:cMLT45jqw3+jiJCrtHVwfQLnfR0MGZ4rgOJwUOIqLkI= +github.com/pion/sdp/v3 v3.0.6 h1:WuDLhtuFUUVpTfus9ILC4HRyHsW6TdugjEX/QY9OiUw= +github.com/pion/sdp/v3 v3.0.6/go.mod h1:iiFWFpQO8Fy3S5ldclBkpXqmWy02ns78NOKoLLL0YQw= +github.com/pion/srtp/v2 v2.0.18 h1:vKpAXfawO9RtTRKZJbG4y0v1b11NZxQnxRl85kGuUlo= +github.com/pion/srtp/v2 v2.0.18/go.mod h1:0KJQjA99A6/a0DOVTu1PhDSw0CXF2jTkqOoMg3ODqdA= +github.com/pion/stun v0.6.1 h1:8lp6YejULeHBF8NmV8e2787BogQhduZugh5PdhDyyN4= +github.com/pion/stun v0.6.1/go.mod h1:/hO7APkX4hZKu/D0f2lHzNyvdkTGtIy3NDmLR7kSz/8= +github.com/pion/transport v0.14.1 h1:XSM6olwW+o8J4SCmOBb/BpwZypkHeyM0PGFCxNQBr40= +github.com/pion/transport v0.14.1/go.mod h1:4tGmbk00NeYA3rUa9+n+dzCCoKkcy3YlYb99Jn2fNnI= +github.com/pion/transport/v2 v2.2.1/go.mod h1:cXXWavvCnFF6McHTft3DWS9iic2Mftcz1Aq29pGcU5g= +github.com/pion/transport/v2 v2.2.2/go.mod h1:OJg3ojoBJopjEeECq2yJdXH9YVrUJ1uQ++NjXLOUorc= +github.com/pion/transport/v2 v2.2.3/go.mod h1:q2U/tf9FEfnSBGSW6w5Qp5PFWRLRj3NjLhCCgpRK4p0= +github.com/pion/transport/v2 v2.2.4 h1:41JJK6DZQYSeVLxILA2+F4ZkKb4Xd/tFJZRFZQ9QAlo= +github.com/pion/transport/v2 v2.2.4/go.mod h1:q2U/tf9FEfnSBGSW6w5Qp5PFWRLRj3NjLhCCgpRK4p0= +github.com/pion/transport/v3 v3.0.1 h1:gDTlPJwROfSfz6QfSi0ZmeCSkFcnWWiiR9ES0ouANiM= +github.com/pion/transport/v3 v3.0.1/go.mod h1:UY7kiITrlMv7/IKgd5eTUcaahZx5oUN3l9SzK5f5xE0= +github.com/pion/turn/v2 v2.1.3/go.mod h1:huEpByKKHix2/b9kmTAM3YoX6MKP+/D//0ClgUYR2fY= +github.com/pion/turn/v2 v2.1.5 h1:tTyy7TM3DCoX9IxTt/yHc/bThiRLyXK3T1YbNcgx9k4= +github.com/pion/turn/v2 v2.1.5/go.mod h1:huEpByKKHix2/b9kmTAM3YoX6MKP+/D//0ClgUYR2fY= +github.com/pion/webrtc/v3 v3.2.28 h1:ienStxZ6HcjtH2UlmnFpMM0loENiYjaX437uIUpQSKo= +github.com/pion/webrtc/v3 v3.2.28/go.mod h1:PNRCEuQlibrmuBhOTnol9j6KkIbUG11aHLEfNpUYey0= github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= @@ -295,6 +387,8 @@ github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsT github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= +github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= @@ -303,6 +397,7 @@ github.com/rs/dnscache v0.0.0-20230804202142-fc85eb664529 h1:18kd+8ZUlt/ARXhljq+ github.com/rs/dnscache v0.0.0-20230804202142-fc85eb664529/go.mod h1:qe5TWALJ8/a1Lqznoc5BDHpYX/8HU60Hm2AwRmqzxqA= github.com/ryszard/goskiplist v0.0.0-20150312221310-2dfbae5fcf46 h1:GHRpF1pTW19a8tTFrMLUcfWwyC0pnifVo2ClaLq+hP8= github.com/ryszard/goskiplist v0.0.0-20150312221310-2dfbae5fcf46/go.mod h1:uAQ5PCi+MFsC7HjREoAz1BU+Mq60+05gifQSsHSDG/8= +github.com/sclevine/agouti v3.0.0+incompatible/go.mod h1:b4WX9W9L1sfQKXeJf1mUTLZKJ48R1S7H23Ji7oFO5Bw= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= @@ -317,10 +412,12 @@ github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/swaggo/files v1.0.1 h1:J1bVJ4XHZNq0I46UU90611i9/YzdrF7x92oX1ig5IdE= @@ -329,11 +426,11 @@ github.com/swaggo/gin-swagger v1.6.0 h1:y8sxvQ3E20/RCyrXeFfg60r6H0Z+SwpTjMYsMm+z github.com/swaggo/gin-swagger v1.6.0/go.mod h1:BG00cCEy294xtVpyIAHG6+e2Qzj/xKlRdOqDkvq0uzo= github.com/swaggo/swag v1.16.3 h1:PnCYjPCah8FK4I26l2F/KQ4yz3sILcVUN3cTlBFA9Pg= github.com/swaggo/swag v1.16.3/go.mod h1:DImHIuOFXKpMFAQjcC7FG4m3Dg4+QuUgUzJmKjI/gRk= +github.com/tidwall/btree v1.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI= +github.com/tidwall/btree v1.7.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tinylib/msgp v1.1.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tsynik/torrent v1.2.13 h1:PyOTz6dpzsoIT0IhiEmg6H5VD+mFqF93Q2L9iFyqPtQ= -github.com/tsynik/torrent v1.2.13/go.mod h1:NDxg14AwVqi3PWt1oStYLnyUxHYHX3qGKBAZVh/6Jk8= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= @@ -342,6 +439,7 @@ github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65E github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/willf/bitset v1.1.9/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= github.com/willf/bitset v1.1.10/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= @@ -349,29 +447,42 @@ go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opentelemetry.io/otel v1.23.1 h1:Za4UzOqJYS+MUczKI320AtqZHZb7EqxO00jAHE0jmQY= +go.opentelemetry.io/otel v1.23.1/go.mod h1:Td0134eafDLcTS4y+zQ26GE8u3dEuRBiBCTUIRHaikA= +go.opentelemetry.io/otel/metric v1.23.1 h1:PQJmqJ9u2QaJLBOELl1cxIdPcpbwzbkjfEyelTl2rlo= +go.opentelemetry.io/otel/metric v1.23.1/go.mod h1:mpG2QPlAfnK8yNhNJAxDZruU9Y1/HubbC+KyH8FaCWI= +go.opentelemetry.io/otel/trace v1.23.1 h1:4LrmmEd8AU2rFvU1zegmvqW7+kWarxtNOPyeL6HmYY8= +go.opentelemetry.io/otel/trace v1.23.1/go.mod h1:4IpnpJFwr1mo/6HL8XIPJaE9y0+u1KcVmuW7dwFSVrI= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/arch v0.7.0 h1:pskyeJh/3AmoQ8CPE95vxHLqp1G1GfGNXTmcl9NEKTc= golang.org/x/arch v0.7.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= +golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE= +golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= +golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= +golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo= +golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20220428152302-39d4317da171/go.mod h1:lgLbSvA5ygNOMpwM/9anMpWVlVJ7Z+cHWq/eFuinpGE= -golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3 h1:/RIbNt/Zr7rVhIkQhooTxCxFcdWLGIKnZA4IXNFSrvo= -golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08= +golang.org/x/exp v0.0.0-20240213143201-ec583247a57a h1:HinSgX1tJRX3KsL//Gxynpw5CTOAIPhgL4W8PNiIpVE= +golang.org/x/exp v0.0.0-20240213143201-ec583247a57a/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= golang.org/x/image v0.15.0 h1:kOELfmgrmJlw4Cdb7g/QGuB3CvDrXbqEIww/pNtNBm8= golang.org/x/image v0.15.0/go.mod h1:HUYqC05R2ZcZ3ejNQsIHQDQiwWM4JBqmm6MKANTp4LE= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.6.0-dev.0.20211013180041-c96bc1413d57/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -383,13 +494,23 @@ golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220524220425-1d687d428aca/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= +golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.13.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= +golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -398,8 +519,10 @@ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -411,11 +534,17 @@ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200413165638-669c56c373c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -423,19 +552,36 @@ golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= +golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= +golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= +golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= @@ -447,10 +593,12 @@ golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3 golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.8-0.20211029000441-d6a9af8af023/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc= -golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.18.0 h1:k8NLag8AGHnn+PHbl7g43CtqZAwG60vZkLqgyZgIHgQ= +golang.org/x/tools v0.18.0/go.mod h1:GL7B4CwcLLeo59yx/9UWWuNOW1n3VZ4f5axWfML7Lcg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -469,6 +617,9 @@ google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= @@ -486,10 +637,22 @@ gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +modernc.org/libc v1.41.0 h1:g9YAc6BkKlgORsUWj+JwqoB1wU3o4DE3bM3yvA3k+Gk= +modernc.org/libc v1.41.0/go.mod h1:w0eszPsiXoOnoMJgrXjglgLuDy/bt5RR4y3QzUUeodY= +modernc.org/mathutil v1.6.0 h1:fRe9+AmYlaej+64JsEEhoWuAYBkOtQiMEU7n/XgfYi4= +modernc.org/mathutil v1.6.0/go.mod h1:Ui5Q9q1TR2gFm0AQRqQUaBWFLAhQpCwNcuhBOSedWPo= +modernc.org/memory v1.7.2 h1:Klh90S215mmH8c9gO98QxQFsY+W451E8AnzjoE2ee1E= +modernc.org/memory v1.7.2/go.mod h1:NO4NVCQy0N7ln+T9ngWqOQfi7ley4vpwvARR+Hjw95E= +modernc.org/sqlite v1.29.1 h1:19GY2qvWB4VPw0HppFlZCPAbmxFU41r+qjKZQdQ1ryA= +modernc.org/sqlite v1.29.1/go.mod h1:hG41jCYxOAOoO6BRK66AdRlmOcDzXf7qnwlwjUIOqa0= nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= +zombiezen.com/go/sqlite v1.1.2 h1:faRIy8qc5Yvt/ZM9xv6zgufo8PI2rnPWIif2VTy8+uw= +zombiezen.com/go/sqlite v1.1.2/go.mod h1:yRl27//s/9aXU3RWs8uFQwjkTG9gYNGEls6+6SvrclY= From d1fbd2d31149c21bb4676a9721a64518de8caf1f Mon Sep 17 00:00:00 2001 From: nikk gitanes Date: Thu, 15 Feb 2024 09:27:41 +0300 Subject: [PATCH 51/76] anacrolix/torrent v1.54.0 => tsynik/torrent v1.2.13 --- server/go.mod | 45 ++----------- server/go.sum | 171 ++------------------------------------------------ 2 files changed, 8 insertions(+), 208 deletions(-) diff --git a/server/go.mod b/server/go.mod index bd88e06..dc48632 100644 --- a/server/go.mod +++ b/server/go.mod @@ -2,7 +2,7 @@ module server go 1.20 -replace github.com/anacrolix/torrent v1.53.3 => github.com/tsynik/torrent v1.2.13 +replace github.com/anacrolix/torrent v1.54.0 => github.com/tsynik/torrent v1.2.13 require ( github.com/agnivade/levenshtein v1.1.1 @@ -31,24 +31,19 @@ require ( require ( github.com/KyleBanks/depth v1.2.1 // indirect github.com/RoaringBitmap/roaring v1.9.0 // indirect - github.com/ajwerner/btree v0.0.0-20211221152037-f427b3e689c0 // indirect github.com/alecthomas/atomic v0.1.0-alpha2 // indirect github.com/alexflint/go-scalar v1.2.0 // indirect github.com/anacrolix/chansync v0.4.0 // indirect github.com/anacrolix/dht/v2 v2.21.0 // indirect - github.com/anacrolix/envpprof v1.3.0 // indirect github.com/anacrolix/ffprobe v1.1.0 // indirect github.com/anacrolix/generics v0.0.0-20230911070922-5dd7545c6b13 // indirect - github.com/anacrolix/go-libutp v1.3.1 // indirect github.com/anacrolix/missinggo v1.3.0 // indirect github.com/anacrolix/missinggo/perf v1.0.0 // indirect - github.com/anacrolix/mmsg v1.0.0 // indirect github.com/anacrolix/multiless v0.3.1-0.20221221005021-2d12701f83f7 // indirect github.com/anacrolix/stm v0.5.0 // indirect github.com/anacrolix/sync v0.5.1 // indirect github.com/anacrolix/upnp v0.1.3 // indirect github.com/anacrolix/utp v0.2.0 // indirect - github.com/bahlo/generic-list-go v0.2.0 // indirect github.com/benbjohnson/immutable v0.4.3 // indirect github.com/bits-and-blooms/bitset v1.13.0 // indirect github.com/bradfitz/iter v0.0.0-20191230175014-e8f45d346db8 // indirect @@ -58,12 +53,9 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/edsrzf/mmap-go v1.1.0 // indirect + github.com/frankban/quicktest v1.14.6 // indirect github.com/gabriel-vasile/mimetype v1.4.3 // indirect github.com/gin-contrib/sse v0.1.0 // indirect - github.com/go-llsqlite/adapter v0.1.0 // indirect - github.com/go-llsqlite/crawshaw v0.5.1 // indirect - github.com/go-logr/logr v1.4.1 // indirect - github.com/go-logr/stdr v1.2.2 // indirect github.com/go-openapi/jsonpointer v0.20.2 // indirect github.com/go-openapi/jsonreference v0.20.4 // indirect github.com/go-openapi/spec v0.20.14 // indirect @@ -73,8 +65,7 @@ require ( github.com/go-playground/validator/v10 v10.18.0 // indirect github.com/goccy/go-json v0.10.2 // indirect github.com/google/btree v1.1.2 // indirect - github.com/google/uuid v1.6.0 // indirect - github.com/gorilla/websocket v1.5.1 // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/huandu/xstrings v1.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect @@ -85,34 +76,11 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/mschoch/smat v0.2.0 // indirect - github.com/ncruces/go-strftime v0.1.9 // indirect github.com/pelletier/go-toml/v2 v2.1.1 // indirect - github.com/pion/datachannel v1.5.5 // indirect - github.com/pion/dtls/v2 v2.2.10 // indirect - github.com/pion/ice/v2 v2.3.13 // indirect - github.com/pion/interceptor v0.1.25 // indirect - github.com/pion/logging v0.2.2 // indirect - github.com/pion/mdns v0.0.12 // indirect - github.com/pion/randutil v0.1.0 // indirect - github.com/pion/rtcp v1.2.13 // indirect - github.com/pion/rtp v1.8.3 // indirect - github.com/pion/sctp v1.8.12 // indirect - github.com/pion/sdp/v3 v3.0.6 // indirect - github.com/pion/srtp/v2 v2.0.18 // indirect - github.com/pion/stun v0.6.1 // indirect - github.com/pion/transport/v2 v2.2.4 // indirect - github.com/pion/turn/v2 v2.1.5 // indirect - github.com/pion/webrtc/v3 v3.2.28 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect github.com/rs/dnscache v0.0.0-20230804202142-fc85eb664529 // indirect - github.com/stretchr/testify v1.8.4 // indirect - github.com/tidwall/btree v1.7.0 // indirect + github.com/ryszard/goskiplist v0.0.0-20150312221310-2dfbae5fcf46 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/ugorji/go/codec v1.2.12 // indirect - go.opentelemetry.io/otel v1.23.1 // indirect - go.opentelemetry.io/otel/metric v1.23.1 // indirect - go.opentelemetry.io/otel/trace v1.23.1 // indirect golang.org/x/arch v0.7.0 // indirect golang.org/x/crypto v0.19.0 // indirect golang.org/x/net v0.21.0 // indirect @@ -122,9 +90,4 @@ require ( golang.org/x/tools v0.18.0 // indirect google.golang.org/protobuf v1.32.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - modernc.org/libc v1.41.0 // indirect - modernc.org/mathutil v1.6.0 // indirect - modernc.org/memory v1.7.2 // indirect - modernc.org/sqlite v1.29.1 // indirect - zombiezen.com/go/sqlite v1.1.2 // indirect ) diff --git a/server/go.sum b/server/go.sum index b557efc..011c105 100644 --- a/server/go.sum +++ b/server/go.sum @@ -15,8 +15,6 @@ github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWX github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8= github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo= -github.com/ajwerner/btree v0.0.0-20211221152037-f427b3e689c0 h1:byYvvbfSo3+9efR4IeReh77gVs4PnNDR3AMOE9NJ7a0= -github.com/ajwerner/btree v0.0.0-20211221152037-f427b3e689c0/go.mod h1:q37NoqncT41qKc048STsifIt69LfUJ8SrWWcz/yam5k= github.com/alecthomas/assert/v2 v2.0.0-alpha3 h1:pcHeMvQ3OMstAWgaeaXIAL8uzB9xMm2zlxt+/4ml8lk= github.com/alecthomas/atomic v0.1.0-alpha2 h1:dqwXmax66gXvHhsOS4pGPZKqYOlTkapELkLb3MNdlH8= github.com/alecthomas/atomic v0.1.0-alpha2/go.mod h1:zD6QGEyw49HIq19caJDc2NMXAy8rNi9ROrxtMXATfyI= @@ -40,24 +38,18 @@ github.com/anacrolix/envpprof v0.0.0-20180404065416-323002cec2fa/go.mod h1:KgHhU github.com/anacrolix/envpprof v1.0.0/go.mod h1:KgHhUaQMc8cC0+cEflSgCFNFbKwi5h54gqtVn8yhP7c= github.com/anacrolix/envpprof v1.1.0/go.mod h1:My7T5oSqVfEn4MD4Meczkw/f5lSIndGAKu/0SM/rkf4= github.com/anacrolix/envpprof v1.3.0 h1:WJt9bpuT7A/CDCxPOv/eeZqHWlle/Y0keJUvc6tcJDk= -github.com/anacrolix/envpprof v1.3.0/go.mod h1:7QIG4CaX1uexQ3tqd5+BRa/9e2D02Wcertl6Yh0jCB0= github.com/anacrolix/ffprobe v1.0.0/go.mod h1:BIw+Bjol6CWjm/CRWrVLk2Vy+UYlkgmBZ05vpSYqZPw= github.com/anacrolix/ffprobe v1.1.0 h1:eKBudnERW9zRJ0+ge6FzkQ0pWLyq142+FJrwRwSRMT4= github.com/anacrolix/ffprobe v1.1.0/go.mod h1:MXe+zG/RRa5OdIf5+VYYfS/CfsSqOH7RrvGIqJBzqhI= github.com/anacrolix/generics v0.0.0-20230113004304-d6428d516633/go.mod h1:ff2rHB/joTV03aMSSn/AZNnaIpUw0h3njetGsaXcMy8= github.com/anacrolix/generics v0.0.0-20230911070922-5dd7545c6b13 h1:qwOprPTDMM3BASJRf84mmZnTXRsPGGJ8xoHKQS7m3so= github.com/anacrolix/generics v0.0.0-20230911070922-5dd7545c6b13/go.mod h1:ff2rHB/joTV03aMSSn/AZNnaIpUw0h3njetGsaXcMy8= -github.com/anacrolix/go-libutp v1.3.1 h1:idJzreNLl+hNjGC3ZnUOjujEaryeOGgkwHLqSGoige0= -github.com/anacrolix/go-libutp v1.3.1/go.mod h1:heF41EC8kN0qCLMokLBVkB8NXiLwx3t8R8810MTNI5o= github.com/anacrolix/log v0.3.0/go.mod h1:lWvLTqzAnCWPJA08T2HCstZi0L1y2Wyvm3FJgwU9jwU= github.com/anacrolix/log v0.6.0/go.mod h1:lWvLTqzAnCWPJA08T2HCstZi0L1y2Wyvm3FJgwU9jwU= github.com/anacrolix/log v0.13.1/go.mod h1:D4+CvN8SnruK6zIFS/xPoRJmtvtnxs+CSfDQ+BFxZ68= github.com/anacrolix/log v0.14.2/go.mod h1:1OmJESOtxQGNMlUO5rcv96Vpp9mfMqXXbe2RdinFLdY= github.com/anacrolix/log v0.15.0 h1:QIhbW5NDUL6P1Aml+ZfdaXJ+QFAnrO0K1EpFYs/nh9M= github.com/anacrolix/log v0.15.0/go.mod h1:m0poRtlr41mriZlXBQ9SOVZ8yZBkLjOkDhd5Li5pITA= -github.com/anacrolix/lsan v0.0.0-20211126052245-807000409a62 h1:P04VG6Td13FHMgS5ZBcJX23NPC/fiC4cp9bXwYujdYM= -github.com/anacrolix/lsan v0.0.0-20211126052245-807000409a62/go.mod h1:66cFKPCO7Sl4vbFnAaSq7e4OXtdMhRSBagJGWgmpJbM= -github.com/anacrolix/missinggo v0.0.0-20180725070939-60ef2fbf63df/go.mod h1:kwGiTUTZ0+p4vAz3VbAI5a30t2YbvemcmspjKwrAz5s= github.com/anacrolix/missinggo v1.1.0/go.mod h1:MBJu3Sk/k3ZfGYcS7z18gwfu72Ey/xopPFJJbTi5yIo= github.com/anacrolix/missinggo v1.1.2-0.20190815015349-b888af804467/go.mod h1:MBJu3Sk/k3ZfGYcS7z18gwfu72Ey/xopPFJJbTi5yIo= github.com/anacrolix/missinggo v1.2.1/go.mod h1:J5cMhif8jPmFoC3+Uvob3OXXNIhOUikzMt+uUjeM21Y= @@ -69,9 +61,6 @@ github.com/anacrolix/missinggo/v2 v2.2.0/go.mod h1:o0jgJoYOyaoYQ4E2ZMISVa9c88BbU github.com/anacrolix/missinggo/v2 v2.5.1/go.mod h1:WEjqh2rmKECd0t1VhQkLGTdIWXO6f6NLjp5GlMZ+6FA= github.com/anacrolix/missinggo/v2 v2.7.3 h1:Ee//CmZBMadeNiYB/hHo9ly2PFOEZ4Fhsbnug3rDAIE= github.com/anacrolix/missinggo/v2 v2.7.3/go.mod h1:mIEtp9pgaXqt8VQ3NQxFOod/eQ1H0D1XsZzKUQfwtac= -github.com/anacrolix/mmsg v0.0.0-20180515031531-a4a3ba1fc8bb/go.mod h1:x2/ErsYUmT77kezS63+wzZp8E3byYB0gzirM/WMBLfw= -github.com/anacrolix/mmsg v1.0.0 h1:btC7YLjOn29aTUAExJiVUhQOuf/8rhm+/nWCMAnL3Hg= -github.com/anacrolix/mmsg v1.0.0/go.mod h1:x8kRaJY/dCrY9Al0PEcj1mb/uFHwP6GCJ9fLl4thEPc= github.com/anacrolix/multiless v0.3.1-0.20221221005021-2d12701f83f7 h1:lOtCD+LzoD1g7bowhYJNR++uV+FyY5bTZXKwnPex9S8= github.com/anacrolix/multiless v0.3.1-0.20221221005021-2d12701f83f7/go.mod h1:zJv1JF9AqdZiHwxqPgjuOZDGWER6nyE48WBCi/OOrMM= github.com/anacrolix/publicip v0.3.0 h1:QK+lvqNzZDznqWMe5lbnjdXsKb7Mvhqy6osV3J+HwPY= @@ -79,15 +68,12 @@ github.com/anacrolix/publicip v0.3.0/go.mod h1:tF1kAG96Ao3t9Q8zyfA7Lso1wOEfHHEcZ github.com/anacrolix/stm v0.2.0/go.mod h1:zoVQRvSiGjGoTmbM0vSLIiaKjWtNPeTvXUSdJQA4hsg= github.com/anacrolix/stm v0.5.0 h1:9df1KBpttF0TzLgDq51Z+TEabZKMythqgx89f1FQJt8= github.com/anacrolix/stm v0.5.0/go.mod h1:MOwrSy+jCm8Y7HYfMAwPj7qWVu7XoVvjOiYwJmpeB/M= -github.com/anacrolix/sync v0.0.0-20180808010631-44578de4e778/go.mod h1:s735Etp3joe/voe2sdaXLcqDdJSay1O0OPnM0ystjqk= github.com/anacrolix/sync v0.3.0/go.mod h1:BbecHL6jDSExojhNtgTFSBcdGerzNc64tz3DCOj/I0g= github.com/anacrolix/sync v0.5.1 h1:FbGju6GqSjzVoTgcXTUKkF041lnZkG5P0C3T5RL3SGc= github.com/anacrolix/sync v0.5.1/go.mod h1:BbecHL6jDSExojhNtgTFSBcdGerzNc64tz3DCOj/I0g= github.com/anacrolix/tagflag v0.0.0-20180109131632-2146c8d41bf0/go.mod h1:1m2U/K6ZT+JZG0+bdMK6qauP49QT4wE5pmhJXOKKCHw= github.com/anacrolix/tagflag v1.0.0/go.mod h1:1m2U/K6ZT+JZG0+bdMK6qauP49QT4wE5pmhJXOKKCHw= github.com/anacrolix/tagflag v1.1.0/go.mod h1:Scxs9CV10NQatSmbyjqmqmeQNwGzlNe0CMUMIxqHIG8= -github.com/anacrolix/torrent v1.54.0 h1:sl+2J1pHjJWq6+5G861+Yc74k2XTc/m8ijaMQR/8+2k= -github.com/anacrolix/torrent v1.54.0/go.mod h1:is8GNob5qDeZ5Kq+pKPiE2xqYUi1ms7IgSB+CftZETk= github.com/anacrolix/upnp v0.1.3 h1:NlYEhE75adz2npEJKjbqyqnyW9qU4STookvSNXBJ5ao= github.com/anacrolix/upnp v0.1.3/go.mod h1:Qyhbqo69gwNWvEk1xNTXsS5j7hMHef9hdr984+9fIic= github.com/anacrolix/utp v0.2.0 h1:65Cdmr6q9WSw2KsM+rtJFu7rqDzLl2bdysf4KlNPcFI= @@ -95,8 +81,6 @@ github.com/anacrolix/utp v0.2.0/go.mod h1:HGk4GYQw1O/3T1+yhqT/F6EcBd+AAwlo9dYErN github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0 h1:jfIu9sQUG6Ig+0+Ap1h4unLjW6YQJpKZVmUzxsD4E/Q= github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0/go.mod h1:t2tdKJDJF9BV14lnkjHmOQgcvEKgtqs5a1N3LNdJhGE= -github.com/bahlo/generic-list-go v0.2.0 h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPnH1Wvgk= -github.com/bahlo/generic-list-go v0.2.0/go.mod h1:2KvAjgMlE5NNynlg/5iLrrCCZ2+5xWbdbCW3pNTGyYg= github.com/benbjohnson/immutable v0.2.0/go.mod h1:uc6OHo6PN2++n98KHLxW8ef4W42ylHiQSENghE1ezxI= github.com/benbjohnson/immutable v0.4.3 h1:GYHcksoJ9K6HyAUpGxwZURrbTkXA0Dh4otXGqbhdrjA= github.com/benbjohnson/immutable v0.4.3/go.mod h1:qJIKKSmdqz1tVzNtst1DZzvaqOU1onk1rc03IeM3Owk= @@ -139,11 +123,10 @@ github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1 github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/edsrzf/mmap-go v1.1.0 h1:6EUwBLQ/Mcr1EYLE4Tn1VdW1A4ckqCQWZBw8Hr0kjpQ= github.com/edsrzf/mmap-go v1.1.0/go.mod h1:19H/e8pUPLicwkyNgOykDXkJ9F0MHE+Z52B8EIth78Q= -github.com/frankban/quicktest v1.9.0/go.mod h1:ui7WezCLWMWxVWr1GETZY3smRy0G4KWq9vcPtJmFl7Y= github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/gabriel-vasile/mimetype v1.4.3 h1:in2uUcidCuFcDKtdcBxlR0rJ1+fsokWf+uqxgUFjbI0= github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcPfT7nKyLpA0lbSSk= github.com/gin-contrib/cors v1.5.0 h1:DgGKV7DDoOn36DFkNtbHrjoRiT5ExCe+PC9/xp7aKvk= @@ -164,17 +147,8 @@ github.com/glycerine/goconvey v0.0.0-20190315024820-982ee783a72e/go.mod h1:Ogl1T github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-llsqlite/adapter v0.1.0 h1:wGSQNsu/rtYeu/lqZNZQMjwUdEF3OW66xTLvsFwJQUw= -github.com/go-llsqlite/adapter v0.1.0/go.mod h1:DADrR88ONKPPeSGjFp5iEN55Arx3fi2qXZeKCYDpbmU= -github.com/go-llsqlite/crawshaw v0.5.1 h1:dIYQG2qHrGjWXVXvl00JxIHBuwD+h8VXgNubLiMoPNU= -github.com/go-llsqlite/crawshaw v0.5.1/go.mod h1:/YJdV7uBQaYDE0fwe4z3wwJIZBJxdYzd38ICggWqtaE= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= -github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= -github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= -github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-openapi/jsonpointer v0.20.2 h1:mQc3nmndL8ZBzStEo3JYF8wzmeWffDH4VbXz58sAx6Q= github.com/go-openapi/jsonpointer v0.20.2/go.mod h1:bHen+N0u1KEO3YlmqOjTT9Adn1RfD91Ar825/PuiRVs= github.com/go-openapi/jsonreference v0.20.4 h1:bKlDxQxQJgwpUSgOENiMPzCTBVuc7vTdXSSgNeAhojU= @@ -195,7 +169,6 @@ github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GO github.com/go-playground/validator/v10 v10.18.0 h1:BvolUXjp4zuvkZ5YN5t7ebzbhlUtPsPm2S9NAZ5nl9U= github.com/go-playground/validator/v10 v10.18.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= @@ -213,9 +186,6 @@ github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:x github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180124185431-e89373fe6b4a/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -226,27 +196,21 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= -github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20190309154008-847fc94819f9/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20190910122728-9d188e94fb99/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= -github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbcucJdbSo= github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4= -github.com/huandu/xstrings v1.3.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/huandu/xstrings v1.4.0 h1:D17IlohoQq4UcpqD7fDk80P7l+lwAmlFaBHgOipl2FU= github.com/huandu/xstrings v1.4.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= @@ -269,7 +233,6 @@ github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgSh github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= @@ -297,70 +260,15 @@ github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE github.com/mschoch/smat v0.2.0 h1:8imxQsjDm8yFEAVBe7azKmKSgzSkZXDuKkSq9374khM= github.com/mschoch/smat v0.2.0/go.mod h1:kc9mz7DoBKqDyiRL7VZN8KvXQMWeTaVnttLRXOlotKw= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4= -github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls= github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8= -github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= -github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI= github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -github.com/pion/datachannel v1.5.5 h1:10ef4kwdjije+M9d7Xm9im2Y3O6A6ccQb0zcqZcJew8= -github.com/pion/datachannel v1.5.5/go.mod h1:iMz+lECmfdCMqFRhXhcA/219B0SQlbpoR2V118yimL0= -github.com/pion/dtls/v2 v2.2.7/go.mod h1:8WiMkebSHFD0T+dIU+UeBaoV7kDhOW5oDCzZ7WZ/F9s= -github.com/pion/dtls/v2 v2.2.10 h1:u2Axk+FyIR1VFTPurktB+1zoEPGIW3bmyj3LEFrXjAA= -github.com/pion/dtls/v2 v2.2.10/go.mod h1:d9SYc9fch0CqK90mRk1dC7AkzzpwJj6u2GU3u+9pqFE= -github.com/pion/ice/v2 v2.3.13 h1:xOxP+4V9nSDlUaGFRf/LvAuGHDXRcjIdsbbXPK/w7c8= -github.com/pion/ice/v2 v2.3.13/go.mod h1:KXJJcZK7E8WzrBEYnV4UtqEZsGeWfHxsNqhVcVvgjxw= -github.com/pion/interceptor v0.1.25 h1:pwY9r7P6ToQ3+IF0bajN0xmk/fNw/suTgaTdlwTDmhc= -github.com/pion/interceptor v0.1.25/go.mod h1:wkbPYAak5zKsfpVDYMtEfWEy8D4zL+rpxCxPImLOg3Y= -github.com/pion/logging v0.2.2 h1:M9+AIj/+pxNsDfAT64+MAVgJO0rsyLnoJKCqf//DoeY= -github.com/pion/logging v0.2.2/go.mod h1:k0/tDVsRCX2Mb2ZEmTqNa7CWsQPc+YYCB7Q+5pahoms= -github.com/pion/mdns v0.0.12 h1:CiMYlY+O0azojWDmxdNr7ADGrnZ+V6Ilfner+6mSVK8= -github.com/pion/mdns v0.0.12/go.mod h1:VExJjv8to/6Wqm1FXK+Ii/Z9tsVk/F5sD/N70cnYFbk= -github.com/pion/randutil v0.1.0 h1:CFG1UdESneORglEsnimhUjf33Rwjubwj6xfiOXBa3mA= -github.com/pion/randutil v0.1.0/go.mod h1:XcJrSMMbbMRhASFVOlj/5hQial/Y8oH/HVo7TBZq+j8= -github.com/pion/rtcp v1.2.10/go.mod h1:ztfEwXZNLGyF1oQDttz/ZKIBaeeg/oWbRYqzBM9TL1I= -github.com/pion/rtcp v1.2.12/go.mod h1:sn6qjxvnwyAkkPzPULIbVqSKI5Dv54Rv7VG0kNxh9L4= -github.com/pion/rtcp v1.2.13 h1:+EQijuisKwm/8VBs8nWllr0bIndR7Lf7cZG200mpbNo= -github.com/pion/rtcp v1.2.13/go.mod h1:sn6qjxvnwyAkkPzPULIbVqSKI5Dv54Rv7VG0kNxh9L4= -github.com/pion/rtp v1.8.2/go.mod h1:pBGHaFt/yW7bf1jjWAoUjpSNoDnw98KTMg+jWWvziqU= -github.com/pion/rtp v1.8.3 h1:VEHxqzSVQxCkKDSHro5/4IUUG1ea+MFdqR2R3xSpNU8= -github.com/pion/rtp v1.8.3/go.mod h1:pBGHaFt/yW7bf1jjWAoUjpSNoDnw98KTMg+jWWvziqU= -github.com/pion/sctp v1.8.5/go.mod h1:SUFFfDpViyKejTAdwD1d/HQsCu+V/40cCs2nZIvC3s0= -github.com/pion/sctp v1.8.12 h1:2VX50pedElH+is6FI+OKyRTeN5oy4mrk2HjnGa3UCmY= -github.com/pion/sctp v1.8.12/go.mod h1:cMLT45jqw3+jiJCrtHVwfQLnfR0MGZ4rgOJwUOIqLkI= -github.com/pion/sdp/v3 v3.0.6 h1:WuDLhtuFUUVpTfus9ILC4HRyHsW6TdugjEX/QY9OiUw= -github.com/pion/sdp/v3 v3.0.6/go.mod h1:iiFWFpQO8Fy3S5ldclBkpXqmWy02ns78NOKoLLL0YQw= -github.com/pion/srtp/v2 v2.0.18 h1:vKpAXfawO9RtTRKZJbG4y0v1b11NZxQnxRl85kGuUlo= -github.com/pion/srtp/v2 v2.0.18/go.mod h1:0KJQjA99A6/a0DOVTu1PhDSw0CXF2jTkqOoMg3ODqdA= -github.com/pion/stun v0.6.1 h1:8lp6YejULeHBF8NmV8e2787BogQhduZugh5PdhDyyN4= -github.com/pion/stun v0.6.1/go.mod h1:/hO7APkX4hZKu/D0f2lHzNyvdkTGtIy3NDmLR7kSz/8= -github.com/pion/transport v0.14.1 h1:XSM6olwW+o8J4SCmOBb/BpwZypkHeyM0PGFCxNQBr40= -github.com/pion/transport v0.14.1/go.mod h1:4tGmbk00NeYA3rUa9+n+dzCCoKkcy3YlYb99Jn2fNnI= -github.com/pion/transport/v2 v2.2.1/go.mod h1:cXXWavvCnFF6McHTft3DWS9iic2Mftcz1Aq29pGcU5g= -github.com/pion/transport/v2 v2.2.2/go.mod h1:OJg3ojoBJopjEeECq2yJdXH9YVrUJ1uQ++NjXLOUorc= -github.com/pion/transport/v2 v2.2.3/go.mod h1:q2U/tf9FEfnSBGSW6w5Qp5PFWRLRj3NjLhCCgpRK4p0= -github.com/pion/transport/v2 v2.2.4 h1:41JJK6DZQYSeVLxILA2+F4ZkKb4Xd/tFJZRFZQ9QAlo= -github.com/pion/transport/v2 v2.2.4/go.mod h1:q2U/tf9FEfnSBGSW6w5Qp5PFWRLRj3NjLhCCgpRK4p0= -github.com/pion/transport/v3 v3.0.1 h1:gDTlPJwROfSfz6QfSi0ZmeCSkFcnWWiiR9ES0ouANiM= -github.com/pion/transport/v3 v3.0.1/go.mod h1:UY7kiITrlMv7/IKgd5eTUcaahZx5oUN3l9SzK5f5xE0= -github.com/pion/turn/v2 v2.1.3/go.mod h1:huEpByKKHix2/b9kmTAM3YoX6MKP+/D//0ClgUYR2fY= -github.com/pion/turn/v2 v2.1.5 h1:tTyy7TM3DCoX9IxTt/yHc/bThiRLyXK3T1YbNcgx9k4= -github.com/pion/turn/v2 v2.1.5/go.mod h1:huEpByKKHix2/b9kmTAM3YoX6MKP+/D//0ClgUYR2fY= -github.com/pion/webrtc/v3 v3.2.28 h1:ienStxZ6HcjtH2UlmnFpMM0loENiYjaX437uIUpQSKo= -github.com/pion/webrtc/v3 v3.2.28/go.mod h1:PNRCEuQlibrmuBhOTnol9j6KkIbUG11aHLEfNpUYey0= github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= @@ -387,8 +295,6 @@ github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsT github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= -github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= @@ -397,7 +303,6 @@ github.com/rs/dnscache v0.0.0-20230804202142-fc85eb664529 h1:18kd+8ZUlt/ARXhljq+ github.com/rs/dnscache v0.0.0-20230804202142-fc85eb664529/go.mod h1:qe5TWALJ8/a1Lqznoc5BDHpYX/8HU60Hm2AwRmqzxqA= github.com/ryszard/goskiplist v0.0.0-20150312221310-2dfbae5fcf46 h1:GHRpF1pTW19a8tTFrMLUcfWwyC0pnifVo2ClaLq+hP8= github.com/ryszard/goskiplist v0.0.0-20150312221310-2dfbae5fcf46/go.mod h1:uAQ5PCi+MFsC7HjREoAz1BU+Mq60+05gifQSsHSDG/8= -github.com/sclevine/agouti v3.0.0+incompatible/go.mod h1:b4WX9W9L1sfQKXeJf1mUTLZKJ48R1S7H23Ji7oFO5Bw= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= @@ -412,12 +317,10 @@ github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/swaggo/files v1.0.1 h1:J1bVJ4XHZNq0I46UU90611i9/YzdrF7x92oX1ig5IdE= @@ -426,11 +329,11 @@ github.com/swaggo/gin-swagger v1.6.0 h1:y8sxvQ3E20/RCyrXeFfg60r6H0Z+SwpTjMYsMm+z github.com/swaggo/gin-swagger v1.6.0/go.mod h1:BG00cCEy294xtVpyIAHG6+e2Qzj/xKlRdOqDkvq0uzo= github.com/swaggo/swag v1.16.3 h1:PnCYjPCah8FK4I26l2F/KQ4yz3sILcVUN3cTlBFA9Pg= github.com/swaggo/swag v1.16.3/go.mod h1:DImHIuOFXKpMFAQjcC7FG4m3Dg4+QuUgUzJmKjI/gRk= -github.com/tidwall/btree v1.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI= -github.com/tidwall/btree v1.7.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tinylib/msgp v1.1.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= +github.com/tsynik/torrent v1.2.13 h1:PyOTz6dpzsoIT0IhiEmg6H5VD+mFqF93Q2L9iFyqPtQ= +github.com/tsynik/torrent v1.2.13/go.mod h1:NDxg14AwVqi3PWt1oStYLnyUxHYHX3qGKBAZVh/6Jk8= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= @@ -439,7 +342,6 @@ github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65E github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/willf/bitset v1.1.9/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= github.com/willf/bitset v1.1.10/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= @@ -447,24 +349,13 @@ go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opentelemetry.io/otel v1.23.1 h1:Za4UzOqJYS+MUczKI320AtqZHZb7EqxO00jAHE0jmQY= -go.opentelemetry.io/otel v1.23.1/go.mod h1:Td0134eafDLcTS4y+zQ26GE8u3dEuRBiBCTUIRHaikA= -go.opentelemetry.io/otel/metric v1.23.1 h1:PQJmqJ9u2QaJLBOELl1cxIdPcpbwzbkjfEyelTl2rlo= -go.opentelemetry.io/otel/metric v1.23.1/go.mod h1:mpG2QPlAfnK8yNhNJAxDZruU9Y1/HubbC+KyH8FaCWI= -go.opentelemetry.io/otel/trace v1.23.1 h1:4LrmmEd8AU2rFvU1zegmvqW7+kWarxtNOPyeL6HmYY8= -go.opentelemetry.io/otel/trace v1.23.1/go.mod h1:4IpnpJFwr1mo/6HL8XIPJaE9y0+u1KcVmuW7dwFSVrI= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/arch v0.7.0 h1:pskyeJh/3AmoQ8CPE95vxHLqp1G1GfGNXTmcl9NEKTc= golang.org/x/arch v0.7.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE= -golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= -golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= -golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -477,11 +368,9 @@ golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTk golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.6.0-dev.0.20211013180041-c96bc1413d57/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -494,21 +383,11 @@ golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220524220425-1d687d428aca/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/net v0.13.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= -golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= -golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -519,10 +398,8 @@ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -534,17 +411,11 @@ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200413165638-669c56c373c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -552,36 +423,19 @@ golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= -golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= -golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= -golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= -golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= @@ -593,10 +447,8 @@ golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3 golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.8-0.20211029000441-d6a9af8af023/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.18.0 h1:k8NLag8AGHnn+PHbl7g43CtqZAwG60vZkLqgyZgIHgQ= golang.org/x/tools v0.18.0/go.mod h1:GL7B4CwcLLeo59yx/9UWWuNOW1n3VZ4f5axWfML7Lcg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -617,9 +469,6 @@ google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= @@ -637,22 +486,10 @@ gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -modernc.org/libc v1.41.0 h1:g9YAc6BkKlgORsUWj+JwqoB1wU3o4DE3bM3yvA3k+Gk= -modernc.org/libc v1.41.0/go.mod h1:w0eszPsiXoOnoMJgrXjglgLuDy/bt5RR4y3QzUUeodY= -modernc.org/mathutil v1.6.0 h1:fRe9+AmYlaej+64JsEEhoWuAYBkOtQiMEU7n/XgfYi4= -modernc.org/mathutil v1.6.0/go.mod h1:Ui5Q9q1TR2gFm0AQRqQUaBWFLAhQpCwNcuhBOSedWPo= -modernc.org/memory v1.7.2 h1:Klh90S215mmH8c9gO98QxQFsY+W451E8AnzjoE2ee1E= -modernc.org/memory v1.7.2/go.mod h1:NO4NVCQy0N7ln+T9ngWqOQfi7ley4vpwvARR+Hjw95E= -modernc.org/sqlite v1.29.1 h1:19GY2qvWB4VPw0HppFlZCPAbmxFU41r+qjKZQdQ1ryA= -modernc.org/sqlite v1.29.1/go.mod h1:hG41jCYxOAOoO6BRK66AdRlmOcDzXf7qnwlwjUIOqa0= nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= -zombiezen.com/go/sqlite v1.1.2 h1:faRIy8qc5Yvt/ZM9xv6zgufo8PI2rnPWIif2VTy8+uw= -zombiezen.com/go/sqlite v1.1.2/go.mod h1:yRl27//s/9aXU3RWs8uFQwjkTG9gYNGEls6+6SvrclY= From cbf7764d08ac86df42cef644e3687d8f60ec7511 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=BE=D0=BD=D1=81=D1=82=D0=B0=D0=BD=D1=82=D0=B8?= =?UTF-8?q?=D0=BD?= Date: Fri, 16 Feb 2024 20:01:03 +0100 Subject: [PATCH 52/76] Correct sorting of strings containing numbers without leading zeros (#357) Co-authored-by: Konstantin Kayukin --- server/torr/torrent.go | 3 ++- server/utils/strings.go | 51 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 1 deletion(-) diff --git a/server/torr/torrent.go b/server/torr/torrent.go index 6d95a20..e01ee59 100644 --- a/server/torr/torrent.go +++ b/server/torr/torrent.go @@ -2,6 +2,7 @@ package torr import ( "errors" + utils2 "server/utils" "sort" "sync" "time" @@ -331,7 +332,7 @@ func (t *Torrent) Status() *state.TorrentStatus { files := t.Files() sort.Slice(files, func(i, j int) bool { - return files[i].Path() < files[j].Path() + return utils2.CompareStrings(files[i].Path(), files[j].Path()) }) for i, f := range files { st.FileStats = append(st.FileStats, &state.TorrentFileStat{ diff --git a/server/utils/strings.go b/server/utils/strings.go index 0660520..5767f54 100644 --- a/server/utils/strings.go +++ b/server/utils/strings.go @@ -3,6 +3,8 @@ package utils import ( "fmt" "strconv" + "strings" + "unicode" ) const ( @@ -46,3 +48,52 @@ func Format(b float64) string { return fmt.Sprintf("%.2f%s", value, multiple) } + +func CommonPrefix(first, second string) string { + var result strings.Builder + + minLength := len(first) + if len(second) < minLength { + minLength = len(second) + } + + for i := 0; i < minLength; i++ { + if first[i] != second[i] { + break + } + result.WriteByte(first[i]) + } + + return result.String() +} + +func NumberPrefix(str string) (int, error) { + var result strings.Builder + + for i := 0; i < len(str); i++ { + if !unicode.IsDigit(rune(str[i])) { + break + } + result.WriteByte(str[i]) + } + + return strconv.Atoi(result.String()) +} + +func CompareStrings(first, second string) bool { + commonPrefix := CommonPrefix(first, second) + resultStr1 := strings.TrimPrefix(first, commonPrefix) + resultStr2 := strings.TrimPrefix(second, commonPrefix) + num1, err1 := NumberPrefix(resultStr1) + num2, err2 := NumberPrefix(resultStr2) + + if err1 == nil && err2 == nil { + return num1 < num2 + } + if err1 == nil { + return true + } else if err2 == nil { + return false + } + return resultStr1 < resultStr2 +} From 913c067b87383d82b75f44f6c9aee56b62d03890 Mon Sep 17 00:00:00 2001 From: nikk gitanes Date: Fri, 16 Feb 2024 22:03:20 +0300 Subject: [PATCH 53/76] make prettier happy --- web/src/components/CloseServer.jsx | 1 + web/src/components/RemoveAll.jsx | 1 + web/src/components/UnsafeButton.jsx | 45 +++++++++++++++-------------- 3 files changed, 26 insertions(+), 21 deletions(-) diff --git a/web/src/components/CloseServer.jsx b/web/src/components/CloseServer.jsx index f652c4f..d444ed5 100644 --- a/web/src/components/CloseServer.jsx +++ b/web/src/components/CloseServer.jsx @@ -6,6 +6,7 @@ import { shutdownHost } from 'utils/Hosts' import { useTranslation } from 'react-i18next' import { isStandaloneApp } from 'utils/Utils' import useOnStandaloneAppOutsideClick from 'utils/useOnStandaloneAppOutsideClick' + import UnsafeButton from './UnsafeButton' export default function CloseServer({ isOffline, isLoading }) { diff --git a/web/src/components/RemoveAll.jsx b/web/src/components/RemoveAll.jsx index faa4874..02bd7b3 100644 --- a/web/src/components/RemoveAll.jsx +++ b/web/src/components/RemoveAll.jsx @@ -6,6 +6,7 @@ import DeleteIcon from '@material-ui/icons/Delete' import { useState } from 'react' import { torrentsHost } from 'utils/Hosts' import { useTranslation } from 'react-i18next' + import UnsafeButton from './UnsafeButton' const fnRemoveAll = () => { diff --git a/web/src/components/UnsafeButton.jsx b/web/src/components/UnsafeButton.jsx index 6edd730..a4ae7de 100644 --- a/web/src/components/UnsafeButton.jsx +++ b/web/src/components/UnsafeButton.jsx @@ -1,26 +1,29 @@ -import { Button } from '@material-ui/core'; -import { useEffect, useRef, useState } from 'react'; +import { Button } from '@material-ui/core' +import { useEffect, useState } from 'react' export default function UnsafeButton({ timeout, children, disabled, ...props }) { - const [timeLeft, setTimeLeft] = useState(timeout || 7) - const [buttonDisabled, setButtonDisabled] = useState(disabled || timeLeft > 0) - const handleTimerTick = () => { - const newTimeLeft = timeLeft - 1 - setTimeLeft(newTimeLeft) - if (newTimeLeft <= 0) { - setButtonDisabled(disabled) - } + const [timeLeft, setTimeLeft] = useState(timeout || 7) + const [buttonDisabled, setButtonDisabled] = useState(disabled || timeLeft > 0) + const handleTimerTick = () => { + const newTimeLeft = timeLeft - 1 + setTimeLeft(newTimeLeft) + if (newTimeLeft <= 0) { + setButtonDisabled(disabled) } - const getTimerText = () => !disabled && timeLeft > 0 ? ` (${timeLeft})` : '' - useEffect(() => { - if (disabled || !timeLeft) { return } - const intervalId = setInterval(handleTimerTick, 1000) - return () => clearInterval(intervalId) - }, [timeLeft]) + } + const getTimerText = () => (!disabled && timeLeft > 0 ? ` (${timeLeft})` : '') + useEffect(() => { + if (disabled || !timeLeft) { + return + } + const intervalId = setInterval(handleTimerTick, 1000) + return () => clearInterval(intervalId) + // eslint-disable-next-line + }, [timeLeft]) - return ( - - ) + return ( + + ) } From 3fef3ec28f0d0c43cd29e76e0d0525f2cbf3f4f7 Mon Sep 17 00:00:00 2001 From: nikk gitanes Date: Sat, 17 Feb 2024 16:48:17 +0300 Subject: [PATCH 54/76] disable dlna server StallEventSubscribe as of https://github.com/anacrolix/dms/issues/138 --- server/dlna/dlna.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/dlna/dlna.go b/server/dlna/dlna.go index e27377a..9915b21 100644 --- a/server/dlna/dlna.go +++ b/server/dlna/dlna.go @@ -65,7 +65,7 @@ func Start() { FriendlyName: getDefaultFriendlyName(), NoTranscode: true, NoProbe: true, - StallEventSubscribe: true, + StallEventSubscribe: false, Icons: []dms.Icon{ { Width: 48, From f2dea394052dc7c7b9b3eafb10cab72415482a3d Mon Sep 17 00:00:00 2001 From: nikk gitanes Date: Sun, 18 Feb 2024 10:35:04 +0300 Subject: [PATCH 55/76] Update stream.go --- server/web/api/stream.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/web/api/stream.go b/server/web/api/stream.go index c5b46eb..9e16916 100644 --- a/server/web/api/stream.go +++ b/server/web/api/stream.go @@ -41,11 +41,11 @@ import ( // @Param stat query string false "Get statistics from torrent" // @Param save query string false "Should save torrent" // @Param m3u query string false "Get torrent as M3U playlist" -// @Param fromlast query string false "Get m3u from last play" +// @Param fromlast query string false "Get M3U from last played file" // @Param play query string false "Start stream torrent" // @Param title query string true "Set title of torrent" -// @Param poster query string true "File index in torrent" -// @Param not_auth query string true "Set poster link of torrent" +// @Param poster query string true "Set poster link of torrent" +// @Param not_auth query string true "Stream / playlist without authentication" // // @Produce application/octet-stream // @Success 200 "Data returned according to query" From 4dd1c6e3f49be11107cf5719eba4558a9841f9c3 Mon Sep 17 00:00:00 2001 From: nikk gitanes Date: Tue, 20 Feb 2024 14:34:37 +0300 Subject: [PATCH 56/76] mod update and bump ver for tag MatriX.129.4 --- server/go.mod | 10 +++++----- server/go.sum | 12 ++++++------ server/version/version.go | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/server/go.mod b/server/go.mod index dc48632..cc62bd4 100644 --- a/server/go.mod +++ b/server/go.mod @@ -2,7 +2,7 @@ module server go 1.20 -replace github.com/anacrolix/torrent v1.54.0 => github.com/tsynik/torrent v1.2.13 +replace github.com/anacrolix/torrent v1.54.1 => github.com/tsynik/torrent v1.2.13 require ( github.com/agnivade/levenshtein v1.1.1 @@ -11,7 +11,7 @@ require ( github.com/anacrolix/log v0.15.0 github.com/anacrolix/missinggo/v2 v2.7.3 github.com/anacrolix/publicip v0.3.0 - github.com/anacrolix/torrent v1.54.0 + github.com/anacrolix/torrent v1.54.1 github.com/gin-contrib/cors v1.5.0 github.com/gin-contrib/location v0.0.2 github.com/gin-gonic/gin v1.9.1 @@ -34,9 +34,9 @@ require ( github.com/alecthomas/atomic v0.1.0-alpha2 // indirect github.com/alexflint/go-scalar v1.2.0 // indirect github.com/anacrolix/chansync v0.4.0 // indirect - github.com/anacrolix/dht/v2 v2.21.0 // indirect + github.com/anacrolix/dht/v2 v2.21.1 // indirect github.com/anacrolix/ffprobe v1.1.0 // indirect - github.com/anacrolix/generics v0.0.0-20230911070922-5dd7545c6b13 // indirect + github.com/anacrolix/generics v0.0.1 // indirect github.com/anacrolix/missinggo v1.3.0 // indirect github.com/anacrolix/missinggo/perf v1.0.0 // indirect github.com/anacrolix/multiless v0.3.1-0.20221221005021-2d12701f83f7 // indirect @@ -47,7 +47,7 @@ require ( github.com/benbjohnson/immutable v0.4.3 // indirect github.com/bits-and-blooms/bitset v1.13.0 // indirect github.com/bradfitz/iter v0.0.0-20191230175014-e8f45d346db8 // indirect - github.com/bytedance/sonic v1.10.2 // indirect + github.com/bytedance/sonic v1.11.0 // indirect github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect github.com/chenzhuoyu/iasm v0.9.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect diff --git a/server/go.sum b/server/go.sum index 011c105..d163acf 100644 --- a/server/go.sum +++ b/server/go.sum @@ -30,8 +30,8 @@ github.com/alexflint/go-scalar v1.2.0 h1:WR7JPKkeNpnYIOfHRa7ivM21aWAdHD0gEWHCx+W github.com/alexflint/go-scalar v1.2.0/go.mod h1:LoFvNMqS1CPrMVltza4LvnGKhaSpc3oyLEBUZVhhS2o= github.com/anacrolix/chansync v0.4.0 h1:Md0HM7zYCAO4KwNwgcIRgxNsMxiRuk7D1Ha0Uo+2y60= github.com/anacrolix/chansync v0.4.0/go.mod h1:DZsatdsdXxD0WiwcGl0nJVwyjCKMDv+knl1q2iBjA2k= -github.com/anacrolix/dht/v2 v2.21.0 h1:8nzI+faaynY9jOKmVgdmBZVrTo8B7ZE/LKEgN3Vl/Bs= -github.com/anacrolix/dht/v2 v2.21.0/go.mod h1:SDGC+sEs1pnO2sJGYuhvIis7T8749dDHNfcjtdH4e3g= +github.com/anacrolix/dht/v2 v2.21.1 h1:s1rKkfLLcmBHKv4v/mtMkIeHIEptzEFiB6xVu54+5/o= +github.com/anacrolix/dht/v2 v2.21.1/go.mod h1:SDGC+sEs1pnO2sJGYuhvIis7T8749dDHNfcjtdH4e3g= github.com/anacrolix/dms v1.6.0 h1:v2g1Y+Fc/ICSEc+7M6B92oFcfcqa5LXYPhE4Hcm5tVA= github.com/anacrolix/dms v1.6.0/go.mod h1:5fAMpBcPFG4WQFh91zhf2E7/KYZ3/WmmRAf/WMoL0Q0= github.com/anacrolix/envpprof v0.0.0-20180404065416-323002cec2fa/go.mod h1:KgHhUaQMc8cC0+cEflSgCFNFbKwi5h54gqtVn8yhP7c= @@ -42,8 +42,8 @@ github.com/anacrolix/ffprobe v1.0.0/go.mod h1:BIw+Bjol6CWjm/CRWrVLk2Vy+UYlkgmBZ0 github.com/anacrolix/ffprobe v1.1.0 h1:eKBudnERW9zRJ0+ge6FzkQ0pWLyq142+FJrwRwSRMT4= github.com/anacrolix/ffprobe v1.1.0/go.mod h1:MXe+zG/RRa5OdIf5+VYYfS/CfsSqOH7RrvGIqJBzqhI= github.com/anacrolix/generics v0.0.0-20230113004304-d6428d516633/go.mod h1:ff2rHB/joTV03aMSSn/AZNnaIpUw0h3njetGsaXcMy8= -github.com/anacrolix/generics v0.0.0-20230911070922-5dd7545c6b13 h1:qwOprPTDMM3BASJRf84mmZnTXRsPGGJ8xoHKQS7m3so= -github.com/anacrolix/generics v0.0.0-20230911070922-5dd7545c6b13/go.mod h1:ff2rHB/joTV03aMSSn/AZNnaIpUw0h3njetGsaXcMy8= +github.com/anacrolix/generics v0.0.1 h1:4WVhK6iLb3UAAAQP6I3uYlMOHcp9FqJC9j4n81Wv9Ks= +github.com/anacrolix/generics v0.0.1/go.mod h1:ff2rHB/joTV03aMSSn/AZNnaIpUw0h3njetGsaXcMy8= github.com/anacrolix/log v0.3.0/go.mod h1:lWvLTqzAnCWPJA08T2HCstZi0L1y2Wyvm3FJgwU9jwU= github.com/anacrolix/log v0.6.0/go.mod h1:lWvLTqzAnCWPJA08T2HCstZi0L1y2Wyvm3FJgwU9jwU= github.com/anacrolix/log v0.13.1/go.mod h1:D4+CvN8SnruK6zIFS/xPoRJmtvtnxs+CSfDQ+BFxZ68= @@ -96,8 +96,8 @@ github.com/bradfitz/iter v0.0.0-20191230175014-e8f45d346db8 h1:GKTyiRCL6zVf5wWaq github.com/bradfitz/iter v0.0.0-20191230175014-e8f45d346db8/go.mod h1:spo1JLcs67NmW1aVLEgtA8Yy1elc+X8y5SRW1sFW4Og= github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= github.com/bytedance/sonic v1.10.0-rc/go.mod h1:ElCzW+ufi8qKqNW0FY314xriJhyJhuoJ3gFZdAHF7NM= -github.com/bytedance/sonic v1.10.2 h1:GQebETVBxYB7JGWJtLBi07OVzWwt+8dWA00gEVW2ZFE= -github.com/bytedance/sonic v1.10.2/go.mod h1:iZcSUejdk5aukTND/Eu/ivjQuEL0Cu9/rf50Hi0u/g4= +github.com/bytedance/sonic v1.11.0 h1:FwNNv6Vu4z2Onf1++LNzxB/QhitD8wuTdpZzMTGITWo= +github.com/bytedance/sonic v1.11.0/go.mod h1:iZcSUejdk5aukTND/Eu/ivjQuEL0Cu9/rf50Hi0u/g4= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= diff --git a/server/version/version.go b/server/version/version.go index aa19600..3f676b1 100644 --- a/server/version/version.go +++ b/server/version/version.go @@ -6,7 +6,7 @@ import ( // "github.com/anacrolix/torrent" ) -const Version = "MatriX.129.3" +const Version = "MatriX.129.4" func GetTorrentVersion() string { bi, ok := debug.ReadBuildInfo() From af14dbbeb870d3e2d76cb2c6e396e5d6726c8a85 Mon Sep 17 00:00:00 2001 From: Viacheslav Evseev Date: Thu, 22 Feb 2024 01:47:50 +0300 Subject: [PATCH 57/76] Fix docker check env flags Checking for the value of an environment variable according to README.md, not for its existing. --- docker-entrypoint.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index ac67b7a..4bf7262 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -1,9 +1,9 @@ #!/bin/sh FLAGS="--path $TS_CONF_PATH --logpath $TS_LOG_PATH --port $TS_PORT --torrentsdir $TS_TORR_DIR" -if [[ -n "$TS_HTTPAUTH" ]]; then FLAGS="${FLAGS} --httpauth"; fi -if [[ -n "$TS_RDB" ]]; then FLAGS="${FLAGS} --rdb"; fi -if [[ -n "$TS_DONTKILL" ]]; then FLAGS="${FLAGS} --dontkill"; fi +if [[ "$TS_HTTPAUTH" -eq 1 ]]; then FLAGS="${FLAGS} --httpauth"; fi +if [[ "$TS_RDB" -eq 1 ]]; then FLAGS="${FLAGS} --rdb"; fi +if [[ "$TS_DONTKILL" -eq 1 ]]; then FLAGS="${FLAGS} --dontkill"; fi if [ ! -d $TS_CONF_PATH ]; then mkdir -p $TS_CONF_PATH From c3f89042f91382b3fb3b571285a45c1484bf4308 Mon Sep 17 00:00:00 2001 From: Viacheslav Evseev Date: Thu, 22 Feb 2024 01:50:03 +0300 Subject: [PATCH 58/76] Refactor auth code --- server/docs/docs.go | 17 ++--------- server/docs/swagger.json | 17 ++--------- server/docs/swagger.yaml | 13 ++------- server/web/api/play.go | 3 +- server/web/api/route.go | 26 ++++++++++------- server/web/api/stream.go | 3 +- server/web/auth/auth.go | 47 +++++++++++++++--------------- server/web/msx/msx.go | 11 ++++--- server/web/pages/route.go | 11 ++++--- server/web/pages/template/route.go | 3 +- server/web/server.go | 15 ++++------ 11 files changed, 68 insertions(+), 98 deletions(-) diff --git a/server/docs/docs.go b/server/docs/docs.go index b2c4f5b..ad7ff29 100644 --- a/server/docs/docs.go +++ b/server/docs/docs.go @@ -241,12 +241,6 @@ const docTemplate = `{ "name": "id", "in": "path", "required": true - }, - { - "type": "boolean", - "description": "Not authenticated", - "name": "not_auth", - "in": "query" } ], "responses": { @@ -458,7 +452,7 @@ const docTemplate = `{ }, { "type": "string", - "description": "Get m3u from last play", + "description": "Get M3U from last played file", "name": "fromlast", "in": "query" }, @@ -475,17 +469,10 @@ const docTemplate = `{ "in": "query", "required": true }, - { - "type": "string", - "description": "File index in torrent", - "name": "poster", - "in": "query", - "required": true - }, { "type": "string", "description": "Set poster link of torrent", - "name": "not_auth", + "name": "poster", "in": "query", "required": true } diff --git a/server/docs/swagger.json b/server/docs/swagger.json index 52ef964..454c1e7 100644 --- a/server/docs/swagger.json +++ b/server/docs/swagger.json @@ -234,12 +234,6 @@ "name": "id", "in": "path", "required": true - }, - { - "type": "boolean", - "description": "Not authenticated", - "name": "not_auth", - "in": "query" } ], "responses": { @@ -451,7 +445,7 @@ }, { "type": "string", - "description": "Get m3u from last play", + "description": "Get M3U from last played file", "name": "fromlast", "in": "query" }, @@ -468,17 +462,10 @@ "in": "query", "required": true }, - { - "type": "string", - "description": "File index in torrent", - "name": "poster", - "in": "query", - "required": true - }, { "type": "string", "description": "Set poster link of torrent", - "name": "not_auth", + "name": "poster", "in": "query", "required": true } diff --git a/server/docs/swagger.yaml b/server/docs/swagger.yaml index fe094f3..79174d1 100644 --- a/server/docs/swagger.yaml +++ b/server/docs/swagger.yaml @@ -452,10 +452,6 @@ paths: name: id required: true type: string - - description: Not authenticated - in: query - name: not_auth - type: boolean produces: - application/octet-stream responses: @@ -592,7 +588,7 @@ paths: in: query name: m3u type: string - - description: Get m3u from last play + - description: Get M3U from last played file in: query name: fromlast type: string @@ -605,14 +601,9 @@ paths: name: title required: true type: string - - description: File index in torrent - in: query - name: poster - required: true - type: string - description: Set poster link of torrent in: query - name: not_auth + name: poster required: true type: string produces: diff --git a/server/web/api/play.go b/server/web/api/play.go index 3a4c946..48d4180 100644 --- a/server/web/api/play.go +++ b/server/web/api/play.go @@ -21,7 +21,6 @@ import ( // // @Param hash path string true "Torrent hash" // @Param id path string true "File index in torrent" -// @Param not_auth query bool false "Not authenticated" // // @Produce application/octet-stream // @Success 200 "Torrent data" @@ -29,7 +28,7 @@ import ( func play(c *gin.Context) { hash := c.Param("hash") indexStr := c.Param("id") - notAuth := c.GetBool("not_auth") + notAuth := c.GetBool("auth_required") && c.GetString(gin.AuthUserKey) == "" if hash == "" || indexStr == "" { c.AbortWithError(http.StatusNotFound, errors.New("link should not be empty")) diff --git a/server/web/api/route.go b/server/web/api/route.go index 53c8ebe..94002d4 100644 --- a/server/web/api/route.go +++ b/server/web/api/route.go @@ -1,6 +1,8 @@ package api import ( + "server/web/auth" + "github.com/gin-gonic/gin" ) @@ -8,15 +10,17 @@ type requestI struct { Action string `json:"action,omitempty"` } -func SetupRoute(route *gin.RouterGroup) { - route.GET("/shutdown", shutdown) +func SetupRoute(route gin.IRouter) { + authorized := route.Group("/", auth.CheckAuth()) - route.POST("/settings", settings) + authorized.GET("/shutdown", shutdown) - route.POST("/torrents", torrents) - route.POST("/torrent/upload", torrentUpload) + authorized.POST("/settings", settings) - route.POST("/cache", cache) + authorized.POST("/torrents", torrents) + authorized.POST("/torrent/upload", torrentUpload) + + authorized.POST("/cache", cache) route.HEAD("/stream", stream) route.HEAD("/stream/*fname", stream) @@ -27,15 +31,15 @@ func SetupRoute(route *gin.RouterGroup) { route.HEAD("/play/:hash/:id", play) route.GET("/play/:hash/:id", play) - route.POST("/viewed", viewed) + authorized.POST("/viewed", viewed) - route.GET("/playlistall/all.m3u", allPlayList) + authorized.GET("/playlistall/all.m3u", allPlayList) route.GET("/playlist", playList) route.GET("/playlist/*fname", playList) // Is this endpoint still needed ? `fname` is never used in handler - route.GET("/download/:size", download) + authorized.GET("/download/:size", download) - route.GET("/search/*query", rutorSearch) + authorized.GET("/search/*query", rutorSearch) - route.GET("/ffp/:hash/:id", ffp) + authorized.GET("/ffp/:hash/:id", ffp) } diff --git a/server/web/api/stream.go b/server/web/api/stream.go index 9e16916..6f9ab57 100644 --- a/server/web/api/stream.go +++ b/server/web/api/stream.go @@ -45,7 +45,6 @@ import ( // @Param play query string false "Start stream torrent" // @Param title query string true "Set title of torrent" // @Param poster query string true "Set poster link of torrent" -// @Param not_auth query string true "Stream / playlist without authentication" // // @Produce application/octet-stream // @Success 200 "Data returned according to query" @@ -62,7 +61,7 @@ func stream(c *gin.Context) { title := c.Query("title") poster := c.Query("poster") data := "" - notAuth := c.GetBool("not_auth") + notAuth := c.GetBool("auth_required") && c.GetString(gin.AuthUserKey) == "" if notAuth && (play || m3u) { streamNoAuth(c) diff --git a/server/web/auth/auth.go b/server/web/auth/auth.go index cb5eb08..bcc60f5 100644 --- a/server/web/auth/auth.go +++ b/server/web/auth/auth.go @@ -6,8 +6,6 @@ import ( "net/http" "os" "path/filepath" - "reflect" - "strings" "unsafe" "github.com/gin-gonic/gin" @@ -16,15 +14,15 @@ import ( "server/settings" ) -func SetupAuth(engine *gin.Engine) *gin.RouterGroup { +func SetupAuth(engine *gin.Engine) { if !settings.HttpAuth { - return nil + return } accs := getAccounts() if accs == nil { - return nil + return } - return engine.Group("/", BasicAuth(accs)) + engine.Use(BasicAuth(accs)) } func getAccounts() gin.Accounts { @@ -60,22 +58,28 @@ func (a authPairs) searchCredential(authValue string) (string, bool) { func BasicAuth(accounts gin.Accounts) gin.HandlerFunc { pairs := processAccounts(accounts) - return func(c *gin.Context) { + return func(c *gin.Context) { + c.Set("auth_required", true) + user, found := pairs.searchCredential(c.Request.Header.Get("Authorization")) - if !found { // always accessible - if strings.HasPrefix(c.FullPath(), "/stream") || - c.FullPath() == "/site.webmanifest" || - // https://github.com/YouROK/TorrServer/issues/172 - (strings.HasPrefix(c.FullPath(), "/play") && c.FullPath() != "/playlistall/all.m3u") || - (settings.SearchWA && strings.HasPrefix(c.FullPath(), "/search")) { - c.Set("not_auth", true) - return - } - c.Header("WWW-Authenticate", "Basic realm=Authorization Required") - c.AbortWithStatus(http.StatusUnauthorized) + if found { + c.Set(gin.AuthUserKey, user) + } + } +} + +func CheckAuth() gin.HandlerFunc { + return func(c *gin.Context) { + if !settings.HttpAuth { return } - c.Set(gin.AuthUserKey, user) + + if _, ok := c.Get(gin.AuthUserKey); ok { + return + } + + c.Header("WWW-Authenticate", "Basic realm=Authorization Required") + c.AbortWithStatus(http.StatusUnauthorized) } } @@ -97,8 +101,5 @@ func authorizationHeader(user, password string) string { } func StringToBytes(s string) (b []byte) { - sh := *(*reflect.StringHeader)(unsafe.Pointer(&s)) - bh := (*reflect.SliceHeader)(unsafe.Pointer(&b)) - bh.Data, bh.Len, bh.Cap = sh.Data, sh.Len, sh.Len - return b + return unsafe.Slice(unsafe.StringData(s), len(s)) } diff --git a/server/web/msx/msx.go b/server/web/msx/msx.go index d5a74e2..d87f321 100644 --- a/server/web/msx/msx.go +++ b/server/web/msx/msx.go @@ -7,6 +7,7 @@ import ( "sync" "server/version" + "server/web/auth" "github.com/gin-gonic/gin" ) @@ -30,10 +31,12 @@ func asset(c *gin.Context, t string, d []byte) { c.Data(200, t+"; charset=UTF-8", d) } -func SetupRoute(r *gin.RouterGroup) { - r.GET("/msx/:pth", msxPTH) - r.GET("/msx/imdb", msxIMDB) - r.GET("/msx/imdb/:id", msxIMDBID) +func SetupRoute(r gin.IRouter) { + authorized := r.Group("/", auth.CheckAuth()) + + authorized.GET("/msx/:pth", msxPTH) + authorized.GET("/msx/imdb", msxIMDB) + authorized.GET("/msx/imdb/:id", msxIMDBID) } // msxPTH godoc diff --git a/server/web/pages/route.go b/server/web/pages/route.go index 90a5090..96a100f 100644 --- a/server/web/pages/route.go +++ b/server/web/pages/route.go @@ -6,13 +6,16 @@ import ( "server/settings" "server/torr" + "server/web/auth" "server/web/pages/template" ) -func SetupRoute(route *gin.RouterGroup) { - template.RouteWebPages(route) - route.GET("/stat", statPage) - route.GET("/magnets", getTorrents) +func SetupRoute(route gin.IRouter) { + authorized := route.Group("/", auth.CheckAuth()) + + template.RouteWebPages(authorized) + authorized.GET("/stat", statPage) + authorized.GET("/magnets", getTorrents) } // stat godoc diff --git a/server/web/pages/template/route.go b/server/web/pages/template/route.go index e1af681..c87594c 100644 --- a/server/web/pages/template/route.go +++ b/server/web/pages/template/route.go @@ -3,10 +3,11 @@ package template import ( "crypto/md5" "fmt" + "github.com/gin-gonic/gin" ) -func RouteWebPages(route *gin.RouterGroup) { +func RouteWebPages(route gin.IRouter) { route.GET("/", func(c *gin.Context) { etag := fmt.Sprintf("%x", md5.Sum(Indexhtml)) c.Header("Cache-Control", "public, max-age=31536000") diff --git a/server/web/server.go b/server/web/server.go index 69aa3f9..873e5b6 100644 --- a/server/web/server.go +++ b/server/web/server.go @@ -71,19 +71,14 @@ func Start() { route := gin.New() route.Use(log.WebLogger(), blocker.Blocker(), gin.Recovery(), cors.New(corsCfg), location.Default()) + auth.SetupAuth(route) route.GET("/echo", echo) - routeAuth := auth.SetupAuth(route) - if routeAuth != nil { - api.SetupRoute(routeAuth) - msx.SetupRoute(routeAuth) - pages.SetupRoute(routeAuth) - } else { - api.SetupRoute(&route.RouterGroup) - msx.SetupRoute(&route.RouterGroup) - pages.SetupRoute(&route.RouterGroup) - } + api.SetupRoute(route) + msx.SetupRoute(route) + pages.SetupRoute(route) + if settings.BTsets.EnableDLNA { dlna.Start() } From 3695797f74abcd27a6e2c9a155db31965cf9d68b Mon Sep 17 00:00:00 2001 From: Viacheslav Evseev Date: Thu, 22 Feb 2024 02:40:54 +0300 Subject: [PATCH 59/76] return missing "/search" and "/site.webmanifest" router --- gen_web.go | 2 +- server/web/api/route.go | 9 +++++++-- server/web/auth/auth.go | 7 ++++++- server/web/pages/route.go | 2 +- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/gen_web.go b/gen_web.go index 8ae0d4a..1f9e64e 100644 --- a/gen_web.go +++ b/gen_web.go @@ -87,7 +87,7 @@ import ( "github.com/gin-gonic/gin" ) -func RouteWebPages(route *gin.RouterGroup) { +func RouteWebPages(route gin.IRouter) { route.GET("/", func(c *gin.Context) { etag := fmt.Sprintf("%x", md5.Sum(Indexhtml)) c.Header("Cache-Control", "public, max-age=31536000") diff --git a/server/web/api/route.go b/server/web/api/route.go index 94002d4..7c1d263 100644 --- a/server/web/api/route.go +++ b/server/web/api/route.go @@ -1,6 +1,7 @@ package api import ( + config "server/settings" "server/web/auth" "github.com/gin-gonic/gin" @@ -39,7 +40,11 @@ func SetupRoute(route gin.IRouter) { authorized.GET("/download/:size", download) - authorized.GET("/search/*query", rutorSearch) - + if config.SearchWA { + route.GET("/search/*query", rutorSearch) + } else { + authorized.GET("/search/*query", rutorSearch) + } + authorized.GET("/ffp/:hash/:id", ffp) } diff --git a/server/web/auth/auth.go b/server/web/auth/auth.go index bcc60f5..b125f39 100644 --- a/server/web/auth/auth.go +++ b/server/web/auth/auth.go @@ -6,6 +6,7 @@ import ( "net/http" "os" "path/filepath" + "slices" "unsafe" "github.com/gin-gonic/gin" @@ -68,12 +69,16 @@ func BasicAuth(accounts gin.Accounts) gin.HandlerFunc { } } -func CheckAuth() gin.HandlerFunc { +func CheckAuth(exclude ...string) gin.HandlerFunc { return func(c *gin.Context) { if !settings.HttpAuth { return } + if slices.Contains(exclude, c.FullPath()) { + return + } + if _, ok := c.Get(gin.AuthUserKey); ok { return } diff --git a/server/web/pages/route.go b/server/web/pages/route.go index 96a100f..4649ad8 100644 --- a/server/web/pages/route.go +++ b/server/web/pages/route.go @@ -11,7 +11,7 @@ import ( ) func SetupRoute(route gin.IRouter) { - authorized := route.Group("/", auth.CheckAuth()) + authorized := route.Group("/", auth.CheckAuth("/site.webmanifest")) template.RouteWebPages(authorized) authorized.GET("/stat", statPage) From 433151252760636e7a6208ec5e292dad3648a877 Mon Sep 17 00:00:00 2001 From: nikk gitanes Date: Thu, 22 Feb 2024 05:49:24 +0300 Subject: [PATCH 60/76] up torrent v1.2.14 --- server/go.mod | 2 +- server/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/go.mod b/server/go.mod index cc62bd4..ca44074 100644 --- a/server/go.mod +++ b/server/go.mod @@ -2,7 +2,7 @@ module server go 1.20 -replace github.com/anacrolix/torrent v1.54.1 => github.com/tsynik/torrent v1.2.13 +replace github.com/anacrolix/torrent v1.54.1 => github.com/tsynik/torrent v1.2.14 require ( github.com/agnivade/levenshtein v1.1.1 diff --git a/server/go.sum b/server/go.sum index d163acf..df3c5ce 100644 --- a/server/go.sum +++ b/server/go.sum @@ -332,8 +332,8 @@ github.com/swaggo/swag v1.16.3/go.mod h1:DImHIuOFXKpMFAQjcC7FG4m3Dg4+QuUgUzJmKjI github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tinylib/msgp v1.1.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tsynik/torrent v1.2.13 h1:PyOTz6dpzsoIT0IhiEmg6H5VD+mFqF93Q2L9iFyqPtQ= -github.com/tsynik/torrent v1.2.13/go.mod h1:NDxg14AwVqi3PWt1oStYLnyUxHYHX3qGKBAZVh/6Jk8= +github.com/tsynik/torrent v1.2.14 h1:1KdjnSTzVpyCwCNcdgQ/uCFJN59OGK3MxefcegXDBzc= +github.com/tsynik/torrent v1.2.14/go.mod h1:nw/6nj2Zy0/p7AgzUsfpK7WOexDeo1bArDLjeBq1u70= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= From 7837a7316c3c137d3f801bc467e292334636a37e Mon Sep 17 00:00:00 2001 From: nikk gitanes Date: Thu, 22 Feb 2024 05:49:46 +0300 Subject: [PATCH 61/76] update docs --- server/docs/docs.go | 6 +++--- server/docs/swagger.json | 6 +++--- server/docs/swagger.yaml | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/server/docs/docs.go b/server/docs/docs.go index b2c4f5b..d131ef5 100644 --- a/server/docs/docs.go +++ b/server/docs/docs.go @@ -458,7 +458,7 @@ const docTemplate = `{ }, { "type": "string", - "description": "Get m3u from last play", + "description": "Get M3U from last played file", "name": "fromlast", "in": "query" }, @@ -477,14 +477,14 @@ const docTemplate = `{ }, { "type": "string", - "description": "File index in torrent", + "description": "Set poster link of torrent", "name": "poster", "in": "query", "required": true }, { "type": "string", - "description": "Set poster link of torrent", + "description": "Stream / playlist without authentication", "name": "not_auth", "in": "query", "required": true diff --git a/server/docs/swagger.json b/server/docs/swagger.json index 52ef964..5a6db5f 100644 --- a/server/docs/swagger.json +++ b/server/docs/swagger.json @@ -451,7 +451,7 @@ }, { "type": "string", - "description": "Get m3u from last play", + "description": "Get M3U from last played file", "name": "fromlast", "in": "query" }, @@ -470,14 +470,14 @@ }, { "type": "string", - "description": "File index in torrent", + "description": "Set poster link of torrent", "name": "poster", "in": "query", "required": true }, { "type": "string", - "description": "Set poster link of torrent", + "description": "Stream / playlist without authentication", "name": "not_auth", "in": "query", "required": true diff --git a/server/docs/swagger.yaml b/server/docs/swagger.yaml index fe094f3..09de818 100644 --- a/server/docs/swagger.yaml +++ b/server/docs/swagger.yaml @@ -592,7 +592,7 @@ paths: in: query name: m3u type: string - - description: Get m3u from last play + - description: Get M3U from last played file in: query name: fromlast type: string @@ -605,12 +605,12 @@ paths: name: title required: true type: string - - description: File index in torrent + - description: Set poster link of torrent in: query name: poster required: true type: string - - description: Set poster link of torrent + - description: Stream / playlist without authentication in: query name: not_auth required: true From 89a7f9249e6f734c03494ece2b31dd3073d78f58 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 22 Feb 2024 05:52:17 +0300 Subject: [PATCH 62/76] Bump ip from 1.1.8 to 1.1.9 in /web (#362) Bumps [ip](https://github.com/indutny/node-ip) from 1.1.8 to 1.1.9. - [Commits](https://github.com/indutny/node-ip/compare/v1.1.8...v1.1.9) --- updated-dependencies: - dependency-name: ip dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- web/yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/yarn.lock b/web/yarn.lock index d8d09f9..33fd644 100644 --- a/web/yarn.lock +++ b/web/yarn.lock @@ -7063,9 +7063,9 @@ ip-regex@^2.1.0: integrity sha512-58yWmlHpp7VYfcdTwMTvwMmqx/Elfxjd9RXTDyMsbL7lLWmhMylLEqiYVLKuLzOZqVgiWXD9MfR62Vv89VRxkw== ip@^1.1.0, ip@^1.1.5: - version "1.1.8" - resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.8.tgz#ae05948f6b075435ed3307acce04629da8cdbf48" - integrity sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg== + version "1.1.9" + resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.9.tgz#8dfbcc99a754d07f425310b86a99546b1151e396" + integrity sha512-cyRxvOEpNHNtchU3Ln9KC/auJgup87llfQpQ+t5ghoC/UhL16SWzbueiCsdTnWmqAWl7LadfuwhlqmtOaqMHdQ== ipaddr.js@1.9.1, ipaddr.js@^1.9.0: version "1.9.1" From b50e5a381e5fe4b53a693bb86aa36a2f80f48841 Mon Sep 17 00:00:00 2001 From: Viacheslav Evseev Date: Thu, 22 Feb 2024 05:53:55 +0300 Subject: [PATCH 63/76] isolate web pages auth logic --- server/web/auth/auth.go | 7 +------ server/web/pages/route.go | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/server/web/auth/auth.go b/server/web/auth/auth.go index b125f39..3a03650 100644 --- a/server/web/auth/auth.go +++ b/server/web/auth/auth.go @@ -6,7 +6,6 @@ import ( "net/http" "os" "path/filepath" - "slices" "unsafe" "github.com/gin-gonic/gin" @@ -69,15 +68,11 @@ func BasicAuth(accounts gin.Accounts) gin.HandlerFunc { } } -func CheckAuth(exclude ...string) gin.HandlerFunc { +func CheckAuth() gin.HandlerFunc { return func(c *gin.Context) { if !settings.HttpAuth { return } - - if slices.Contains(exclude, c.FullPath()) { - return - } if _, ok := c.Get(gin.AuthUserKey); ok { return diff --git a/server/web/pages/route.go b/server/web/pages/route.go index 4649ad8..d0dfc53 100644 --- a/server/web/pages/route.go +++ b/server/web/pages/route.go @@ -1,6 +1,8 @@ package pages import ( + "slices" + "github.com/anacrolix/torrent/metainfo" "github.com/gin-gonic/gin" @@ -11,9 +13,18 @@ import ( ) func SetupRoute(route gin.IRouter) { - authorized := route.Group("/", auth.CheckAuth("/site.webmanifest")) + authorized := route.Group("/", auth.CheckAuth()) - template.RouteWebPages(authorized) + webPagesAuth := route.Group("/", func() gin.HandlerFunc { + return func(c *gin.Context) { + if slices.Contains([]string{"/site.webmanifest"}, c.FullPath()) { + return + } + auth.CheckAuth()(c) + } + }()) + + template.RouteWebPages(webPagesAuth) authorized.GET("/stat", statPage) authorized.GET("/magnets", getTorrents) } From c774bbd69ae3737c7dcb1a7ffe8a349c04b10e50 Mon Sep 17 00:00:00 2001 From: Viacheslav Evseev Date: Thu, 22 Feb 2024 06:01:01 +0300 Subject: [PATCH 64/76] remove `not_auth` from swagger docs --- server/docs/docs.go | 7 ------- server/docs/swagger.json | 7 ------- server/docs/swagger.yaml | 5 ----- 3 files changed, 19 deletions(-) diff --git a/server/docs/docs.go b/server/docs/docs.go index 1b10d1d..ad7ff29 100644 --- a/server/docs/docs.go +++ b/server/docs/docs.go @@ -475,13 +475,6 @@ const docTemplate = `{ "name": "poster", "in": "query", "required": true - }, - { - "type": "string", - "description": "Stream / playlist without authentication", - "name": "not_auth", - "in": "query", - "required": true } ], "responses": { diff --git a/server/docs/swagger.json b/server/docs/swagger.json index ca920d0..454c1e7 100644 --- a/server/docs/swagger.json +++ b/server/docs/swagger.json @@ -468,13 +468,6 @@ "name": "poster", "in": "query", "required": true - }, - { - "type": "string", - "description": "Stream / playlist without authentication", - "name": "not_auth", - "in": "query", - "required": true } ], "responses": { diff --git a/server/docs/swagger.yaml b/server/docs/swagger.yaml index 61c0876..79174d1 100644 --- a/server/docs/swagger.yaml +++ b/server/docs/swagger.yaml @@ -606,11 +606,6 @@ paths: name: poster required: true type: string - - description: Stream / playlist without authentication - in: query - name: poster - required: true - type: string produces: - application/octet-stream responses: From c3218b0ea1510223482708e335e2c93ae448da5e Mon Sep 17 00:00:00 2001 From: nikk gitanes Date: Thu, 22 Feb 2024 06:12:33 +0300 Subject: [PATCH 65/76] go1.20 compat slices --- server/web/pages/route.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/web/pages/route.go b/server/web/pages/route.go index d0dfc53..3c2ad8f 100644 --- a/server/web/pages/route.go +++ b/server/web/pages/route.go @@ -1,8 +1,6 @@ package pages import ( - "slices" - "github.com/anacrolix/torrent/metainfo" "github.com/gin-gonic/gin" @@ -10,6 +8,8 @@ import ( "server/torr" "server/web/auth" "server/web/pages/template" + + "golang.org/x/exp/slices" ) func SetupRoute(route gin.IRouter) { From a0b8b6f43ed6b0af611974ff081190db4e096ce0 Mon Sep 17 00:00:00 2001 From: nikk gitanes Date: Thu, 22 Feb 2024 06:29:58 +0300 Subject: [PATCH 66/76] bump version --- 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 3f676b1..e2c37fa 100644 --- a/server/version/version.go +++ b/server/version/version.go @@ -6,7 +6,7 @@ import ( // "github.com/anacrolix/torrent" ) -const Version = "MatriX.129.4" +const Version = "MatriX.129.5" func GetTorrentVersion() string { bi, ok := debug.ReadBuildInfo() From 4d2fd19f6544523871480ac1160ac5ef5feeca0e Mon Sep 17 00:00:00 2001 From: nikk gitanes Date: Thu, 22 Feb 2024 08:20:52 +0300 Subject: [PATCH 67/76] fix --- server/go.mod | 2 +- server/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/go.mod b/server/go.mod index ca44074..fc9e48e 100644 --- a/server/go.mod +++ b/server/go.mod @@ -2,7 +2,7 @@ module server go 1.20 -replace github.com/anacrolix/torrent v1.54.1 => github.com/tsynik/torrent v1.2.14 +replace github.com/anacrolix/torrent v1.54.1 => github.com/tsynik/torrent v1.2.15 require ( github.com/agnivade/levenshtein v1.1.1 diff --git a/server/go.sum b/server/go.sum index df3c5ce..51382c9 100644 --- a/server/go.sum +++ b/server/go.sum @@ -332,8 +332,8 @@ github.com/swaggo/swag v1.16.3/go.mod h1:DImHIuOFXKpMFAQjcC7FG4m3Dg4+QuUgUzJmKjI github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tinylib/msgp v1.1.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tsynik/torrent v1.2.14 h1:1KdjnSTzVpyCwCNcdgQ/uCFJN59OGK3MxefcegXDBzc= -github.com/tsynik/torrent v1.2.14/go.mod h1:nw/6nj2Zy0/p7AgzUsfpK7WOexDeo1bArDLjeBq1u70= +github.com/tsynik/torrent v1.2.15 h1:f76Jhtz8MtgCwCBO396hzz9wsuF8+N1OdcB+YNh3d7k= +github.com/tsynik/torrent v1.2.15/go.mod h1:ZDW51KV/sGhccWk3HVpd2YXJvQLDDVByOfYZ7pVRFWc= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= From 26e7956ef9aec0fa88956f42f0362d737e3af093 Mon Sep 17 00:00:00 2001 From: nikk gitanes Date: Thu, 22 Feb 2024 10:38:14 +0300 Subject: [PATCH 68/76] reformat peers info --- server/server.go | 4 ++-- server/torr/preload.go | 4 ++-- .../components/DialogTorrentDetailsContent/widgets/index.jsx | 2 +- web/src/locales/bg/translation.json | 2 +- web/src/locales/en/translation.json | 2 +- web/src/locales/ru/translation.json | 2 +- web/src/locales/ua/translation.json | 2 +- web/src/locales/zh/translation.json | 2 +- web/src/utils/Utils.js | 5 +++-- 9 files changed, 13 insertions(+), 12 deletions(-) diff --git a/server/server.go b/server/server.go index 4fbaf26..1aece68 100644 --- a/server/server.go +++ b/server/server.go @@ -45,7 +45,7 @@ func Start(port, sslport, sslCert, sslKey string, sslEnabled, roSets, searchWA b l.Close() } if err != nil { - log.TLogln("Port", sslport, "already in use! Please set different port for HTTPS. Abort") + log.TLogln("Port", sslport, "already in use! Please set different ssl port for HTTPS. Abort") os.Exit(1) } } @@ -59,7 +59,7 @@ func Start(port, sslport, sslCert, sslKey string, sslEnabled, roSets, searchWA b l.Close() } if err != nil { - log.TLogln("Port", port, "already in use! Please set different sslport for HTTP. Abort") + log.TLogln("Port", port, "already in use! Please set different port for HTTP. Abort") os.Exit(1) } // remove old disk caches diff --git a/server/torr/preload.go b/server/torr/preload.go index ac18d2b..1b83309 100644 --- a/server/torr/preload.go +++ b/server/torr/preload.go @@ -62,7 +62,7 @@ func (t *Torrent) Preload(index int, size int64) { // Запуск лога в отдельном потоке go func() { for t.Stat == state.TorrentPreload { - stat := fmt.Sprint(file.Torrent().InfoHash().HexString(), " ", utils2.Format(float64(t.PreloadedBytes)), "/", utils2.Format(float64(t.PreloadSize)), " Speed:", utils2.Format(t.DownloadSpeed), " Peers:[", t.Torrent.Stats().ConnectedSeeders, "]", t.Torrent.Stats().ActivePeers, "/", t.Torrent.Stats().TotalPeers) + stat := fmt.Sprint(file.Torrent().InfoHash().HexString(), " ", utils2.Format(float64(t.PreloadedBytes)), "/", utils2.Format(float64(t.PreloadSize)), " Speed:", utils2.Format(t.DownloadSpeed), " Peers:", t.Torrent.Stats().ActivePeers, "/", t.Torrent.Stats().TotalPeers, " [Seeds:", t.Torrent.Stats().ConnectedSeeders, "]") log.TLogln("Preload:", stat) t.AddExpiredTime(time.Second * time.Duration(settings.BTsets.TorrentDisconnectTimeout)) time.Sleep(time.Second) @@ -158,7 +158,7 @@ func (t *Torrent) Preload(index int, size int64) { wg.Wait() } - log.TLogln("End preload:", file.Torrent().InfoHash().HexString(), "Peers:[", t.Torrent.Stats().ConnectedSeeders, "]", t.Torrent.Stats().ActivePeers, "/", t.Torrent.Stats().TotalPeers) + log.TLogln("End preload:", file.Torrent().InfoHash().HexString(), "Peers:", t.Torrent.Stats().ActivePeers, "/", t.Torrent.Stats().TotalPeers, "[ Seeds:", t.Torrent.Stats().ConnectedSeeders, "]") } func (t *Torrent) findFileIndex(index int) *torrent.File { diff --git a/web/src/components/DialogTorrentDetailsContent/widgets/index.jsx b/web/src/components/DialogTorrentDetailsContent/widgets/index.jsx index cf567f3..a8592f1 100644 --- a/web/src/components/DialogTorrentDetailsContent/widgets/index.jsx +++ b/web/src/components/DialogTorrentDetailsContent/widgets/index.jsx @@ -51,7 +51,7 @@ export const PeersWidget = ({ data }) => { return ( From a8187922807eca5a0e5681c0968ebfde70ec378f Mon Sep 17 00:00:00 2001 From: nikk gitanes Date: Thu, 22 Feb 2024 10:52:19 +0300 Subject: [PATCH 69/76] extend playable files list --- .../components/DialogTorrentDetailsContent/helpers.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/web/src/components/DialogTorrentDetailsContent/helpers.js b/web/src/components/DialogTorrentDetailsContent/helpers.js index cb164e5..450703e 100644 --- a/web/src/components/DialogTorrentDetailsContent/helpers.js +++ b/web/src/components/DialogTorrentDetailsContent/helpers.js @@ -12,6 +12,7 @@ const playableExtList = [ 'avchd', 'avi', 'drc', + 'dv', 'flv', 'iso', 'm2v', @@ -27,9 +28,9 @@ const playableExtList = [ 'mpeg', 'mpg', 'mpv', + 'mts', 'mxf', 'nsv', - 'ogg', 'ogv', 'ts', 'qt', @@ -46,6 +47,9 @@ const playableExtList = [ 'aiff', 'ape', 'au', + 'dsd', + 'dff', + 'dsf', 'flac', 'gsm', 'it', @@ -55,11 +59,15 @@ const playableExtList = [ 'mod', 'mp3', 'mpa', + 'oga', + 'ogg', + 'opus', 'pls', 'ra', 's3m', 'sid', 'wav', + 'weba', 'wma', 'xm', ] From fb982aa1108db41020915ebf59d84ee6f1c51b33 Mon Sep 17 00:00:00 2001 From: yourok <8yourok8@mail.ru> Date: Sat, 24 Feb 2024 11:04:33 +0300 Subject: [PATCH 70/76] change to use readers --- server/torr/storage/torrstor/cache.go | 15 +++++++++++++++ server/torr/torrent.go | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/server/torr/storage/torrstor/cache.go b/server/torr/storage/torrstor/cache.go index 5a16480..3019570 100644 --- a/server/torr/storage/torrstor/cache.go +++ b/server/torr/storage/torrstor/cache.go @@ -314,6 +314,21 @@ func (c *Cache) NewReader(file *torrent.File) *Reader { return newReader(file, c) } +func (c *Cache) GetUseReaders() int { + if c == nil { + return 0 + } + c.muReaders.Lock() + defer c.muReaders.Unlock() + readers := 0 + for reader := range c.readers { + if reader.isUse { + readers++ + } + } + return readers +} + func (c *Cache) Readers() int { if c == nil { return 0 diff --git a/server/torr/torrent.go b/server/torr/torrent.go index e01ee59..84a5e43 100644 --- a/server/torr/torrent.go +++ b/server/torr/torrent.go @@ -267,7 +267,7 @@ func (t *Torrent) drop() { } func (t *Torrent) Close() bool { - if t.cache != nil && t.cache.Readers() > 0 { + if t.cache != nil && t.cache.GetUseReaders() > 0 { return false } t.Stat = state.TorrentClosed From e1a2aa73240202ee831ef718cc40c4d7863fbb49 Mon Sep 17 00:00:00 2001 From: nikk gitanes Date: Mon, 26 Feb 2024 10:57:05 +0300 Subject: [PATCH 71/76] update contributors --- README.md | 1 + web/src/components/About/index.jsx | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index f916edc..0d007fe 100644 --- a/README.md +++ b/README.md @@ -266,4 +266,5 @@ local:127.0.0.1 - [shadeov](https://github.com/shadeov) for README improvements - [butaford](https://github.com/butaford) Pavel for make docker file and scripts - [filimonic](https://github.com/filimonic) Alexey D. Filimonov +- [leporel](https://github.com/leporel) Viacheslav Evseev - and others diff --git a/web/src/components/About/index.jsx b/web/src/components/About/index.jsx index 567c3a8..70cd2b6 100644 --- a/web/src/components/About/index.jsx +++ b/web/src/components/About/index.jsx @@ -94,6 +94,7 @@ export default function AboutDialog() { + From 45e4ec054a32b75f1a6b90a77936ed9047783177 Mon Sep 17 00:00:00 2001 From: nikk gitanes Date: Mon, 26 Feb 2024 18:35:19 +0300 Subject: [PATCH 72/76] go get -u && gofumpt -w --- server/go.mod | 12 +- server/go.sum | 24 +-- server/settings/dbreadcache.go | 140 +++++++------- server/settings/jsondb.go | 318 +++++++++++++++---------------- server/settings/migrate.go | 1 + server/settings/settings.go | 1 - server/settings/torrserverdb.go | 18 +- server/settings/xpathdbrouter.go | 237 +++++++++++------------ server/torr/torrent.go | 3 +- server/web/api/route.go | 2 +- server/web/auth/auth.go | 8 +- server/web/msx/msx.go | 2 +- 12 files changed, 384 insertions(+), 382 deletions(-) diff --git a/server/go.mod b/server/go.mod index fc9e48e..de08781 100644 --- a/server/go.mod +++ b/server/go.mod @@ -2,7 +2,7 @@ module server go 1.20 -replace github.com/anacrolix/torrent v1.54.1 => github.com/tsynik/torrent v1.2.15 +replace github.com/anacrolix/torrent v1.54.1 => github.com/tsynik/torrent v1.2.16 require ( github.com/agnivade/levenshtein v1.1.1 @@ -21,8 +21,8 @@ require ( github.com/swaggo/files v1.0.1 github.com/swaggo/gin-swagger v1.6.0 github.com/swaggo/swag v1.16.3 - go.etcd.io/bbolt v1.3.8 - golang.org/x/exp v0.0.0-20240213143201-ec583247a57a + go.etcd.io/bbolt v1.3.9 + golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 golang.org/x/image v0.15.0 golang.org/x/time v0.5.0 gopkg.in/vansante/go-ffprobe.v2 v2.1.1 @@ -42,12 +42,12 @@ require ( github.com/anacrolix/multiless v0.3.1-0.20221221005021-2d12701f83f7 // indirect github.com/anacrolix/stm v0.5.0 // indirect github.com/anacrolix/sync v0.5.1 // indirect - github.com/anacrolix/upnp v0.1.3 // indirect + github.com/anacrolix/upnp v0.1.4 // indirect github.com/anacrolix/utp v0.2.0 // indirect github.com/benbjohnson/immutable v0.4.3 // indirect github.com/bits-and-blooms/bitset v1.13.0 // indirect github.com/bradfitz/iter v0.0.0-20191230175014-e8f45d346db8 // indirect - github.com/bytedance/sonic v1.11.0 // indirect + github.com/bytedance/sonic v1.11.1 // indirect github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect github.com/chenzhuoyu/iasm v0.9.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect @@ -69,7 +69,7 @@ require ( github.com/huandu/xstrings v1.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/cpuid/v2 v2.2.6 // indirect + github.com/klauspost/cpuid/v2 v2.2.7 // indirect github.com/leodido/go-urn v1.4.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-isatty v0.0.20 // indirect diff --git a/server/go.sum b/server/go.sum index 51382c9..21a4475 100644 --- a/server/go.sum +++ b/server/go.sum @@ -74,8 +74,8 @@ github.com/anacrolix/sync v0.5.1/go.mod h1:BbecHL6jDSExojhNtgTFSBcdGerzNc64tz3DC github.com/anacrolix/tagflag v0.0.0-20180109131632-2146c8d41bf0/go.mod h1:1m2U/K6ZT+JZG0+bdMK6qauP49QT4wE5pmhJXOKKCHw= github.com/anacrolix/tagflag v1.0.0/go.mod h1:1m2U/K6ZT+JZG0+bdMK6qauP49QT4wE5pmhJXOKKCHw= github.com/anacrolix/tagflag v1.1.0/go.mod h1:Scxs9CV10NQatSmbyjqmqmeQNwGzlNe0CMUMIxqHIG8= -github.com/anacrolix/upnp v0.1.3 h1:NlYEhE75adz2npEJKjbqyqnyW9qU4STookvSNXBJ5ao= -github.com/anacrolix/upnp v0.1.3/go.mod h1:Qyhbqo69gwNWvEk1xNTXsS5j7hMHef9hdr984+9fIic= +github.com/anacrolix/upnp v0.1.4 h1:+2t2KA6QOhm/49zeNyeVwDu1ZYS9dB9wfxyVvh/wk7U= +github.com/anacrolix/upnp v0.1.4/go.mod h1:Qyhbqo69gwNWvEk1xNTXsS5j7hMHef9hdr984+9fIic= github.com/anacrolix/utp v0.2.0 h1:65Cdmr6q9WSw2KsM+rtJFu7rqDzLl2bdysf4KlNPcFI= github.com/anacrolix/utp v0.2.0/go.mod h1:HGk4GYQw1O/3T1+yhqT/F6EcBd+AAwlo9dYErNy7mj8= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= @@ -96,8 +96,8 @@ github.com/bradfitz/iter v0.0.0-20191230175014-e8f45d346db8 h1:GKTyiRCL6zVf5wWaq github.com/bradfitz/iter v0.0.0-20191230175014-e8f45d346db8/go.mod h1:spo1JLcs67NmW1aVLEgtA8Yy1elc+X8y5SRW1sFW4Og= github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= github.com/bytedance/sonic v1.10.0-rc/go.mod h1:ElCzW+ufi8qKqNW0FY314xriJhyJhuoJ3gFZdAHF7NM= -github.com/bytedance/sonic v1.11.0 h1:FwNNv6Vu4z2Onf1++LNzxB/QhitD8wuTdpZzMTGITWo= -github.com/bytedance/sonic v1.11.0/go.mod h1:iZcSUejdk5aukTND/Eu/ivjQuEL0Cu9/rf50Hi0u/g4= +github.com/bytedance/sonic v1.11.1 h1:JC0+6c9FoWYYxakaoa+c5QTtJeiSZNeByOBhXtAFSn4= +github.com/bytedance/sonic v1.11.1/go.mod h1:iZcSUejdk5aukTND/Eu/ivjQuEL0Cu9/rf50Hi0u/g4= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= @@ -225,8 +225,8 @@ github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfV github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/klauspost/cpuid/v2 v2.2.6 h1:ndNyv040zDGIDh8thGkXYjnFtiN02M1PVVF+JE/48xc= -github.com/klauspost/cpuid/v2 v2.2.6/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= +github.com/klauspost/cpuid/v2 v2.2.7 h1:ZWSB3igEs+d0qvnxR/ZBzXVmxkgt8DdzP6m9pfuVLDM= +github.com/klauspost/cpuid/v2 v2.2.7/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= github.com/kljensen/snowball v0.9.0 h1:OpXkQBcic6vcPG+dChOGLIA/GNuVg47tbbIJ2s7Keas= github.com/kljensen/snowball v0.9.0/go.mod h1:OGo5gFWjaeXqCu4iIrMl5OYip9XUJHGOU5eSkPjVg2A= github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= @@ -332,8 +332,8 @@ github.com/swaggo/swag v1.16.3/go.mod h1:DImHIuOFXKpMFAQjcC7FG4m3Dg4+QuUgUzJmKjI github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tinylib/msgp v1.1.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tsynik/torrent v1.2.15 h1:f76Jhtz8MtgCwCBO396hzz9wsuF8+N1OdcB+YNh3d7k= -github.com/tsynik/torrent v1.2.15/go.mod h1:ZDW51KV/sGhccWk3HVpd2YXJvQLDDVByOfYZ7pVRFWc= +github.com/tsynik/torrent v1.2.16 h1:jEXIkdPKIOerO+8b/12wTvEoLnjGFcHX7dMitTmrWH0= +github.com/tsynik/torrent v1.2.16/go.mod h1:c/K0Twt8E0qXJj02tl5FmjhGXSl0XzbFYrzkXTGqU+w= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= @@ -344,8 +344,8 @@ github.com/willf/bitset v1.1.9/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPyS github.com/willf/bitset v1.1.10/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= -go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= +go.etcd.io/bbolt v1.3.9 h1:8x7aARPEXiXbHmtUwAIv7eV2fQFHrLLavdiJ3uzJXoI= +go.etcd.io/bbolt v1.3.9/go.mod h1:zaO32+Ti0PK1ivdPtgMESzuzL2VPoIG1PCQNvOdo/dE= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -360,8 +360,8 @@ golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20220428152302-39d4317da171/go.mod h1:lgLbSvA5ygNOMpwM/9anMpWVlVJ7Z+cHWq/eFuinpGE= -golang.org/x/exp v0.0.0-20240213143201-ec583247a57a h1:HinSgX1tJRX3KsL//Gxynpw5CTOAIPhgL4W8PNiIpVE= -golang.org/x/exp v0.0.0-20240213143201-ec583247a57a/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= +golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 h1:LfspQV/FYTatPTr/3HzIcmiUFH7PGP+OQ6mgDYo3yuQ= +golang.org/x/exp v0.0.0-20240222234643-814bf88cf225/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= golang.org/x/image v0.15.0 h1:kOELfmgrmJlw4Cdb7g/QGuB3CvDrXbqEIww/pNtNBm8= golang.org/x/image v0.15.0/go.mod h1:HUYqC05R2ZcZ3ejNQsIHQDQiwWM4JBqmm6MKANTp4LE= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= diff --git a/server/settings/dbreadcache.go b/server/settings/dbreadcache.go index 862faf2..77b700f 100644 --- a/server/settings/dbreadcache.go +++ b/server/settings/dbreadcache.go @@ -1,70 +1,70 @@ -package settings - -import "server/log" - -type DBReadCache struct { - db TorrServerDB - listCache map[string][]string - dataCache map[[2]string][]byte -} - -func NewDBReadCache(db TorrServerDB) TorrServerDB { - cdb := &DBReadCache{ - db: db, - listCache: map[string][]string{}, - dataCache: map[[2]string][]byte{}, - } - return cdb -} - -func (v *DBReadCache) CloseDB() { - v.db.CloseDB() - v.db = nil - v.listCache = nil - v.dataCache = nil -} - -func (v *DBReadCache) Get(xPath, name string) []byte { - cacheKey := v.makeDataCacheKey(xPath, name) - if data, ok := v.dataCache[cacheKey]; ok { - return data - } - data := v.db.Get(xPath, name) - v.dataCache[cacheKey] = data - return data -} - -func (v *DBReadCache) Set(xPath, name string, value []byte) { - if ReadOnly { - log.TLogln("DB.Set: Read-only DB mode!", name) - return - } - cacheKey := v.makeDataCacheKey(xPath, name) - v.dataCache[cacheKey] = value - delete(v.listCache, xPath) - v.db.Set(xPath, name, value) -} - -func (v *DBReadCache) List(xPath string) []string { - if names, ok := v.listCache[xPath]; ok { - return names - } - names := v.db.List(xPath) - v.listCache[xPath] = names - return names -} - -func (v *DBReadCache) Rem(xPath, name string) { - if ReadOnly { - log.TLogln("DB.Rem: Read-only DB mode!", name) - return - } - cacheKey := v.makeDataCacheKey(xPath, name) - delete(v.dataCache, cacheKey) - delete(v.listCache, xPath) - v.db.Rem(xPath, name) -} - -func (v *DBReadCache) makeDataCacheKey(xPath, name string) [2]string { - return [2]string{xPath, name} -} +package settings + +import "server/log" + +type DBReadCache struct { + db TorrServerDB + listCache map[string][]string + dataCache map[[2]string][]byte +} + +func NewDBReadCache(db TorrServerDB) TorrServerDB { + cdb := &DBReadCache{ + db: db, + listCache: map[string][]string{}, + dataCache: map[[2]string][]byte{}, + } + return cdb +} + +func (v *DBReadCache) CloseDB() { + v.db.CloseDB() + v.db = nil + v.listCache = nil + v.dataCache = nil +} + +func (v *DBReadCache) Get(xPath, name string) []byte { + cacheKey := v.makeDataCacheKey(xPath, name) + if data, ok := v.dataCache[cacheKey]; ok { + return data + } + data := v.db.Get(xPath, name) + v.dataCache[cacheKey] = data + return data +} + +func (v *DBReadCache) Set(xPath, name string, value []byte) { + if ReadOnly { + log.TLogln("DB.Set: Read-only DB mode!", name) + return + } + cacheKey := v.makeDataCacheKey(xPath, name) + v.dataCache[cacheKey] = value + delete(v.listCache, xPath) + v.db.Set(xPath, name, value) +} + +func (v *DBReadCache) List(xPath string) []string { + if names, ok := v.listCache[xPath]; ok { + return names + } + names := v.db.List(xPath) + v.listCache[xPath] = names + return names +} + +func (v *DBReadCache) Rem(xPath, name string) { + if ReadOnly { + log.TLogln("DB.Rem: Read-only DB mode!", name) + return + } + cacheKey := v.makeDataCacheKey(xPath, name) + delete(v.dataCache, cacheKey) + delete(v.listCache, xPath) + v.db.Rem(xPath, name) +} + +func (v *DBReadCache) makeDataCacheKey(xPath, name string) [2]string { + return [2]string{xPath, name} +} diff --git a/server/settings/jsondb.go b/server/settings/jsondb.go index a4c4180..6185edb 100644 --- a/server/settings/jsondb.go +++ b/server/settings/jsondb.go @@ -1,159 +1,159 @@ -package settings - -import ( - "encoding/json" - "errors" - "fmt" - "io/fs" - "os" - "path/filepath" - "server/log" - "strings" - "sync" -) - -type JsonDB struct { - Path string - filenameDelimiter string - filenameExtension string - fileMode fs.FileMode - xPathDelimeter string -} - -var jsonDbLocks = make(map[string]*sync.Mutex) - -func NewJsonDB() TorrServerDB { - settingsDB := &JsonDB{ - Path: Path, - filenameDelimiter: ".", - filenameExtension: ".json", - fileMode: fs.FileMode(0o666), - xPathDelimeter: "/", - } - return settingsDB -} - -func (v *JsonDB) CloseDB() { - // Not necessary -} - -func (v *JsonDB) Set(xPath, name string, value []byte) { - var err error = nil - jsonObj := map[string]interface{}{} - - if err := json.Unmarshal(value, &jsonObj); err == nil { - if filename, err := v.xPathToFilename(xPath); err == nil { - v.lock(filename) - defer v.unlock(filename) - if root, err := v.readJsonFileAsMap(filename); err == nil { - root[name] = jsonObj - if err = v.writeMapAsJsonFile(filename, root); err == nil { - return - } - } - } - } - v.log(fmt.Sprintf("Set: error writing entry %s->%s", xPath, name), err) -} - -func (v *JsonDB) Get(xPath, name string) []byte { - var err error = nil - if filename, err := v.xPathToFilename(xPath); err == nil { - v.lock(filename) - defer v.unlock(filename) - if root, err := v.readJsonFileAsMap(filename); err == nil { - if jsonData, ok := root[name]; ok { - if byteData, err := json.Marshal(jsonData); err == nil { - return byteData - } - } else { - // We assume this is not 'error' but 'no entry' which is normal - return nil - } - } - } - v.log(fmt.Sprintf("Get: error reading entry %s->%s", xPath, name), err) - return nil -} - -func (v *JsonDB) List(xPath string) []string { - var err error = nil - if filename, err := v.xPathToFilename(xPath); err == nil { - v.lock(filename) - defer v.unlock(filename) - if root, err := v.readJsonFileAsMap(filename); err == nil { - nameList := make([]string, 0, len(root)) - for k := range root { - nameList = append(nameList, k) - } - return nameList - } - } - v.log(fmt.Sprintf("List: error reading entries in xPath %s", xPath), err) - return nil -} - -func (v *JsonDB) Rem(xPath, name string) { - var err error = nil - if filename, err := v.xPathToFilename(xPath); err == nil { - v.lock(filename) - defer v.unlock(filename) - if root, err := v.readJsonFileAsMap(filename); err == nil { - delete(root, name) - v.writeMapAsJsonFile(filename, root) - return - } - } - v.log(fmt.Sprintf("Rem: error removing entry %s->%s", xPath, name), err) -} - -func (v *JsonDB) lock(filename string) { - var mtx sync.Mutex - if mtx, ok := jsonDbLocks[filename]; !ok { - mtx = new(sync.Mutex) - jsonDbLocks[v.Path] = mtx - } - mtx.Lock() -} - -func (v *JsonDB) unlock(filename string) { - if mtx, ok := jsonDbLocks[filename]; ok { - mtx.Unlock() - } -} - -func (v *JsonDB) xPathToFilename(xPath string) (string, error) { - if pathComponents := strings.Split(xPath, v.xPathDelimeter); len(pathComponents) > 0 { - return strings.ToLower(strings.Join(pathComponents, v.filenameDelimiter) + v.filenameExtension), nil - } - return "", errors.New("xPath has no components") -} - -func (v *JsonDB) readJsonFileAsMap(filename string) (map[string]interface{}, error) { - var err error = nil - jsonData := map[string]interface{}{} - path := filepath.Join(v.Path, filename) - if fileData, err := os.ReadFile(path); err == nil { - err = json.Unmarshal(fileData, &jsonData) - } - return jsonData, err -} - -func (v *JsonDB) writeMapAsJsonFile(filename string, o map[string]interface{}) error { - var err error = nil - path := filepath.Join(v.Path, filename) - - if fileData, err := json.MarshalIndent(o, "", " "); err == nil { - err = os.WriteFile(path, fileData, v.fileMode) - } - return err -} - -func (v *JsonDB) log(s string, params ...interface{}) { - if len(params) > 0 { - log.TLogln(fmt.Sprintf("JsonDB: %s: %s", s, fmt.Sprint(params...))) - } else { - log.TLogln(fmt.Sprintf("JsonDB: %s", s)) - } - -} +package settings + +import ( + "encoding/json" + "errors" + "fmt" + "io/fs" + "os" + "path/filepath" + "strings" + "sync" + + "server/log" +) + +type JsonDB struct { + Path string + filenameDelimiter string + filenameExtension string + fileMode fs.FileMode + xPathDelimeter string +} + +var jsonDbLocks = make(map[string]*sync.Mutex) + +func NewJsonDB() TorrServerDB { + settingsDB := &JsonDB{ + Path: Path, + filenameDelimiter: ".", + filenameExtension: ".json", + fileMode: fs.FileMode(0o666), + xPathDelimeter: "/", + } + return settingsDB +} + +func (v *JsonDB) CloseDB() { + // Not necessary +} + +func (v *JsonDB) Set(xPath, name string, value []byte) { + var err error = nil + jsonObj := map[string]interface{}{} + + if err := json.Unmarshal(value, &jsonObj); err == nil { + if filename, err := v.xPathToFilename(xPath); err == nil { + v.lock(filename) + defer v.unlock(filename) + if root, err := v.readJsonFileAsMap(filename); err == nil { + root[name] = jsonObj + if err = v.writeMapAsJsonFile(filename, root); err == nil { + return + } + } + } + } + v.log(fmt.Sprintf("Set: error writing entry %s->%s", xPath, name), err) +} + +func (v *JsonDB) Get(xPath, name string) []byte { + var err error = nil + if filename, err := v.xPathToFilename(xPath); err == nil { + v.lock(filename) + defer v.unlock(filename) + if root, err := v.readJsonFileAsMap(filename); err == nil { + if jsonData, ok := root[name]; ok { + if byteData, err := json.Marshal(jsonData); err == nil { + return byteData + } + } else { + // We assume this is not 'error' but 'no entry' which is normal + return nil + } + } + } + v.log(fmt.Sprintf("Get: error reading entry %s->%s", xPath, name), err) + return nil +} + +func (v *JsonDB) List(xPath string) []string { + var err error = nil + if filename, err := v.xPathToFilename(xPath); err == nil { + v.lock(filename) + defer v.unlock(filename) + if root, err := v.readJsonFileAsMap(filename); err == nil { + nameList := make([]string, 0, len(root)) + for k := range root { + nameList = append(nameList, k) + } + return nameList + } + } + v.log(fmt.Sprintf("List: error reading entries in xPath %s", xPath), err) + return nil +} + +func (v *JsonDB) Rem(xPath, name string) { + var err error = nil + if filename, err := v.xPathToFilename(xPath); err == nil { + v.lock(filename) + defer v.unlock(filename) + if root, err := v.readJsonFileAsMap(filename); err == nil { + delete(root, name) + v.writeMapAsJsonFile(filename, root) + return + } + } + v.log(fmt.Sprintf("Rem: error removing entry %s->%s", xPath, name), err) +} + +func (v *JsonDB) lock(filename string) { + var mtx sync.Mutex + if mtx, ok := jsonDbLocks[filename]; !ok { + mtx = new(sync.Mutex) + jsonDbLocks[v.Path] = mtx + } + mtx.Lock() +} + +func (v *JsonDB) unlock(filename string) { + if mtx, ok := jsonDbLocks[filename]; ok { + mtx.Unlock() + } +} + +func (v *JsonDB) xPathToFilename(xPath string) (string, error) { + if pathComponents := strings.Split(xPath, v.xPathDelimeter); len(pathComponents) > 0 { + return strings.ToLower(strings.Join(pathComponents, v.filenameDelimiter) + v.filenameExtension), nil + } + return "", errors.New("xPath has no components") +} + +func (v *JsonDB) readJsonFileAsMap(filename string) (map[string]interface{}, error) { + var err error = nil + jsonData := map[string]interface{}{} + path := filepath.Join(v.Path, filename) + if fileData, err := os.ReadFile(path); err == nil { + err = json.Unmarshal(fileData, &jsonData) + } + return jsonData, err +} + +func (v *JsonDB) writeMapAsJsonFile(filename string, o map[string]interface{}) error { + var err error = nil + path := filepath.Join(v.Path, filename) + + if fileData, err := json.MarshalIndent(o, "", " "); err == nil { + err = os.WriteFile(path, fileData, v.fileMode) + } + return err +} + +func (v *JsonDB) log(s string, params ...interface{}) { + if len(params) > 0 { + log.TLogln(fmt.Sprintf("JsonDB: %s: %s", s, fmt.Sprint(params...))) + } else { + log.TLogln(fmt.Sprintf("JsonDB: %s", s)) + } +} diff --git a/server/settings/migrate.go b/server/settings/migrate.go index 2ae12f7..314778a 100644 --- a/server/settings/migrate.go +++ b/server/settings/migrate.go @@ -8,6 +8,7 @@ import ( "os" "path/filepath" "reflect" + "server/log" "server/web/api/utils" diff --git a/server/settings/settings.go b/server/settings/settings.go index 13769f7..7e44949 100644 --- a/server/settings/settings.go +++ b/server/settings/settings.go @@ -54,7 +54,6 @@ func InitSets(readOnly, searchWA bool) { } loadBTSets() Migrate1() - } func CloseDB() { diff --git a/server/settings/torrserverdb.go b/server/settings/torrserverdb.go index c9bb50e..52edc12 100644 --- a/server/settings/torrserverdb.go +++ b/server/settings/torrserverdb.go @@ -1,9 +1,9 @@ -package settings - -type TorrServerDB interface { - CloseDB() - Get(xPath, name string) []byte - Set(xPath, name string, value []byte) - List(xPath string) []string - Rem(xPath, name string) -} +package settings + +type TorrServerDB interface { + CloseDB() + Get(xPath, name string) []byte + Set(xPath, name string, value []byte) + List(xPath string) []string + Rem(xPath, name string) +} diff --git a/server/settings/xpathdbrouter.go b/server/settings/xpathdbrouter.go index 6008bc8..fa9db82 100644 --- a/server/settings/xpathdbrouter.go +++ b/server/settings/xpathdbrouter.go @@ -1,118 +1,119 @@ -package settings - -import ( - "errors" - "fmt" - "reflect" - "server/log" - "sort" - "strings" - - "golang.org/x/exp/slices" -) - -type XPathDBRouter struct { - dbs []TorrServerDB - routes []string - route2db map[string]TorrServerDB - dbNames map[TorrServerDB]string -} - -func NewXPathDBRouter() *XPathDBRouter { - router := &XPathDBRouter{ - dbs: []TorrServerDB{}, - dbNames: map[TorrServerDB]string{}, - routes: []string{}, - route2db: map[string]TorrServerDB{}, - } - return router -} - -func (v *XPathDBRouter) RegisterRoute(db TorrServerDB, xPath string) error { - newRoute := v.xPathToRoute(xPath) - - if slices.Contains(v.routes, newRoute) { - return errors.New(fmt.Sprintf("route \"%s\" already in routing table", newRoute)) - } - - // First DB becomes Default DB with default route - if len(v.dbs) == 0 && len(newRoute) != 0 { - v.RegisterRoute(db, "") - } - - if !slices.Contains(v.dbs, db) { - v.dbs = append(v.dbs, db) - v.dbNames[db] = reflect.TypeOf(db).Elem().Name() - v.log(fmt.Sprintf("Registered new DB \"%s\", total %d DBs registered", v.getDBName(db), len(v.dbs))) - } - - v.route2db[newRoute] = db - v.routes = append(v.routes, newRoute) - - // Sort routes by length descending. - // It is important later to help selecting - // most suitable route in getDBForXPath(xPath) - sort.Slice(v.routes, func(iLeft, iRight int) bool { - return len(v.routes[iLeft]) > len(v.routes[iRight]) - }) - v.log(fmt.Sprintf("Registered new route \"%s\" for DB \"%s\", total %d routes", newRoute, v.getDBName(db), len(v.routes))) - return nil -} - -func (v *XPathDBRouter) xPathToRoute(xPath string) string { - return strings.ToLower(strings.TrimSpace(xPath)) -} - -func (v *XPathDBRouter) getDBForXPath(xPath string) TorrServerDB { - if len(v.dbs) == 0 { - return nil - } - lookup_route := v.xPathToRoute(xPath) - var db TorrServerDB = nil - // Expected v.routes sorted by length descending - for _, route_prefix := range v.routes { - if strings.HasPrefix(lookup_route, route_prefix) { - db = v.route2db[route_prefix] - break - } - } - return db -} - -func (v *XPathDBRouter) Get(xPath, name string) []byte { - return v.getDBForXPath(xPath).Get(xPath, name) -} - -func (v *XPathDBRouter) Set(xPath, name string, value []byte) { - v.getDBForXPath(xPath).Set(xPath, name, value) -} - -func (v *XPathDBRouter) List(xPath string) []string { - return v.getDBForXPath(xPath).List(xPath) -} - -func (v *XPathDBRouter) Rem(xPath, name string) { - v.getDBForXPath(xPath).Rem(xPath, name) -} - -func (v *XPathDBRouter) CloseDB() { - for _, db := range v.dbs { - db.CloseDB() - } - v.dbs = nil - v.routes = nil - v.route2db = nil - v.dbNames = nil -} - -func (v *XPathDBRouter) getDBName(db TorrServerDB) string { - return v.dbNames[db] -} - -func (v *XPathDBRouter) log(s string, params ...interface{}) { - if len(params) > 0 { - log.TLogln(fmt.Sprintf("XPathDBRouter: %s: %s", s, fmt.Sprint(params...))) - } else { - log.TLogln(fmt.Sprintf("XPathDBRouter: %s", s)) - } -} +package settings + +import ( + "errors" + "fmt" + "reflect" + "sort" + "strings" + + "server/log" + + "golang.org/x/exp/slices" +) + +type XPathDBRouter struct { + dbs []TorrServerDB + routes []string + route2db map[string]TorrServerDB + dbNames map[TorrServerDB]string +} + +func NewXPathDBRouter() *XPathDBRouter { + router := &XPathDBRouter{ + dbs: []TorrServerDB{}, + dbNames: map[TorrServerDB]string{}, + routes: []string{}, + route2db: map[string]TorrServerDB{}, + } + return router +} + +func (v *XPathDBRouter) RegisterRoute(db TorrServerDB, xPath string) error { + newRoute := v.xPathToRoute(xPath) + + if slices.Contains(v.routes, newRoute) { + return errors.New(fmt.Sprintf("route \"%s\" already in routing table", newRoute)) + } + + // First DB becomes Default DB with default route + if len(v.dbs) == 0 && len(newRoute) != 0 { + v.RegisterRoute(db, "") + } + + if !slices.Contains(v.dbs, db) { + v.dbs = append(v.dbs, db) + v.dbNames[db] = reflect.TypeOf(db).Elem().Name() + v.log(fmt.Sprintf("Registered new DB \"%s\", total %d DBs registered", v.getDBName(db), len(v.dbs))) + } + + v.route2db[newRoute] = db + v.routes = append(v.routes, newRoute) + + // Sort routes by length descending. + // It is important later to help selecting + // most suitable route in getDBForXPath(xPath) + sort.Slice(v.routes, func(iLeft, iRight int) bool { + return len(v.routes[iLeft]) > len(v.routes[iRight]) + }) + v.log(fmt.Sprintf("Registered new route \"%s\" for DB \"%s\", total %d routes", newRoute, v.getDBName(db), len(v.routes))) + return nil +} + +func (v *XPathDBRouter) xPathToRoute(xPath string) string { + return strings.ToLower(strings.TrimSpace(xPath)) +} + +func (v *XPathDBRouter) getDBForXPath(xPath string) TorrServerDB { + if len(v.dbs) == 0 { + return nil + } + lookup_route := v.xPathToRoute(xPath) + var db TorrServerDB = nil + // Expected v.routes sorted by length descending + for _, route_prefix := range v.routes { + if strings.HasPrefix(lookup_route, route_prefix) { + db = v.route2db[route_prefix] + break + } + } + return db +} + +func (v *XPathDBRouter) Get(xPath, name string) []byte { + return v.getDBForXPath(xPath).Get(xPath, name) +} + +func (v *XPathDBRouter) Set(xPath, name string, value []byte) { + v.getDBForXPath(xPath).Set(xPath, name, value) +} + +func (v *XPathDBRouter) List(xPath string) []string { + return v.getDBForXPath(xPath).List(xPath) +} + +func (v *XPathDBRouter) Rem(xPath, name string) { + v.getDBForXPath(xPath).Rem(xPath, name) +} + +func (v *XPathDBRouter) CloseDB() { + for _, db := range v.dbs { + db.CloseDB() + } + v.dbs = nil + v.routes = nil + v.route2db = nil + v.dbNames = nil +} + +func (v *XPathDBRouter) getDBName(db TorrServerDB) string { + return v.dbNames[db] +} + +func (v *XPathDBRouter) log(s string, params ...interface{}) { + if len(params) > 0 { + log.TLogln(fmt.Sprintf("XPathDBRouter: %s: %s", s, fmt.Sprint(params...))) + } else { + log.TLogln(fmt.Sprintf("XPathDBRouter: %s", s)) + } +} diff --git a/server/torr/torrent.go b/server/torr/torrent.go index 84a5e43..b113a24 100644 --- a/server/torr/torrent.go +++ b/server/torr/torrent.go @@ -2,11 +2,12 @@ package torr import ( "errors" - utils2 "server/utils" "sort" "sync" "time" + utils2 "server/utils" + "github.com/anacrolix/torrent" "github.com/anacrolix/torrent/metainfo" diff --git a/server/web/api/route.go b/server/web/api/route.go index 7c1d263..731f874 100644 --- a/server/web/api/route.go +++ b/server/web/api/route.go @@ -45,6 +45,6 @@ func SetupRoute(route gin.IRouter) { } else { authorized.GET("/search/*query", rutorSearch) } - + authorized.GET("/ffp/:hash/:id", ffp) } diff --git a/server/web/auth/auth.go b/server/web/auth/auth.go index 3a03650..d810240 100644 --- a/server/web/auth/auth.go +++ b/server/web/auth/auth.go @@ -20,7 +20,7 @@ func SetupAuth(engine *gin.Engine) { } accs := getAccounts() if accs == nil { - return + return } engine.Use(BasicAuth(accs)) } @@ -58,11 +58,11 @@ func (a authPairs) searchCredential(authValue string) (string, bool) { func BasicAuth(accounts gin.Accounts) gin.HandlerFunc { pairs := processAccounts(accounts) - return func(c *gin.Context) { + return func(c *gin.Context) { c.Set("auth_required", true) user, found := pairs.searchCredential(c.Request.Header.Get("Authorization")) - if found { + if found { c.Set(gin.AuthUserKey, user) } } @@ -77,7 +77,7 @@ func CheckAuth() gin.HandlerFunc { if _, ok := c.Get(gin.AuthUserKey); ok { return } - + c.Header("WWW-Authenticate", "Basic realm=Authorization Required") c.AbortWithStatus(http.StatusUnauthorized) } diff --git a/server/web/msx/msx.go b/server/web/msx/msx.go index d87f321..9b99511 100644 --- a/server/web/msx/msx.go +++ b/server/web/msx/msx.go @@ -33,7 +33,7 @@ func asset(c *gin.Context, t string, d []byte) { func SetupRoute(r gin.IRouter) { authorized := r.Group("/", auth.CheckAuth()) - + authorized.GET("/msx/:pth", msxPTH) authorized.GET("/msx/imdb", msxIMDB) authorized.GET("/msx/imdb/:id", msxIMDBID) From 1b239446fa0759da578f4df57ff6bddfb5612739 Mon Sep 17 00:00:00 2001 From: nikk gitanes Date: Tue, 27 Feb 2024 17:41:15 +0300 Subject: [PATCH 73/76] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0d007fe..cb9f942 100644 --- a/README.md +++ b/README.md @@ -81,12 +81,12 @@ On FreeBSD (TrueNAS/FreeNAS) you can use this plugin: Date: Thu, 29 Feb 2024 12:40:07 +0300 Subject: [PATCH 74/76] update web --- server/web/pages/template/html.go | 20 ++++++------ .../pages/template/pages/asset-manifest.json | 14 ++++----- server/web/pages/template/pages/index.html | 2 +- server/web/pages/template/route.go | 31 +++++++++---------- 4 files changed, 33 insertions(+), 34 deletions(-) diff --git a/server/web/pages/template/html.go b/server/web/pages/template/html.go index 5ebaa06..13672a6 100644 --- a/server/web/pages/template/html.go +++ b/server/web/pages/template/html.go @@ -118,20 +118,20 @@ var Mstile150x150png []byte //go:embed pages/site.webmanifest var Sitewebmanifest []byte -//go:embed pages/static/js/2.ddcd1461.chunk.js -var Staticjs2ddcd1461chunkjs []byte +//go:embed pages/static/js/2.916c2545.chunk.js +var Staticjs2916c2545chunkjs []byte -//go:embed pages/static/js/2.ddcd1461.chunk.js.LICENSE.txt -var Staticjs2ddcd1461chunkjsLICENSEtxt []byte +//go:embed pages/static/js/2.916c2545.chunk.js.LICENSE.txt +var Staticjs2916c2545chunkjsLICENSEtxt []byte -//go:embed pages/static/js/2.ddcd1461.chunk.js.map -var Staticjs2ddcd1461chunkjsmap []byte +//go:embed pages/static/js/2.916c2545.chunk.js.map +var Staticjs2916c2545chunkjsmap []byte -//go:embed pages/static/js/main.30c42a09.chunk.js -var Staticjsmain30c42a09chunkjs []byte +//go:embed pages/static/js/main.55f380e1.chunk.js +var Staticjsmain55f380e1chunkjs []byte -//go:embed pages/static/js/main.30c42a09.chunk.js.map -var Staticjsmain30c42a09chunkjsmap []byte +//go:embed pages/static/js/main.55f380e1.chunk.js.map +var Staticjsmain55f380e1chunkjsmap []byte //go:embed pages/static/js/runtime-main.f542387e.js var Staticjsruntimemainf542387ejs []byte diff --git a/server/web/pages/template/pages/asset-manifest.json b/server/web/pages/template/pages/asset-manifest.json index efadcd6..c6b5e05 100644 --- a/server/web/pages/template/pages/asset-manifest.json +++ b/server/web/pages/template/pages/asset-manifest.json @@ -1,17 +1,17 @@ { "files": { - "main.js": "/static/js/main.30c42a09.chunk.js", - "main.js.map": "/static/js/main.30c42a09.chunk.js.map", + "main.js": "/static/js/main.55f380e1.chunk.js", + "main.js.map": "/static/js/main.55f380e1.chunk.js.map", "runtime-main.js": "/static/js/runtime-main.f542387e.js", "runtime-main.js.map": "/static/js/runtime-main.f542387e.js.map", - "static/js/2.ddcd1461.chunk.js": "/static/js/2.ddcd1461.chunk.js", - "static/js/2.ddcd1461.chunk.js.map": "/static/js/2.ddcd1461.chunk.js.map", + "static/js/2.916c2545.chunk.js": "/static/js/2.916c2545.chunk.js", + "static/js/2.916c2545.chunk.js.map": "/static/js/2.916c2545.chunk.js.map", "index.html": "/index.html", - "static/js/2.ddcd1461.chunk.js.LICENSE.txt": "/static/js/2.ddcd1461.chunk.js.LICENSE.txt" + "static/js/2.916c2545.chunk.js.LICENSE.txt": "/static/js/2.916c2545.chunk.js.LICENSE.txt" }, "entrypoints": [ "static/js/runtime-main.f542387e.js", - "static/js/2.ddcd1461.chunk.js", - "static/js/main.30c42a09.chunk.js" + "static/js/2.916c2545.chunk.js", + "static/js/main.55f380e1.chunk.js" ] } \ No newline at end of file diff --git a/server/web/pages/template/pages/index.html b/server/web/pages/template/pages/index.html index 3e665dc..b489fb1 100644 --- a/server/web/pages/template/pages/index.html +++ b/server/web/pages/template/pages/index.html @@ -1 +1 @@ -TorrServer MatriX
\ No newline at end of file +TorrServer MatriX
\ No newline at end of file diff --git a/server/web/pages/template/route.go b/server/web/pages/template/route.go index c87594c..3800b6f 100644 --- a/server/web/pages/template/route.go +++ b/server/web/pages/template/route.go @@ -3,7 +3,6 @@ package template import ( "crypto/md5" "fmt" - "github.com/gin-gonic/gin" ) @@ -281,39 +280,39 @@ func RouteWebPages(route gin.IRouter) { c.Data(200, "application/manifest+json", Sitewebmanifest) }) - route.GET("/static/js/2.ddcd1461.chunk.js", func(c *gin.Context) { - etag := fmt.Sprintf("%x", md5.Sum(Staticjs2ddcd1461chunkjs)) + route.GET("/static/js/2.916c2545.chunk.js", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Staticjs2916c2545chunkjs)) c.Header("Cache-Control", "public, max-age=31536000") c.Header("ETag", etag) - c.Data(200, "application/javascript; charset=utf-8", Staticjs2ddcd1461chunkjs) + c.Data(200, "application/javascript; charset=utf-8", Staticjs2916c2545chunkjs) }) - route.GET("/static/js/2.ddcd1461.chunk.js.LICENSE.txt", func(c *gin.Context) { - etag := fmt.Sprintf("%x", md5.Sum(Staticjs2ddcd1461chunkjsLICENSEtxt)) + route.GET("/static/js/2.916c2545.chunk.js.LICENSE.txt", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Staticjs2916c2545chunkjsLICENSEtxt)) c.Header("Cache-Control", "public, max-age=31536000") c.Header("ETag", etag) - c.Data(200, "text/plain; charset=utf-8", Staticjs2ddcd1461chunkjsLICENSEtxt) + c.Data(200, "text/plain; charset=utf-8", Staticjs2916c2545chunkjsLICENSEtxt) }) - route.GET("/static/js/2.ddcd1461.chunk.js.map", func(c *gin.Context) { - etag := fmt.Sprintf("%x", md5.Sum(Staticjs2ddcd1461chunkjsmap)) + route.GET("/static/js/2.916c2545.chunk.js.map", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Staticjs2916c2545chunkjsmap)) c.Header("Cache-Control", "public, max-age=31536000") c.Header("ETag", etag) - c.Data(200, "application/json", Staticjs2ddcd1461chunkjsmap) + c.Data(200, "application/json", Staticjs2916c2545chunkjsmap) }) - route.GET("/static/js/main.30c42a09.chunk.js", func(c *gin.Context) { - etag := fmt.Sprintf("%x", md5.Sum(Staticjsmain30c42a09chunkjs)) + route.GET("/static/js/main.55f380e1.chunk.js", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Staticjsmain55f380e1chunkjs)) c.Header("Cache-Control", "public, max-age=31536000") c.Header("ETag", etag) - c.Data(200, "application/javascript; charset=utf-8", Staticjsmain30c42a09chunkjs) + c.Data(200, "application/javascript; charset=utf-8", Staticjsmain55f380e1chunkjs) }) - route.GET("/static/js/main.30c42a09.chunk.js.map", func(c *gin.Context) { - etag := fmt.Sprintf("%x", md5.Sum(Staticjsmain30c42a09chunkjsmap)) + route.GET("/static/js/main.55f380e1.chunk.js.map", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Staticjsmain55f380e1chunkjsmap)) c.Header("Cache-Control", "public, max-age=31536000") c.Header("ETag", etag) - c.Data(200, "application/json", Staticjsmain30c42a09chunkjsmap) + c.Data(200, "application/json", Staticjsmain55f380e1chunkjsmap) }) route.GET("/static/js/runtime-main.f542387e.js", func(c *gin.Context) { From 92bbadec9b09404070acbc4a884c7a0ec23c6007 Mon Sep 17 00:00:00 2001 From: yourok <8yourok8@mail.ru> Date: Thu, 29 Feb 2024 12:40:12 +0300 Subject: [PATCH 75/76] MatriX.130 --- 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 e2c37fa..1ae6008 100644 --- a/server/version/version.go +++ b/server/version/version.go @@ -6,7 +6,7 @@ import ( // "github.com/anacrolix/torrent" ) -const Version = "MatriX.129.5" +const Version = "MatriX.130" func GetTorrentVersion() string { bi, ok := debug.ReadBuildInfo() From cb36fceae7a8f2c3682268e79a5ed1270c555e82 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Mar 2024 06:27:49 +0300 Subject: [PATCH 76/76] Bump es5-ext from 0.10.62 to 0.10.63 in /web (#365) Bumps [es5-ext](https://github.com/medikoo/es5-ext) from 0.10.62 to 0.10.63. - [Release notes](https://github.com/medikoo/es5-ext/releases) - [Changelog](https://github.com/medikoo/es5-ext/blob/main/CHANGELOG.md) - [Commits](https://github.com/medikoo/es5-ext/compare/v0.10.62...v0.10.63) --- updated-dependencies: - dependency-name: es5-ext dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- web/yarn.lock | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/web/yarn.lock b/web/yarn.lock index 33fd644..936a1ea 100644 --- a/web/yarn.lock +++ b/web/yarn.lock @@ -5230,13 +5230,14 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" -es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50: - version "0.10.62" - resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.62.tgz#5e6adc19a6da524bf3d1e02bbc8960e5eb49a9a5" - integrity sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA== +es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50, es5-ext@^0.10.62, es5-ext@~0.10.14: + version "0.10.63" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.63.tgz#9c222a63b6a332ac80b1e373b426af723b895bd6" + integrity sha512-hUCZd2Byj/mNKjfP9jXrdVZ62B8KuA/VoK7X8nUh5qT+AxDmcbvZz041oDVZdbIN1qW6XY9VDNwzkvKnZvK2TQ== dependencies: es6-iterator "^2.0.3" es6-symbol "^3.1.3" + esniff "^2.0.1" next-tick "^1.1.0" es6-iterator@2.0.3, es6-iterator@^2.0.1, es6-iterator@^2.0.3: @@ -5559,6 +5560,16 @@ eslint@^7.11.0, eslint@^7.27.0: text-table "^0.2.0" v8-compile-cache "^2.0.3" +esniff@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/esniff/-/esniff-2.0.1.tgz#a4d4b43a5c71c7ec51c51098c1d8a29081f9b308" + integrity sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg== + dependencies: + d "^1.0.1" + es5-ext "^0.10.62" + event-emitter "^0.3.5" + type "^2.7.2" + espree@^7.3.0, espree@^7.3.1: version "7.3.1" resolved "https://registry.yarnpkg.com/espree/-/espree-7.3.1.tgz#f2df330b752c6f55019f8bd89b7660039c1bbbb6" @@ -5622,6 +5633,14 @@ etag@~1.8.1: resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg== +event-emitter@^0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" + integrity sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA== + dependencies: + d "1" + es5-ext "~0.10.14" + eventemitter3@^4.0.0: version "4.0.7" resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f"