From e9fb8298706698dd5ccc3f7f9fad7fd132241406 Mon Sep 17 00:00:00 2001 From: Alexandr Bogomyakov Date: Fri, 4 Oct 2024 03:32:21 +0300 Subject: [PATCH] Fix --- .github/workflows/build-and-publish.yaml | 2 +- content/posts/wg-xray.md | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-and-publish.yaml b/.github/workflows/build-and-publish.yaml index 3a79393..5d56bd8 100644 --- a/.github/workflows/build-and-publish.yaml +++ b/.github/workflows/build-and-publish.yaml @@ -9,7 +9,7 @@ jobs: - name: Checkout uses: actions/checkout@v3.0.0 - name: Set commit id - run: sed -e "s/tag\ =.*/tag = \"${{ github.sha }}\"/" -i config.toml + run: sed -e "s/tag\ =.*/tag = \"${{ github.sha.substr(0,7) }}\"/" -i config.toml - name: Build and push to gh-pages branch uses: shalzz/zola-deploy-action@v0.17.2 env: diff --git a/content/posts/wg-xray.md b/content/posts/wg-xray.md index 0c9b76d..d65725c 100644 --- a/content/posts/wg-xray.md +++ b/content/posts/wg-xray.md @@ -26,7 +26,7 @@ sudo bash -c "$(curl -L https://github.com/XTLS/Xray-install/raw/main/install-re First, generate the necessary keys and IDs: -```shell +```sh # Generate X25519 keys using Xray's built-in command _x25519=$(xray x25519) PRIVATE_KEY=$(echo "$_x25519" | awk -F': ' '/Private key/{print $2}') @@ -47,7 +47,8 @@ PORT=8443 Create the server configuration file `server.json`: -```shell +```sh +# /usr/local/etc/xray/config.json cat > server.json < client.json <