mirror of
https://github.com/WeeJeWel/wg-easy.git
synced 2024-12-21 16:49:22 +08:00
eslint
This commit is contained in:
parent
c19cb72b6d
commit
e843593b17
4
package-lock.json
generated
Normal file
4
package-lock.json
generated
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"version": "1.0.0",
|
||||||
|
"lockfileVersion": 1
|
||||||
|
}
|
@ -5,4 +5,4 @@
|
|||||||
"serve": "docker-compose -f docker-compose.yml -f docker-compose.dev.yml up",
|
"serve": "docker-compose -f docker-compose.yml -f docker-compose.dev.yml up",
|
||||||
"start": "docker run --env WG_HOST=0.0.0.0 --name wg-easy --cap-add=NET_ADMIN --cap-add=SYS_MODULE --sysctl=\"net.ipv4.conf.all.src_valid_mark=1\" --mount type=bind,source=\"$(pwd)\"/config,target=/etc/wireguard -p 51820:51820/udp -p 51821:51821/tcp wg-easy"
|
"start": "docker run --env WG_HOST=0.0.0.0 --name wg-easy --cap-add=NET_ADMIN --cap-add=SYS_MODULE --sysctl=\"net.ipv4.conf.all.src_valid_mark=1\" --mount type=bind,source=\"$(pwd)\"/config,target=/etc/wireguard -p 51820:51820/udp -p 51821:51821/tcp wg-easy"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ module.exports = class Util {
|
|||||||
|
|
||||||
static promisify(fn) {
|
static promisify(fn) {
|
||||||
// eslint-disable-next-line func-names
|
// eslint-disable-next-line func-names
|
||||||
return function (req, res) {
|
return function(req, res) {
|
||||||
Promise.resolve().then(async () => fn(req, res))
|
Promise.resolve().then(async () => fn(req, res))
|
||||||
.then(result => {
|
.then(result => {
|
||||||
if (res.headersSent) return;
|
if (res.headersSent) return;
|
||||||
|
@ -38,7 +38,7 @@ module.exports = class WireGuard {
|
|||||||
} catch (err) {
|
} catch (err) {
|
||||||
const privateKey = await Util.exec('wg genkey');
|
const privateKey = await Util.exec('wg genkey');
|
||||||
const publicKey = await Util.exec(`echo ${privateKey} | wg pubkey`, {
|
const publicKey = await Util.exec(`echo ${privateKey} | wg pubkey`, {
|
||||||
log: `echo ***hidden*** | wg pubkey`
|
log: 'echo ***hidden*** | wg pubkey',
|
||||||
});
|
});
|
||||||
const address = WG_DEFAULT_ADDRESS.replace('x', '1');
|
const address = WG_DEFAULT_ADDRESS.replace('x', '1');
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user