diff --git a/app-list.png b/app-list.png index 473caaa6..38565d0e 100644 Binary files a/app-list.png and b/app-list.png differ diff --git a/apps/wireguard-easy/7/.env.sample b/apps/wireguard-easy/7/.env.sample new file mode 100644 index 00000000..b05d07cc --- /dev/null +++ b/apps/wireguard-easy/7/.env.sample @@ -0,0 +1,6 @@ +CONTAINER_NAME="wireguard-easy" +DATA_PATH="./data" +HOST_ADDRESS="172.17.0.1" +PANEL_APP_PORT_HTTP="40074" +WEBUI_PWD="password" +WIREGUARD_PORT="51820" diff --git a/apps/wireguard-easy/7/data.yml b/apps/wireguard-easy/7/data.yml new file mode 100644 index 00000000..adeadc5f --- /dev/null +++ b/apps/wireguard-easy/7/data.yml @@ -0,0 +1,42 @@ +additionalProperties: + formFields: + - default: 40074 + edit: true + envKey: PANEL_APP_PORT_HTTP + labelEn: WebUI Port + labelZh: 网页端口 + required: true + rule: paramPort + type: number + - default: 51820 + edit: true + envKey: WIREGUARD_PORT + labelEn: Wireguard port + labelZh: Wireguard端口 + required: true + rule: paramPort + type: number + - default: ./data + edit: true + envKey: DATA_PATH + labelEn: Data folder path + labelZh: 数据文件夹路径 + required: true + type: text + - default: "password" + edit: true + envKey: WEBUI_PWD + labelEn: Webui password + labelZh: 网页密码 + random: false + required: true + rule: paramComplexity + type: password + - default: 172.17.0.1 + edit: true + envKey: HOST_ADDRESS + labelEn: Local IP address (must change item) + labelZh: 本机IP地址(必改项) + required: true + rule: paramCommon + type: text \ No newline at end of file diff --git a/apps/wireguard-easy/7/docker-compose.yml b/apps/wireguard-easy/7/docker-compose.yml new file mode 100644 index 00000000..51f22fed --- /dev/null +++ b/apps/wireguard-easy/7/docker-compose.yml @@ -0,0 +1,38 @@ +version: "3" +services: + wg-easy: + container_name: ${CONTAINER_NAME} + restart: always + networks: + - 1panel-network + environment: + - WG_HOST=${HOST_ADDRESS} + - PASSWORD=${WEBUI_PWD} + - WG_PORT=${WIREGUARD_PORT} + # Optional: + # - WG_DEFAULT_ADDRESS=10.8.0.x + # - WG_DEFAULT_DNS=1.1.1.1 + # - WG_MTU=1420 + # - WG_ALLOWED_IPS=192.168.15.0/24, 10.0.1.0/24 + # - WG_PRE_UP=echo "Pre Up" > /etc/wireguard/pre-up.txt + # - WG_POST_UP=echo "Post Up" > /etc/wireguard/post-up.txt + # - WG_PRE_DOWN=echo "Pre Down" > /etc/wireguard/pre-down.txt + # - WG_POST_DOWN=echo "Post Down" > /etc/wireguard/post-down.txt + volumes: + - ${DATA_PATH}:/etc/wireguard + ports: + - "${WIREGUARD_PORT}:${WIREGUARD_PORT}/udp" + - "${PANEL_APP_PORT_HTTP}:51821/tcp" + cap_add: + - NET_ADMIN + - SYS_MODULE + sysctls: + - net.ipv4.ip_forward=1 + - net.ipv4.conf.all.src_valid_mark=1 + image: weejewel/wg-easy:7 + labels: + createdBy: "Apps" + +networks: + 1panel-network: + external: true diff --git a/apps/wireguard-easy/README.md b/apps/wireguard-easy/README.md new file mode 100644 index 00000000..ca38d60c --- /dev/null +++ b/apps/wireguard-easy/README.md @@ -0,0 +1,115 @@ +# WireGuard Easy + +[](https://github.com/WeeJeWel/wg-easy/actions/workflows/deploy.yml) +[](https://github.com/WeeJeWel/wg-easy/actions/workflows/lint.yml) +[](https://hub.docker.com/r/weejewel/wg-easy) +[](https://hub.docker.com/r/weejewel/wg-easy) +[](https://github.com/sponsors/WeeJeWel) + + +You have found the easiest way to install & manage WireGuard on any Linux host! + +
+
+
+$ docker run -d \ + --name=wg-easy \ + -e WG_HOST=🚨YOUR_SERVER_IP \ + -e PASSWORD=🚨YOUR_ADMIN_PASSWORD \ + -v ~/.wg-easy:/etc/wireguard \ + -p 51820:51820/udp \ + -p 51821:51821/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 \ + weejewel/wg-easy ++ +> 💡 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. + +The Web UI will now be available on `http://0.0.0.0:51821`. + +> 💡 Your configuration files will be saved in `~/.wg-easy` + +### 3. Sponsor + +Are you enjoying this project? [Buy me a beer!](https://github.com/sponsors/WeeJeWel) 🍻 + +## Options + +These options can be configured by setting environment variables using `-e KEY="VALUE"` in the `docker run` command. + +| Env | Default | Example | Description | +| - | - | - | - | +| `PASSWORD` | - | `foobar123` | When set, requires a password when logging in to the Web UI. | +| `WG_HOST` | - | `vpn.myserver.com` | The public hostname of your VPN server. | +| `WG_DEVICE` | `eth0` | `ens6f0` | Ethernet device the wireguard traffic should be forwarded through. | +| `WG_PORT` | `51820` | `12345` | The public UDP port of your VPN server. WireGuard will always listen on `51820` inside the Docker container. | +| `WG_MTU` | `null` | `1420` | The MTU the clients will use. Server uses default WG MTU. | +| `WG_PERSISTENT_KEEPALIVE` | `0` | `25` | Value in seconds to keep the "connection" open. If this value is 0, then connections won't be kept alive. | +| `WG_DEFAULT_ADDRESS` | `10.8.0.x` | `10.6.0.x` | Clients IP address range. | +| `WG_DEFAULT_DNS` | `1.1.1.1` | `8.8.8.8, 8.8.4.4` | DNS server clients will use. | +| `WG_ALLOWED_IPS` | `0.0.0.0/0, ::/0` | `192.168.15.0/24, 10.0.1.0/24` | Allowed IPs clients will use. | +| `WG_PRE_UP` | `...` | - | See [config.js](https://github.com/WeeJeWel/wg-easy/blob/master/src/config.js#L19) for the default value. | +| `WG_POST_UP` | `...` | `iptables ...` | See [config.js](https://github.com/WeeJeWel/wg-easy/blob/master/src/config.js#L20) for the default value. | +| `WG_PRE_DOWN` | `...` | - | See [config.js](https://github.com/WeeJeWel/wg-easy/blob/master/src/config.js#L27) for the default value. | +| `WG_POST_DOWN` | `...` | `iptables ...` | See [config.js](https://github.com/WeeJeWel/wg-easy/blob/master/src/config.js#L28) for the default value. | + +> If you change `WG_PORT`, make sure to also change the exposed port. + +## Updating + +To update to the latest version, simply run: + +```bash +docker stop wg-easy +docker rm wg-easy +docker pull weejewel/wg-easy +``` + +And then run the `docker run -d \ ...` command above again. + +## Common Use Cases + +* [Using WireGuard-Easy with Pi-Hole](https://github.com/WeeJeWel/wg-easy/wiki/Using-WireGuard-Easy-with-Pi-Hole) +* [Using WireGuard-Easy with nginx/SSL](https://github.com/WeeJeWel/wg-easy/wiki/Using-WireGuard-Easy-with-nginx-SSL) diff --git a/apps/wireguard-easy/data.yml b/apps/wireguard-easy/data.yml new file mode 100644 index 00000000..a9681575 --- /dev/null +++ b/apps/wireguard-easy/data.yml @@ -0,0 +1,20 @@ +name: WireGuard Easy +tags: + - 工具 +title: 运行WireGuard VPN +基于Web的管理UI的最简单方法 +type: 工具 +description: 运行WireGuard VPN +基于Web的管理UI的最简单方法 +additionalProperties: + key: wireguard-easy + name: WireGuard Easy + tags: + - Tool + shortDescZh: 运行WireGuard VPN +基于Web的管理UI的最简单方法 + shortDescEn: The easiest way to run WireGuard VPN + Web-based Admin UI + type: tool + crossVersionUpdate: true + limit: 0 + recommend: 0 + website: https://www.wireguard.com/ + github: https://github.com/wg-easy/wg-easy + document: https://www.wireguard.com/ \ No newline at end of file diff --git a/apps/wireguard-easy/latest/.env.sample b/apps/wireguard-easy/latest/.env.sample new file mode 100644 index 00000000..b05d07cc --- /dev/null +++ b/apps/wireguard-easy/latest/.env.sample @@ -0,0 +1,6 @@ +CONTAINER_NAME="wireguard-easy" +DATA_PATH="./data" +HOST_ADDRESS="172.17.0.1" +PANEL_APP_PORT_HTTP="40074" +WEBUI_PWD="password" +WIREGUARD_PORT="51820" diff --git a/apps/wireguard-easy/latest/data.yml b/apps/wireguard-easy/latest/data.yml new file mode 100644 index 00000000..adeadc5f --- /dev/null +++ b/apps/wireguard-easy/latest/data.yml @@ -0,0 +1,42 @@ +additionalProperties: + formFields: + - default: 40074 + edit: true + envKey: PANEL_APP_PORT_HTTP + labelEn: WebUI Port + labelZh: 网页端口 + required: true + rule: paramPort + type: number + - default: 51820 + edit: true + envKey: WIREGUARD_PORT + labelEn: Wireguard port + labelZh: Wireguard端口 + required: true + rule: paramPort + type: number + - default: ./data + edit: true + envKey: DATA_PATH + labelEn: Data folder path + labelZh: 数据文件夹路径 + required: true + type: text + - default: "password" + edit: true + envKey: WEBUI_PWD + labelEn: Webui password + labelZh: 网页密码 + random: false + required: true + rule: paramComplexity + type: password + - default: 172.17.0.1 + edit: true + envKey: HOST_ADDRESS + labelEn: Local IP address (must change item) + labelZh: 本机IP地址(必改项) + required: true + rule: paramCommon + type: text \ No newline at end of file diff --git a/apps/wireguard-easy/latest/docker-compose.yml b/apps/wireguard-easy/latest/docker-compose.yml new file mode 100644 index 00000000..f4324253 --- /dev/null +++ b/apps/wireguard-easy/latest/docker-compose.yml @@ -0,0 +1,38 @@ +version: "3" +services: + wg-easy: + container_name: ${CONTAINER_NAME} + restart: always + networks: + - 1panel-network + environment: + - WG_HOST=${HOST_ADDRESS} + - PASSWORD=${WEBUI_PWD} + - WG_PORT=${WIREGUARD_PORT} + # Optional: + # - WG_DEFAULT_ADDRESS=10.8.0.x + # - WG_DEFAULT_DNS=1.1.1.1 + # - WG_MTU=1420 + # - WG_ALLOWED_IPS=192.168.15.0/24, 10.0.1.0/24 + # - WG_PRE_UP=echo "Pre Up" > /etc/wireguard/pre-up.txt + # - WG_POST_UP=echo "Post Up" > /etc/wireguard/post-up.txt + # - WG_PRE_DOWN=echo "Pre Down" > /etc/wireguard/pre-down.txt + # - WG_POST_DOWN=echo "Post Down" > /etc/wireguard/post-down.txt + volumes: + - ${DATA_PATH}:/etc/wireguard + ports: + - "${WIREGUARD_PORT}:${WIREGUARD_PORT}/udp" + - "${PANEL_APP_PORT_HTTP}:51821/tcp" + cap_add: + - NET_ADMIN + - SYS_MODULE + sysctls: + - net.ipv4.ip_forward=1 + - net.ipv4.conf.all.src_valid_mark=1 + image: weejewel/wg-easy:latest + labels: + createdBy: "Apps" + +networks: + 1panel-network: + external: true diff --git a/apps/wireguard-easy/logo.png b/apps/wireguard-easy/logo.png new file mode 100644 index 00000000..cf4b8c48 Binary files /dev/null and b/apps/wireguard-easy/logo.png differ diff --git a/apps/wireguard-easy/nightly/.env.sample b/apps/wireguard-easy/nightly/.env.sample new file mode 100644 index 00000000..b05d07cc --- /dev/null +++ b/apps/wireguard-easy/nightly/.env.sample @@ -0,0 +1,6 @@ +CONTAINER_NAME="wireguard-easy" +DATA_PATH="./data" +HOST_ADDRESS="172.17.0.1" +PANEL_APP_PORT_HTTP="40074" +WEBUI_PWD="password" +WIREGUARD_PORT="51820" diff --git a/apps/wireguard-easy/nightly/data.yml b/apps/wireguard-easy/nightly/data.yml new file mode 100644 index 00000000..adeadc5f --- /dev/null +++ b/apps/wireguard-easy/nightly/data.yml @@ -0,0 +1,42 @@ +additionalProperties: + formFields: + - default: 40074 + edit: true + envKey: PANEL_APP_PORT_HTTP + labelEn: WebUI Port + labelZh: 网页端口 + required: true + rule: paramPort + type: number + - default: 51820 + edit: true + envKey: WIREGUARD_PORT + labelEn: Wireguard port + labelZh: Wireguard端口 + required: true + rule: paramPort + type: number + - default: ./data + edit: true + envKey: DATA_PATH + labelEn: Data folder path + labelZh: 数据文件夹路径 + required: true + type: text + - default: "password" + edit: true + envKey: WEBUI_PWD + labelEn: Webui password + labelZh: 网页密码 + random: false + required: true + rule: paramComplexity + type: password + - default: 172.17.0.1 + edit: true + envKey: HOST_ADDRESS + labelEn: Local IP address (must change item) + labelZh: 本机IP地址(必改项) + required: true + rule: paramCommon + type: text \ No newline at end of file diff --git a/apps/wireguard-easy/nightly/docker-compose.yml b/apps/wireguard-easy/nightly/docker-compose.yml new file mode 100644 index 00000000..1508bd09 --- /dev/null +++ b/apps/wireguard-easy/nightly/docker-compose.yml @@ -0,0 +1,38 @@ +version: "3" +services: + wg-easy: + container_name: ${CONTAINER_NAME} + restart: always + networks: + - 1panel-network + environment: + - WG_HOST=${HOST_ADDRESS} + - PASSWORD=${WEBUI_PWD} + - WG_PORT=${WIREGUARD_PORT} + # Optional: + # - WG_DEFAULT_ADDRESS=10.8.0.x + # - WG_DEFAULT_DNS=1.1.1.1 + # - WG_MTU=1420 + # - WG_ALLOWED_IPS=192.168.15.0/24, 10.0.1.0/24 + # - WG_PRE_UP=echo "Pre Up" > /etc/wireguard/pre-up.txt + # - WG_POST_UP=echo "Post Up" > /etc/wireguard/post-up.txt + # - WG_PRE_DOWN=echo "Pre Down" > /etc/wireguard/pre-down.txt + # - WG_POST_DOWN=echo "Post Down" > /etc/wireguard/post-down.txt + volumes: + - ${DATA_PATH}:/etc/wireguard + ports: + - "${WIREGUARD_PORT}:${WIREGUARD_PORT}/udp" + - "${PANEL_APP_PORT_HTTP}:51821/tcp" + cap_add: + - NET_ADMIN + - SYS_MODULE + sysctls: + - net.ipv4.ip_forward=1 + - net.ipv4.conf.all.src_valid_mark=1 + image: weejewel/wg-easy:nightly + labels: + createdBy: "Apps" + +networks: + 1panel-network: + external: true diff --git a/apps/wireguard-ui/data.yml b/apps/wireguard-ui/data.yml index 6b3d0b47..490c11c1 100644 --- a/apps/wireguard-ui/data.yml +++ b/apps/wireguard-ui/data.yml @@ -1,4 +1,4 @@ -name: wireguard-ui +name: WireGuard-UI tags: - 工具 title: Wireguard网络界面 @@ -6,7 +6,7 @@ type: 工具 description: Wireguard网络界面 additionalProperties: key: wireguard-ui - name: wireguard-ui + name: WireGuard-UI tags: - Tool shortDescZh: Wireguard网络界面