diff --git a/server/go.mod b/server/go.mod index cf397c18..e8529097 100644 --- a/server/go.mod +++ b/server/go.mod @@ -1,8 +1,6 @@ module server -go 1.21 - -toolchain go1.23.1 +go 1.20 replace github.com/anacrolix/torrent v1.54.1 => github.com/tsynik/torrent v1.2.22 diff --git a/server/go.sum b/server/go.sum index 80369646..1c328e3f 100644 --- a/server/go.sum +++ b/server/go.sum @@ -3,7 +3,6 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT crawshaw.io/iox v0.0.0-20181124134642-c51c3df30797/go.mod h1:sXBiorCo8c46JlQV3oXPKINnZ8mcqnye1EkVkqsectk= crawshaw.io/sqlite v0.3.2/go.mod h1:igAO5JulrQ1DbdZdtVq48mnZUBAPOeFzer7VhDWNtW4= filippo.io/edwards25519 v1.0.0-rc.1 h1:m0VOOB23frXZvAOK44usCgLWvtsxIoMCTBGJZlpmGfU= -filippo.io/edwards25519 v1.0.0-rc.1/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/KyleBanks/depth v1.2.1 h1:5h8fQADFrWtarTdtDudMmGsC7GPbOAu6RVB3ffsVFHc= github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6XgeJcm8brE= @@ -17,11 +16,9 @@ github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMx github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8= github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo= github.com/alecthomas/assert/v2 v2.0.0-alpha3 h1:pcHeMvQ3OMstAWgaeaXIAL8uzB9xMm2zlxt+/4ml8lk= -github.com/alecthomas/assert/v2 v2.0.0-alpha3/go.mod h1:+zD0lmDXTeQj7TgDgCt0ePWxb0hMC1G+PGTsTCv1B9o= github.com/alecthomas/atomic v0.1.0-alpha2 h1:dqwXmax66gXvHhsOS4pGPZKqYOlTkapELkLb3MNdlH8= github.com/alecthomas/atomic v0.1.0-alpha2/go.mod h1:zD6QGEyw49HIq19caJDc2NMXAy8rNi9ROrxtMXATfyI= github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142 h1:8Uy0oSf5co/NZXje7U1z8Mpep++QJOldL2hs/sBQf48= -github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -40,7 +37,6 @@ 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= @@ -132,7 +128,6 @@ github.com/gabriel-vasile/mimetype v1.4.4/go.mod h1:JwLei5XPtWdGiMFB5Pjle1oEeoSe github.com/gin-contrib/cors v1.7.2 h1:oLDHxdg8W/XDoN/8zamqk/Drgt4oVZDvaV0YmvVICQw= github.com/gin-contrib/cors v1.7.2/go.mod h1:SUJVARKgQ40dmrzgXEVxj2m7Ig1v1qIboQkPDTQ9t2E= github.com/gin-contrib/gzip v0.0.6 h1:NjcunTcGAj5CO1gn4N8jHOSIeRFHIbn51z6K+xaN4d4= -github.com/gin-contrib/gzip v0.0.6/go.mod h1:QOJlmV2xmayAjkNS2Y8NQsMneuRShOU/kjovCXNuzzk= github.com/gin-contrib/location v1.0.1 h1:jvRTI1OnbssvN5gfhZfJoCcfRl5TryBh6hVWSifJfYw= github.com/gin-contrib/location v1.0.1/go.mod h1:ekHwW1ahklUMaOv7riu6Wyyn0bCkxQdWf3EQWwVIcs0= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= @@ -158,7 +153,6 @@ github.com/go-openapi/spec v0.21.0/go.mod h1:78u6VdPw81XU44qEWGhtr982gJ5BWg2c0I5 github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= -github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= 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.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= @@ -194,7 +188,6 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.4.0/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/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= @@ -204,7 +197,6 @@ github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51 github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= 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/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= 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= @@ -294,7 +286,6 @@ github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTE 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= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= -github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= 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= @@ -368,7 +359,6 @@ 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.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= -golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= 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= @@ -472,7 +462,6 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8 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-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= diff --git a/server/torr/stream.go b/server/torr/stream.go index 01c5d438..9e65b1fc 100644 --- a/server/torr/stream.go +++ b/server/torr/stream.go @@ -21,13 +21,6 @@ import ( ) func (t *Torrent) Stream(fileID int, req *http.Request, resp http.ResponseWriter) error { - // Log arguments - log.Printf("Stream called with fileID: %d, req: %v, resp: %v\n", fileID, req, resp) - // Log the request fully - log.Printf("Request: %+v\n", req) - // Log the response fully - log.Printf("Response: %+v\n", resp) - if !t.GotInfo() { http.NotFound(resp, req) return errors.New("torrent don't get info") diff --git a/server/web/pages/template/html.go b/server/web/pages/template/html.go index 40f5f9fa..e7e40a16 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.2ee428ae.chunk.js -var Staticjs22ee428aechunkjs []byte +//go:embed pages/static/js/2.15e75e72.chunk.js +var Staticjs215e75e72chunkjs []byte -//go:embed pages/static/js/2.2ee428ae.chunk.js.LICENSE.txt -var Staticjs22ee428aechunkjsLICENSEtxt []byte +//go:embed pages/static/js/2.15e75e72.chunk.js.LICENSE.txt +var Staticjs215e75e72chunkjsLICENSEtxt []byte -//go:embed pages/static/js/2.2ee428ae.chunk.js.map -var Staticjs22ee428aechunkjsmap []byte +//go:embed pages/static/js/2.15e75e72.chunk.js.map +var Staticjs215e75e72chunkjsmap []byte -//go:embed pages/static/js/main.ec65ea40.chunk.js -var Staticjsmainec65ea40chunkjs []byte +//go:embed pages/static/js/main.60265001.chunk.js +var Staticjsmain60265001chunkjs []byte -//go:embed pages/static/js/main.ec65ea40.chunk.js.map -var Staticjsmainec65ea40chunkjsmap []byte +//go:embed pages/static/js/main.60265001.chunk.js.map +var Staticjsmain60265001chunkjsmap []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 84f4ce84..c384a4e7 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.ec65ea40.chunk.js", - "main.js.map": "/static/js/main.ec65ea40.chunk.js.map", + "main.js": "/static/js/main.60265001.chunk.js", + "main.js.map": "/static/js/main.60265001.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.2ee428ae.chunk.js": "/static/js/2.2ee428ae.chunk.js", - "static/js/2.2ee428ae.chunk.js.map": "/static/js/2.2ee428ae.chunk.js.map", + "static/js/2.15e75e72.chunk.js": "/static/js/2.15e75e72.chunk.js", + "static/js/2.15e75e72.chunk.js.map": "/static/js/2.15e75e72.chunk.js.map", "index.html": "/index.html", - "static/js/2.2ee428ae.chunk.js.LICENSE.txt": "/static/js/2.2ee428ae.chunk.js.LICENSE.txt" + "static/js/2.15e75e72.chunk.js.LICENSE.txt": "/static/js/2.15e75e72.chunk.js.LICENSE.txt" }, "entrypoints": [ "static/js/runtime-main.f542387e.js", - "static/js/2.2ee428ae.chunk.js", - "static/js/main.ec65ea40.chunk.js" + "static/js/2.15e75e72.chunk.js", + "static/js/main.60265001.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 f91c8a06..1c604497 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 d545eea4..9fcc3579 100644 --- a/server/web/pages/template/route.go +++ b/server/web/pages/template/route.go @@ -280,46 +280,46 @@ func RouteWebPages(route gin.IRouter) { c.Data(200, "application/manifest+json", Sitewebmanifest) }) - route.GET("/static/js/2.2ee428ae.chunk.js", func(c *gin.Context) { - etag := fmt.Sprintf("%x", md5.Sum(Staticjs22ee428aechunkjs)) + route.GET("/static/js/2.15e75e72.chunk.js", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Staticjs215e75e72chunkjs)) c.Header("Cache-Control", "public, max-age=31536000") c.Header("ETag", etag) - c.Data(200, "text/javascript; charset=utf-8", Staticjs22ee428aechunkjs) + c.Data(200, "application/javascript; charset=utf-8", Staticjs215e75e72chunkjs) }) - route.GET("/static/js/2.2ee428ae.chunk.js.LICENSE.txt", func(c *gin.Context) { - etag := fmt.Sprintf("%x", md5.Sum(Staticjs22ee428aechunkjsLICENSEtxt)) + route.GET("/static/js/2.15e75e72.chunk.js.LICENSE.txt", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Staticjs215e75e72chunkjsLICENSEtxt)) c.Header("Cache-Control", "public, max-age=31536000") c.Header("ETag", etag) - c.Data(200, "text/plain; charset=utf-8", Staticjs22ee428aechunkjsLICENSEtxt) + c.Data(200, "text/plain; charset=utf-8", Staticjs215e75e72chunkjsLICENSEtxt) }) - route.GET("/static/js/2.2ee428ae.chunk.js.map", func(c *gin.Context) { - etag := fmt.Sprintf("%x", md5.Sum(Staticjs22ee428aechunkjsmap)) + route.GET("/static/js/2.15e75e72.chunk.js.map", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Staticjs215e75e72chunkjsmap)) c.Header("Cache-Control", "public, max-age=31536000") c.Header("ETag", etag) - c.Data(200, "application/json", Staticjs22ee428aechunkjsmap) + c.Data(200, "application/json", Staticjs215e75e72chunkjsmap) }) - route.GET("/static/js/main.ec65ea40.chunk.js", func(c *gin.Context) { - etag := fmt.Sprintf("%x", md5.Sum(Staticjsmainec65ea40chunkjs)) + route.GET("/static/js/main.60265001.chunk.js", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Staticjsmain60265001chunkjs)) c.Header("Cache-Control", "public, max-age=31536000") c.Header("ETag", etag) - c.Data(200, "text/javascript; charset=utf-8", Staticjsmainec65ea40chunkjs) + c.Data(200, "application/javascript; charset=utf-8", Staticjsmain60265001chunkjs) }) - route.GET("/static/js/main.ec65ea40.chunk.js.map", func(c *gin.Context) { - etag := fmt.Sprintf("%x", md5.Sum(Staticjsmainec65ea40chunkjsmap)) + route.GET("/static/js/main.60265001.chunk.js.map", func(c *gin.Context) { + etag := fmt.Sprintf("%x", md5.Sum(Staticjsmain60265001chunkjsmap)) c.Header("Cache-Control", "public, max-age=31536000") c.Header("ETag", etag) - c.Data(200, "application/json", Staticjsmainec65ea40chunkjsmap) + c.Data(200, "application/json", Staticjsmain60265001chunkjsmap) }) 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, "text/javascript; charset=utf-8", Staticjsruntimemainf542387ejs) + c.Data(200, "application/javascript; charset=utf-8", Staticjsruntimemainf542387ejs) }) route.GET("/static/js/runtime-main.f542387e.js.map", func(c *gin.Context) {