forked from mirrors/amnezia-wg-easy
wip
This commit is contained in:
parent
985d886362
commit
91832c8e20
9 changed files with 449 additions and 379 deletions
|
@ -12,6 +12,7 @@ const WireGuard = require('../services/WireGuard');
|
|||
|
||||
const {
|
||||
PORT,
|
||||
RELEASE,
|
||||
PASSWORD,
|
||||
} = require('../config');
|
||||
|
||||
|
@ -29,6 +30,10 @@ module.exports = class Server {
|
|||
saveUninitialized: true,
|
||||
}))
|
||||
|
||||
.get('/api/release', (Util.promisify(async () => {
|
||||
return RELEASE;
|
||||
})))
|
||||
|
||||
// Authentication
|
||||
.get('/api/session', Util.promisify(async req => {
|
||||
const requiresPassword = !!process.env.PASSWORD;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue