mirror of
https://github.com/QYG2297248353/appstore-1panel.git
synced 2024-11-10 14:56:58 +08:00
feat: 新增 2FAuth (#1831)
This commit is contained in:
parent
2d783a08be
commit
f79d92e950
30
apps/2fauth/5.2.0/data.yml
Executable file
30
apps/2fauth/5.2.0/data.yml
Executable file
@ -0,0 +1,30 @@
|
||||
additionalProperties:
|
||||
formFields:
|
||||
- default: 2FAuth
|
||||
envKey: APP_NAME
|
||||
labelEn: APP NAME
|
||||
labelZh: 应用名称
|
||||
required: true
|
||||
type: text
|
||||
- default: 8000
|
||||
edit: true
|
||||
envKey: PANEL_APP_PORT_HTTP
|
||||
labelEn: Port
|
||||
labelZh: 端口
|
||||
required: true
|
||||
rule: paramPort
|
||||
type: number
|
||||
- default: http://localhost:8000
|
||||
edit: true
|
||||
envKey: APP_URL
|
||||
labelEn: APP URL
|
||||
labelZh: 外部地址(可以添加为反向代理网站,并启用 HTTPS)
|
||||
required: true
|
||||
rule: paramExtUrl
|
||||
type: text
|
||||
- default: SomeRandomStringOf32CharsExactly
|
||||
envKey: APP_KEY
|
||||
labelEn: APP KEY
|
||||
labelZh: 加密键
|
||||
required: true
|
||||
type: text
|
0
apps/2fauth/5.2.0/data/.gitkeep
Normal file
0
apps/2fauth/5.2.0/data/.gitkeep
Normal file
27
apps/2fauth/5.2.0/docker-compose.yml
Normal file
27
apps/2fauth/5.2.0/docker-compose.yml
Normal file
@ -0,0 +1,27 @@
|
||||
services:
|
||||
2fauth:
|
||||
image: 2fauth/2fauth:5.2.0
|
||||
container_name: ${CONTAINER_NAME}
|
||||
restart: always
|
||||
ports:
|
||||
- ${PANEL_APP_PORT_HTTP}:8000/tcp
|
||||
networks:
|
||||
- 1panel-network
|
||||
volumes:
|
||||
- ./data:/2fauth
|
||||
environment:
|
||||
- APP_NAME=${APP_NAME}
|
||||
- APP_KEY=${APP_KEY}
|
||||
- APP_URL=${APP_URL}
|
||||
- IS_DEMO_APP=false
|
||||
- LOG_CHANNEL=daily
|
||||
- LOG_LEVEL=notice
|
||||
- DB_DATABASE="/srv/database/database.sqlite"
|
||||
- CACHE_DRIVER=file
|
||||
- SESSION_DRIVER=file
|
||||
- AUTHENTICATION_GUARD=web-guard
|
||||
labels:
|
||||
createdBy: "Apps"
|
||||
networks:
|
||||
1panel-network:
|
||||
external: true
|
3
apps/2fauth/5.2.0/scripts/init.sh
Normal file
3
apps/2fauth/5.2.0/scripts/init.sh
Normal file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
chown -R 1000:1000 data
|
12
apps/2fauth/README.md
Normal file
12
apps/2fauth/README.md
Normal file
@ -0,0 +1,12 @@
|
||||
# 设置
|
||||
|
||||
## **启用 HTTPS**
|
||||
|
||||
- **创建应用**:外部地址填写 `https://2fauth.example.com`(请根据实际情况替换域名)。
|
||||
- **创建反向代理网站**:代理地址填写 `http://127.0.0.1:8000`(请根据实际情况替换 IP 和端口)。
|
||||
- **申请证书**:为 `2fauth.example.com` 创建证书,验证方式选择 HTTP 类型。
|
||||
- **启用 HTTPS**:进入网站设置页面,点击 HTTPS,选择刚刚添加的证书并保存。
|
||||
|
||||
## **不启用 HTTPS**
|
||||
|
||||
- 如果不启用 HTTPS,会导致无法扫描二维码等问题。在这种情况下,外部地址可以直接填写 `http://192.168.10.100:8000`,无需进行反向代理设置。
|
19
apps/2fauth/data.yml
Normal file
19
apps/2fauth/data.yml
Normal file
@ -0,0 +1,19 @@
|
||||
name: 2FAuth
|
||||
tags:
|
||||
- 安全
|
||||
title: 管理双因素身份验证(2FA)帐户并生成安全代码的 Web 应用程序
|
||||
description: 管理双因素身份验证(2FA)帐户并生成安全代码的 Web 应用程序
|
||||
additionalProperties:
|
||||
key: 2fauth
|
||||
name: 2FAuth
|
||||
tags:
|
||||
- Security
|
||||
shortDescZh: 管理双因素身份验证(2FA)帐户并生成安全代码的 Web 应用程序
|
||||
shortDescEn: A Web app to manage your Two-Factor Authentication (2FA) accounts and generate their security codes
|
||||
type: tool
|
||||
crossVersionUpdate: true
|
||||
limit: 0
|
||||
recommend: 0
|
||||
website: https://docs.2fauth.app/
|
||||
github: https://github.com/Bubka/2FAuth
|
||||
document: https://docs.2fauth.app/
|
BIN
apps/2fauth/logo.png
Normal file
BIN
apps/2fauth/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.9 KiB |
Loading…
Reference in New Issue
Block a user