Merge branch 'feat-no-privateKey' into feat/clients-without-privatekey
This commit is contained in:
@@ -18,6 +18,7 @@ const {
|
||||
RELEASE,
|
||||
PASSWORD,
|
||||
LANG,
|
||||
UI_TRAFFIC_STATS,
|
||||
} = require('../config');
|
||||
|
||||
module.exports = class Server {
|
||||
@@ -44,6 +45,9 @@ module.exports = class Server {
|
||||
.get('/api/lang', (Util.promisify(async () => {
|
||||
return LANG;
|
||||
})))
|
||||
.get('/api/ui-traffic-stats', (Util.promisify(async () => {
|
||||
return UI_TRAFFIC_STATS === 'true';
|
||||
})))
|
||||
|
||||
// Authentication
|
||||
.get('/api/session', Util.promisify(async (req) => {
|
||||
|
||||
@@ -319,4 +319,9 @@ Endpoint = ${WG_HOST}:${WG_PORT}`;
|
||||
await this.saveConfig();
|
||||
}
|
||||
|
||||
// Shutdown wireguard
|
||||
async Shutdown() {
|
||||
await Util.exec('wg-quick down wg0').catch(() => { });
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user