diff --git a/apps/upsnap/4.3/.env.sample b/apps/upsnap/4.3/.env.sample new file mode 100644 index 00000000..4b8d103d --- /dev/null +++ b/apps/upsnap/4.3/.env.sample @@ -0,0 +1,12 @@ +CONTAINER_NAME="upsnap" +DATA_PATH="./data" +DNS_SERVER_1="119.29.29.29" +DNS_SERVER_2="223.5.5.5" +LISTEN_ADDR="0.0.0.0" +PANEL_APP_PORT_HTTP=40318 +TIME_ZONE="Asia/Shanghai" +UPSNAP_INTERVAL="@every 10s" +UPSNAP_PING_PRIVILEGED="true" +UPSNAP_SCAN_RANGE="192.168.1.0/24" +UPSNAP_SCAN_TIMEOUT="500ms" +UPSNAP_WEBSITE_TITLE="Upsnap Dashboard" diff --git a/apps/upsnap/4.3/data.yml b/apps/upsnap/4.3/data.yml new file mode 100644 index 00000000..a01c48d5 --- /dev/null +++ b/apps/upsnap/4.3/data.yml @@ -0,0 +1,85 @@ +additionalProperties: + formFields: + - default: "40318" + disabled: true + envKey: PANEL_APP_PORT_HTTP + labelEn: Port + labelZh: 端口 + required: true + rule: paramPort + type: number + - default: "0.0.0.0" + edit: true + envKey: LISTEN_ADDR + labelEn: Listening address + labelZh: 监听地址 + required: true + type: text + - default: "./data" + edit: true + envKey: DATA_PATH + labelEn: Data Path + labelZh: 数据路径 + required: true + type: text + - default: "Asia/Shanghai" + edit: true + envKey: TIME_ZONE + labelEn: Time Zone + labelZh: 时区 + required: true + type: text + - default: "@every 10s" + edit: true + envKey: UPSNAP_INTERVAL + labelEn: Scan Interval + labelZh: 扫描间隔 + required: true + type: text + - default: "192.168.1.0/24" + edit: true + envKey: UPSNAP_SCAN_RANGE + labelEn: Scan Range + labelZh: 扫描网段范围 + required: true + type: text + - default: "500ms" + edit: true + envKey: UPSNAP_SCAN_TIMEOUT + labelEn: Scan Timeout + labelZh: 扫描超时 + required: true + type: text + - default: "true" + edit: true + envKey: UPSNAP_PING_PRIVILEGED + labelEn: Ping Privileged + labelZh: 使用特权权限进行 Ping + required: true + type: select + values: + - label: "True" + value: "true" + - label: "False" + value: "false" + - default: "Upsnap Dashboard" + edit: true + envKey: UPSNAP_WEBSITE_TITLE + labelEn: Website Title + labelZh: 网站标题 + required: true + type: text + - default: "119.29.29.29" + edit: true + envKey: DNS_SERVER_1 + labelEn: DNS Server 1 + labelZh: DNS 服务器 1 + required: true + type: text + - default: "223.5.5.5" + edit: true + envKey: DNS_SERVER_2 + labelEn: DNS Server 2 + labelZh: DNS 服务器 2 + required: true + type: text diff --git a/apps/upsnap/4.3/docker-compose.yml b/apps/upsnap/4.3/docker-compose.yml new file mode 100644 index 00000000..bb0504b6 --- /dev/null +++ b/apps/upsnap/4.3/docker-compose.yml @@ -0,0 +1,24 @@ +services: + upsnap: + image: "seriousm4x/upsnap:4.3" + container_name: ${CONTAINER_NAME} + network_mode: host + restart: always + volumes: + - ${DATA_PATH}:/app/pb_data + environment: + - TZ=${TIME_ZONE} + - UPSNAP_INTERVAL=${UPSNAP_INTERVAL} + - UPSNAP_SCAN_RANGE=${UPSNAP_SCAN_RANGE} + - UPSNAP_SCAN_TIMEOUT=${UPSNAP_SCAN_TIMEOUT} + - UPSNAP_PING_PRIVILEGED=${UPSNAP_PING_PRIVILEGED} + - UPSNAP_WEBSITE_TITLE=${UPSNAP_WEBSITE_TITLE} + healthcheck: + test: curl -fs "http://localhost:${PANEL_APP_PORT_HTTP}/api/health" || exit 1 + interval: 10s + dns: + - ${DNS_SERVER_1} + - ${DNS_SERVER_2} + entrypoint: /bin/sh -c "./upsnap serve --http ${LISTEN_ADDR}:${PANEL_APP_PORT_HTTP}" + labels: + createdBy: "Apps" diff --git a/apps/upsnap/README.md b/apps/upsnap/README.md new file mode 100644 index 00000000..db4e7c18 --- /dev/null +++ b/apps/upsnap/README.md @@ -0,0 +1,15 @@ +# UpSnap + +**UpSnap** 是一款简单的 Wake on LAN Web 应用,使用 SvelteKit、Go 和 PocketBase 编写。 + +## ✨ 功能 + +- 🚀 一键设备唤醒仪表盘 +- ⏰ 通过 Cron 定时事件实现自动化 +- 🔌 自定义端口 Ping +- 🔍 通过网络扫描发现设备(需要 nmap) +- 👤 安全的用户管理 +- 🌐 支持 [多语言](https://github.com/seriousm4x/UpSnap/tree/master/frontend/src/lib/i18n) +- 🎨 多种主题 +- 🐳 支持 [Docker 镜像](https://github.com/seriousm4x/UpSnap/pkgs/container/upsnap),适用于 amd64、arm64、arm/v7、arm/v6 +- 🏠 可自托管 \ No newline at end of file diff --git a/apps/upsnap/data.yml b/apps/upsnap/data.yml new file mode 100644 index 00000000..2e5473b7 --- /dev/null +++ b/apps/upsnap/data.yml @@ -0,0 +1,19 @@ +name: UpSnap +tags: + - 实用工具 +title: 一个简单的唤醒网络应用程序 +description: 一个简单的唤醒网络应用程序 +additionalProperties: + key: upsnap + name: UpSnap + tags: + - Tool + shortDescZh: 一个简单的唤醒网络应用程序 + shortDescEn: A simple wake on lan web app + type: tool + crossVersionUpdate: true + limit: 0 + recommend: 0 + website: https://github.com/seriousm4x/UpSnap + github: https://github.com/seriousm4x/UpSnap + document: https://github.com/seriousm4x/UpSnap diff --git a/apps/upsnap/latest/.env.sample b/apps/upsnap/latest/.env.sample new file mode 100644 index 00000000..4b8d103d --- /dev/null +++ b/apps/upsnap/latest/.env.sample @@ -0,0 +1,12 @@ +CONTAINER_NAME="upsnap" +DATA_PATH="./data" +DNS_SERVER_1="119.29.29.29" +DNS_SERVER_2="223.5.5.5" +LISTEN_ADDR="0.0.0.0" +PANEL_APP_PORT_HTTP=40318 +TIME_ZONE="Asia/Shanghai" +UPSNAP_INTERVAL="@every 10s" +UPSNAP_PING_PRIVILEGED="true" +UPSNAP_SCAN_RANGE="192.168.1.0/24" +UPSNAP_SCAN_TIMEOUT="500ms" +UPSNAP_WEBSITE_TITLE="Upsnap Dashboard" diff --git a/apps/upsnap/latest/data.yml b/apps/upsnap/latest/data.yml new file mode 100644 index 00000000..a01c48d5 --- /dev/null +++ b/apps/upsnap/latest/data.yml @@ -0,0 +1,85 @@ +additionalProperties: + formFields: + - default: "40318" + disabled: true + envKey: PANEL_APP_PORT_HTTP + labelEn: Port + labelZh: 端口 + required: true + rule: paramPort + type: number + - default: "0.0.0.0" + edit: true + envKey: LISTEN_ADDR + labelEn: Listening address + labelZh: 监听地址 + required: true + type: text + - default: "./data" + edit: true + envKey: DATA_PATH + labelEn: Data Path + labelZh: 数据路径 + required: true + type: text + - default: "Asia/Shanghai" + edit: true + envKey: TIME_ZONE + labelEn: Time Zone + labelZh: 时区 + required: true + type: text + - default: "@every 10s" + edit: true + envKey: UPSNAP_INTERVAL + labelEn: Scan Interval + labelZh: 扫描间隔 + required: true + type: text + - default: "192.168.1.0/24" + edit: true + envKey: UPSNAP_SCAN_RANGE + labelEn: Scan Range + labelZh: 扫描网段范围 + required: true + type: text + - default: "500ms" + edit: true + envKey: UPSNAP_SCAN_TIMEOUT + labelEn: Scan Timeout + labelZh: 扫描超时 + required: true + type: text + - default: "true" + edit: true + envKey: UPSNAP_PING_PRIVILEGED + labelEn: Ping Privileged + labelZh: 使用特权权限进行 Ping + required: true + type: select + values: + - label: "True" + value: "true" + - label: "False" + value: "false" + - default: "Upsnap Dashboard" + edit: true + envKey: UPSNAP_WEBSITE_TITLE + labelEn: Website Title + labelZh: 网站标题 + required: true + type: text + - default: "119.29.29.29" + edit: true + envKey: DNS_SERVER_1 + labelEn: DNS Server 1 + labelZh: DNS 服务器 1 + required: true + type: text + - default: "223.5.5.5" + edit: true + envKey: DNS_SERVER_2 + labelEn: DNS Server 2 + labelZh: DNS 服务器 2 + required: true + type: text diff --git a/apps/upsnap/latest/docker-compose.yml b/apps/upsnap/latest/docker-compose.yml new file mode 100644 index 00000000..876031bc --- /dev/null +++ b/apps/upsnap/latest/docker-compose.yml @@ -0,0 +1,24 @@ +services: + upsnap: + image: "seriousm4x/upsnap:latest" + container_name: ${CONTAINER_NAME} + network_mode: host + restart: always + volumes: + - ${DATA_PATH}:/app/pb_data + environment: + - TZ=${TIME_ZONE} + - UPSNAP_INTERVAL=${UPSNAP_INTERVAL} + - UPSNAP_SCAN_RANGE=${UPSNAP_SCAN_RANGE} + - UPSNAP_SCAN_TIMEOUT=${UPSNAP_SCAN_TIMEOUT} + - UPSNAP_PING_PRIVILEGED=${UPSNAP_PING_PRIVILEGED} + - UPSNAP_WEBSITE_TITLE=${UPSNAP_WEBSITE_TITLE} + healthcheck: + test: curl -fs "http://localhost:${PANEL_APP_PORT_HTTP}/api/health" || exit 1 + interval: 10s + dns: + - ${DNS_SERVER_1} + - ${DNS_SERVER_2} + entrypoint: /bin/sh -c "./upsnap serve --http ${LISTEN_ADDR}:${PANEL_APP_PORT_HTTP}" + labels: + createdBy: "Apps" diff --git a/apps/upsnap/logo.png b/apps/upsnap/logo.png new file mode 100644 index 00000000..69aff252 Binary files /dev/null and b/apps/upsnap/logo.png differ