Initial commit: docker compose config
Release Docker multi arch / docker (push) Has been cancelled
Test Install Script / Test Script Syntax (push) Has been cancelled
Test Install Script / Test on almalinux-10 (default) (push) Has been cancelled
Test Install Script / Test on almalinux-10 (root) (push) Has been cancelled
Test Install Script / Test on almalinux-8 (default) (push) Has been cancelled
Test Install Script / Test on almalinux-8 (root) (push) Has been cancelled
Test Install Script / Test on almalinux-9 (default) (push) Has been cancelled
Test Install Script / Test on almalinux-9 (root) (push) Has been cancelled
Test Install Script / Test on amazonlinux-2 (default) (push) Has been cancelled
Test Install Script / Test on amazonlinux-2 (root) (push) Has been cancelled
Test Install Script / Test on debian-11 (default) (push) Has been cancelled
Test Install Script / Test on debian-11 (root) (push) Has been cancelled
Test Install Script / Test on debian-12 (default) (push) Has been cancelled
Test Install Script / Test on debian-12 (root) (push) Has been cancelled
Test Install Script / Test on debian-13 (default) (push) Has been cancelled
Test Install Script / Test on debian-13 (root) (push) Has been cancelled
Test Install Script / Test on fedora-latest (default) (push) Has been cancelled
Test Install Script / Test on fedora-latest (root) (push) Has been cancelled
Test Install Script / Test on rocky-10 (default) (push) Has been cancelled
Test Install Script / Test on rocky-10 (root) (push) Has been cancelled
Test Install Script / Test on rocky-8 (default) (push) Has been cancelled
Test Install Script / Test on rocky-8 (root) (push) Has been cancelled
Test Install Script / Test on rocky-9 (default) (push) Has been cancelled
Test Install Script / Test on rocky-9 (root) (push) Has been cancelled
Test Install Script / Test on ubuntu-22.04 (default) (push) Has been cancelled
Test Install Script / Test on ubuntu-22.04 (root) (push) Has been cancelled
Test Install Script / Test on ubuntu-24.04 (default) (push) Has been cancelled
Test Install Script / Test on ubuntu-24.04 (root) (push) Has been cancelled
@@ -0,0 +1,83 @@
|
||||
package pages
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"server/proxy"
|
||||
|
||||
"github.com/anacrolix/torrent/metainfo"
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"server/settings"
|
||||
"server/torr"
|
||||
"server/web/auth"
|
||||
"server/web/pages/template"
|
||||
|
||||
"golang.org/x/exp/slices"
|
||||
)
|
||||
|
||||
func SetupRoute(route gin.IRouter) {
|
||||
authorized := route.Group("/", auth.CheckAuth())
|
||||
|
||||
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)
|
||||
authorized.Any("/proxy/*url", proxyUrl)
|
||||
}
|
||||
|
||||
// stat godoc
|
||||
//
|
||||
// @Summary TorrServer Statistics
|
||||
// @Description Show server and torrents statistics.
|
||||
//
|
||||
// @Tags Pages
|
||||
//
|
||||
// @Produce text/plain
|
||||
// @Success 200 "TorrServer statistics"
|
||||
// @Router /stat [get]
|
||||
func statPage(c *gin.Context) {
|
||||
torr.WriteStatus(c.Writer)
|
||||
c.Status(200)
|
||||
}
|
||||
|
||||
// getTorrents godoc
|
||||
//
|
||||
// @Summary Get HTML of magnet links
|
||||
// @Description Get HTML of magnet links.
|
||||
//
|
||||
// @Tags Pages
|
||||
//
|
||||
// @Produce text/html
|
||||
// @Success 200 "HTML with Magnet links"
|
||||
// @Router /magnets [get]
|
||||
func getTorrents(c *gin.Context) {
|
||||
list := settings.ListTorrent()
|
||||
http := "<div>"
|
||||
for _, db := range list {
|
||||
ts := db.TorrentSpec
|
||||
mi := metainfo.MetaInfo{
|
||||
AnnounceList: ts.Trackers,
|
||||
}
|
||||
// mag := mi.Magnet(ts.DisplayName, ts.InfoHash)
|
||||
mag := mi.Magnet(&ts.InfoHash, &metainfo.Info{Name: ts.DisplayName})
|
||||
http += "<p><a href='" + mag.String() + "'>magnet:?xt=urn:btih:" + mag.InfoHash.HexString() + "</a></p>"
|
||||
}
|
||||
http += "</div>"
|
||||
c.Data(200, "text/html; charset=utf-8", []byte(http))
|
||||
}
|
||||
|
||||
func proxyUrl(c *gin.Context) {
|
||||
if proxy.P2Proxy != nil {
|
||||
proxy.P2Proxy.GinHandler(c)
|
||||
return
|
||||
}
|
||||
c.AbortWithStatus(http.StatusNotFound)
|
||||
}
|
||||
@@ -0,0 +1,149 @@
|
||||
package template
|
||||
|
||||
import (
|
||||
_ "embed"
|
||||
)
|
||||
|
||||
//go:embed pages/apple-splash-1125-2436.jpg
|
||||
var Applesplash11252436jpg []byte
|
||||
|
||||
//go:embed pages/apple-splash-1136-640.jpg
|
||||
var Applesplash1136640jpg []byte
|
||||
|
||||
//go:embed pages/apple-splash-1170-2532.jpg
|
||||
var Applesplash11702532jpg []byte
|
||||
|
||||
//go:embed pages/apple-splash-1242-2208.jpg
|
||||
var Applesplash12422208jpg []byte
|
||||
|
||||
//go:embed pages/apple-splash-1242-2688.jpg
|
||||
var Applesplash12422688jpg []byte
|
||||
|
||||
//go:embed pages/apple-splash-1284-2778.jpg
|
||||
var Applesplash12842778jpg []byte
|
||||
|
||||
//go:embed pages/apple-splash-1334-750.jpg
|
||||
var Applesplash1334750jpg []byte
|
||||
|
||||
//go:embed pages/apple-splash-1536-2048.jpg
|
||||
var Applesplash15362048jpg []byte
|
||||
|
||||
//go:embed pages/apple-splash-1620-2160.jpg
|
||||
var Applesplash16202160jpg []byte
|
||||
|
||||
//go:embed pages/apple-splash-1668-2224.jpg
|
||||
var Applesplash16682224jpg []byte
|
||||
|
||||
//go:embed pages/apple-splash-1668-2388.jpg
|
||||
var Applesplash16682388jpg []byte
|
||||
|
||||
//go:embed pages/apple-splash-1792-828.jpg
|
||||
var Applesplash1792828jpg []byte
|
||||
|
||||
//go:embed pages/apple-splash-2048-1536.jpg
|
||||
var Applesplash20481536jpg []byte
|
||||
|
||||
//go:embed pages/apple-splash-2048-2732.jpg
|
||||
var Applesplash20482732jpg []byte
|
||||
|
||||
//go:embed pages/apple-splash-2160-1620.jpg
|
||||
var Applesplash21601620jpg []byte
|
||||
|
||||
//go:embed pages/apple-splash-2208-1242.jpg
|
||||
var Applesplash22081242jpg []byte
|
||||
|
||||
//go:embed pages/apple-splash-2224-1668.jpg
|
||||
var Applesplash22241668jpg []byte
|
||||
|
||||
//go:embed pages/apple-splash-2388-1668.jpg
|
||||
var Applesplash23881668jpg []byte
|
||||
|
||||
//go:embed pages/apple-splash-2436-1125.jpg
|
||||
var Applesplash24361125jpg []byte
|
||||
|
||||
//go:embed pages/apple-splash-2532-1170.jpg
|
||||
var Applesplash25321170jpg []byte
|
||||
|
||||
//go:embed pages/apple-splash-2688-1242.jpg
|
||||
var Applesplash26881242jpg []byte
|
||||
|
||||
//go:embed pages/apple-splash-2732-2048.jpg
|
||||
var Applesplash27322048jpg []byte
|
||||
|
||||
//go:embed pages/apple-splash-2778-1284.jpg
|
||||
var Applesplash27781284jpg []byte
|
||||
|
||||
//go:embed pages/apple-splash-640-1136.jpg
|
||||
var Applesplash6401136jpg []byte
|
||||
|
||||
//go:embed pages/apple-splash-750-1334.jpg
|
||||
var Applesplash7501334jpg []byte
|
||||
|
||||
//go:embed pages/apple-splash-828-1792.jpg
|
||||
var Applesplash8281792jpg []byte
|
||||
|
||||
//go:embed pages/asset-manifest.json
|
||||
var Assetmanifestjson []byte
|
||||
|
||||
//go:embed pages/browserconfig.xml
|
||||
var Browserconfigxml []byte
|
||||
|
||||
//go:embed pages/dlnaicon-120.png
|
||||
var Dlnaicon120png []byte
|
||||
|
||||
//go:embed pages/dlnaicon-48.png
|
||||
var Dlnaicon48png []byte
|
||||
|
||||
//go:embed pages/favicon-16x16.png
|
||||
var Favicon16x16png []byte
|
||||
|
||||
//go:embed pages/favicon-32x32.png
|
||||
var Favicon32x32png []byte
|
||||
|
||||
//go:embed pages/favicon.ico
|
||||
var Faviconico []byte
|
||||
|
||||
//go:embed pages/icon.png
|
||||
var Iconpng []byte
|
||||
|
||||
//go:embed pages/index.html
|
||||
var Indexhtml []byte
|
||||
|
||||
//go:embed pages/logo.png
|
||||
var Logopng []byte
|
||||
|
||||
//go:embed pages/lordicon/jkzgajyr.json
|
||||
var Lordiconjkzgajyrjson []byte
|
||||
|
||||
//go:embed pages/lordicon/lord-icon-2.0.2.js
|
||||
var Lordiconlordicon202js []byte
|
||||
|
||||
//go:embed pages/lordicon/wrprwmwt.json
|
||||
var Lordiconwrprwmwtjson []byte
|
||||
|
||||
//go:embed pages/mstile-150x150.png
|
||||
var Mstile150x150png []byte
|
||||
|
||||
//go:embed pages/site.webmanifest
|
||||
var Sitewebmanifest []byte
|
||||
|
||||
//go:embed pages/static/js/2.17225dbd.chunk.js
|
||||
var Staticjs217225dbdchunkjs []byte
|
||||
|
||||
//go:embed pages/static/js/2.17225dbd.chunk.js.LICENSE.txt
|
||||
var Staticjs217225dbdchunkjsLICENSEtxt []byte
|
||||
|
||||
//go:embed pages/static/js/2.17225dbd.chunk.js.map
|
||||
var Staticjs217225dbdchunkjsmap []byte
|
||||
|
||||
//go:embed pages/static/js/main.c7b9a3c5.chunk.js
|
||||
var Staticjsmainc7b9a3c5chunkjs []byte
|
||||
|
||||
//go:embed pages/static/js/main.c7b9a3c5.chunk.js.map
|
||||
var Staticjsmainc7b9a3c5chunkjsmap []byte
|
||||
|
||||
//go:embed pages/static/js/runtime-main.5ed86a79.js
|
||||
var Staticjsruntimemain5ed86a79js []byte
|
||||
|
||||
//go:embed pages/static/js/runtime-main.5ed86a79.js.map
|
||||
var Staticjsruntimemain5ed86a79jsmap []byte
|
||||
|
After Width: | Height: | Size: 386 KiB |
|
After Width: | Height: | Size: 195 KiB |
|
After Width: | Height: | Size: 411 KiB |
|
After Width: | Height: | Size: 403 KiB |
|
After Width: | Height: | Size: 455 KiB |
|
After Width: | Height: | Size: 480 KiB |
|
After Width: | Height: | Size: 252 KiB |
|
After Width: | Height: | Size: 476 KiB |
|
After Width: | Height: | Size: 516 KiB |
|
After Width: | Height: | Size: 547 KiB |
|
After Width: | Height: | Size: 572 KiB |
|
After Width: | Height: | Size: 368 KiB |
|
After Width: | Height: | Size: 535 KiB |
|
After Width: | Height: | Size: 734 KiB |
|
After Width: | Height: | Size: 595 KiB |
|
After Width: | Height: | Size: 537 KiB |
|
After Width: | Height: | Size: 624 KiB |
|
After Width: | Height: | Size: 675 KiB |
|
After Width: | Height: | Size: 596 KiB |
|
After Width: | Height: | Size: 638 KiB |
|
After Width: | Height: | Size: 691 KiB |
|
After Width: | Height: | Size: 848 KiB |
|
After Width: | Height: | Size: 730 KiB |
|
After Width: | Height: | Size: 137 KiB |
|
After Width: | Height: | Size: 178 KiB |
|
After Width: | Height: | Size: 236 KiB |
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"files": {
|
||||
"main.js": "./static/js/main.c7b9a3c5.chunk.js",
|
||||
"main.js.map": "./static/js/main.c7b9a3c5.chunk.js.map",
|
||||
"runtime-main.js": "./static/js/runtime-main.5ed86a79.js",
|
||||
"runtime-main.js.map": "./static/js/runtime-main.5ed86a79.js.map",
|
||||
"static/js/2.17225dbd.chunk.js": "./static/js/2.17225dbd.chunk.js",
|
||||
"static/js/2.17225dbd.chunk.js.map": "./static/js/2.17225dbd.chunk.js.map",
|
||||
"index.html": "./index.html",
|
||||
"static/js/2.17225dbd.chunk.js.LICENSE.txt": "./static/js/2.17225dbd.chunk.js.LICENSE.txt"
|
||||
},
|
||||
"entrypoints": [
|
||||
"static/js/runtime-main.5ed86a79.js",
|
||||
"static/js/2.17225dbd.chunk.js",
|
||||
"static/js/main.c7b9a3c5.chunk.js"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<browserconfig>
|
||||
<msapplication>
|
||||
<tile>
|
||||
<square150x150logo src="/mstile-150x150.png"/>
|
||||
<TileColor>#00a572</TileColor>
|
||||
<TileImage src="/mstile-150x150.png" />
|
||||
</tile>
|
||||
</msapplication>
|
||||
</browserconfig>
|
||||
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 824 B |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 72 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 213 KiB |
|
After Width: | Height: | Size: 20 KiB |
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"name": "TorrServer",
|
||||
"short_name": "TorrServer",
|
||||
"icons": [
|
||||
{
|
||||
"src": "icon.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png",
|
||||
"purpose": "any"
|
||||
},
|
||||
{
|
||||
"src": "logo.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png",
|
||||
"purpose": "any"
|
||||
}
|
||||
],
|
||||
"theme_color": "#ffffff",
|
||||
"background_color": "#ffffff",
|
||||
"display": "standalone"
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
/*
|
||||
object-assign
|
||||
(c) Sindre Sorhus
|
||||
@license MIT
|
||||
*/
|
||||
|
||||
/*!
|
||||
* The buffer module from node.js, for the browser.
|
||||
*
|
||||
* @author Feross Aboukhadijeh <http://feross.org>
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
/*! blob-to-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||||
|
||||
/*! https://mths.be/punycode v1.4.1 by @mathias */
|
||||
|
||||
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||||
|
||||
/*! magnet-uri. MIT License. WebTorrent LLC <https://webtorrent.io/opensource> */
|
||||
|
||||
/*! parse-torrent. MIT License. WebTorrent LLC <https://webtorrent.io/opensource> */
|
||||
|
||||
/*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||||
|
||||
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||||
|
||||
/*! simple-concat. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||||
|
||||
/*! simple-get. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||||
|
||||
/**
|
||||
* A better abstraction over CSS.
|
||||
*
|
||||
* @copyright Oleg Isonen (Slobodskoi) / Isonen 2014-present
|
||||
* @website https://github.com/cssinjs/jss
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
/** @license React v0.20.2
|
||||
* scheduler.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/** @license React v16.13.1
|
||||
* react-is.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/** @license React v17.0.2
|
||||
* react-dom.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/** @license React v17.0.2
|
||||
* react-is.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/** @license React v17.0.2
|
||||
* react-jsx-runtime.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/** @license React v17.0.2
|
||||
* react.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/**!
|
||||
* @fileOverview Kickass library to create and place poppers near their reference elements.
|
||||
* @version 1.16.1-lts
|
||||
* @license
|
||||
* Copyright (c) 2016 Federico Zivolo and contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
@@ -0,0 +1,2 @@
|
||||
!function(e){function r(r){for(var n,l,f=r[0],i=r[1],a=r[2],c=0,s=[];c<f.length;c++)l=f[c],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&s.push(o[l][0]),o[l]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(p&&p(r);s.length;)s.shift()();return u.push.apply(u,a||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,f=1;f<t.length;f++){var i=t[f];0!==o[i]&&(n=!1)}n&&(u.splice(r--,1),e=l(l.s=t[0]))}return e}var n={},o={1:0},u=[];function l(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,l),t.l=!0,t.exports}l.m=e,l.c=n,l.d=function(e,r,t){l.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},l.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,r){if(1&r&&(e=l(e)),8&r)return e;if(4&r&&"object"===typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(l.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)l.d(t,n,function(r){return e[r]}.bind(null,n));return t},l.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(r,"a",r),r},l.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},l.p="./";var f=this.webpackJsonptorrserver_web=this.webpackJsonptorrserver_web||[],i=f.push.bind(f);f.push=r,f=f.slice();for(var a=0;a<f.length;a++)r(f[a]);var p=i;t()}([]);
|
||||
//# sourceMappingURL=runtime-main.5ed86a79.js.map
|
||||
@@ -0,0 +1,352 @@
|
||||
package template
|
||||
|
||||
import (
|
||||
"crypto/md5"
|
||||
"fmt"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
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")
|
||||
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("/lordicon/jkzgajyr.json", func(c *gin.Context) {
|
||||
etag := fmt.Sprintf("%x", md5.Sum(Lordiconjkzgajyrjson))
|
||||
c.Header("Cache-Control", "public, max-age=31536000")
|
||||
c.Header("ETag", etag)
|
||||
c.Data(200, "application/json", Lordiconjkzgajyrjson)
|
||||
})
|
||||
|
||||
route.GET("/lordicon/lord-icon-2.0.2.js", func(c *gin.Context) {
|
||||
etag := fmt.Sprintf("%x", md5.Sum(Lordiconlordicon202js))
|
||||
c.Header("Cache-Control", "public, max-age=31536000")
|
||||
c.Header("ETag", etag)
|
||||
c.Data(200, "application/javascript; charset=utf-8", Lordiconlordicon202js)
|
||||
})
|
||||
|
||||
route.GET("/lordicon/wrprwmwt.json", func(c *gin.Context) {
|
||||
etag := fmt.Sprintf("%x", md5.Sum(Lordiconwrprwmwtjson))
|
||||
c.Header("Cache-Control", "public, max-age=31536000")
|
||||
c.Header("ETag", etag)
|
||||
c.Data(200, "application/json", Lordiconwrprwmwtjson)
|
||||
})
|
||||
|
||||
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.17225dbd.chunk.js", func(c *gin.Context) {
|
||||
etag := fmt.Sprintf("%x", md5.Sum(Staticjs217225dbdchunkjs))
|
||||
c.Header("Cache-Control", "public, max-age=31536000")
|
||||
c.Header("ETag", etag)
|
||||
c.Data(200, "application/javascript; charset=utf-8", Staticjs217225dbdchunkjs)
|
||||
})
|
||||
|
||||
route.GET("/static/js/2.17225dbd.chunk.js.LICENSE.txt", func(c *gin.Context) {
|
||||
etag := fmt.Sprintf("%x", md5.Sum(Staticjs217225dbdchunkjsLICENSEtxt))
|
||||
c.Header("Cache-Control", "public, max-age=31536000")
|
||||
c.Header("ETag", etag)
|
||||
c.Data(200, "text/plain; charset=utf-8", Staticjs217225dbdchunkjsLICENSEtxt)
|
||||
})
|
||||
|
||||
route.GET("/static/js/2.17225dbd.chunk.js.map", func(c *gin.Context) {
|
||||
etag := fmt.Sprintf("%x", md5.Sum(Staticjs217225dbdchunkjsmap))
|
||||
c.Header("Cache-Control", "public, max-age=31536000")
|
||||
c.Header("ETag", etag)
|
||||
c.Data(200, "application/json", Staticjs217225dbdchunkjsmap)
|
||||
})
|
||||
|
||||
route.GET("/static/js/main.c7b9a3c5.chunk.js", func(c *gin.Context) {
|
||||
etag := fmt.Sprintf("%x", md5.Sum(Staticjsmainc7b9a3c5chunkjs))
|
||||
c.Header("Cache-Control", "public, max-age=31536000")
|
||||
c.Header("ETag", etag)
|
||||
c.Data(200, "application/javascript; charset=utf-8", Staticjsmainc7b9a3c5chunkjs)
|
||||
})
|
||||
|
||||
route.GET("/static/js/main.c7b9a3c5.chunk.js.map", func(c *gin.Context) {
|
||||
etag := fmt.Sprintf("%x", md5.Sum(Staticjsmainc7b9a3c5chunkjsmap))
|
||||
c.Header("Cache-Control", "public, max-age=31536000")
|
||||
c.Header("ETag", etag)
|
||||
c.Data(200, "application/json", Staticjsmainc7b9a3c5chunkjsmap)
|
||||
})
|
||||
|
||||
route.GET("/static/js/runtime-main.5ed86a79.js", func(c *gin.Context) {
|
||||
etag := fmt.Sprintf("%x", md5.Sum(Staticjsruntimemain5ed86a79js))
|
||||
c.Header("Cache-Control", "public, max-age=31536000")
|
||||
c.Header("ETag", etag)
|
||||
c.Data(200, "application/javascript; charset=utf-8", Staticjsruntimemain5ed86a79js)
|
||||
})
|
||||
|
||||
route.GET("/static/js/runtime-main.5ed86a79.js.map", func(c *gin.Context) {
|
||||
etag := fmt.Sprintf("%x", md5.Sum(Staticjsruntimemain5ed86a79jsmap))
|
||||
c.Header("Cache-Control", "public, max-age=31536000")
|
||||
c.Header("ETag", etag)
|
||||
c.Data(200, "application/json", Staticjsruntimemain5ed86a79jsmap)
|
||||
})
|
||||
}
|
||||