Compare commits
10 commits
06b16b1fbb
...
6879011856
Author | SHA1 | Date | |
---|---|---|---|
|
6879011856 | ||
|
d90caf5899 | ||
|
d1dedfade9 | ||
|
77f9cd2a6f | ||
|
25dc0c6651 | ||
|
b16c247a55 | ||
|
78f10949b7 | ||
|
55d66ec7f0 | ||
|
7d2009c5b9 | ||
|
213a98cb22 |
5 changed files with 49 additions and 13 deletions
4
.github/workflows/autotag.yml
vendored
4
.github/workflows/autotag.yml
vendored
|
@ -6,14 +6,14 @@ on:
|
||||||
- main
|
- main
|
||||||
paths:
|
paths:
|
||||||
- "Dockerfile"
|
- "Dockerfile"
|
||||||
- "tailscale.sh"
|
- "entrypoint.sh"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
auto-tag:
|
auto-tag:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: ⤵️ Check out code
|
- name: ⤵️ Check out code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
token: ${{ secrets.GH_PAT }}
|
token: ${{ secrets.GH_PAT }}
|
||||||
|
|
12
.github/workflows/build.yml
vendored
12
.github/workflows/build.yml
vendored
|
@ -14,17 +14,17 @@ jobs:
|
||||||
name: Build image
|
name: Build image
|
||||||
steps:
|
steps:
|
||||||
- name: 📥 Checkout the repository
|
- name: 📥 Checkout the repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: 🏗 Set up QEMU
|
- name: 🏗 Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v2
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
- name: 🏗 Set up Docker Buildx
|
- name: 🏗 Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v2
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- name: 🪄 Extract metadata (tags, labels)
|
- name: 🪄 Extract metadata (tags, labels)
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v4
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
images: |
|
images: |
|
||||||
ghcr.io/${{ github.repository }}
|
ghcr.io/${{ github.repository }}
|
||||||
|
@ -36,14 +36,14 @@ jobs:
|
||||||
|
|
||||||
- name: 🔓 Registry login
|
- name: 🔓 Registry login
|
||||||
if: github.event_name == 'push'
|
if: github.event_name == 'push'
|
||||||
uses: docker/login-action@v2.1.0
|
uses: docker/login-action@v3.0.0
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
username: ${{ github.repository_owner }}
|
username: ${{ github.repository_owner }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: 🛠️ Build image
|
- name: 🛠️ Build image
|
||||||
uses: docker/build-push-action@v3
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: ./Dockerfile
|
file: ./Dockerfile
|
||||||
|
|
6
.github/workflows/lint.yml
vendored
6
.github/workflows/lint.yml
vendored
|
@ -11,7 +11,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: ⤵️ Check out code
|
- name: ⤵️ Check out code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: 🚀 Run yamllint
|
- name: 🚀 Run yamllint
|
||||||
uses: reviewdog/action-yamllint@v1
|
uses: reviewdog/action-yamllint@v1
|
||||||
|
@ -24,7 +24,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: ⤵️ Check out code
|
- name: ⤵️ Check out code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: 🚀 Run hadolint
|
- name: 🚀 Run hadolint
|
||||||
uses: reviewdog/action-hadolint@v1
|
uses: reviewdog/action-hadolint@v1
|
||||||
|
@ -36,7 +36,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: ⤵️ Check out code
|
- name: ⤵️ Check out code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: 🚀 Run shellcheck
|
- name: 🚀 Run shellcheck
|
||||||
uses: reviewdog/action-shellcheck@v1
|
uses: reviewdog/action-shellcheck@v1
|
||||||
|
|
|
@ -1,10 +1,14 @@
|
||||||
FROM weejewel/wg-easy:7
|
FROM weejewel/wg-easy:7
|
||||||
|
|
||||||
# hadolint ignore=DL3022,DL3023
|
# hadolint ignore=DL3022,DL3023
|
||||||
COPY --from=mindflavor/prometheus-wireguard-exporter:3.6.4 /usr/local/bin/prometheus_wireguard_exporter /usr/local/bin/
|
COPY --from=mindflavor/prometheus-wireguard-exporter:3.6.6 /usr/local/bin/prometheus_wireguard_exporter /usr/local/bin/
|
||||||
|
|
||||||
|
# shellcheck disable=SC2016
|
||||||
RUN apk add -U --no-cache \
|
RUN apk add -U --no-cache \
|
||||||
wireguard-tools=1.0.20200102-r0
|
wireguard-tools=1.0.20200102-r0 \
|
||||||
|
&& sed \
|
||||||
|
-i '1,/^\[Peer\]/{s//[Peer]\n# friendly_name = ${client.name}\n# (${clientId})/}' \
|
||||||
|
lib/WireGuard.js
|
||||||
|
|
||||||
COPY entrypoint.sh /app/entrypoint.sh
|
COPY entrypoint.sh /app/entrypoint.sh
|
||||||
RUN chmod +x /app/entrypoint.sh
|
RUN chmod +x /app/entrypoint.sh
|
||||||
|
|
32
README.md
Normal file
32
README.md
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
# wg-easy-extended
|
||||||
|
|
||||||
|
All-in-one: [wg-easy](https://github.com/wg-easy/wg-easy) + [prometheus-wireguard-exporter](https://github.com/MindFlavor/prometheus_wireguard_exporter)
|
||||||
|
|
||||||
|
## Run
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
$ docker run -d \
|
||||||
|
--name=wg-easy-extended \
|
||||||
|
-e WG_HOST=<b>🚨YOUR_SERVER_IP</b> \
|
||||||
|
-e PASSWORD=<b>🚨YOUR_ADMIN_PASSWORD</b> \
|
||||||
|
-v ~/.wg-easy:/etc/wireguard \
|
||||||
|
-p 51820:51820/udp \
|
||||||
|
-p 51821:51821/tcp \
|
||||||
|
-p 9586:9586/tcp \
|
||||||
|
--cap-add=NET_ADMIN \
|
||||||
|
--cap-add=SYS_MODULE \
|
||||||
|
--sysctl="net.ipv4.conf.all.src_valid_mark=1" \
|
||||||
|
--sysctl="net.ipv4.ip_forward=1" \
|
||||||
|
--restart unless-stopped \
|
||||||
|
ghcr.io/tolkonepiu/wg-easy-extended
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
> 💡 Replace `YOUR_SERVER_IP` with your WAN IP, or a Dynamic DNS hostname.
|
||||||
|
>
|
||||||
|
> 💡 Replace `YOUR_ADMIN_PASSWORD` with a password to log in on the Web UI.
|
||||||
|
|
||||||
|
* Web UI - `http://0.0.0.0:51821`
|
||||||
|
|
||||||
|
* Exporter metrics - `http://0.0.0.0:9586/metrics`
|
||||||
|
|
||||||
|
> 💡 Your configuration files will be saved in `~/.wg-easy`
|
Loading…
Reference in a new issue