diff --git a/src/config.js b/src/config.js index 28c9fc5a..8c0c91e0 100644 --- a/src/config.js +++ b/src/config.js @@ -26,3 +26,4 @@ iptables -A FORWARD -o wg0 -j ACCEPT; module.exports.WG_PRE_DOWN = process.env.WG_PRE_DOWN || ''; module.exports.WG_POST_DOWN = process.env.WG_POST_DOWN || ''; +module.exports.LANG = process.env.LANG || 'en'; diff --git a/src/lib/Server.js b/src/lib/Server.js index c893d7d5..0279796f 100644 --- a/src/lib/Server.js +++ b/src/lib/Server.js @@ -14,6 +14,7 @@ const { PORT, RELEASE, PASSWORD, + LANG, } = require('../config'); module.exports = class Server { @@ -134,6 +135,9 @@ module.exports = class Server { const { address } = req.body; return WireGuard.updateClientAddress({ clientId, address }); })) + .get('/api/lang', (Util.promisify(async () => { + return LANG; + }))) .listen(PORT, () => { debug(`Listening on http://0.0.0.0:${PORT}`); diff --git a/src/www/index.html b/src/www/index.html index 14259b9e..d54cbe9f 100644 --- a/src/www/index.html +++ b/src/www/index.html @@ -33,26 +33,10 @@ d="M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1" /> -
+