diff --git a/apps/headscale-webui/README.md b/apps/headscale-webui/README.md new file mode 100644 index 00000000..319e4a64 --- /dev/null +++ b/apps/headscale-webui/README.md @@ -0,0 +1,82 @@ +# 使用说明 + +## 数据文件夹授权 + +- 1、**必要操作:** 首次安装完成后,进入已安装应用界面,点击跳转数据目录,修改目录下的`data`文件夹为`1000`用户和用户组。 + +命令行修改则类似如下,路径按需修改: +``` +chown -R 1000:1000 /opt/1panel/apps/local/headscale-webui/headscale-webui/data +``` + +- 2、回到已安装应用界面,重建应用。 + + +# 原始相关 +*** +

+ + + +

+ +

Headscale-WebUI

+ +

+ A simple Headscale web UI for small-scale deployments. +

+

+ Screenshots | Installation | Issues +

+ +--- +# Features +1. Enable/Disable routes and exit nodes + * Manage failover routes as well +2. Add, move, rename, and remove machines +3. Add and remove users/namespaces +4. Add and expire PreAuth keys +5. Add and remove machine tags +6. View machine details + * Hostname + * User associated with the machine + * IP addresses in the Tailnet + * Last seen by the control server + * Last update with the control server + * Creation date + * Expiration date (will also display a badge when nearing expiration) + * PreAuth key associated with the machine + * Enable / disable routes and exit nodes + * Add and delete machine tags +7. Basic and OIDC Authentication + * OIDC Authentication tested with Authelia and Keycloak +8. Change your color theme! See MaterializeCSS Documentation for Colors for examples. +9. Search your machines and users. + * Machines have tags you can use to filter search: + * `tag:tagname` Searches only for specific tags + * `machine:machine-name` Searches only for specific machines + * `user:user-name` Searches only for specific users + + +--- +# Installation +* See [SETUP.md](SETUP.md) for installation and configuration instructions. + +--- +# Screenshots: +![Overview](https://github.com/iFargle/headscale-webui/raw/main/screenshots/overview.png) +![Routes](https://github.com/iFargle/headscale-webui/raw/main/screenshots/routes.png) +![Machines](https://github.com/iFargle/headscale-webui/raw/main/screenshots/machines.png) +![Users](https://github.com/iFargle/headscale-webui/raw/main/screenshots/users.png) +![Settings](https://github.com/iFargle/headscale-webui/raw/main/screenshots/settings.png) + +--- +# Tech used: +* Python - [Link](https://www.python.org/) +* Poetry - [Link](https://python-poetry.org/) +* MaterializeCSS - [Link](https://github.com/Dogfalo/materialize) +* jQuery - [Link](https://jquery.com/) + +For Python libraries, see [pyproject.toml](https://github.com/iFargle/headscale-webui/blob/main/pyproject.toml) + +If you use this project, please reach out! It keeps me motivated! Thank you! \ No newline at end of file diff --git a/apps/headscale-webui/data.yml b/apps/headscale-webui/data.yml new file mode 100644 index 00000000..16b09bd8 --- /dev/null +++ b/apps/headscale-webui/data.yml @@ -0,0 +1,20 @@ +name: Headscale-WebUI +tags: + - 工具 +title: 适用于小规模部署的简单 Headscale 网络用户界面 +type: 工具 +description: 适用于小规模部署的简单 Headscale 网络用户界面 +additionalProperties: + key: headscale-webui + name: Headscale-WebUI + tags: + - Tool + shortDescZh: 适用于小规模部署的简单 Headscale 网络用户界面 + shortDescEn: A simple Headscale web UI for small-scale deployments + type: tool + crossVersionUpdate: true + limit: 0 + recommend: 0 + website: https://github.com/iFargle/headscale-webui + github: https://github.com/iFargle/headscale-webui + document: https://github.com/iFargle/headscale-webui diff --git a/apps/headscale-webui/latest/.env.sample b/apps/headscale-webui/latest/.env.sample new file mode 100644 index 00000000..8fff0243 --- /dev/null +++ b/apps/headscale-webui/latest/.env.sample @@ -0,0 +1,12 @@ +CONTAINER_NAME="headscale-webui" +PANEL_APP_PORT_HTTP="40185" +AUTH_TYPE="Basic" +DATA_PATH="./data" +External_URL="https://hs.example.com" +HEADSCALE_PATH="/opt/1panel/apps/local/headscale/headscale/data/config" +HS_SERVER="http://172.18.0.241:8080" +HTTP_PWD="password_PhbfKw" +HTTP_USER="user" +SECRET_KEY="TvMhk7FDnAfaIwp0RDRsq3AVNdrYBuhNT0NTPNw4vIQ=" +TIME_ZONE="Asia/Shanghai" +URL_PATH="/admin" diff --git a/apps/headscale-webui/latest/data.yml b/apps/headscale-webui/latest/data.yml new file mode 100644 index 00000000..e49df8b3 --- /dev/null +++ b/apps/headscale-webui/latest/data.yml @@ -0,0 +1,84 @@ +additionalProperties: + formFields: + - default: 40185 + edit: true + envKey: PANEL_APP_PORT_HTTP + labelEn: Port + labelZh: 端口 + required: true + rule: paramPort + type: number + - default: ./data + edit: true + envKey: DATA_PATH + labelEn: Data folder path + labelZh: 数据文件夹路径 + required: true + type: text + - default: '/opt/1panel/apps/local/headscale/headscale/data/config' + edit: true + envKey: HEADSCALE_PATH + labelEn: Headscale configuration file path + labelZh: Headscale 配置文件路径 + required: true + type: text + - default: http://172.18.0.241:8080 + edit: true + envKey: HS_SERVER + labelEn: Headscale server url + labelZh: Headscale 服务器链接 + required: true + rule: paramExtUrl + type: text + - default: https://hs.example.com + edit: true + envKey: External_URL + labelEn: External URL (Domain URL) + labelZh: 外部访问地址 (域名地址) + required: true + rule: paramExtUrl + type: text + - default: /admin + edit: true + envKey: URL_PATH + labelEn: Admin console path + labelZh: 后台管理路径 + required: true + type: text + - default: Asia/Shanghai + edit: true + envKey: TIME_ZONE + labelEn: Time zone + labelZh: 时区 + required: true + type: text + - default: 'TvMhk7FDnAfaIwp0RDRsq3AVNdrYBuhNT0NTPNw4vIQ=' + edit: true + envKey: SECRET_KEY + labelEn: Secret key (Obtained by running 'openssl rand -base64 32') + labelZh: 加密密钥 (终端执行'openssl rand -base64 32'获得) + required: true + type: text + - default: Basic + edit: true + envKey: AUTH_TYPE + labelEn: Authentication method (leave blank without http validation) + labelZh: 验证方式 (留空无 http 验证) + required: false + type: text + - default: user + edit: true + envKey: HTTP_USER + labelEn: http auth user + labelZh: HTTP 用户 + required: false + type: text + - default: password + edit: true + envKey: HTTP_PWD + labelEn: http auth password + labelZh: HTTP 密码 + random: true + required: false + rule: paramComplexity + type: password diff --git a/apps/headscale-webui/latest/docker-compose.yml b/apps/headscale-webui/latest/docker-compose.yml new file mode 100644 index 00000000..9c7b9738 --- /dev/null +++ b/apps/headscale-webui/latest/docker-compose.yml @@ -0,0 +1,28 @@ +version: '3' +services: + headscale-webui: + container_name: ${CONTAINER_NAME} + restart: always + networks: + - 1panel-network + ports: + - "${PANEL_APP_PORT_HTTP}:5000" + volumes: + - ${DATA_PATH}:/data + - ${HEADSCALE_PATH}:/etc/headscale/:ro + environment: + - TZ=${TIME_ZONE} + - HS_SERVER=${HS_SERVER} + - DOMAIN_NAME=${External_URL} + - SCRIPT_NAME=${URL_PATH} + - AUTH_TYPE=${AUTH_TYPE} + - BASIC_AUTH_USER=${HTTP_USER} + - BASIC_AUTH_PASS=${HTTP_PWD} + - KEY=${SECRET_KEY} + image: ifargle/headscale-webui:latest + labels: + createdBy: "Apps" + +networks: + 1panel-network: + external: true diff --git a/apps/headscale-webui/logo.png b/apps/headscale-webui/logo.png new file mode 100644 index 00000000..54422190 Binary files /dev/null and b/apps/headscale-webui/logo.png differ