feat:添加2fauth到列表#670

This commit is contained in:
okxlin 2024-08-01 20:24:09 +08:00
parent e9a75f6e39
commit fc6ee6368c
14 changed files with 1138 additions and 3 deletions

View File

@ -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"

426
apps/2fauth/5.2.0/data.yml Normal file
View File

@ -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

View File

View File

@ -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

View File

@ -0,0 +1,3 @@
#!/bin/bash
chown -R 1000:1000 data

7
apps/2fauth/README.md Normal file
View File

@ -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账户并生成其安全代码的网络应用程序。

19
apps/2fauth/data.yml Normal file
View File

@ -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

View File

@ -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"

426
apps/2fauth/latest/data.yml Normal file
View File

@ -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

View File

View File

@ -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

View File

@ -0,0 +1,3 @@
#!/bin/bash
chown -R 1000:1000 data

BIN
apps/2fauth/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -1,3 +0,0 @@
[ZoneTransfer]
ZoneId=3
HostUrl=https://squoosh.app/