Browse Source

feat: [WIP] wgpw -> wgcli

pull/1465/head
Rah Emil 6 months ago
parent
commit
038d3c7f60
  1. 4
      Dockerfile
  2. 2
      src/wgcli.mjs
  3. 2
      src/wgcli.sh

4
Dockerfile

@ -27,8 +27,8 @@ COPY --from=build_node_modules /app /app
COPY --from=build_node_modules /node_modules /node_modules COPY --from=build_node_modules /node_modules /node_modules
# Copy the needed wg-password scripts # Copy the needed wg-password scripts
COPY --from=build_node_modules /app/wgpw.sh /bin/wgpw COPY --from=build_node_modules /app/wgcli.sh /bin/wgcli
RUN chmod +x /bin/wgpw RUN chmod +x /bin/wgcli
# Install Linux packages # Install Linux packages
RUN apk add --no-cache \ RUN apk add --no-cache \

2
src/wgpw.mjs → src/wgcli.mjs

@ -61,7 +61,7 @@ const readStdinPassword = () => {
// Retrieve command line arguments // Retrieve command line arguments
const args = process.argv.slice(2); // Ignore the first two arguments const args = process.argv.slice(2); // Ignore the first two arguments
if (args.length > 2) { if (args.length > 2) {
throw new Error('Usage : wgpw [YOUR_PASSWORD] [HASH]'); throw new Error('Usage : wgcli [YOUR_PASSWORD] [HASH]');
} }
const [password, hash] = args; const [password, hash] = args;

2
src/wgpw.sh → 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 # This script is intended to be run only inside a docker container, not on the development host machine
set -e set -e
# proxy command # proxy command
node /app/wgpw.mjs "$@" node /app/wgcli.mjs "$@"
Loading…
Cancel
Save