From 038d3c7f6061bce92c6a4c56ad6656f6bc73ed8f Mon Sep 17 00:00:00 2001 From: Rah Emil <013131@mail.ru> Date: Sat, 12 Oct 2024 09:01:50 +0300 Subject: [PATCH] feat: [WIP] wgpw -> wgcli --- Dockerfile | 4 ++-- src/{wgpw.mjs => wgcli.mjs} | 2 +- src/{wgpw.sh => wgcli.sh} | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) rename src/{wgpw.mjs => wgcli.mjs} (97%) rename src/{wgpw.sh => wgcli.sh} (84%) diff --git a/Dockerfile b/Dockerfile index 99f1acf6..f0a92dce 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,8 +27,8 @@ COPY --from=build_node_modules /app /app COPY --from=build_node_modules /node_modules /node_modules # Copy the needed wg-password scripts -COPY --from=build_node_modules /app/wgpw.sh /bin/wgpw -RUN chmod +x /bin/wgpw +COPY --from=build_node_modules /app/wgcli.sh /bin/wgcli +RUN chmod +x /bin/wgcli # Install Linux packages RUN apk add --no-cache \ diff --git a/src/wgpw.mjs b/src/wgcli.mjs similarity index 97% rename from src/wgpw.mjs rename to src/wgcli.mjs index 6ad6aede..5c7d9a13 100644 --- a/src/wgpw.mjs +++ b/src/wgcli.mjs @@ -61,7 +61,7 @@ const readStdinPassword = () => { // Retrieve command line arguments const args = process.argv.slice(2); // Ignore the first two arguments if (args.length > 2) { - throw new Error('Usage : wgpw [YOUR_PASSWORD] [HASH]'); + throw new Error('Usage : wgcli [YOUR_PASSWORD] [HASH]'); } const [password, hash] = args; diff --git a/src/wgpw.sh b/src/wgcli.sh similarity index 84% rename from src/wgpw.sh rename to src/wgcli.sh index aac6afa1..a3cc68f7 100755 --- a/src/wgpw.sh +++ b/src/wgcli.sh @@ -2,4 +2,4 @@ # This script is intended to be run only inside a docker container, not on the development host machine set -e # proxy command -node /app/wgpw.mjs "$@" \ No newline at end of file +node /app/wgcli.mjs "$@"