add ssl options to web

This commit is contained in:
nikk gitanes
2023-11-13 10:53:28 +03:00
parent b72c66d433
commit ffdd20a019
15 changed files with 115 additions and 43 deletions

View File

@@ -45,7 +45,7 @@ allowing the cache size to be adjusted according to the system parameters and th
### Installation
Download the application for the required platform in the [releases](https://github.com/YouROK/TorrServer/releases) page. After installation, open the link <http://127.0.0.1:8090> in the browser.'
Download the application for the required platform in the [releases](https://github.com/YouROK/TorrServer/releases) page. After installation, open the link <http://127.0.0.1:8090> in the browser.
#### Windows
@@ -262,3 +262,5 @@ local:127.0.0.1
- [Anton111111 (Anton Potekhin)](https://github.com/Anton111111)
- [lieranderl (Evgeni)](https://github.com/lieranderl)
- [cocool97](https://github.com/cocool97)
- [shadeov](https://github.com/shadeov)
and others

View File

@@ -118,23 +118,23 @@ var Mstile150x150png []byte
//go:embed pages/site.webmanifest
var Sitewebmanifest []byte
//go:embed pages/static/js/2.883fbd6e.chunk.js
var Staticjs2883fbd6echunkjs []byte
//go:embed pages/static/js/2.56a11991.chunk.js
var Staticjs256a11991chunkjs []byte
//go:embed pages/static/js/2.883fbd6e.chunk.js.LICENSE.txt
var Staticjs2883fbd6echunkjsLICENSEtxt []byte
//go:embed pages/static/js/2.56a11991.chunk.js.LICENSE.txt
var Staticjs256a11991chunkjsLICENSEtxt []byte
//go:embed pages/static/js/2.883fbd6e.chunk.js.map
var Staticjs2883fbd6echunkjsmap []byte
//go:embed pages/static/js/2.56a11991.chunk.js.map
var Staticjs256a11991chunkjsmap []byte
//go:embed pages/static/js/main.07e69ba8.chunk.js
var Staticjsmain07e69ba8chunkjs []byte
//go:embed pages/static/js/main.5883b760.chunk.js
var Staticjsmain5883b760chunkjs []byte
//go:embed pages/static/js/main.07e69ba8.chunk.js.map
var Staticjsmain07e69ba8chunkjsmap []byte
//go:embed pages/static/js/main.5883b760.chunk.js.map
var Staticjsmain5883b760chunkjsmap []byte
//go:embed pages/static/js/runtime-main.64d07802.js
var Staticjsruntimemain64d07802js []byte
//go:embed pages/static/js/runtime-main.f542387e.js
var Staticjsruntimemainf542387ejs []byte
//go:embed pages/static/js/runtime-main.64d07802.js.map
var Staticjsruntimemain64d07802jsmap []byte
//go:embed pages/static/js/runtime-main.f542387e.js.map
var Staticjsruntimemainf542387ejsmap []byte

View File

@@ -1,17 +1,17 @@
{
"files": {
"main.js": "/static/js/main.07e69ba8.chunk.js",
"main.js.map": "/static/js/main.07e69ba8.chunk.js.map",
"runtime-main.js": "/static/js/runtime-main.64d07802.js",
"runtime-main.js.map": "/static/js/runtime-main.64d07802.js.map",
"static/js/2.883fbd6e.chunk.js": "/static/js/2.883fbd6e.chunk.js",
"static/js/2.883fbd6e.chunk.js.map": "/static/js/2.883fbd6e.chunk.js.map",
"main.js": "/static/js/main.5883b760.chunk.js",
"main.js.map": "/static/js/main.5883b760.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",
"index.html": "/index.html",
"static/js/2.883fbd6e.chunk.js.LICENSE.txt": "/static/js/2.883fbd6e.chunk.js.LICENSE.txt"
"static/js/2.56a11991.chunk.js.LICENSE.txt": "/static/js/2.56a11991.chunk.js.LICENSE.txt"
},
"entrypoints": [
"static/js/runtime-main.64d07802.js",
"static/js/2.883fbd6e.chunk.js",
"static/js/main.07e69ba8.chunk.js"
"static/js/runtime-main.f542387e.js",
"static/js/2.56a11991.chunk.js",
"static/js/main.5883b760.chunk.js"
]
}

File diff suppressed because one or more lines are too long

View File

@@ -1,2 +0,0 @@
!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.64d07802.js.map

File diff suppressed because one or more lines are too long

View File

@@ -161,31 +161,31 @@ func RouteWebPages(route *gin.RouterGroup) {
c.Data(200, "application/manifest+json", Sitewebmanifest)
})
route.GET("/static/js/2.883fbd6e.chunk.js", func(c *gin.Context) {
c.Data(200, "application/javascript; charset=utf-8", Staticjs2883fbd6echunkjs)
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.883fbd6e.chunk.js.LICENSE.txt", func(c *gin.Context) {
c.Data(200, "text/plain; charset=utf-8", Staticjs2883fbd6echunkjsLICENSEtxt)
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.883fbd6e.chunk.js.map", func(c *gin.Context) {
c.Data(200, "application/json", Staticjs2883fbd6echunkjsmap)
route.GET("/static/js/2.56a11991.chunk.js.map", func(c *gin.Context) {
c.Data(200, "application/json", Staticjs256a11991chunkjsmap)
})
route.GET("/static/js/main.07e69ba8.chunk.js", func(c *gin.Context) {
c.Data(200, "application/javascript; charset=utf-8", Staticjsmain07e69ba8chunkjs)
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.07e69ba8.chunk.js.map", func(c *gin.Context) {
c.Data(200, "application/json", Staticjsmain07e69ba8chunkjsmap)
route.GET("/static/js/main.5883b760.chunk.js.map", func(c *gin.Context) {
c.Data(200, "application/json", Staticjsmain5883b760chunkjsmap)
})
route.GET("/static/js/runtime-main.64d07802.js", func(c *gin.Context) {
c.Data(200, "application/javascript; charset=utf-8", Staticjsruntimemain64d07802js)
route.GET("/static/js/runtime-main.f542387e.js", func(c *gin.Context) {
c.Data(200, "application/javascript; charset=utf-8", Staticjsruntimemainf542387ejs)
})
route.GET("/static/js/runtime-main.64d07802.js.map", func(c *gin.Context) {
c.Data(200, "application/json", Staticjsruntimemain64d07802jsmap)
route.GET("/static/js/runtime-main.f542387e.js.map", func(c *gin.Context) {
c.Data(200, "application/json", Staticjsruntimemainf542387ejsmap)
})
}

View File

@@ -91,6 +91,7 @@ export default function AboutDialog() {
<LinkComponent name='FaintGhost' link='https://github.com/FaintGhost' />
<LinkComponent name='lieranderl' link='https://github.com/lieranderl' />
<LinkComponent name='cocool97' link='https://github.com/cocool97' />
<LinkComponent name='shadeov' link='https://github.com/shadeov' />
</div>
</Section>
</div>

View File

@@ -34,6 +34,9 @@ export default function SecondarySettingsComponent({ settings, inputForm }) {
UploadRateLimit,
ConnectionsLimit,
PeersListenPort,
SslPort,
SslCert,
SslKey,
} = settings || {}
return (
@@ -214,6 +217,42 @@ export default function SecondarySettingsComponent({ settings, inputForm }) {
<option value={3}>{t('SettingsDialog.ReplaceRetrackers')}</option>
</Select>
<br />
<TextField
onChange={inputForm}
margin='normal'
id='SslPort'
label={t('SettingsDialog.SslPort')}
helperText={t('SettingsDialog.SslPortHint')}
value={SslPort}
type='number'
variant='outlined'
fullWidth
/>
<br />
<TextField
onChange={inputForm}
margin='normal'
id='SslCert'
label={t('SettingsDialog.SslCert')}
helperText={t('SettingsDialog.SslCertHint')}
value={SslCert}
type='url'
variant='outlined'
fullWidth
/>
<br />
<TextField
onChange={inputForm}
margin='normal'
id='SslKey'
label={t('SettingsDialog.SslKey')}
helperText={t('SettingsDialog.SslKeyHint')}
value={SslKey}
type='url'
variant='outlined'
fullWidth
/>
<br />
</SecondarySettingsContent>
)
}

View File

@@ -23,4 +23,7 @@ export default {
UploadRateLimit: 0,
ConnectionsLimit: 25,
PeersListenPort: 0,
SslPort: 0,
SslCert: '',
SslKey: '',
}

View File

@@ -140,6 +140,12 @@
"RetrackersMode": "Режим за ретракери",
"ResetToDefault": "Връщане по подразбиране",
"Settings": "Настройки",
"SslPort": "HTTPS порт",
"SslPortHint": "По подразбиране: 8091",
"SslCert": "SSL сертификат",
"SslCertHint": "Път до SSL сертификат",
"SslKey": "SSL ключ",
"SslKeyHint": "Път до SSL ключ",
"TorrentDisconnectTimeout": "Време на изчакване на връзката с торенти",
"TorrentsSavePath": "Път за запазване на торенти",
"Upload": "Качване",

View File

@@ -140,6 +140,12 @@
"RetrackersMode": "Retrackers Mode",
"ResetToDefault": "Reset to default",
"Settings": "Settings",
"SslPort": "HTTPS Port",
"SslPortHint": "Default: 8091",
"SslCert": "SSL Certificate",
"SslCertHint": "Path to SSL Certificate",
"SslKey": "SSL Key",
"SslKeyHint": "Path to SSL Key",
"TorrentDisconnectTimeout": "Torrent Disconnect Timeout",
"TorrentsSavePath": "Torrents Save Path",
"Upload": "Upload",

View File

@@ -140,6 +140,12 @@
"RetrackersMode": "Ретрекеры",
"ResetToDefault": "Настройки по умолчанию",
"Settings": "Настройки",
"SslPort": "Порт для HTTPS",
"SslPortHint": "По умолчанию: 8091",
"SslCert": "SSL Сертификат",
"SslCertHint": "Путь к SSL сертификату",
"SslKey": "SSL Ключ",
"SslKeyHint": "Путь к SSL ключу",
"TorrentDisconnectTimeout": "Тайм-аут отключения торрента",
"TorrentsSavePath": "Путь хранения кеша",
"Upload": "Отдача",

View File

@@ -140,6 +140,12 @@
"RetrackersMode": "Ретрекери",
"ResetToDefault": "Базові налаштування",
"Settings": "Налаштування",
"SslPort": "Порт HTTPS",
"SslPortHint": "Типове значення: 8091",
"SslCert": "Сертифікат SSL",
"SslCertHint": "Шлях до сертифіката SSL",
"SslKey": "Ключ SSL",
"SslKeyHint": "Шлях до ключа SSL",
"TorrentDisconnectTimeout": "Час очікування відключення торрента",
"TorrentsSavePath": "Шлях для збереження кешу",
"Upload": "Відвантаження",

View File

@@ -140,6 +140,12 @@
"RetrackersMode": "Retrackers模式",
"ResetToDefault": "重置为默认值",
"Settings": "设置",
"SslPort": "HTTPS 端口",
"SslPortHint": "默认值8091",
"SslCert": "SSL证书",
"SslCertHint": "SSL 证书的路径",
"SslKey": "SSL 密钥",
"SslKeyHint": "SSL 密钥的路径",
"TorrentDisconnectTimeout": "种子断开超时",
"TorrentsSavePath": "种子缓存保存路径",
"Upload": "上传",