Этот коммит содержится в:
AJ ONeal 2018-05-26 08:48:23 +00:00
родитель 28944a6933
Коммит d3a6ef96d6
4 изменённых файлов: 19 добавлений и 3 удалений

Просмотреть файл

@ -2,8 +2,14 @@
<html>
<head>
<title>Telebit Relay</title>
<meta charset="UTF-8">
</head>
<body>
<script>document.body.hidden = true;</script>
<button class="js-login">Login</button>
<button class="js-login">Sign Up</button>
<br>
[TODO: Admin Interface]
<script src="js/app.js"></script>
</body>
</html>

6
admin/js/app.js Обычный файл
Просмотреть файл

@ -0,0 +1,6 @@
(function () {
'use strict';
document.body.hidden = false;
}());

Просмотреть файл

@ -129,7 +129,7 @@ function applyConfig(config) {
, approveDomains: approveDomains
, configDir: state.config.greenlock.configDir
, debug: true
, debug: state.config.debug || state.config.greenlock.debug
//, approvedDomains: program.servernames

Просмотреть файл

@ -118,8 +118,12 @@ module.exports.create = function (state) {
var serveAdmin = require('serve-static')(__dirname + '/admin', { redirect: true });
var finalhandler = require('finalhandler');
state.httpTunnelServer = http.createServer(function (req, res) {
console.log('req.socket.encrypted', req.socket.encrypted);
serveAdmin(req, res, finalhandler(req, res));
console.log('admin req.socket.encrypted', req.socket.encrypted);
res.setHeader('connection', 'close');
serveAdmin(req, res, function () {
console.log("serveAdmin fail");
finalhandler(req, res)
});
});
Object.keys(state.tlsOptions).forEach(function (key) {
tunnelAdminTlsOpts[key] = state.tlsOptions[key];