Adapt GUI for cloudflare temp mail
This commit is contained in:
43
README.md
43
README.md
@@ -1,6 +1,13 @@
|
||||
# DuckMail GUI (PySide6)
|
||||
# Temp Mail GUI (PySide6)
|
||||
|
||||
一个基于 PySide6 的 DuckMail 邮箱创建与收信工具。
|
||||
一个基于 PySide6 的临时邮箱创建与收信工具。
|
||||
|
||||
当前版本已经适配 `cloudflare_temp_email` 后端,推荐配置:
|
||||
|
||||
- API Base: `https://temp-email-api.example.com`
|
||||
- Domain: `example.com`
|
||||
- Backend Type: `cloudflare_temp_email`
|
||||
- Bearer: 填 `cloudflare_temp_email` 的管理员密码
|
||||
|
||||
当前版本改为纯 PostgreSQL 账号源:
|
||||
|
||||
@@ -9,6 +16,31 @@
|
||||
- 导入账号并获取 Token 后直接写入 PostgreSQL
|
||||
- 界面采用分页布局,日常使用时只看账号页即可
|
||||
|
||||
现在也支持:
|
||||
|
||||
- PostgreSQL / MySQL 二选一
|
||||
- 设置页显示或隐藏密码
|
||||
- 数据库连接测试
|
||||
- 一键初始化数据库和表
|
||||
- 勾选后在数据库或表不存在时自动创建
|
||||
- 通过脚本把 PostgreSQL 里的某个域名邮箱补档到 D1
|
||||
|
||||
## 补档脚本
|
||||
|
||||
把 PostgreSQL 中某个域名的邮箱导出成 Cloudflare D1 可执行的 SQL:
|
||||
|
||||
```bash
|
||||
python sync_pg_to_d1.py \
|
||||
--pg-host 127.0.0.1 \
|
||||
--pg-port 5432 \
|
||||
--pg-db mail_accounts_db \
|
||||
--pg-user postgres \
|
||||
--pg-password 'your-password' \
|
||||
--table registered_accounts \
|
||||
--domain example.com \
|
||||
--output /tmp/kotei_asia_import.sql
|
||||
```
|
||||
|
||||
## 安装依赖
|
||||
|
||||
```bash
|
||||
@@ -40,7 +72,7 @@ python gui.py
|
||||
- 导入账号并写入数据库
|
||||
- 创建邮箱并写入数据库
|
||||
|
||||
## PostgreSQL 表结构
|
||||
## 数据表结构
|
||||
|
||||
默认读取并写入表:`registered_accounts`
|
||||
|
||||
@@ -60,9 +92,9 @@ python gui.py
|
||||
|
||||
程序会将界面配置保存到 `config_gui.json`,包括:
|
||||
|
||||
- DuckMail API Base
|
||||
- Cloudflare Temp Mail API Base
|
||||
- Domain
|
||||
- Bearer
|
||||
- Admin Password
|
||||
- Proxy
|
||||
- 自动刷新开关与间隔
|
||||
- PostgreSQL Host / Port / DB / User / Password
|
||||
@@ -74,3 +106,4 @@ python gui.py
|
||||
- `PySide6`
|
||||
- `requests`
|
||||
- `psycopg[binary]`
|
||||
- `PyMySQL`
|
||||
|
||||
Reference in New Issue
Block a user