From fc6ee6368c56be1320c24fcd3ae4e88895d051fd Mon Sep 17 00:00:00 2001 From: okxlin Date: Thu, 1 Aug 2024 20:24:09 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=B7=BB=E5=8A=A02fauth=E5=88=B0=E5=88=97?= =?UTF-8?q?=E8=A1=A8#670?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/2fauth/5.2.0/.env.sample | 54 +++ apps/2fauth/5.2.0/data.yml | 426 ++++++++++++++++++++++ apps/2fauth/5.2.0/data/.gitkeep | 0 apps/2fauth/5.2.0/docker-compose.yml | 73 ++++ apps/2fauth/5.2.0/scripts/init.sh | 3 + apps/2fauth/README.md | 7 + apps/2fauth/data.yml | 19 + apps/2fauth/latest/.env.sample | 54 +++ apps/2fauth/latest/data.yml | 426 ++++++++++++++++++++++ apps/2fauth/latest/data/.gitkeep | 0 apps/2fauth/latest/docker-compose.yml | 73 ++++ apps/2fauth/latest/scripts/init.sh | 3 + apps/2fauth/logo.png | Bin 0 -> 1861 bytes apps/dashdot/logo (1).png:Zone.Identifier | 3 - 14 files changed, 1138 insertions(+), 3 deletions(-) create mode 100644 apps/2fauth/5.2.0/.env.sample create mode 100644 apps/2fauth/5.2.0/data.yml create mode 100644 apps/2fauth/5.2.0/data/.gitkeep create mode 100644 apps/2fauth/5.2.0/docker-compose.yml create mode 100644 apps/2fauth/5.2.0/scripts/init.sh create mode 100644 apps/2fauth/README.md create mode 100644 apps/2fauth/data.yml create mode 100644 apps/2fauth/latest/.env.sample create mode 100644 apps/2fauth/latest/data.yml create mode 100644 apps/2fauth/latest/data/.gitkeep create mode 100644 apps/2fauth/latest/docker-compose.yml create mode 100644 apps/2fauth/latest/scripts/init.sh create mode 100644 apps/2fauth/logo.png delete mode 100644 apps/dashdot/logo (1).png:Zone.Identifier diff --git a/apps/2fauth/5.2.0/.env.sample b/apps/2fauth/5.2.0/.env.sample new file mode 100644 index 00000000..2fcfa632 --- /dev/null +++ b/apps/2fauth/5.2.0/.env.sample @@ -0,0 +1,54 @@ +APP_DEBUG="false" +APP_ENV="local" +APP_KEY="yuBiR9dlyokasPeguSPl8oPRLpHiqAbr" +APP_NAME="2FAuth" +APP_TIMEZONE="Asia/Shanghai" +APP_URL="http://192.168.123.9:40273" +AUTHENTICATION_GUARD="web-guard" +AUTHENTICATION_LOG_RETENTION=365 +AUTH_PROXY_HEADER_FOR_EMAIL="" +AUTH_PROXY_HEADER_FOR_USER="" +BROADCAST_DRIVER="log" +CACHE_DRIVER="file" +CONTAINER_NAME="2fauth" +DB_DATABASE="/srv/database/database.sqlite" +GITHUB_CLIENT_ID="" +GITHUB_CLIENT_SECRET="" +IS_DEMO_APP="false" +LOGIN_THROTTLE=5 +LOG_CHANNEL="daily" +LOG_LEVEL="notice" +MAIL_ENCRYPTION="" +MAIL_FROM_ADDRESS="" +MAIL_FROM_NAME="" +MAIL_HOST="" +MAIL_MAILER="log" +MAIL_PASSWORD="" +MAIL_PORT="" +MAIL_USERNAME="" +MAIL_VERIFY_SSL_PEER="true" +MIX_ENV="local" +OPENID_AUTHORIZE_URL="" +OPENID_CLIENT_ID="" +OPENID_CLIENT_SECRET="" +OPENID_TOKEN_URL="" +OPENID_USERINFO_URL="" +PANEL_APP_PORT_HTTP=40273 +PANEL_REDIS_ROOT_PASSWORD="redis_password" +PROXY_FOR_OUTGOING_REQUESTS="" +PROXY_LOGOUT_URL="" +PUSHER_APP_CLUSTER="mt1" +PUSHER_APP_ID="" +PUSHER_APP_KEY="" +PUSHER_APP_SECRET="" +QUEUE_DRIVER="sync" +REDIS_HOST="redis" +REDIS_PORT=6379 +SESSION_DRIVER="file" +SESSION_LIFETIME=120 +SITE_OWNER="admin@localhost.com" +THROTTLE_API=60 +TRUSTED_PROXIES="" +WEBAUTHN_ID="" +WEBAUTHN_NAME="2FAuth" +WEBAUTHN_USER_VERIFICATION="preferred" diff --git a/apps/2fauth/5.2.0/data.yml b/apps/2fauth/5.2.0/data.yml new file mode 100644 index 00000000..cf55ca66 --- /dev/null +++ b/apps/2fauth/5.2.0/data.yml @@ -0,0 +1,426 @@ +additionalProperties: + formFields: + - default: "40273" + edit: true + envKey: PANEL_APP_PORT_HTTP + labelEn: Port + labelZh: 端口 + required: true + rule: paramPort + type: number + - default: "2FAuth" + edit: true + envKey: APP_NAME + labelEn: App Name + labelZh: 应用名 + required: true + type: text + - default: "local" + edit: true + envKey: APP_ENV + labelEn: App Environment + labelZh: 应用环境 + required: true + type: select + values: + - label: "local" + value: "local" + - label: "production" + value: "production" + - default: "Asia/Shanghai" + edit: true + envKey: APP_TIMEZONE + labelEn: Timezone + labelZh: 时区 + required: true + type: text + - default: "false" + edit: true + envKey: APP_DEBUG + labelEn: Debug Mode + labelZh: 调试模式 + required: true + type: select + values: + - label: "True" + value: "true" + - label: "False" + value: "false" + - default: "admin@localhost.com" + edit: true + envKey: SITE_OWNER + labelEn: Site Owner + labelZh: 站点拥有者 + required: true + type: text + - default: "yuBiR9dlyokasPeguSPl8oPRLpHiqAbr" + edit: true + envKey: APP_KEY + labelEn: App Key (32 characters) + labelZh: 应用密钥 (32 位字符) + required: true + type: text + - default: "http://localhost:40273" + edit: true + envKey: APP_URL + labelEn: App URL (External URL) + labelZh: 应用网址 (外部访问地址) + required: true + rule: paramExtUrl + type: text + - default: "false" + edit: true + envKey: IS_DEMO_APP + labelEn: Demo Mode + labelZh: 演示模式 + required: true + type: select + values: + - label: "True" + value: "true" + - label: "False" + value: "false" + - default: "daily" + edit: true + envKey: LOG_CHANNEL + labelEn: Log Channel + labelZh: 日志通道 + required: true + type: text + - default: "notice" + edit: true + envKey: LOG_LEVEL + labelEn: Log Level + labelZh: 日志级别 + required: true + type: select + values: + - label: "debug" + value: "debug" + - label: "info" + value: "info" + - label: "notice" + value: "notice" + - label: "warning" + value: "warning" + - label: "error" + value: "error" + - label: "critical" + value: "critical" + - label: "alert" + value: "alert" + - label: "emergency" + value: "emergency" + - default: "/srv/database/database.sqlite" + disabled: true + envKey: DB_DATABASE + labelEn: Database Path + labelZh: 数据库路径 + required: true + type: text + - default: "file" + disabled: true + envKey: CACHE_DRIVER + labelEn: Cache Driver + labelZh: 缓存驱动 + required: true + type: text + - default: "file" + disabled: true + envKey: SESSION_DRIVER + labelEn: Session Driver + labelZh: 会话驱动 + required: true + type: text + - default: "log" + edit: true + envKey: MAIL_MAILER + labelEn: Mailer + labelZh: 邮件发送方式 + required: true + type: text + - default: "" + edit: true + envKey: MAIL_HOST + labelEn: Mail Host + labelZh: 邮件服务器 + required: false + type: text + - default: "" + edit: true + envKey: MAIL_PORT + labelEn: Mail Port + labelZh: 邮件端口 + required: false + type: number + - default: "" + edit: true + envKey: MAIL_USERNAME + labelEn: Mail Username + labelZh: 邮件用户名 + required: false + type: text + - default: "" + edit: true + envKey: MAIL_PASSWORD + labelEn: Mail Password + labelZh: 邮件密码 + required: false + type: password + - default: "" + edit: true + envKey: MAIL_ENCRYPTION + labelEn: Mail Encryption + labelZh: 邮件加密方式 + required: false + type: text + - default: "" + edit: true + envKey: MAIL_FROM_NAME + labelEn: Mail From Name + labelZh: 邮件发件人姓名 + required: false + type: text + - default: "" + edit: true + envKey: MAIL_FROM_ADDRESS + labelEn: Mail From Address + labelZh: 邮件发件人地址 + required: false + type: text + - default: "true" + edit: true + envKey: MAIL_VERIFY_SSL_PEER + labelEn: Mail Verify SSL Peer + labelZh: 邮件验证 SSL 证书 + required: true + type: select + values: + - label: "True" + value: "true" + - label: "False" + value: "false" + - default: "60" + edit: true + envKey: THROTTLE_API + labelEn: API Throttle + labelZh: API 限制 + required: true + type: number + - default: "5" + edit: true + envKey: LOGIN_THROTTLE + labelEn: Login Throttle + labelZh: 登录限制 + required: true + type: number + - default: "web-guard" + edit: true + envKey: AUTHENTICATION_GUARD + labelEn: Authentication Guard + labelZh: 认证保护 + required: true + type: select + values: + - label: "web-guard" + value: "web-guard" + - label: "reverse-proxy-guard" + value: "reverse-proxy-guard" + - default: "365" + edit: true + envKey: AUTHENTICATION_LOG_RETENTION + labelEn: Authentication Log Retention + labelZh: 认证日志保留 + required: true + type: number + - default: "" + edit: true + envKey: AUTH_PROXY_HEADER_FOR_USER + labelEn: Authentication Proxy Header for User + labelZh: 用户认证代理头 + required: false + type: text + - default: "" + edit: true + envKey: AUTH_PROXY_HEADER_FOR_EMAIL + labelEn: Authentication Proxy Header for Email + labelZh: 邮箱认证代理头 + required: false + type: text + - default: "" + edit: true + envKey: PROXY_LOGOUT_URL + labelEn: Proxy Logout URL + labelZh: 代理注销网址 + required: false + type: text + - default: "2FAuth" + edit: true + envKey: WEBAUTHN_NAME + labelEn: WebAuthn Name + labelZh: WebAuthn 名称 + required: true + type: text + - default: "" + edit: true + envKey: WEBAUTHN_ID + labelEn: WebAuthn ID + labelZh: WebAuthn ID + required: false + type: text + - default: "preferred" + edit: true + envKey: WEBAUTHN_USER_VERIFICATION + labelEn: WebAuthn User Verification + labelZh: WebAuthn 用户验证 + required: true + type: select + values: + - label: "Preferred" + value: "preferred" + - label: "Required" + value: "required" + - label: "Discouraged" + value: "discouraged" + - default: "" + edit: true + envKey: TRUSTED_PROXIES + labelEn: Trusted Proxies + labelZh: 信任代理 + required: false + type: text + - default: "" + edit: true + envKey: PROXY_FOR_OUTGOING_REQUESTS + labelEn: Proxy for Outgoing Requests + labelZh: 出站请求代理 + required: false + type: text + - default: "log" + edit: true + envKey: BROADCAST_DRIVER + labelEn: Broadcast Driver + labelZh: 广播驱动 + required: true + type: text + - default: "sync" + edit: true + envKey: QUEUE_DRIVER + labelEn: Queue Driver + labelZh: 队列驱动 + required: true + type: text + - default: "120" + edit: true + envKey: SESSION_LIFETIME + labelEn: Session Lifetime + labelZh: 会话有效期 + required: true + type: number + - default: "" + edit: true + envKey: REDIS_HOST + key: redis + labelEn: Redis Service + labelZh: Redis服务 + required: true + type: service + - default: "6379" + edit: true + envKey: REDIS_PORT + labelEn: Redis Service Port + labelZh: Redis服务端口 + required: true + rule: paramPort + type: number + - default: "" + edit: true + envKey: PANEL_REDIS_ROOT_PASSWORD + labelEn: Redis Password + labelZh: Redis 密码 + required: true + type: password + - default: "" + edit: true + envKey: PUSHER_APP_ID + labelEn: Pusher App ID + labelZh: Pusher 应用 ID + required: false + type: text + - default: "" + edit: true + envKey: PUSHER_APP_KEY + labelEn: Pusher App Key + labelZh: Pusher 应用密钥 + required: false + type: text + - default: "" + edit: true + envKey: PUSHER_APP_SECRET + labelEn: Pusher App Secret + labelZh: Pusher 应用密钥 + required: false + type: password + - default: "mt1" + edit: true + envKey: PUSHER_APP_CLUSTER + labelEn: Pusher App Cluster + labelZh: Pusher 应用集群 + required: true + type: text + - default: "local" + edit: true + envKey: MIX_ENV + labelEn: Mix Environment + labelZh: Mix 环境 + required: true + type: text + - default: "" + edit: true + envKey: OPENID_AUTHORIZE_URL + labelEn: OpenID Authorize URL (Edit to remove comments in compose.yml to take effect) + labelZh: OpenID 授权 URL (编辑去除compose.yml里的注释生效) + required: false + type: text + - default: "" + edit: true + envKey: OPENID_TOKEN_URL + labelEn: OpenID Token URL (Edit to remove comments in compose.yml to take effect) + labelZh: OpenID 令牌 URL (编辑去除compose.yml里的注释生效) + required: false + type: text + - default: "" + edit: true + envKey: OPENID_USERINFO_URL + labelEn: OpenID Userinfo URL (Edit to remove comments in compose.yml to take effect) + labelZh: OpenID 用户信息 URL (编辑去除compose.yml里的注释生效) + required: false + type: text + - default: "" + edit: true + envKey: OPENID_CLIENT_ID + labelEn: OpenID Client ID (Edit to remove comments in compose.yml to take effect) + labelZh: OpenID 客户端 ID (编辑去除compose.yml里的注释生效) + required: false + type: text + - default: "" + edit: true + envKey: OPENID_CLIENT_SECRET + labelEn: OpenID Client Secret (Edit to remove comments in compose.yml to take effect) + labelZh: OpenID 客户端密钥 (编辑去除compose.yml里的注释生效) + required: false + type: password + - default: "" + edit: true + envKey: GITHUB_CLIENT_ID + labelEn: GitHub Client ID (Edit to remove comments in compose.yml to take effect) + labelZh: GitHub 客户端 ID (编辑去除compose.yml里的注释生效) + required: false + type: text + - default: "" + edit: true + envKey: GITHUB_CLIENT_SECRET + labelEn: GitHub Client Secret (Edit to remove comments in compose.yml to take effect) + labelZh: GitHub 客户端密钥 (编辑去除compose.yml里的注释生效) + required: false + type: password \ No newline at end of file diff --git a/apps/2fauth/5.2.0/data/.gitkeep b/apps/2fauth/5.2.0/data/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/apps/2fauth/5.2.0/docker-compose.yml b/apps/2fauth/5.2.0/docker-compose.yml new file mode 100644 index 00000000..cb5daedc --- /dev/null +++ b/apps/2fauth/5.2.0/docker-compose.yml @@ -0,0 +1,73 @@ +services: + 2fauth: + image: "2fauth/2fauth:5.2.0" + container_name: ${CONTAINER_NAME} + restart: always + networks: + - 1panel-network + ports: + - ${PANEL_APP_PORT_HTTP}:8000/tcp + volumes: + - ./data:/2fauth + environment: + - APP_NAME=${APP_NAME} + - APP_ENV=${APP_ENV} + - APP_TIMEZONE=${APP_TIMEZONE} + - APP_DEBUG=${APP_DEBUG} + - SITE_OWNER=${SITE_OWNER} + - APP_KEY=${APP_KEY} + - APP_URL=${APP_URL} + - IS_DEMO_APP=${IS_DEMO_APP} + - LOG_CHANNEL=${LOG_CHANNEL} + - LOG_LEVEL=${LOG_LEVEL} + - DB_DATABASE=${DB_DATABASE} + - CACHE_DRIVER=${CACHE_DRIVER} + - SESSION_DRIVER=${SESSION_DRIVER} + - MAIL_MAILER=${MAIL_MAILER} + - MAIL_HOST=${MAIL_HOST} + - MAIL_PORT=${MAIL_PORT} + - MAIL_USERNAME=${MAIL_USERNAME} + - MAIL_PASSWORD=${MAIL_PASSWORD} + - MAIL_ENCRYPTION=${MAIL_ENCRYPTION} + - MAIL_FROM_NAME=${MAIL_FROM_NAME} + - MAIL_FROM_ADDRESS=${MAIL_FROM_ADDRESS} + - MAIL_VERIFY_SSL_PEER=${MAIL_VERIFY_SSL_PEER} + - THROTTLE_API=${THROTTLE_API} + - LOGIN_THROTTLE=${LOGIN_THROTTLE} + - AUTHENTICATION_GUARD=${AUTHENTICATION_GUARD} + - AUTHENTICATION_LOG_RETENTION=${AUTHENTICATION_LOG_RETENTION} + - AUTH_PROXY_HEADER_FOR_USER=${AUTH_PROXY_HEADER_FOR_USER} + - AUTH_PROXY_HEADER_FOR_EMAIL=${AUTH_PROXY_HEADER_FOR_EMAIL} + - PROXY_LOGOUT_URL=${PROXY_LOGOUT_URL} + - WEBAUTHN_NAME=${WEBAUTHN_NAME} + - WEBAUTHN_ID=${WEBAUTHN_ID} + - WEBAUTHN_USER_VERIFICATION=${WEBAUTHN_USER_VERIFICATION} + - TRUSTED_PROXIES=${TRUSTED_PROXIES} + - PROXY_FOR_OUTGOING_REQUESTS=${PROXY_FOR_OUTGOING_REQUESTS} + - BROADCAST_DRIVER=${BROADCAST_DRIVER} + - QUEUE_DRIVER=${QUEUE_DRIVER} + - SESSION_LIFETIME=${SESSION_LIFETIME} + - REDIS_HOST=${REDIS_HOST} + - REDIS_PASSWORD=${PANEL_REDIS_ROOT_PASSWORD} + - REDIS_PORT=${REDIS_PORT} + - PUSHER_APP_ID=${PUSHER_APP_ID} + - PUSHER_APP_KEY=${PUSHER_APP_KEY} + - PUSHER_APP_SECRET=${PUSHER_APP_SECRET} + - PUSHER_APP_CLUSTER=${PUSHER_APP_CLUSTER} + - VITE_PUSHER_APP_KEY=${PUSHER_APP_KEY} + - VITE_PUSHER_APP_CLUSTER=${PUSHER_APP_CLUSTER} + - MIX_ENV=${MIX_ENV} + # 删除以下行前的#号表示启用 + #- OPENID_AUTHORIZE_URL=${OPENID_AUTHORIZE_URL} + #- OPENID_TOKEN_URL=${OPENID_TOKEN_URL} + #- OPENID_USERINFO_URL=${OPENID_USERINFO_URL} + #- OPENID_CLIENT_ID=${OPENID_CLIENT_ID} + #- OPENID_CLIENT_SECRET=${OPENID_CLIENT_SECRET} + #- GITHUB_CLIENT_ID=${GITHUB_CLIENT_ID} + #- GITHUB_CLIENT_SECRET=${GITHUB_CLIENT_SECRET} + labels: + createdBy: "Apps" + +networks: + 1panel-network: + external: true \ No newline at end of file diff --git a/apps/2fauth/5.2.0/scripts/init.sh b/apps/2fauth/5.2.0/scripts/init.sh new file mode 100644 index 00000000..4e811c86 --- /dev/null +++ b/apps/2fauth/5.2.0/scripts/init.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +chown -R 1000:1000 data \ No newline at end of file diff --git a/apps/2fauth/README.md b/apps/2fauth/README.md new file mode 100644 index 00000000..ae5c72b6 --- /dev/null +++ b/apps/2fauth/README.md @@ -0,0 +1,7 @@ +# 2FAuth + +![Docker build status](https://img.shields.io/github/actions/workflow/status/bubka/2fauth/ci-docker-test.yml?branch=master&style=flat-square) +![https://codecov.io/gh/Bubka/2FAuth](https://img.shields.io/codecov/c/github/Bubka/2FAuth?style=flat-square) +![https://github.com/Bubka/2FAuth/blob/master/LICENSE](https://img.shields.io/github/license/Bubka/2FAuth.svg?style=flat-square) + +管理双因素身份验证(2FA)账户并生成其安全代码的网络应用程序。 diff --git a/apps/2fauth/data.yml b/apps/2fauth/data.yml new file mode 100644 index 00000000..791daba5 --- /dev/null +++ b/apps/2fauth/data.yml @@ -0,0 +1,19 @@ +name: 2FAuth +tags: + - 安全 +title: 开源双因素认证管理器 +description: 开源双因素认证管理器 +additionalProperties: + key: 2fauth + name: 2FAuth + tags: + - Security + shortDescZh: 开源双因素认证管理器 + shortDescEn: Open-source two-factor authentication manager + type: tool + crossVersionUpdate: true + limit: 0 + recommend: 0 + website: https://docs.2fauth.app + github: https://github.com/Bubka/2FAuth + document: https://docs.2fauth.app diff --git a/apps/2fauth/latest/.env.sample b/apps/2fauth/latest/.env.sample new file mode 100644 index 00000000..2fcfa632 --- /dev/null +++ b/apps/2fauth/latest/.env.sample @@ -0,0 +1,54 @@ +APP_DEBUG="false" +APP_ENV="local" +APP_KEY="yuBiR9dlyokasPeguSPl8oPRLpHiqAbr" +APP_NAME="2FAuth" +APP_TIMEZONE="Asia/Shanghai" +APP_URL="http://192.168.123.9:40273" +AUTHENTICATION_GUARD="web-guard" +AUTHENTICATION_LOG_RETENTION=365 +AUTH_PROXY_HEADER_FOR_EMAIL="" +AUTH_PROXY_HEADER_FOR_USER="" +BROADCAST_DRIVER="log" +CACHE_DRIVER="file" +CONTAINER_NAME="2fauth" +DB_DATABASE="/srv/database/database.sqlite" +GITHUB_CLIENT_ID="" +GITHUB_CLIENT_SECRET="" +IS_DEMO_APP="false" +LOGIN_THROTTLE=5 +LOG_CHANNEL="daily" +LOG_LEVEL="notice" +MAIL_ENCRYPTION="" +MAIL_FROM_ADDRESS="" +MAIL_FROM_NAME="" +MAIL_HOST="" +MAIL_MAILER="log" +MAIL_PASSWORD="" +MAIL_PORT="" +MAIL_USERNAME="" +MAIL_VERIFY_SSL_PEER="true" +MIX_ENV="local" +OPENID_AUTHORIZE_URL="" +OPENID_CLIENT_ID="" +OPENID_CLIENT_SECRET="" +OPENID_TOKEN_URL="" +OPENID_USERINFO_URL="" +PANEL_APP_PORT_HTTP=40273 +PANEL_REDIS_ROOT_PASSWORD="redis_password" +PROXY_FOR_OUTGOING_REQUESTS="" +PROXY_LOGOUT_URL="" +PUSHER_APP_CLUSTER="mt1" +PUSHER_APP_ID="" +PUSHER_APP_KEY="" +PUSHER_APP_SECRET="" +QUEUE_DRIVER="sync" +REDIS_HOST="redis" +REDIS_PORT=6379 +SESSION_DRIVER="file" +SESSION_LIFETIME=120 +SITE_OWNER="admin@localhost.com" +THROTTLE_API=60 +TRUSTED_PROXIES="" +WEBAUTHN_ID="" +WEBAUTHN_NAME="2FAuth" +WEBAUTHN_USER_VERIFICATION="preferred" diff --git a/apps/2fauth/latest/data.yml b/apps/2fauth/latest/data.yml new file mode 100644 index 00000000..cf55ca66 --- /dev/null +++ b/apps/2fauth/latest/data.yml @@ -0,0 +1,426 @@ +additionalProperties: + formFields: + - default: "40273" + edit: true + envKey: PANEL_APP_PORT_HTTP + labelEn: Port + labelZh: 端口 + required: true + rule: paramPort + type: number + - default: "2FAuth" + edit: true + envKey: APP_NAME + labelEn: App Name + labelZh: 应用名 + required: true + type: text + - default: "local" + edit: true + envKey: APP_ENV + labelEn: App Environment + labelZh: 应用环境 + required: true + type: select + values: + - label: "local" + value: "local" + - label: "production" + value: "production" + - default: "Asia/Shanghai" + edit: true + envKey: APP_TIMEZONE + labelEn: Timezone + labelZh: 时区 + required: true + type: text + - default: "false" + edit: true + envKey: APP_DEBUG + labelEn: Debug Mode + labelZh: 调试模式 + required: true + type: select + values: + - label: "True" + value: "true" + - label: "False" + value: "false" + - default: "admin@localhost.com" + edit: true + envKey: SITE_OWNER + labelEn: Site Owner + labelZh: 站点拥有者 + required: true + type: text + - default: "yuBiR9dlyokasPeguSPl8oPRLpHiqAbr" + edit: true + envKey: APP_KEY + labelEn: App Key (32 characters) + labelZh: 应用密钥 (32 位字符) + required: true + type: text + - default: "http://localhost:40273" + edit: true + envKey: APP_URL + labelEn: App URL (External URL) + labelZh: 应用网址 (外部访问地址) + required: true + rule: paramExtUrl + type: text + - default: "false" + edit: true + envKey: IS_DEMO_APP + labelEn: Demo Mode + labelZh: 演示模式 + required: true + type: select + values: + - label: "True" + value: "true" + - label: "False" + value: "false" + - default: "daily" + edit: true + envKey: LOG_CHANNEL + labelEn: Log Channel + labelZh: 日志通道 + required: true + type: text + - default: "notice" + edit: true + envKey: LOG_LEVEL + labelEn: Log Level + labelZh: 日志级别 + required: true + type: select + values: + - label: "debug" + value: "debug" + - label: "info" + value: "info" + - label: "notice" + value: "notice" + - label: "warning" + value: "warning" + - label: "error" + value: "error" + - label: "critical" + value: "critical" + - label: "alert" + value: "alert" + - label: "emergency" + value: "emergency" + - default: "/srv/database/database.sqlite" + disabled: true + envKey: DB_DATABASE + labelEn: Database Path + labelZh: 数据库路径 + required: true + type: text + - default: "file" + disabled: true + envKey: CACHE_DRIVER + labelEn: Cache Driver + labelZh: 缓存驱动 + required: true + type: text + - default: "file" + disabled: true + envKey: SESSION_DRIVER + labelEn: Session Driver + labelZh: 会话驱动 + required: true + type: text + - default: "log" + edit: true + envKey: MAIL_MAILER + labelEn: Mailer + labelZh: 邮件发送方式 + required: true + type: text + - default: "" + edit: true + envKey: MAIL_HOST + labelEn: Mail Host + labelZh: 邮件服务器 + required: false + type: text + - default: "" + edit: true + envKey: MAIL_PORT + labelEn: Mail Port + labelZh: 邮件端口 + required: false + type: number + - default: "" + edit: true + envKey: MAIL_USERNAME + labelEn: Mail Username + labelZh: 邮件用户名 + required: false + type: text + - default: "" + edit: true + envKey: MAIL_PASSWORD + labelEn: Mail Password + labelZh: 邮件密码 + required: false + type: password + - default: "" + edit: true + envKey: MAIL_ENCRYPTION + labelEn: Mail Encryption + labelZh: 邮件加密方式 + required: false + type: text + - default: "" + edit: true + envKey: MAIL_FROM_NAME + labelEn: Mail From Name + labelZh: 邮件发件人姓名 + required: false + type: text + - default: "" + edit: true + envKey: MAIL_FROM_ADDRESS + labelEn: Mail From Address + labelZh: 邮件发件人地址 + required: false + type: text + - default: "true" + edit: true + envKey: MAIL_VERIFY_SSL_PEER + labelEn: Mail Verify SSL Peer + labelZh: 邮件验证 SSL 证书 + required: true + type: select + values: + - label: "True" + value: "true" + - label: "False" + value: "false" + - default: "60" + edit: true + envKey: THROTTLE_API + labelEn: API Throttle + labelZh: API 限制 + required: true + type: number + - default: "5" + edit: true + envKey: LOGIN_THROTTLE + labelEn: Login Throttle + labelZh: 登录限制 + required: true + type: number + - default: "web-guard" + edit: true + envKey: AUTHENTICATION_GUARD + labelEn: Authentication Guard + labelZh: 认证保护 + required: true + type: select + values: + - label: "web-guard" + value: "web-guard" + - label: "reverse-proxy-guard" + value: "reverse-proxy-guard" + - default: "365" + edit: true + envKey: AUTHENTICATION_LOG_RETENTION + labelEn: Authentication Log Retention + labelZh: 认证日志保留 + required: true + type: number + - default: "" + edit: true + envKey: AUTH_PROXY_HEADER_FOR_USER + labelEn: Authentication Proxy Header for User + labelZh: 用户认证代理头 + required: false + type: text + - default: "" + edit: true + envKey: AUTH_PROXY_HEADER_FOR_EMAIL + labelEn: Authentication Proxy Header for Email + labelZh: 邮箱认证代理头 + required: false + type: text + - default: "" + edit: true + envKey: PROXY_LOGOUT_URL + labelEn: Proxy Logout URL + labelZh: 代理注销网址 + required: false + type: text + - default: "2FAuth" + edit: true + envKey: WEBAUTHN_NAME + labelEn: WebAuthn Name + labelZh: WebAuthn 名称 + required: true + type: text + - default: "" + edit: true + envKey: WEBAUTHN_ID + labelEn: WebAuthn ID + labelZh: WebAuthn ID + required: false + type: text + - default: "preferred" + edit: true + envKey: WEBAUTHN_USER_VERIFICATION + labelEn: WebAuthn User Verification + labelZh: WebAuthn 用户验证 + required: true + type: select + values: + - label: "Preferred" + value: "preferred" + - label: "Required" + value: "required" + - label: "Discouraged" + value: "discouraged" + - default: "" + edit: true + envKey: TRUSTED_PROXIES + labelEn: Trusted Proxies + labelZh: 信任代理 + required: false + type: text + - default: "" + edit: true + envKey: PROXY_FOR_OUTGOING_REQUESTS + labelEn: Proxy for Outgoing Requests + labelZh: 出站请求代理 + required: false + type: text + - default: "log" + edit: true + envKey: BROADCAST_DRIVER + labelEn: Broadcast Driver + labelZh: 广播驱动 + required: true + type: text + - default: "sync" + edit: true + envKey: QUEUE_DRIVER + labelEn: Queue Driver + labelZh: 队列驱动 + required: true + type: text + - default: "120" + edit: true + envKey: SESSION_LIFETIME + labelEn: Session Lifetime + labelZh: 会话有效期 + required: true + type: number + - default: "" + edit: true + envKey: REDIS_HOST + key: redis + labelEn: Redis Service + labelZh: Redis服务 + required: true + type: service + - default: "6379" + edit: true + envKey: REDIS_PORT + labelEn: Redis Service Port + labelZh: Redis服务端口 + required: true + rule: paramPort + type: number + - default: "" + edit: true + envKey: PANEL_REDIS_ROOT_PASSWORD + labelEn: Redis Password + labelZh: Redis 密码 + required: true + type: password + - default: "" + edit: true + envKey: PUSHER_APP_ID + labelEn: Pusher App ID + labelZh: Pusher 应用 ID + required: false + type: text + - default: "" + edit: true + envKey: PUSHER_APP_KEY + labelEn: Pusher App Key + labelZh: Pusher 应用密钥 + required: false + type: text + - default: "" + edit: true + envKey: PUSHER_APP_SECRET + labelEn: Pusher App Secret + labelZh: Pusher 应用密钥 + required: false + type: password + - default: "mt1" + edit: true + envKey: PUSHER_APP_CLUSTER + labelEn: Pusher App Cluster + labelZh: Pusher 应用集群 + required: true + type: text + - default: "local" + edit: true + envKey: MIX_ENV + labelEn: Mix Environment + labelZh: Mix 环境 + required: true + type: text + - default: "" + edit: true + envKey: OPENID_AUTHORIZE_URL + labelEn: OpenID Authorize URL (Edit to remove comments in compose.yml to take effect) + labelZh: OpenID 授权 URL (编辑去除compose.yml里的注释生效) + required: false + type: text + - default: "" + edit: true + envKey: OPENID_TOKEN_URL + labelEn: OpenID Token URL (Edit to remove comments in compose.yml to take effect) + labelZh: OpenID 令牌 URL (编辑去除compose.yml里的注释生效) + required: false + type: text + - default: "" + edit: true + envKey: OPENID_USERINFO_URL + labelEn: OpenID Userinfo URL (Edit to remove comments in compose.yml to take effect) + labelZh: OpenID 用户信息 URL (编辑去除compose.yml里的注释生效) + required: false + type: text + - default: "" + edit: true + envKey: OPENID_CLIENT_ID + labelEn: OpenID Client ID (Edit to remove comments in compose.yml to take effect) + labelZh: OpenID 客户端 ID (编辑去除compose.yml里的注释生效) + required: false + type: text + - default: "" + edit: true + envKey: OPENID_CLIENT_SECRET + labelEn: OpenID Client Secret (Edit to remove comments in compose.yml to take effect) + labelZh: OpenID 客户端密钥 (编辑去除compose.yml里的注释生效) + required: false + type: password + - default: "" + edit: true + envKey: GITHUB_CLIENT_ID + labelEn: GitHub Client ID (Edit to remove comments in compose.yml to take effect) + labelZh: GitHub 客户端 ID (编辑去除compose.yml里的注释生效) + required: false + type: text + - default: "" + edit: true + envKey: GITHUB_CLIENT_SECRET + labelEn: GitHub Client Secret (Edit to remove comments in compose.yml to take effect) + labelZh: GitHub 客户端密钥 (编辑去除compose.yml里的注释生效) + required: false + type: password \ No newline at end of file diff --git a/apps/2fauth/latest/data/.gitkeep b/apps/2fauth/latest/data/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/apps/2fauth/latest/docker-compose.yml b/apps/2fauth/latest/docker-compose.yml new file mode 100644 index 00000000..c1d09756 --- /dev/null +++ b/apps/2fauth/latest/docker-compose.yml @@ -0,0 +1,73 @@ +services: + 2fauth: + image: "2fauth/2fauth:latest" + container_name: ${CONTAINER_NAME} + restart: always + networks: + - 1panel-network + ports: + - ${PANEL_APP_PORT_HTTP}:8000/tcp + volumes: + - ./data:/2fauth + environment: + - APP_NAME=${APP_NAME} + - APP_ENV=${APP_ENV} + - APP_TIMEZONE=${APP_TIMEZONE} + - APP_DEBUG=${APP_DEBUG} + - SITE_OWNER=${SITE_OWNER} + - APP_KEY=${APP_KEY} + - APP_URL=${APP_URL} + - IS_DEMO_APP=${IS_DEMO_APP} + - LOG_CHANNEL=${LOG_CHANNEL} + - LOG_LEVEL=${LOG_LEVEL} + - DB_DATABASE=${DB_DATABASE} + - CACHE_DRIVER=${CACHE_DRIVER} + - SESSION_DRIVER=${SESSION_DRIVER} + - MAIL_MAILER=${MAIL_MAILER} + - MAIL_HOST=${MAIL_HOST} + - MAIL_PORT=${MAIL_PORT} + - MAIL_USERNAME=${MAIL_USERNAME} + - MAIL_PASSWORD=${MAIL_PASSWORD} + - MAIL_ENCRYPTION=${MAIL_ENCRYPTION} + - MAIL_FROM_NAME=${MAIL_FROM_NAME} + - MAIL_FROM_ADDRESS=${MAIL_FROM_ADDRESS} + - MAIL_VERIFY_SSL_PEER=${MAIL_VERIFY_SSL_PEER} + - THROTTLE_API=${THROTTLE_API} + - LOGIN_THROTTLE=${LOGIN_THROTTLE} + - AUTHENTICATION_GUARD=${AUTHENTICATION_GUARD} + - AUTHENTICATION_LOG_RETENTION=${AUTHENTICATION_LOG_RETENTION} + - AUTH_PROXY_HEADER_FOR_USER=${AUTH_PROXY_HEADER_FOR_USER} + - AUTH_PROXY_HEADER_FOR_EMAIL=${AUTH_PROXY_HEADER_FOR_EMAIL} + - PROXY_LOGOUT_URL=${PROXY_LOGOUT_URL} + - WEBAUTHN_NAME=${WEBAUTHN_NAME} + - WEBAUTHN_ID=${WEBAUTHN_ID} + - WEBAUTHN_USER_VERIFICATION=${WEBAUTHN_USER_VERIFICATION} + - TRUSTED_PROXIES=${TRUSTED_PROXIES} + - PROXY_FOR_OUTGOING_REQUESTS=${PROXY_FOR_OUTGOING_REQUESTS} + - BROADCAST_DRIVER=${BROADCAST_DRIVER} + - QUEUE_DRIVER=${QUEUE_DRIVER} + - SESSION_LIFETIME=${SESSION_LIFETIME} + - REDIS_HOST=${REDIS_HOST} + - REDIS_PASSWORD=${PANEL_REDIS_ROOT_PASSWORD} + - REDIS_PORT=${REDIS_PORT} + - PUSHER_APP_ID=${PUSHER_APP_ID} + - PUSHER_APP_KEY=${PUSHER_APP_KEY} + - PUSHER_APP_SECRET=${PUSHER_APP_SECRET} + - PUSHER_APP_CLUSTER=${PUSHER_APP_CLUSTER} + - VITE_PUSHER_APP_KEY=${PUSHER_APP_KEY} + - VITE_PUSHER_APP_CLUSTER=${PUSHER_APP_CLUSTER} + - MIX_ENV=${MIX_ENV} + # 删除以下行前的#号表示启用 + #- OPENID_AUTHORIZE_URL=${OPENID_AUTHORIZE_URL} + #- OPENID_TOKEN_URL=${OPENID_TOKEN_URL} + #- OPENID_USERINFO_URL=${OPENID_USERINFO_URL} + #- OPENID_CLIENT_ID=${OPENID_CLIENT_ID} + #- OPENID_CLIENT_SECRET=${OPENID_CLIENT_SECRET} + #- GITHUB_CLIENT_ID=${GITHUB_CLIENT_ID} + #- GITHUB_CLIENT_SECRET=${GITHUB_CLIENT_SECRET} + labels: + createdBy: "Apps" + +networks: + 1panel-network: + external: true \ No newline at end of file diff --git a/apps/2fauth/latest/scripts/init.sh b/apps/2fauth/latest/scripts/init.sh new file mode 100644 index 00000000..4e811c86 --- /dev/null +++ b/apps/2fauth/latest/scripts/init.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +chown -R 1000:1000 data \ No newline at end of file diff --git a/apps/2fauth/logo.png b/apps/2fauth/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..11c3eca457b48fd79f87d9a5f8fae56c838d25d0 GIT binary patch literal 1861 zcmZ{kc{tly7ssP0HAp13iCBsuYOB3!&C^#>UbS z*z5mYg1mqV!FB-U!Qt$jtmNh8fwPj55(0rxP*9MQlLJ&%R#s9{QdCq_NJt3wJCX4wMuX6@fm!rNe0+SHo11{YiHV7Xgv8d?76byBpPw%*EL>Pv7#kY{hS=KL zy1TnmC=?cp_2R{g?d|Q#%1U4&l}a@;Gt<=6jEjro;o+&PtMl;i5Ed4mn3ym!GCDds z+TGoajg8gS)#Y-z!^6YAzP?B#a$sN}DJdx-Az^80DI+5zG&I!O+8TvIy?_5cJ3Bij zCWg&szj^Z}FE1}GEzQBfp}oC5D=TYlZEbpby0x{ntgOt-%Zo%J5sAc$gmN?BL6KpO zSi%NqKX#;*RT8EK7LeOwuJOZq1>fJe$&rIH)G!pm(H*x3*PdIU8BtS{2Xac*-5+5oNO`(M$vC} za|N222L3EaM{py?`SWMa5K~h9PxVqfWqhl-E}^D?(jvAQ4rY#t)c^ke%38=BzKI*o zyz5Wuca(%y=-6mE#)g>8{OUeU^ur&As?pOUNyz7eI&qmBb+|9qdpP>D+Kdg^0_v^c zvDG~3)oR*dVT2_?1jq|h_^_3 zNUqTzug%;p^eQ}ki4yQF{S>f=dz@a%A}$9X6Nj*q1p*eHOQ$(#aL}Tu?w%W?D|nmM zB$fKf!21*&q)skBFP+&#=8R{jbzIX2$=jqtbN$dup;`w_Vbjr$(u13?RPIU?P&1=HaeL0mXv>7ZKSRu4;k6jkm<*ReetO`-jq|0A!9^;@Yv zs%EgS6?V6@+AK%axj6TFuoROy7Mv^+QAgT*ZlrJe;cnsWUnBn-{auCjO4|9D4~n%z@eVv&VltP;!vlu4aC2Yg zI0w=8_B6&yqnaOP(sf2lyfeU6kf>WuWrghQdAY`_&`5r0E>g>9_*6aZmw6vO1jcGC zyT9yVxdxagh0RE5Ce|8h+oO0F|4F_Z{;ZVZGZW+Kl0D`bIQ;5zZJIOs%P9V)1Ue9SD6fx3kpAcFOT}P60IYDlW!DP5A zYa%qsP8k+eV^bAYHo66ws3kmax*B&Fh-~=zQ}%;hyeF* zjdNr=2u*CWoGy_{gc6F~E_%+o^i4T3<}hAOs)!X=iFj$r7F54TNx~cFrVsH%g=N6+ zvG*-{Zxh~qO