Compare commits

..
Author SHA1 Message Date
Codex 555ec1e6a6 Record production validation for XB subscription order
Docker Build and Publish / build (push) Waiting to run
2026-11-07 03:31:14 +00:00
Codex 6e29d4fdf7 Sort user-facing nodes by region across XB instances
Docker Build and Publish / build (push) Waiting to run
2026-11-07 03:24:00 +00:00
hellcat 3633ba32a6 docs(nodes): record HN and DPL country-based UDP protocol allocation
Docker Build and Publish / build (push) Has been cancelled
2026-11-03 19:32:30 +08:00
hellcat 299f8f2d5a docs(dpl): record single-node Hysteria2 UDP cutover
Docker Build and Publish / build (push) Waiting to run
2026-11-03 13:56:39 +08:00
hellcat d8022bb840 docs(hn): record single-node Hysteria2 UDP cutover
Docker Build and Publish / build (push) Waiting to run
2026-11-03 13:31:23 +08:00
hellcat 8642c1be7f docs(hn): record full mail theme activation and real inbox acceptance
Docker Build and Publish / build (push) Has been cancelled
2026-11-01 19:32:39 +08:00
hellcat 2a82819ce8 feat(hn): cover all transactional mail and incoming auto replies
Docker Build and Publish / build (push) Waiting to run
2026-11-01 18:39:44 +08:00
hellcat 97da1ae43a design(hn): add branded transactional email previews 2026-11-01 18:28:40 +08:00
hellcat 8c1a01ab3b docs(payments): record cashier fix rollout and WeChat recovery
Docker Build and Publish / build (push) Waiting to run
2026-11-01 16:40:46 +08:00
hellcat 296e063e3c fix(payments): accept HTML cashiers and recognize WeChat HTTPS QR links
Docker Build and Publish / build (push) Waiting to run
2026-11-01 16:31:14 +08:00
27 changed files with 645 additions and 5 deletions

No files matched your search

+1 -1
View File
@@ -41,7 +41,7 @@ class AutoReplyService
$outHeaders['In-Reply-To'] = $headers['message-id'];
$outHeaders['References'] = $headers['message-id'];
}
$html = view('mail.default.notify', array_replace([
$html = view(config('mailflow.auto_reply_view', 'mail.default.notify'), array_replace([
'name' => admin_setting('app_name', 'dpl'), 'url' => admin_setting('app_url', config('app.url')),
'content' => e((string) Settings::get('auto_reply_text')),
], Branding::values()))->render();
@@ -9,7 +9,7 @@ class HttpsTransport
public function request(string $method,string $url,array $fields=[],bool $downstream=false): array
{
[$host,$ip]=$this->endpoint($url,$downstream);
$client=Http::withoutRedirecting()->connectTimeout(10)->timeout(25)->withUserAgent('XB-PaymentHealth/1.0')
$client=Http::withoutRedirecting()->connectTimeout(10)->timeout(25)->withUserAgent('XB-PaymentHealth/1.0')->accept('text/html')
->withOptions(['verify'=>true,'curl'=>[CURLOPT_RESOLVE=>[$host.':443:'.(str_contains($ip,':')?'['.$ip.']':$ip)]]]);
$response=$method==='POST'?$client->asForm()->post($url,$fields):$client->get($url);
$body=$response->body();if(strlen($body)>2097152)throw new RuntimeException('oversized_cashier_response');
+12 -1
View File
@@ -11,7 +11,18 @@ class QrEvidence
|| preg_match('/(?:money|amount|price)["\x27\s:=]+'.preg_quote($amount,'/').'(?![0-9.])/i',$html);
if(!$amountSeen)return false;
$uri=$type==='wxpay'?'(?:wxpay:\/\/|weixin:\/\/wxpay\/)':'(?:alipays:\/\/|https:\/\/qr\.alipay\.com\/)';
if(!preg_match('~'.$uri.'[^\s"\x27<>]+~i',$html))return false;
$paymentUriSeen=(bool)preg_match('~'.$uri.'[^\s"\x27<>]+~i',$html);
// This provider renders WeChat QR codes as an HTTPS short link. Inspect the
// complete URL so lookalike hosts or a URL embedded in another URL fail.
if(!$paymentUriSeen&&$type==='wxpay'&&preg_match_all('~https://[^\s"\x27<>\\\\]+~i',html_entity_decode($html,ENT_QUOTES|ENT_HTML5),$links)){
foreach($links[0] as $link){
$parts=parse_url($link);
if($parts!==false&&strtolower($parts['scheme']??'')==='https'&&strtolower($parts['host']??'')==='wxmpurl.cn'
&&!isset($parts['user'])&&!isset($parts['pass'])&&!isset($parts['port'])&&!isset($parts['fragment'])
&&($parts['path']??'/')!=='/'){$paymentUriSeen=true;break;}
}
}
if(!$paymentUriSeen)return false;
// Structured rendering of a real payment URI, or a QR bitmap with three finder patterns.
if(preg_match('~(?:new\s+QRCode|\.qrcode\s*\(|QRCode\.to(?:Canvas|DataURL|String))~i',$html))return true;
if(preg_match_all('~data:image/png;base64,([A-Za-z0-9+/=]+)~',$html,$matches))foreach($matches[1]as$data){
+55 -2
View File
@@ -14,6 +14,12 @@ use Illuminate\Support\Collection;
class ServerService
{
private const DISPLAY_REGIONS = [
'hk' => '🇭🇰|香港|Hong[ -]?Kong(?=$|[^\p{L}])|HK(?=$|[^\p{L}])',
'jp' => '🇯🇵|日本|Japan(?=$|[^\p{L}])|JP(?=$|[^\p{L}])',
'sg' => '🇸🇬|新加坡|Singapore(?=$|[^\p{L}])|SG(?=$|[^\p{L}])',
'us' => '🇺🇸|美国|美國|United States(?=$|[^\p{L}])|USA?(?=$|[^\p{L}])',
];
/**
* 获取所有服务器列表
@@ -62,10 +68,11 @@ class ServerService
->orWhereRaw('u + d < transfer_enable');
})
->orderBy('sort', 'ASC')
->orderBy('id', 'ASC')
->get()
->append(['last_check_at', 'last_push_at', 'online', 'is_online', 'available_status', 'cache_key', 'server_key']);
$servers = collect($servers)->map(function ($server) use ($user) {
return self::sortForDisplay($servers)->map(function ($server) use ($user) {
// 判断动态端口
if (str_contains($server->port, '-')) {
$port = $server->port;
@@ -78,8 +85,54 @@ class ServerService
$server->rate = $server->getCurrentRate();
return $server;
})->toArray();
}
return $servers;
private static function sortForDisplay(Collection $servers): Collection
{
$positions = $servers->pluck('id')->flip();
return $servers
->groupBy(fn(Server $server) => $server->parent_id ?: $server->id)
->sortBy(function (Collection $group, int $id) use ($positions) {
$primary = $group->firstWhere('id', $id) ?? $group->first();
return [...self::displayOrder($primary), $positions[$primary->id]];
})
->flatMap(fn(Collection $group) => $group
->sortBy(fn(Server $server) => (bool) $server->parent_id)
->values())
->values();
}
private static function displayOrder(Server $server): array
{
$name = preg_replace('/^(?:\[[^\]]+\]\s*)+/', '', trim($server->name));
$region = 0;
foreach (self::DISPLAY_REGIONS as $code => $prefix) {
if (preg_match('/^(?:(?:' . $prefix . ')[\s_-]*)+/iu', $name, $match) === 1) {
$number = self::displayNumber($server, $code, substr($name, strlen($match[0])));
return [$region, $number];
}
$region++;
}
return [$region, PHP_INT_MAX];
}
private static function displayNumber(Server $server, string $region, string $label): int
{
if (preg_match('/^(\d+)(?=$|[^\p{L}\d])/u', $label, $match) === 1) {
return (int) $match[1];
}
foreach ([data_get($server->protocol_settings, 'tls.server_name'), $server->host] as $host) {
if ($host && preg_match('/^(?:[a-z0-9]+-)*' . $region . '(\d+)(?=\.|$)/i', $host, $match) === 1) {
return (int) $match[1];
}
}
return PHP_INT_MAX;
}
/**
+2
View File
@@ -17,6 +17,8 @@ return [
'imap_password' => env('MAIL_IMAP_PASSWORD'),
'imap_folder' => 'INBOX',
'auto_reply_enabled' => false,
// An instance may brand incoming-mail replies without changing shared defaults.
'auto_reply_view' => env('MAIL_AUTO_REPLY_VIEW', 'mail.default.notify'),
'auto_reply_subject' => '我们已收到您的邮件',
'auto_reply_text' => '您的邮件已收到,我们会尽快处理。',
'report_enabled' => env('MAIL_REPORT_ENABLED', false),
+29
View File
@@ -0,0 +1,29 @@
# DPL 单节点 Hysteria2
当前协议分配与全节点验收以[UDP协议维护](UDP_PROTOCOLS.md)为准。以下保留本日早先单节点验证的历史范围,不代表全站当前协议。
## 当前状态(2026-11-03)
用户要求将DPL一个节点改为Hysteria2 UDP。DPL「🇭🇰 香港 HK - 07」(节点/机器22,物理vn01/VPS-034)已改为type=hysteria、version=2、UDP24443。中转haiwi.lshan.eu.org:47308、严格TLS/SNI vn01.gembox-dns.com、证书路径、展示编号、正式组1和费率保持。客户端须更新DPL订阅,该条缓存AnyTLS配置不再适用。
同机HN「香港01」继续Hysteria2/UDP24444、中转47318;没有修改HN节点。原dpl-node共享主PID13203、程序/配置/secret/unit及旧XrayR文件摘要保持,旧443保持。未改XB核心、节点二进制、DNS、证书/续期或中转规则,也未重启共享unit。
## 传输范围
客户端到入口、出口到落地使用UDP,原47308→24443的随机校验串UDP往返及Hysteria2实际鉴权/联网均通过。但“能转发UDP”不证明中转内部隧道底层也为UDP:当前规则6461、隧道143(17517-jp),内部承载协议未核实,未切换。不能把本次结果写成全链路UDP或已解决国内封锁。
## 执行与回退
先保存面板私密原始行和两站23节点基线,验证DPL原端口UDP可达。按已验证原生机器发现流程,只将DPL节点22 enabled=false;确认24443 TCP/UDP均清空且HN UDP/原PID保持后,设置模型规范化Hysteria2配置并恢复enabled。最后仅UDP24443,不残留旧AnyTLS TCP。没有走会残留旧inbound的直接跨协议热更新。
回退原始行位于面板/root/codex-backups/dpl/hy2-vn01-20261103/node-before.json;同目录阶段意图记录真实原值。仅在本任务after精确匹配、其他保护字段不变时停用本DPL子实例,等端口清空,再恢复原type/protocol_settings和enabled;不重启整个unit、不覆盖HN或整库。原生停用阶段曾记录旧子实例final report被面板拒绝“Node not found on this machine”,本次新Hysteria2上下行已确认上报;不据此宣称停用瞬间所有旧未上报字节均保留。
## 验收与证据
- 真实DPL完整sing-box订阅与Clash YAML各23节点结构、端点、实际凭据、SNI和严格TLS核对通过:1条Hysteria2、其余22条AnyTLS。
- 初次10秒冷启动未就绪;try2明确60秒启动等待后仍遇GitHub geosite/geoip规则集下载超时,无认证拒绝;原失败保留。只读确认两站DNS与规则URL相同、系统/AliDoH/Cloudflare解析均为当前107.148.118.186;先用真实目标参数隔离证明节点本身联网,再在独立try3以原DNS/路由/TLS判据完成完整真实订阅联网。没有改DNS、固定入口IP或删除生产规则集迁就验收。
- 固定SHA已有sing-box1.14.3在gateway01运行,完整订阅只将诊断路由/selector限定到目标,并使用任务独立cache路径;得到96.9.228.135/HK,两HTTPS出口一致、严格TLS通过;错误密码被明确认证拒绝。上传、下载账户与本节点统计均增长,新鲜kernel/users指标通过。
- 同机HN用摘要绑定的原真实HN订阅作新鲜Hysteria2联网回归,通过原47318得到同一预期出口。两站各23条节点已回读,除本次DPL节点22协议字段外,其余保存值保持;保护文件与主PID保持。
- 正式验收器复用既有有效账号1(owned=false);未新建QA,任务租约已关闭,不禁用、不轮换该账号,也不声称其订阅403。所有临时客户端已退出。
私密证据根:codex/output/dpl-hy2-20261103/(Git忽略),以server-acceptance.json、acceptance.json、negative-auth.json、hn-regression.json为准;真实订阅、凭据及失败客户端日志只留服务器私密任务目录,不进入Git。已完成服务器侧验收,未做线上页面验收或国内用户故障网络验收。
+29
View File
@@ -0,0 +1,29 @@
# HN 单节点 Hysteria2
当前协议分配与全节点验收以[UDP协议维护](UDP_PROTOCOLS.md)为准。以下保留本日早先单节点验证的历史范围,不代表全站当前协议。
## 当前状态(2026-11-03)
用户要求将HN一个节点改为Hysteria2 UDP。HN「🇭🇰 香港 HK - 01」(节点/机器1,物理vn01/VPS-034)已切换:面板type=hysteria、version=2,UDP24444;原中转haiwi.lshan.eu.org:47318、严格TLS/SNI vn01.gembox-dns.com、原证书路径、展示编号、组2和费率保持。客户端须更新HN订阅,缓存的该条旧AnyTLS配置不再适用。
HN本轮切换时,DPL同机节点22保留AnyTLS/TCP24443、中转47308;共享dpl-node主PID13203保持,原程序、配置、secret、unit和旧XrayR文件摘要保持。不更新XB核心、节点二进制、DNS、证书、续期或中转规则,不重启共享主进程。
## 操作与恢复边界
先在空闲UDP24444使用20秒自动退出、仅响应随机校验串的探针,经原47318实际往返成功;它不影响同端口TCP。现场中转规则6459、隧道143(17517-jp),为用户此前已调整的当前值;本任务只读取,不改隧道和规则。
初次模型热更新已生成UDP,但保留旧AnyTLS TCP监听,因此未判成功。回退保护因模型按协议规范化settings(删除alpn、补hop_interval)拒绝了原始未规范化CAS;原失败与调查证据保留,没有强行覆盖。只读确认准确after后,经原生enabled移除/发现重建该HN子实例:确认24444 TCP/UDP均清空且DPL仍在,再恢复原enabled与Hysteria2。最终仅UDP24444,DPL TCP24443保持;不能把跨协议热更新直接当成已清除旧监听。
私密回退快照:面板/root/codex-backups/hn/hy2-vn01-20261103/node-before.json;阶段意图同目录。回退必须核对本任务after与并行变动,按同样子实例停止→恢复该行原type/protocol_settings→恢复enabled流程,仅处理HN节点1;不重启共享unit、不恢复整库、不覆盖其他节点。现有临时change.php使用未规范化settings的回退判据不可直接重放,须用已读回模型规范化值作CAS。已执行的原生子实例阶段日志不覆写。
## 验收
- 原中转实际UDP往返,真实HN完整sing-box订阅与Clash YAML各23条参数/凭据/SNI/严格TLS核对:目标1条Hysteria2,其余22条AnyTLS。
- 固定SHA的已有sing-box1.14.3在gateway01运行,保留真实订阅DNS/路由/ruleset,仅将诊断目的路由和selector限定到目标;经Hysteria2获得96.9.228.135/HK,双HTTPS出口一致、严格TLS通过,上传/下载流量入账和新鲜kernel/users指标通过。客户端测试进程退出。
- 随机错误密码的独立客户端被明确认证拒绝;因真实订阅启动时下载规则集也经该出口,拒绝发生于客户端启动阶段。原失败和私密日志保留,不把通用启动失败当认证拒绝;另行只读核实明确authentication failed标志。
- 两站各23条节点回读:只有HN节点1的type/protocol_settings变化;其余HN、全部DPL保存值保持。同机DPL经原中转的严格TLS通过,主PID和原保护文件不变。
- 按正式验收器选择既有有效账号57(owned=false),没有创建QA;任务租约已关闭,既有账号不禁用、不轮换,不能声称其订阅403。日志与秘密仅保留私密任务目录,不提交Git。
证据唯一根:codex/output/hn-hy2-20261103/(Git忽略),server-acceptance.json及其阶段回执;原始失败不覆盖。已完成服务器侧验收,未做线上页面验收。没有来自用户故障国内网络的实测,因此不认定已解决“被墙”,也不把海外网关测通作为国内链路可用证明。
同日后续状态:用户另行要求DPL单节点改Hysteria2,DPL香港07/vn01已切为UDP24443,见[DPL单节点Hysteria2](DPL_HYSTERIA2.md)。本页前述“DPL保持”是HN切换当时的保护范围。两端UDP验证不代表中转内部承载已核实为UDP。
+2
View File
@@ -26,6 +26,8 @@
## HN 邮件运行配置
HN六类普通邮件及来信自动回复已正式统一为独立HN样式,真实收件与启用/回退见[邮件主题](HN_MAIL_THEME.md);DPL模板与配置保持原样。
`/www/wwwroot/hardnerd.net/.env`、HN库的 `mail_flow` 设置;SMTP465 SSL与IMAP993 TLS均校验证书。旧Laravel读取 `MAIL_DRIVER`,已明确设smtp,不能只设MAIL_MAILER。发件名称hardnerd、地址及Reply-To均为自有邮箱,页脚主站hardnerd.net,空MAIL_LOGO_PATH避免沿用DPL图片。
验证码/登录链接/工单回复优先Resend,其他走企业SMTP;额度100/3000且使用官方用量与本地预占,规则沿 [BUSINESS_RULES](BUSINESS_RULES.md)。Resend密钥、IMAP密码与回调签名秘密在HN库加密;SMTP密码只在私有环境,未复制进普通后台可读设置。ACC-HN-MAIL与ACC-RESEND-HN私有字段按GemDocs读取,本文不存值。
+50
View File
@@ -0,0 +1,50 @@
# HN 邮件主题
## 当前状态
2026-11-01用户明确批准“补齐并正式启用HN”后,已在sitejp02 HN实例启用全部六类普通邮件及来信自动回复,统一HN Logo、深灰底与绿色样式。本地HN也已同步六类模板及Logo/自动回复视图,保持本地mailflow关闭,没有本地真实发信或收件任务。DPL的环境、配置缓存、数据库模板、邮件设置、支付与用户订单基线均未改。
功能提交 `2a82819ce8ddb46625ee5a9e2f811d32449a58e2`;初稿设计提交97da1ae。已提交推送master、codex/hn-mail-design、codex/xb-unified-20261031,生产共用/www/wwwroot/xb/current从8c1a01a Git快进,保留原并行Stellar模板。此前“仅预览、尚未启用”为历史阶段。
## 覆盖范围与实现
| 源文件 | 用途 | 业务变量/备注 |
| --- | --- | --- |
| `resources/mail/hn/verify.html` | 邮箱验证码 | code;注册/找回等共用验证入口 |
| `resources/mail/hn/mailLogin.html` | 邮件登录 | link |
| `resources/mail/hn/notify.html` | 站点通知、工单回复、群发、管理员测试 | content;各用途原邮件标题保留 |
| `resources/mail/hn/remindExpire.html` | 订阅即将到期 | 24小时提醒语义保留 |
| `resources/mail/hn/serviceExpired.html` | 套餐已到期 | 档位及资格限制保留 |
| `resources/mail/hn/remindTraffic.html` | 流量提醒 | 80%提醒语义保留 |
| `resources/views/mail/hn/autoReply.blade.php` | 真实来信自动回复 | 原回复正文、当前网站地址与访问按钮 |
六份普通HTML通过HN独立v2_mail_templates覆盖,subject有意置空,使用现有MailService回退以保留验证码、工单及群发等各自业务标题;对应mail_template缓存已逐名清理。不新增数据库结构或邮件API,不复制其他实例数据/密钥。
本次获批核心仅两处:AutoReplyService按配置选择视图;config/mailflow.php新增MAIL_AUTO_REPLY_VIEW,默认mail.default.notify。HN环境单独设mail.hn.autoReply,DPL未配置时继续原默认视图,包括旧配置缓存兼容回退。原自动回复开启状态、正文、主题、北京时间每发件人每日一次、按父记录去重、退信/自动邮件过滤、原收件游标及回信头均保持。
HN单独MAIL_LOGO_PATH指向resources/mail/hn/logo.png;PNG由现有public/brand/hn/logo.svg无修改渲染为128px,展示44px。CID `site-logo@dpl` 仅是既有传输内部兼容标识,实际图片和可见品牌为HN。主题深灰底#111518、内容卡#1E242A、绿色#B4F047,单列600px表格、内联样式与480px窄屏样式,无远程图片/字体、脚本或追踪像素。
## 测试与真实收件验收
邮件全套、共享实例及管理员套餐回归87项504断言通过;包括六类经MailService实际渲染、业务标题保留、文字转义、PNG附件、HN自动回复选择、DPL默认兼容及防循环/按日去重。自动回复正文新增动态站点地址后,两项相关选择/转义回归再次通过。
用户指定的当前Proton账号已由页面账号标识核对,具体私人收件地址仅保留私有回执,不复制到普通Git。真实验收:
- 初稿通知:HN MailMessage7,SMTP submitted,Proton已收到并打开。
- 初稿验证码:第一次测试键含点号导致Resend HTTP422(8,failed、无provider_id);仅修正测试键后9经Resend submitted并收到。服务商字段限制见[官方规范](https://github.com/resend/resend-openapi/blob/main/resend.yaml)。旧失败记录保留,不重发通知,不改核心。
- 正式启用后,邮件登录12、即将到期13、已到期14、流量提醒15,均经MailService选择db:对应模板,原测试标题保留、SMTP submitted;四封均在Proton收到并打开,标题、Logo、正文与按钮显示核对通过。测试不创建真实验证码或登录凭证,不变更真实用户套餐。
- 用户批准的一封Proton来信,已在已发送确认,HN IMAP INBOX UID4/UIDVALIDITY1793103379正常入库16;AutoReplyService生成17,原Horizon经SMTP提交一次并在Proton收到、打开,HN Logo、新样式及动态https://hardnerd.net地址显示通过。日去重仍为1,无重复回信。
最初按完整主题查询未匹配该来信,不能据此认定漏收;随后用IMAP唯一键确认原信和回复均已正常处理。中间一次既有带锁轮询返回0;未重新发送来信、回退游标、重扫历史、改反垃圾规则或手动补造入站记录。
本轮实际收件覆盖六类模板及独立自动回复。工单/群发复用notify,并通过六模板真实渲染回归核对,不为验收创建客户工单或给真实客户群发。Proton桌面显示已验收,不扩大为所有客户端/手机或真实用户订阅到期触发验收。本机仅访问用户指定第三方邮箱,未访问HN/DPL项目线上页面。
## 发布、备份与运行
私有备份:sitejp02 `/root/codex-backups/hn-mail-theme/20261101-full/`,目录700、私密副本600;保存两实例原环境/配置缓存、HN原模板、变更源文件、版本、Git差异、启用与实发回执。初稿试发回执另存 `/root/codex-backups/hn-mail-design/20261101-v1/`。本地HN备份在忽略目录codex/output/hn-mail-design-20261101/local-private-backup/,不提交Git。
仅HN配置缓存按hn身份重建;定点刷新相关OPcache,不做全局重启。HN Horizon正常终止后,现有systemd Restart=on-failure不会自动拉起成功退出的进程;已显式start并核对HN/DPL Horizon及php8.4-fpm均active,未修改Restart策略。后续优雅重载必须按实际Restart策略核对并显式启动,不能只执行horizon:terminate就声称已恢复。
## 回退
仅恢复HN六个指定模板名的原记录,不能整表覆盖随后新增配置;逐名清理mail_template缓存。仅将HN MAIL_AUTO_REPLY_VIEW、MAIL_LOGO_PATH恢复为发布前值/缺省状态,重建仅HN配置缓存并按上述策略重载HN队列。保留所有已发送/入站/投递记录与IMAP游标,不删除事件或重发历史邮件。DPL配置与模板不参与回退;需要代码回退时只回退本任务相关改动,保留并行提交与Stellar本地差异。原MAIL_DRIVER、SMTP/IMAP、Resend及邮件档位均未变。
+5
View File
@@ -1,5 +1,10 @@
# HN / DPL 共享落地:单进程、不同端口
2026-11-03全节点UDP分配:HN、DPL各5条TUIC v5、18条Hysteria2;执行、分账和当前验收以[UDP协议维护](UDP_PROTOCOLS.md)为准,下文早先协议例外属于历史。
2026-11-03协议例外:同一物理vn01的HN香港01与DPL香港07均已改Hysteria2/UDP,两条旧AnyTLS缓存均须更新。当前验收与恢复见[HN](HN_HYSTERIA2.md)、[DPL](DPL_HYSTERIA2.md);中转内部承载仍未核实。
2026-10-31 当前两站节点SNI及续期以[统一SNI维护](NODE_SNI_DOMAINS.md)为准;下述2026-10-28批次保持其历史接入证据范围。
+5
View File
@@ -1,5 +1,10 @@
# HN / DPL 节点 SNI 域名
2026-11-03全节点UDP分配:HN、DPL各5条TUIC v5、18条Hysteria2;执行、分账和当前验收以[UDP协议维护](UDP_PROTOCOLS.md)为准,下文早先协议例外属于历史。
2026-11-03协议例外:同一物理vn01的HN香港01与DPL香港07均已改Hysteria2/UDP,两条旧AnyTLS缓存均须更新。当前验收与恢复见[HN](HN_HYSTERIA2.md)、[DPL](DPL_HYSTERIA2.md);中转内部承载仍未核实。
2026-10-30用户指定:两站同一落地共用`<物理部署key>.gembox-dns.com`,例如`node-jp02 → jp02.gembox-dns.com`。物理key与面板ID、展示编号分别维护;vn01仍用vn01前缀,不按其香港展示改名。该规则用于节点TLS证书名称/SNI,不是HTTP订阅入口,也不替换既有中转host/端口。节点排序不属于本次变更。
## 当前任务状态
+34
View File
@@ -105,3 +105,37 @@ FUC只读聚合验证:生产当前启用epay,最近30日非管理员EPay WeC
19:47:35 +08:00原HN支付宝单已过期,严格拒绝恢复。用户随后明确追加授权仅一笔HN支付宝32元待支付测试单、不付款并在成功后恢复HN支付宝。19:51:29生产原EPay插件和已修复EpayProbe实际运行:网关仅POST一次,随后q.fenjingwl.cn GET HTTP200,fresh_cashier_qr、32元/支付URI/二维码严格验证通过,未误跟到授权登录页。随后只恢复HN支付宝,核对通道身份/配置与有效监测归属,在事务清除归属、保留原slot与每日预算;微信仍关闭。没有新增应用用户/订单、扫码或付款,商户平台有这一笔待支付记录。证据ali-fresh-claim/probe、私有请求/响应与ali-recovery.json均在本批备份目录。HN恢复通知使用稳定事件键经既有TeleHub调用方发送,初次回执queued,随后仅查询该回执确认sent;未重复投递。DPL开关/状态未人工修改,下一自然检测2026-11-01 00:00可用新检测结果自行恢复。微信故障仍未修通,需继续核对商户实际子通道路由;已有同单404证据可交支付平台,尚未对外发送。
本批共59项隔离测试258断言通过;已完成服务器侧发布验收,未做线上页面验收,未扫码、付款或验证到账。二维码漏判、告警文案与HN支付宝收银验收/恢复已完成;微信收银仍未修通,不把代码发布或收银通过写为实际付款/到账成功。
## 2026-11-01 FUC与HN微信对照:两处检测误判已定位
诊断已完成;用户在解释两项具体修复后明确“弄”,批准本轮核心实现、测试及HN/DPL发布。发布前复核生产HEAD为f825c30038723c0c7d5ea0aadc0ce9286f3edc7e;当时HN/DPL支付宝1、微信2均关闭且具有有效监测归属,最近自动结果为12:00 cashier_not_found,每实例当日预算6。保留生产并行Stellar修改和所有自动账本,不以昨日支付宝恢复记录代替当前状态。
FUC生产只读数据及支付商后台已确认今日普通用户微信成功记录(50元/15元),其中15元单已支付且通知成功。FUC成功单与XB未付微信探测均为channel8/subchannel0/version0;当前随机HMAC比较确认网关、商户号、密钥、MD5一致。不能将差异归因为不同商户、管理员捷径或submit.php/mapi.php本身。
用户明确批准最多3笔HN微信待支付对照单、不付款。15:57:56至15:58:00已执行全部3笔:32元原32位格式、32元8位短格式、16元8位短格式,各仅一次mapi请求取得支付商成功返回,随后旧检测传输的收银POST均404,响应为相同通用404页面。因此格式或金额不是这次404的充分解释。三笔已用完授权;没有新增FUC/DPL应用订单或修改商户配置,没有扫码或付款;应用用户/订单计数、通道和自动状态保持。私有完整请求/响应保存在sitejp02的/root/codex-backups/xb-payment-health/manual-20261101-format-matrix-1/,不得复跑矩阵创建新单。
对上述同一批现有订单进行浏览器收银检查,16元短格式与32元长格式都显示正确金额和微信二维码。捕获浏览器实际POST与服务器原POST逐字段及编码字节比较均相同,目标IP亦相同。继续在同一生产HN服务器、同一32元订单、HTTP/1.1和原XB-PaymentHealth/1.0 User-Agent下控制变量:原请求404;仅添加Accept: text/html后200,出现32.00、二维码渲染器及支付链接;最后验证时间16:14:42 +08。未创建新订单。这定位HttpsTransport缺少HTML Accept头,不推断服务商故意拦截或某种WAF策略。
另一独立误判:QrEvidence只接受原生wxpay/weixin URI,实际收银页二维码内容为HTTPS wxmpurl.cn链接。对实际渲染的230px二维码截图使用ZXing离线解码,确认QR Code/valid=true、HTTPS、精确主机wxmpurl.cn;当前检测器仍返回false。二维码未展示、扫码或打开实际付款URI,此证据仅证明收银二维码可用,未完成资金支付或到账验收。脱敏解码结果位于codex/output/payment-format-diagnosis-20261101/browser-qr-decode-redacted.json。
本轮最小核心修复:HttpsTransport添加Accept: text/html;QrEvidence仅在微信分支识别精确HTTPS wxmpurl.cn支付链接,同时保持金额、二维码渲染/定位图案和现有TLS/公网DNS/SSRF校验,不泛化接受任意HTTPS链接、不请求二维码URL。回归覆盖请求头、真实页面形状的合成夹具、恶意相似主机、错误金额、无二维码、旧订单回调及人工停用归属。提交/推送/Git部署到HN/DPL和监测归属恢复已获本轮批准;支付宝须另有有效收银证据,不能用微信证明恢复。
旧Oct31订单被服务商改回调域名而提示“支付参数有变化”,该证据被排除出本轮控制变量结论。Windows经登记FUC反代仅做只读首页HTTP200,不声称FUC浏览器购买流程验收;服务商验证码由用户完成,VNC/RDP管理员会话发生切换后停止桌面输入。此次本机只访问第三方支付收银台,未访问本机禁访的项目线上入口;测试收银台已关闭以停止状态轮询。
### 本轮批准与实现验收
批准范围仅HttpsTransport的HTML Accept、QrEvidence的精确HTTPS wxmpurl.cn识别及相关测试/文档/Git发布。实际实现解析完整URL,拒绝子域、后缀相似主机、用户信息、显式端口、片段及嵌入其他URL的伪装;维持原User-Agent,不改变支付插件、签名、回调、数据库结构或每6小时调度。检测不访问二维码链接。
支付/EPay/回调隔离测试36项180断言通过,涵盖人工停用、监测归属及既有有效回调。发布前合入生产f825c30038723c0c7d5ea0aadc0ce9286f3edc7e,保留已发布付款汇报。共享主题/管理员套餐/注册及付款汇报隔离回归52项196断言通过;与支付回归共88项376断言。共享vendor的工作树测试引导已在忽略目录明确APP_BASE_PATH及App/Tests类路径,未改业务代码或依赖。未实际付款。
### 2026-11-01 16:39 两实例发布与微信恢复
功能提交296e063e3cb3235e4cdec2e13fd5081785a5da35已通过白色机原子推送master、codex/payment-health、codex/xb-unified-20261031,并将sitejp02共用/www/wwwroot/xb/current从f825c30038723c0c7d5ea0aadc0ce9286f3edc7e Git快进到该提交。中继原远端三分支停留18913a1,首次增量缺生产基线而拒绝导入;核对origin确为/tom/dpl.git后,改传从已知18913a1开始的24KB完整增量链,验证祖先后正常快进推送;无强推、打包覆盖或回退并行付款汇报。
私有备份/root/codex-backups/xb-payment-health/20261101-html-wxqr-fix/包含发布前明确提交、回退说明、两实例环境和状态、变更源文件、发布与既有单验收回执;目录700、敏感副本600。PHP语法与两实例运行元数据检查通过,FPM/Horizon三服务active;定点OPcache检查均未缓存两类文件,无全局重启。生产原theme/Stellar/dashboard.blade.php并行改动哈希保持。
16:38:52仅POST原HN矩阵long_32同一笔下游签名表单,未再次mapi下单:api.shangri-la.vc返回HTTP200、金额32元、业务错误检测为false、修复后QrEvidence=true。私有响应与existing-order-verification.json保留,应用用户/订单、通道与自动状态在验收请求前后均不变。
16:39:14按批准仅恢复HN/DPL微信2:两站url/pid/key/type在内存精确一致,分别锁定状态、核对有效Ownership及通道revision/updated_at后事务开启,清除监测归属;DPL复用同商户的HN既有单证据,没有DPL新单或独立付款验收。保留人工停用保护、每站当日预算6及原slot;支付宝1仍关闭且监测归属保留,等待自然18:00独立收银检测,不能把微信证据当支付宝验证。
两站各生成一条恢复通知,使用既有TeleHub专用调用方、notification/base和新稳定事件键,初始回执queued;随后只GET查询各自原回执,HN/DPL两条均确认sent,未重复发送历史通知。完整实际支付、微信客户端扫码和到账未验收;本轮修复不涉及前台交互,已完成服务器侧收银验收,未做项目线上页面验收。回退时先关自动控制,再将本轮两类检测实现恢复到发布前明确版本;保留实例配置、已恢复的开关、监测账本和所有并行功能,不能整库或无范围reset。
+4
View File
@@ -1,5 +1,7 @@
# dpl:AI 维护入口
2026-11-03全节点UDP分配:HN、DPL各5条TUIC v5、18条Hysteria2;执行、分账和当前验收以[UDP协议维护](UDP_PROTOCOLS.md)为准,下文早先协议例外属于历史。
核对日期:2026-10-11。文档随代码版本维护;运行状态必须现场复核,不能把历史验收当成当前状态。
## XB与衍生项目工作规则
@@ -37,6 +39,8 @@
| STATUS.md | 最近验证基线、已知限制与待验收项目 |
| CLOUD_FLARE_AUDIT.md | 两机场 Cloudflare 审查、已部署调优、域名轮换与回退及可选未实施项 |
| NODE_SNI_DOMAINS.md | HN/DPL节点统一物理key.gembox-dns.com、兼容证书、逐台切换与恢复 |
| DPL_HYSTERIA2.md | DPL香港07/vn01单节点Hysteria2 UDP、HN回归、中转承载验证边界与恢复 |
| HN_HYSTERIA2.md | HN香港01/vn01单节点Hysteria2 UDP、共享进程保护、真实订阅及恢复 |
| HN_SHARED_NODES.md | HN/DPL共享落地:逐台单进程不同端口接入、分别记账验收、证据及恢复 |
| NODE_ONBOARDING.md | 五节点链路、命名规则、共享资源与验收 |
| NODE_RUNBOOK.md | initialize/append参数、脚本入口、前检/证书/验收与面板回退;隔离测试/运维版本与现场边界,含验证清单 |
+41
View File
@@ -0,0 +1,41 @@
# HN / DPL UDP 协议分配与维护
## 当前结果(2026-11-03)
按用户要求,两站各自每个现有国家/地区保留一条TUIC v5,其余使用Hysteria2。当前每站23条:5条TUIC、18条Hysteria2,两站共46条;23台落地继续各运行一个现有dpl-node进程,以两站不同端口及独立用户身份分别计费。国家集合与节点数来自本批冻结盘点,并非未来固定配额;新增/删除国家或节点须重新盘点,不能硬编码23或5。
两站同一国家的TUIC使用同一物理落地;展示编号分别沿两站原编号,不能把物理服务器编号当展示编号:
| 国家/地区 | 物理资源 | HN 展示名 | DPL 展示名 |
| --- | --- | --- | --- |
| HK | hk01 | 🇭🇰 香港 HK - 05 | 🇭🇰 香港 HK - 04 |
| JP | jp02 | 🇯🇵 日本 JP - 01 | 🇯🇵 日本 JP - 01 |
| RU | ru01 | 🇷🇺 俄罗斯 RU - 01 | 🇷🇺 俄罗斯 RU - 01 |
| SG | sg02 | 🇸🇬 新加坡 SG - 01 | 🇸🇬 新加坡 SG - 01 |
| US | us01 | 🇺🇸 美国 US - 01 | 🇺🇸 美国 US - 01 |
其他现有节点均为Hysteria2;物理vn01两站此前已完成Hysteria2,本批只复验,没有重启。客户端应更新各自订阅,旧AnyTLS缓存不再适用;TUIC要求支持v5的客户端,不能拿v4 token参数代替UUID/password。
## 实施与恢复边界
本批经登记白色机SSH逐台执行,不打开线上网站:先保存两站原始模型行、实际服务和保护文件摘要,核对所有入口UDP。22台需变更的落地各执行一次现有共享unit优雅stop→保持两站节点enabled=true直至旧进程最终上报完成→两站事务保存规范化协议→启动同一unit。仅这一台两站连接短暂中断;通过两站真实联网才处理下一台。记录本任务拥有的旧/新PID和时间,不把已更换PID冒充原PID保持。未改XB核心、二进制、unit、secret/config、原服务配置、DNS或证书。
TUIC设置version5、BBR、ALPN h3、UDP native;Hysteria设置version2并保持严格TLS。地址/中转端口/落地端口、SNI、文件证书、展示名/sort、machine绑定、group、倍率、show/enabled均与冻结原值一致。全部有效TUIC用户UUID在开工前验证。跨协议直接热更新曾残留旧TCP监听,故不能只看面板保存成功。
前检发现HN物理hk03的既有入口端口缺少任何中转规则,按原目标补建唯一规则7297;中转配置总数68→69,逐id配置回读证明原规则均保持,两站实际UDP往返复测通过。没有将这项缺失归因于封锁或任何操作者。精确目标与原始配置仅留私密资源/任务证据。
恢复只处理任务拥有且当前after精确匹配的一台:优雅停该台现有unit,按两站备份模型规范化CAS恢复原type/protocol_settings,再启动同一unit并验证原传输监听;不回整库、不回滚流量、不覆盖其他字段或并行改动。未知stop/start或事务结果先读实际服务与意图,不盲目重复写。若原服务PID/监听发生非本任务变化,应调查配置/程序/故障原因,不据PID独自归因。
## 验收与证据
两站全部46条均通过真实完整sing-box订阅、Clash YAML参数检查和实际联网:严格TLS、预期IPv4与国家、双HTTPS出口一致。每个阶段以当时真实混合协议集合核对;已通过的节点在最终依赖未变时绑定原始实测时间,不反复整轮重测。实际客户端保留订阅DNS/路由/ruleset,仅诊断目的路由与selector限定目标、cache改为任务独立路径。已有固定SHA sing-box1.14.3在gateway01消费,未临时在节点安装客户端。
hk01使用两站独立100MiB/1h测试用户顺序制造流量,两站上传/下载分别增长,对侧测试账户计数保持;交叉使用另一站UUID/password均有明确认证拒绝。该严格隔离计费验证覆盖同一台两站TUIC,不冒充逐台独立计费证明;其他节点以真实有效授权、两站联网及本节点上传/下载/新鲜kernel-users上报覆盖。客户端负测原始curl35/UNPROVEN保留;拒绝结论使用两向各2条服务端unknown user/authentication、精确foreign UUID摘要、拥有的PID/时间窗和唯一出站/中转端口映射绑定,未重复负测。测试用户最终禁用、有效节点用户集排除、订阅实测源站空text/plain 403且排除缓存/挑战;原验收器借用的既有账号只关闭任务租约,账号保持。
时间判据:last_push_at绑定那次真实流量已经上报;当前健康新鲜性使用last_check_at和metrics.updated_at。空闲节点不一定持续刷新last_push_at,不能因此误判或重跑联网。原错误判据失败记录保留,未刷新原实测时间。
所有23台最终仅UDP24443/24444由对应共享主进程持有,不残留旧AnyTLS TCP。保护文件摘要、SSH与旧443监听/进程与基线保持;未修改原XrayR。独立助手审查冻结计划、UDP资源冲突、客户端合同和最终证据。
私密证据唯一根codex/output/protocol-batch-20261103/(Git忽略);线上原始行、service journal与回退根/root/codex-backups/protocol-batch-20261103。以plan.json、各host-complete/network、final-structure-runtime-audit.json、billing-complete.json、traffic-final.json、cleanup-complete.json及独立审查为准。原失败不覆盖;脚本为本批受控协议迁移,未宣称正式AnyTLS新节点适配器已支持TUIC/Hysteria2无人值守接入。
已完成服务器侧验收,未做线上页面验收。海外网关测通不证明用户国内到入口的UDP可达;端点UDP也不证明中转内部隧道底层为UDP,不能宣称已解决封锁或限速。
+12
View File
@@ -6,6 +6,18 @@
DPL、HN共享同一app/config/routes/vendor代码根;各自的数据库、用户、套餐、订单、密钥、缓存、会话、队列和日志继续独立。不是按访问域名动态切换数据库的多租户,也不把不同实例的数据合并。
## 用户节点列表与订阅的默认顺序
2026-11-06 用户指定 XB 各子项目共用同一展示顺序。用户节点列表和客户端订阅按香港、日本、新加坡、美国、其他排列。排序在 `ServerService::getAvailableServers()` 的权限与流量过滤之后执行。地区按节点名开头的国旗或地区标签识别。区内优先使用展示编号。以昵称命名的节点可从带同地区编号的 SNI 或主机名取序号。无法识别编号的节点按面板顺序排在同区编号节点之后。主节点和可见分身排在一起,主节点在前。
后台保存的手动顺序用于区内的同序号节点、无编号节点及其他地区。此规则随 XB 后端版本进入各实例,发布以实例的 Git 提交和服务器侧订阅回读为准。
2026-11-07 用户授权上线。XB 主分支实现提交 `6e29d4f`,福云 XB 实例在 site-jp01 部署 `d552b8a`,DPL 和 HN 在 site-jp02 部署 `0bca3f1`。两台服务器分别从各自原生产版本更新同一排序实现。
三个生产实例的 PHP-FPM 均通过 Clash Verge 订阅生成验收。福云 XB 57 条,其中 33 个分身紧跟主节点。DPL 和 HN 各 23 条。发布前后权限组可见节点集合一致。HN 现有节点权限组使用内存测试用户,福云 XB 和 DPL 使用既有用户覆盖主要订阅。验收范围是订阅内容与策略组顺序,未刷新本机 Clash,也未做线上页面验收。
两台服务器的 `/root/codex-backups/xb-display-order-20261107/` 按发布提交保存代码备份和回读。回退前先确认当前 Git 提交与并行改动,仅回退本次发布。福云 XB 的原提交为 `a11df4f`,DPL/HN 的原提交为 `8642c1b`。回退后以对应 FPM 重新生成订阅核实。
## 唯一主题目录
所有主题以XB根目录下的 `theme/` 为唯一源:
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

+19
View File
@@ -0,0 +1,19 @@
<!DOCTYPE html>
<html lang="zh-CN"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1.0"><meta name="color-scheme" content="dark"><meta name="supported-color-schemes" content="dark"><title>登录确认 · HardNerd</title>
<style>@media only screen and (max-width:480px){.hn-shell{width:100%!important}.hn-pad{padding-left:24px!important;padding-right:24px!important}.hn-outer{padding:20px 12px!important}.hn-title{font-size:24px!important;line-height:34px!important}}a[x-apple-data-detectors]{color:inherit!important;text-decoration:none!important}</style></head>
<body bgcolor="#111518" style="margin:0;padding:0;background-color:#111518;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','Microsoft YaHei',Arial,sans-serif;color:#EDF1F4;-webkit-text-size-adjust:100%;">
<div style="display:none;font-size:1px;color:#111518;line-height:1px;max-height:0;max-width:0;opacity:0;overflow:hidden;mso-hide:all;">登录确认 · HardNerd 账户与服务邮件</div>
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" bgcolor="#111518" style="background-color:#111518;"><tr><td class="hn-outer" align="center" style="padding:40px 16px;">
<!--[if mso]><table role="presentation" width="600" cellpadding="0" cellspacing="0"><tr><td><![endif]-->
<table class="hn-shell" role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" style="width:100%;max-width:600px;table-layout:fixed;">
<tr><td class="hn-pad" bgcolor="#1E242A" style="padding:28px 36px;background-color:#1E242A;border:1px solid #353D44;border-bottom:0;border-radius:10px 10px 0 0;">
<table role="presentation" cellpadding="0" cellspacing="0" border="0"><tr><td width="48" valign="middle" style="width:48px;padding-right:12px;"><img src="cid:site-logo@dpl" width="44" height="44" alt="HardNerd" style="display:block;width:44px;height:44px;border:0;border-radius:10px;"></td><td valign="middle" style="font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','Microsoft YaHei',Arial,sans-serif;font-size:24px;line-height:30px;letter-spacing:-0.7px;color:#F2F4F1;font-weight:750;">Hard<span style="color:#B4F047;">Nerd</span></td></tr></table>
</td></tr>
<tr><td bgcolor="#1E242A" style="background-color:#1E242A;border-left:1px solid #353D44;border-right:1px solid #353D44;padding:0 36px;"><table role="presentation" width="100%" cellpadding="0" cellspacing="0"><tr><td height="1" bgcolor="#39432F" style="height:1px;background-color:#39432F;font-size:0;line-height:0;">&nbsp;</td></tr></table></td></tr>
<tr><td class="hn-pad" bgcolor="#1E242A" style="padding:32px 36px 36px;background-color:#1E242A;border:1px solid #353D44;border-top:0;border-radius:0 0 10px 10px;">
<h1 class="hn-title" style="margin:0 0 20px;font-size:27px;line-height:38px;letter-spacing:-0.4px;font-weight:700;color:#F2F4F1;">登录确认</h1>
<p style="margin:0 0 18px;color:#C5CBD2;font-size:15px;line-height:26px;word-break:break-word;overflow-wrap:anywhere;">点击下方按钮登录 HardNerd,链接有效期为 5 分钟。</p><table role="presentation" cellpadding="0" cellspacing="0" border="0"><tr><td bgcolor="#B4F047" style="background-color:#B4F047;border-radius:6px;text-align:center;mso-padding-alt:14px 28px;"><a href="{{link}}" style="display:inline-block;padding:14px 28px;border:1px solid #B4F047;border-radius:6px;background-color:#B4F047;color:#141A12;font-size:15px;line-height:22px;font-weight:700;text-decoration:none;">确认登录</a></td></tr></table><p style="margin:22px 0 0;color:#939CA6;font-size:12px;line-height:21px;">如非本人操作,请忽略此邮件。请勿将登录链接转发给他人。</p><p style="margin:22px 0 0;color:#939CA6;font-size:12px;line-height:21px;">按钮无法打开时,可复制此链接到浏览器:<br><a href="{{link}}" style="color:#B4F047;text-decoration:underline;word-break:break-all;">{{link}}</a></p>
</td></tr>
<tr><td class="hn-pad" align="left" style="padding:22px 36px 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','Microsoft YaHei',Arial,sans-serif;font-size:12px;line-height:22px;color:#8D979F;">此邮件由 HardNerd 系统发送。<br><a href="{{site_url|https://hardnerd.net}}" style="color:#B4F047;text-decoration:none;">hardnerd.net</a><span style="color:#59636D;">&nbsp;&nbsp;/&nbsp;&nbsp;</span><a href="mailto:[email protected]" style="color:#AAB4BC;text-decoration:none;">[email protected]</a></td></tr>
</table><!--[if mso]></td></tr></table><![endif]-->
</td></tr></table></body></html>
+55
View File
@@ -0,0 +1,55 @@
{
"brand": "hn",
"version": 1,
"status": "production",
"active_by_default": false,
"templates": [
{
"name": "verify",
"subject": "HardNerd · 邮箱验证码",
"file": "verify.html",
"required_vars": [
"code"
]
},
{
"name": "notify",
"subject": "HardNerd · 站点通知",
"file": "notify.html",
"required_vars": [
"content"
]
},
{
"name": "mailLogin",
"subject": "HardNerd · 登录确认",
"file": "mailLogin.html",
"required_vars": [
"link"
]
},
{
"name": "remindExpire",
"subject": "HardNerd · 订阅即将到期",
"file": "remindExpire.html",
"required_vars": []
},
{
"name": "serviceExpired",
"subject": "HardNerd · 套餐已到期",
"file": "serviceExpired.html",
"required_vars": []
},
{
"name": "remindTraffic",
"subject": "HardNerd · 流量使用提醒",
"file": "remindTraffic.html",
"required_vars": []
}
],
"logo": "logo.png",
"logo_content_id": "site-logo@dpl",
"compatibility_note": "Existing mail transport CID retained; image and visible branding are HN only.",
"auto_reply_view": "mail.hn.autoReply",
"activation_scope": "HN instance database templates and environment only"
}
+19
View File
@@ -0,0 +1,19 @@
<!DOCTYPE html>
<html lang="zh-CN"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1.0"><meta name="color-scheme" content="dark"><meta name="supported-color-schemes" content="dark"><title>站点通知 · HardNerd</title>
<style>@media only screen and (max-width:480px){.hn-shell{width:100%!important}.hn-pad{padding-left:24px!important;padding-right:24px!important}.hn-outer{padding:20px 12px!important}.hn-title{font-size:24px!important;line-height:34px!important}}a[x-apple-data-detectors]{color:inherit!important;text-decoration:none!important}</style></head>
<body bgcolor="#111518" style="margin:0;padding:0;background-color:#111518;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','Microsoft YaHei',Arial,sans-serif;color:#EDF1F4;-webkit-text-size-adjust:100%;">
<div style="display:none;font-size:1px;color:#111518;line-height:1px;max-height:0;max-width:0;opacity:0;overflow:hidden;mso-hide:all;">站点通知 · HardNerd 账户与服务邮件</div>
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" bgcolor="#111518" style="background-color:#111518;"><tr><td class="hn-outer" align="center" style="padding:40px 16px;">
<!--[if mso]><table role="presentation" width="600" cellpadding="0" cellspacing="0"><tr><td><![endif]-->
<table class="hn-shell" role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" style="width:100%;max-width:600px;table-layout:fixed;">
<tr><td class="hn-pad" bgcolor="#1E242A" style="padding:28px 36px;background-color:#1E242A;border:1px solid #353D44;border-bottom:0;border-radius:10px 10px 0 0;">
<table role="presentation" cellpadding="0" cellspacing="0" border="0"><tr><td width="48" valign="middle" style="width:48px;padding-right:12px;"><img src="cid:site-logo@dpl" width="44" height="44" alt="HardNerd" style="display:block;width:44px;height:44px;border:0;border-radius:10px;"></td><td valign="middle" style="font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','Microsoft YaHei',Arial,sans-serif;font-size:24px;line-height:30px;letter-spacing:-0.7px;color:#F2F4F1;font-weight:750;">Hard<span style="color:#B4F047;">Nerd</span></td></tr></table>
</td></tr>
<tr><td bgcolor="#1E242A" style="background-color:#1E242A;border-left:1px solid #353D44;border-right:1px solid #353D44;padding:0 36px;"><table role="presentation" width="100%" cellpadding="0" cellspacing="0"><tr><td height="1" bgcolor="#39432F" style="height:1px;background-color:#39432F;font-size:0;line-height:0;">&nbsp;</td></tr></table></td></tr>
<tr><td class="hn-pad" bgcolor="#1E242A" style="padding:32px 36px 36px;background-color:#1E242A;border:1px solid #353D44;border-top:0;border-radius:0 0 10px 10px;">
<h1 class="hn-title" style="margin:0 0 20px;font-size:27px;line-height:38px;letter-spacing:-0.4px;font-weight:700;color:#F2F4F1;">站点通知</h1>
<p style="margin:0 0 18px;color:#C5CBD2;font-size:15px;line-height:26px;word-break:break-word;overflow-wrap:anywhere;">{{content}}</p><table role="presentation" cellpadding="0" cellspacing="0" border="0"><tr><td bgcolor="#B4F047" style="background-color:#B4F047;border-radius:6px;text-align:center;mso-padding-alt:14px 28px;"><a href="{{url}}" style="display:inline-block;padding:14px 28px;border:1px solid #B4F047;border-radius:6px;background-color:#B4F047;color:#141A12;font-size:15px;line-height:22px;font-weight:700;text-decoration:none;">前往查看</a></td></tr></table>
</td></tr>
<tr><td class="hn-pad" align="left" style="padding:22px 36px 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','Microsoft YaHei',Arial,sans-serif;font-size:12px;line-height:22px;color:#8D979F;">此邮件由 HardNerd 系统发送。<br><a href="{{site_url|https://hardnerd.net}}" style="color:#B4F047;text-decoration:none;">hardnerd.net</a><span style="color:#59636D;">&nbsp;&nbsp;/&nbsp;&nbsp;</span><a href="mailto:[email protected]" style="color:#AAB4BC;text-decoration:none;">[email protected]</a></td></tr>
</table><!--[if mso]></td></tr></table><![endif]-->
</td></tr></table></body></html>
+19
View File
@@ -0,0 +1,19 @@
<!DOCTYPE html>
<html lang="zh-CN"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1.0"><meta name="color-scheme" content="dark"><meta name="supported-color-schemes" content="dark"><title>订阅即将到期 · HardNerd</title>
<style>@media only screen and (max-width:480px){.hn-shell{width:100%!important}.hn-pad{padding-left:24px!important;padding-right:24px!important}.hn-outer{padding:20px 12px!important}.hn-title{font-size:24px!important;line-height:34px!important}}a[x-apple-data-detectors]{color:inherit!important;text-decoration:none!important}</style></head>
<body bgcolor="#111518" style="margin:0;padding:0;background-color:#111518;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','Microsoft YaHei',Arial,sans-serif;color:#EDF1F4;-webkit-text-size-adjust:100%;">
<div style="display:none;font-size:1px;color:#111518;line-height:1px;max-height:0;max-width:0;opacity:0;overflow:hidden;mso-hide:all;">订阅即将到期 · HardNerd 账户与服务邮件</div>
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" bgcolor="#111518" style="background-color:#111518;"><tr><td class="hn-outer" align="center" style="padding:40px 16px;">
<!--[if mso]><table role="presentation" width="600" cellpadding="0" cellspacing="0"><tr><td><![endif]-->
<table class="hn-shell" role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" style="width:100%;max-width:600px;table-layout:fixed;">
<tr><td class="hn-pad" bgcolor="#1E242A" style="padding:28px 36px;background-color:#1E242A;border:1px solid #353D44;border-bottom:0;border-radius:10px 10px 0 0;">
<table role="presentation" cellpadding="0" cellspacing="0" border="0"><tr><td width="48" valign="middle" style="width:48px;padding-right:12px;"><img src="cid:site-logo@dpl" width="44" height="44" alt="HardNerd" style="display:block;width:44px;height:44px;border:0;border-radius:10px;"></td><td valign="middle" style="font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','Microsoft YaHei',Arial,sans-serif;font-size:24px;line-height:30px;letter-spacing:-0.7px;color:#F2F4F1;font-weight:750;">Hard<span style="color:#B4F047;">Nerd</span></td></tr></table>
</td></tr>
<tr><td bgcolor="#1E242A" style="background-color:#1E242A;border-left:1px solid #353D44;border-right:1px solid #353D44;padding:0 36px;"><table role="presentation" width="100%" cellpadding="0" cellspacing="0"><tr><td height="1" bgcolor="#39432F" style="height:1px;background-color:#39432F;font-size:0;line-height:0;">&nbsp;</td></tr></table></td></tr>
<tr><td class="hn-pad" bgcolor="#1E242A" style="padding:32px 36px 36px;background-color:#1E242A;border:1px solid #353D44;border-top:0;border-radius:0 0 10px 10px;">
<h1 class="hn-title" style="margin:0 0 20px;font-size:27px;line-height:38px;letter-spacing:-0.4px;font-weight:700;color:#F2F4F1;">订阅即将到期</h1>
<p style="margin:0 0 18px;color:#C5CBD2;font-size:15px;line-height:26px;word-break:break-word;overflow-wrap:anywhere;">您的订阅服务将在 <strong style="color:#F1F4F0;">24 小时内到期</strong>。</p><p style="margin:0 0 18px;color:#C5CBD2;font-size:15px;line-height:26px;word-break:break-word;overflow-wrap:anywhere;">为避免服务中断,请及时续费。如已完成续费,请忽略此提醒。</p><table role="presentation" cellpadding="0" cellspacing="0" border="0"><tr><td bgcolor="#B4F047" style="background-color:#B4F047;border-radius:6px;text-align:center;mso-padding-alt:14px 28px;"><a href="{{url}}" style="display:inline-block;padding:14px 28px;border:1px solid #B4F047;border-radius:6px;background-color:#B4F047;color:#141A12;font-size:15px;line-height:22px;font-weight:700;text-decoration:none;">管理订阅</a></td></tr></table>
</td></tr>
<tr><td class="hn-pad" align="left" style="padding:22px 36px 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','Microsoft YaHei',Arial,sans-serif;font-size:12px;line-height:22px;color:#8D979F;">此邮件由 HardNerd 系统发送。<br><a href="{{site_url|https://hardnerd.net}}" style="color:#B4F047;text-decoration:none;">hardnerd.net</a><span style="color:#59636D;">&nbsp;&nbsp;/&nbsp;&nbsp;</span><a href="mailto:[email protected]" style="color:#AAB4BC;text-decoration:none;">[email protected]</a></td></tr>
</table><!--[if mso]></td></tr></table><![endif]-->
</td></tr></table></body></html>
+19
View File
@@ -0,0 +1,19 @@
<!DOCTYPE html>
<html lang="zh-CN"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1.0"><meta name="color-scheme" content="dark"><meta name="supported-color-schemes" content="dark"><title>流量使用提醒 · HardNerd</title>
<style>@media only screen and (max-width:480px){.hn-shell{width:100%!important}.hn-pad{padding-left:24px!important;padding-right:24px!important}.hn-outer{padding:20px 12px!important}.hn-title{font-size:24px!important;line-height:34px!important}}a[x-apple-data-detectors]{color:inherit!important;text-decoration:none!important}</style></head>
<body bgcolor="#111518" style="margin:0;padding:0;background-color:#111518;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','Microsoft YaHei',Arial,sans-serif;color:#EDF1F4;-webkit-text-size-adjust:100%;">
<div style="display:none;font-size:1px;color:#111518;line-height:1px;max-height:0;max-width:0;opacity:0;overflow:hidden;mso-hide:all;">流量使用提醒 · HardNerd 账户与服务邮件</div>
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" bgcolor="#111518" style="background-color:#111518;"><tr><td class="hn-outer" align="center" style="padding:40px 16px;">
<!--[if mso]><table role="presentation" width="600" cellpadding="0" cellspacing="0"><tr><td><![endif]-->
<table class="hn-shell" role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" style="width:100%;max-width:600px;table-layout:fixed;">
<tr><td class="hn-pad" bgcolor="#1E242A" style="padding:28px 36px;background-color:#1E242A;border:1px solid #353D44;border-bottom:0;border-radius:10px 10px 0 0;">
<table role="presentation" cellpadding="0" cellspacing="0" border="0"><tr><td width="48" valign="middle" style="width:48px;padding-right:12px;"><img src="cid:site-logo@dpl" width="44" height="44" alt="HardNerd" style="display:block;width:44px;height:44px;border:0;border-radius:10px;"></td><td valign="middle" style="font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','Microsoft YaHei',Arial,sans-serif;font-size:24px;line-height:30px;letter-spacing:-0.7px;color:#F2F4F1;font-weight:750;">Hard<span style="color:#B4F047;">Nerd</span></td></tr></table>
</td></tr>
<tr><td bgcolor="#1E242A" style="background-color:#1E242A;border-left:1px solid #353D44;border-right:1px solid #353D44;padding:0 36px;"><table role="presentation" width="100%" cellpadding="0" cellspacing="0"><tr><td height="1" bgcolor="#39432F" style="height:1px;background-color:#39432F;font-size:0;line-height:0;">&nbsp;</td></tr></table></td></tr>
<tr><td class="hn-pad" bgcolor="#1E242A" style="padding:32px 36px 36px;background-color:#1E242A;border:1px solid #353D44;border-top:0;border-radius:0 0 10px 10px;">
<h1 class="hn-title" style="margin:0 0 20px;font-size:27px;line-height:38px;letter-spacing:-0.4px;font-weight:700;color:#F2F4F1;">流量使用提醒</h1>
<p style="margin:0 0 18px;color:#C5CBD2;font-size:15px;line-height:26px;word-break:break-word;overflow-wrap:anywhere;">您的套餐流量已使用 <strong style="color:#F1F4F0;">80%</strong>。</p><p style="margin:0 0 18px;color:#C5CBD2;font-size:15px;line-height:26px;word-break:break-word;overflow-wrap:anywhere;">请留意剩余流量,您可以在控制台查看详细使用情况。</p><table role="presentation" cellpadding="0" cellspacing="0" border="0"><tr><td bgcolor="#B4F047" style="background-color:#B4F047;border-radius:6px;text-align:center;mso-padding-alt:14px 28px;"><a href="{{url}}" style="display:inline-block;padding:14px 28px;border:1px solid #B4F047;border-radius:6px;background-color:#B4F047;color:#141A12;font-size:15px;line-height:22px;font-weight:700;text-decoration:none;">查看用量</a></td></tr></table>
</td></tr>
<tr><td class="hn-pad" align="left" style="padding:22px 36px 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','Microsoft YaHei',Arial,sans-serif;font-size:12px;line-height:22px;color:#8D979F;">此邮件由 HardNerd 系统发送。<br><a href="{{site_url|https://hardnerd.net}}" style="color:#B4F047;text-decoration:none;">hardnerd.net</a><span style="color:#59636D;">&nbsp;&nbsp;/&nbsp;&nbsp;</span><a href="mailto:[email protected]" style="color:#AAB4BC;text-decoration:none;">[email protected]</a></td></tr>
</table><!--[if mso]></td></tr></table><![endif]-->
</td></tr></table></body></html>
+19
View File
@@ -0,0 +1,19 @@
<!DOCTYPE html>
<html lang="zh-CN"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1.0"><meta name="color-scheme" content="dark"><meta name="supported-color-schemes" content="dark"><title>套餐已到期 · HardNerd</title>
<style>@media only screen and (max-width:480px){.hn-shell{width:100%!important}.hn-pad{padding-left:24px!important;padding-right:24px!important}.hn-outer{padding:20px 12px!important}.hn-title{font-size:24px!important;line-height:34px!important}}a[x-apple-data-detectors]{color:inherit!important;text-decoration:none!important}</style></head>
<body bgcolor="#111518" style="margin:0;padding:0;background-color:#111518;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','Microsoft YaHei',Arial,sans-serif;color:#EDF1F4;-webkit-text-size-adjust:100%;">
<div style="display:none;font-size:1px;color:#111518;line-height:1px;max-height:0;max-width:0;opacity:0;overflow:hidden;mso-hide:all;">套餐已到期 · HardNerd 账户与服务邮件</div>
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" bgcolor="#111518" style="background-color:#111518;"><tr><td class="hn-outer" align="center" style="padding:40px 16px;">
<!--[if mso]><table role="presentation" width="600" cellpadding="0" cellspacing="0"><tr><td><![endif]-->
<table class="hn-shell" role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" style="width:100%;max-width:600px;table-layout:fixed;">
<tr><td class="hn-pad" bgcolor="#1E242A" style="padding:28px 36px;background-color:#1E242A;border:1px solid #353D44;border-bottom:0;border-radius:10px 10px 0 0;">
<table role="presentation" cellpadding="0" cellspacing="0" border="0"><tr><td width="48" valign="middle" style="width:48px;padding-right:12px;"><img src="cid:site-logo@dpl" width="44" height="44" alt="HardNerd" style="display:block;width:44px;height:44px;border:0;border-radius:10px;"></td><td valign="middle" style="font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','Microsoft YaHei',Arial,sans-serif;font-size:24px;line-height:30px;letter-spacing:-0.7px;color:#F2F4F1;font-weight:750;">Hard<span style="color:#B4F047;">Nerd</span></td></tr></table>
</td></tr>
<tr><td bgcolor="#1E242A" style="background-color:#1E242A;border-left:1px solid #353D44;border-right:1px solid #353D44;padding:0 36px;"><table role="presentation" width="100%" cellpadding="0" cellspacing="0"><tr><td height="1" bgcolor="#39432F" style="height:1px;background-color:#39432F;font-size:0;line-height:0;">&nbsp;</td></tr></table></td></tr>
<tr><td class="hn-pad" bgcolor="#1E242A" style="padding:32px 36px 36px;background-color:#1E242A;border:1px solid #353D44;border-top:0;border-radius:0 0 10px 10px;">
<h1 class="hn-title" style="margin:0 0 20px;font-size:27px;line-height:38px;letter-spacing:-0.4px;font-weight:700;color:#F2F4F1;">套餐已到期</h1>
<p style="margin:0 0 18px;color:#C5CBD2;font-size:15px;line-height:26px;word-break:break-word;overflow-wrap:anywhere;">您的套餐已到期。如需继续使用,请前往网站续费。</p><table role="presentation" cellpadding="0" cellspacing="0" border="0"><tr><td bgcolor="#B4F047" style="background-color:#B4F047;border-radius:6px;text-align:center;mso-padding-alt:14px 28px;"><a href="{{url}}" style="display:inline-block;padding:14px 28px;border:1px solid #B4F047;border-radius:6px;background-color:#B4F047;color:#141A12;font-size:15px;line-height:22px;font-weight:700;text-decoration:none;">前往续费</a></td></tr></table>
</td></tr>
<tr><td class="hn-pad" align="left" style="padding:22px 36px 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','Microsoft YaHei',Arial,sans-serif;font-size:12px;line-height:22px;color:#8D979F;">此邮件由 HardNerd 系统发送。<br><a href="{{site_url|https://hardnerd.net}}" style="color:#B4F047;text-decoration:none;">hardnerd.net</a><span style="color:#59636D;">&nbsp;&nbsp;/&nbsp;&nbsp;</span><a href="mailto:[email protected]" style="color:#AAB4BC;text-decoration:none;">[email protected]</a></td></tr>
</table><!--[if mso]></td></tr></table><![endif]-->
</td></tr></table></body></html>
+19
View File
@@ -0,0 +1,19 @@
<!DOCTYPE html>
<html lang="zh-CN"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1.0"><meta name="color-scheme" content="dark"><meta name="supported-color-schemes" content="dark"><title>邮箱验证码 · HardNerd</title>
<style>@media only screen and (max-width:480px){.hn-shell{width:100%!important}.hn-pad{padding-left:24px!important;padding-right:24px!important}.hn-outer{padding:20px 12px!important}.hn-title{font-size:24px!important;line-height:34px!important}}a[x-apple-data-detectors]{color:inherit!important;text-decoration:none!important}</style></head>
<body bgcolor="#111518" style="margin:0;padding:0;background-color:#111518;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','Microsoft YaHei',Arial,sans-serif;color:#EDF1F4;-webkit-text-size-adjust:100%;">
<div style="display:none;font-size:1px;color:#111518;line-height:1px;max-height:0;max-width:0;opacity:0;overflow:hidden;mso-hide:all;">邮箱验证码 · HardNerd 账户与服务邮件</div>
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" bgcolor="#111518" style="background-color:#111518;"><tr><td class="hn-outer" align="center" style="padding:40px 16px;">
<!--[if mso]><table role="presentation" width="600" cellpadding="0" cellspacing="0"><tr><td><![endif]-->
<table class="hn-shell" role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" style="width:100%;max-width:600px;table-layout:fixed;">
<tr><td class="hn-pad" bgcolor="#1E242A" style="padding:28px 36px;background-color:#1E242A;border:1px solid #353D44;border-bottom:0;border-radius:10px 10px 0 0;">
<table role="presentation" cellpadding="0" cellspacing="0" border="0"><tr><td width="48" valign="middle" style="width:48px;padding-right:12px;"><img src="cid:site-logo@dpl" width="44" height="44" alt="HardNerd" style="display:block;width:44px;height:44px;border:0;border-radius:10px;"></td><td valign="middle" style="font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','Microsoft YaHei',Arial,sans-serif;font-size:24px;line-height:30px;letter-spacing:-0.7px;color:#F2F4F1;font-weight:750;">Hard<span style="color:#B4F047;">Nerd</span></td></tr></table>
</td></tr>
<tr><td bgcolor="#1E242A" style="background-color:#1E242A;border-left:1px solid #353D44;border-right:1px solid #353D44;padding:0 36px;"><table role="presentation" width="100%" cellpadding="0" cellspacing="0"><tr><td height="1" bgcolor="#39432F" style="height:1px;background-color:#39432F;font-size:0;line-height:0;">&nbsp;</td></tr></table></td></tr>
<tr><td class="hn-pad" bgcolor="#1E242A" style="padding:32px 36px 36px;background-color:#1E242A;border:1px solid #353D44;border-top:0;border-radius:0 0 10px 10px;">
<h1 class="hn-title" style="margin:0 0 20px;font-size:27px;line-height:38px;letter-spacing:-0.4px;font-weight:700;color:#F2F4F1;">邮箱验证码</h1>
<p style="margin:0 0 18px;color:#C5CBD2;font-size:15px;line-height:26px;word-break:break-word;overflow-wrap:anywhere;">请使用以下验证码完成验证。</p><table role="presentation" width="100%" cellpadding="0" cellspacing="0"><tr><td bgcolor="#14191D" style="padding:24px 16px;border:1px solid #39442E;border-radius:6px;text-align:center;"><span style="font-family:'Courier New',Courier,monospace;font-size:34px;line-height:44px;letter-spacing:8px;font-weight:700;color:#B4F047;">{{code}}</span></td></tr></table><p style="margin:22px 0 0;color:#939CA6;font-size:12px;line-height:21px;">验证码有效期为 5 分钟,请勿转发或透露给他人。如非本人操作,请忽略此邮件。</p>
</td></tr>
<tr><td class="hn-pad" align="left" style="padding:22px 36px 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','Microsoft YaHei',Arial,sans-serif;font-size:12px;line-height:22px;color:#8D979F;">此邮件由 HardNerd 系统发送。<br><a href="{{site_url|https://hardnerd.net}}" style="color:#B4F047;text-decoration:none;">hardnerd.net</a><span style="color:#59636D;">&nbsp;&nbsp;/&nbsp;&nbsp;</span><a href="mailto:[email protected]" style="color:#AAB4BC;text-decoration:none;">[email protected]</a></td></tr>
</table><!--[if mso]></td></tr></table><![endif]-->
</td></tr></table></body></html>
@@ -0,0 +1,19 @@
<!DOCTYPE html>
<html lang="zh-CN"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1.0"><meta name="color-scheme" content="dark"><meta name="supported-color-schemes" content="dark"><title>来信已收到 · HardNerd</title>
<style>@media only screen and (max-width:480px){.hn-shell{width:100%!important}.hn-pad{padding-left:24px!important;padding-right:24px!important}.hn-outer{padding:20px 12px!important}.hn-title{font-size:24px!important;line-height:34px!important}}a[x-apple-data-detectors]{color:inherit!important;text-decoration:none!important}</style></head>
<body bgcolor="#111518" style="margin:0;padding:0;background-color:#111518;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','Microsoft YaHei',Arial,sans-serif;color:#EDF1F4;-webkit-text-size-adjust:100%;">
<div style="display:none;font-size:1px;color:#111518;line-height:1px;max-height:0;max-width:0;opacity:0;overflow:hidden;mso-hide:all;">来信已收到 · HardNerd 账户与服务邮件</div>
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" bgcolor="#111518" style="background-color:#111518;"><tr><td class="hn-outer" align="center" style="padding:40px 16px;">
<!--[if mso]><table role="presentation" width="600" cellpadding="0" cellspacing="0"><tr><td><![endif]-->
<table class="hn-shell" role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" style="width:100%;max-width:600px;table-layout:fixed;">
<tr><td class="hn-pad" bgcolor="#1E242A" style="padding:28px 36px;background-color:#1E242A;border:1px solid #353D44;border-bottom:0;border-radius:10px 10px 0 0;">
<table role="presentation" cellpadding="0" cellspacing="0" border="0"><tr><td width="48" valign="middle" style="width:48px;padding-right:12px;"><img src="cid:site-logo@dpl" width="44" height="44" alt="HardNerd" style="display:block;width:44px;height:44px;border:0;border-radius:10px;"></td><td valign="middle" style="font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','Microsoft YaHei',Arial,sans-serif;font-size:24px;line-height:30px;letter-spacing:-0.7px;color:#F2F4F1;font-weight:750;">Hard<span style="color:#B4F047;">Nerd</span></td></tr></table>
</td></tr>
<tr><td bgcolor="#1E242A" style="background-color:#1E242A;border-left:1px solid #353D44;border-right:1px solid #353D44;padding:0 36px;"><table role="presentation" width="100%" cellpadding="0" cellspacing="0"><tr><td height="1" bgcolor="#39432F" style="height:1px;background-color:#39432F;font-size:0;line-height:0;">&nbsp;</td></tr></table></td></tr>
<tr><td class="hn-pad" bgcolor="#1E242A" style="padding:32px 36px 36px;background-color:#1E242A;border:1px solid #353D44;border-top:0;border-radius:0 0 10px 10px;">
<h1 class="hn-title" style="margin:0 0 20px;font-size:27px;line-height:38px;letter-spacing:-0.4px;font-weight:700;color:#F2F4F1;">来信已收到</h1>
<p style="margin:0 0 18px;color:#C5CBD2;font-size:15px;line-height:26px;word-break:break-word;overflow-wrap:anywhere;">{!! nl2br($content) !!}</p><p style="margin:0 0 22px;color:#C5CBD2;font-size:15px;line-height:26px;">当前网站地址:<br><a href="{{$site_url ?? $url}}" style="color:#B4F047;font-weight:700;text-decoration:none;word-break:break-all;">{{$site_url ?? $url}}</a></p><table role="presentation" cellpadding="0" cellspacing="0" border="0"><tr><td bgcolor="#B4F047" style="background-color:#B4F047;border-radius:6px;text-align:center;mso-padding-alt:14px 28px;"><a href="{{$url}}" style="display:inline-block;padding:14px 28px;border:1px solid #B4F047;border-radius:6px;background-color:#B4F047;color:#141A12;font-size:15px;line-height:22px;font-weight:700;text-decoration:none;">访问 HardNerd</a></td></tr></table>
</td></tr>
<tr><td class="hn-pad" align="left" style="padding:22px 36px 0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','Microsoft YaHei',Arial,sans-serif;font-size:12px;line-height:22px;color:#8D979F;">此邮件由 HardNerd 系统发送。<br><a href="{{$site_url ?? 'https://hardnerd.net'}}" style="color:#B4F047;text-decoration:none;">hardnerd.net</a><span style="color:#59636D;">&nbsp;&nbsp;/&nbsp;&nbsp;</span><a href="mailto:[email protected]" style="color:#AAB4BC;text-decoration:none;">mail@hardnerd.dev</a></td></tr>
</table><!--[if mso]></td></tr></table><![endif]-->
</td></tr></table></body></html>
+49
View File
@@ -256,6 +256,55 @@ class MailFlowTest extends TestCase
$this->assertSame('conventional', $reply->refresh()->channel);
}
public function test_instance_auto_reply_view_uses_hn_brand_and_keeps_escape_headers_and_subject(): void
{
config(['mailflow.auto_reply_enabled'=>true,'mailflow.auto_reply_view'=>'mail.hn.autoReply',
'mailflow.logo_path'=>base_path('resources/mail/hn/logo.png'),
'mailflow.auto_reply_subject'=>'Original reply subject','mailflow.auto_reply_text'=>"Latest address\n<script>not executable</script>"]);
$incoming=MailMessage::create(['message_key'=>'hn-incoming','direction'=>'in','purpose'=>'incoming','email'=>'[email protected]','subject'=>'Help','status'=>'received']);
$reply=app(AutoReplyService::class)->prepare($incoming,['message-id'=>'<[email protected]>']);
$this->assertNotNull($reply);$this->assertSame('Original reply subject',$reply->subject);
$this->assertStringContainsString('Hard<span',$reply->payload['html']);
$this->assertStringContainsString('#B4F047',$reply->payload['html']);
$this->assertStringContainsString('&lt;script&gt;',$reply->payload['html']);
$this->assertStringNotContainsString('<script>',$reply->payload['html']);
$this->assertSame('auto-replied',$reply->payload['headers']['Auto-Submitted']);
$this->assertSame('<[email protected]>',$reply->payload['headers']['In-Reply-To']);
$this->assertSame(file_get_contents(base_path('resources/mail/hn/logo.png')),base64_decode($reply->payload['attachments'][0]['content']));
$this->assertNull(app(AutoReplyService::class)->prepare($incoming,[]));
}
public function test_default_auto_reply_view_remains_legacy_for_other_instances(): void
{
$this->assertSame('mail.default.notify',config('mailflow.auto_reply_view'));
config(['mailflow.auto_reply_enabled'=>true]);
$incoming=MailMessage::create(['message_key'=>'default-incoming','direction'=>'in','purpose'=>'incoming','email'=>'[email protected]','subject'=>'Help','status'=>'received']);
$reply=app(AutoReplyService::class)->prepare($incoming,[]);
$this->assertStringContainsString('#142542',$reply->payload['html']);
$this->assertStringNotContainsString('Hard<span',$reply->payload['html']);
}
public function test_all_six_hn_templates_render_through_mail_service_preserving_business_subject(): void
{
Schema::create('v2_mail_templates',function(Blueprint $t){$t->id();$t->string('name');$t->string('subject');$t->text('content');$t->timestamps();});
Schema::create('v2_mail_log',function(Blueprint $t){$t->id();$t->string('email');$t->string('subject');$t->string('template_name');$t->text('error')->nullable();$t->integer('created_at')->nullable();$t->integer('updated_at')->nullable();});
config(['mailflow.logo_path'=>base_path('resources/mail/hn/logo.png')]);
$manifest=json_decode(file_get_contents(base_path('resources/mail/hn/manifest.json')),true);
$dispatcher=Mockery::mock(Dispatcher::class);
$dispatcher->shouldReceive('send')->times(6)->withArgs(function($params,$subject,$html){
$this->assertSame('Preserved purpose-specific subject',$subject);
$this->assertStringContainsString('Hard<span',$html);$this->assertStringContainsString('#B4F047',$html);
$this->assertDoesNotMatchRegularExpression('/\{\{[A-Za-z_]/',$html);
$this->assertStringNotContainsString('<script>',$html);$this->assertCount(1,$params['attachments']);return true;
})->andReturn(['status'=>'submitted','error'=>null]);$this->app->instance(Dispatcher::class,$dispatcher);
foreach($manifest['templates'] as $item){
\App\Models\MailTemplate::create(['name'=>$item['name'],'subject'=>'','content'=>file_get_contents(base_path('resources/mail/hn/'.$item['file']))]);
$out=\App\Services\MailService::sendEmail(['email'=>'[email protected]','subject'=>'Preserved purpose-specific subject','template_name'=>$item['name'],'purpose'=>'admin_test',
'template_value'=>['name'=>'HardNerd','url'=>'https://example.com','link'=>'https://example.com/login','code'=>'123456','content'=>'<script>not executable</script>','content_mode'=>'text']]);
$this->assertSame('submitted',$out['status']);$this->assertSame('db:'.$item['name'],$out['template_name']);
}
}
public function test_auto_reply_skips_automated_bulk_and_own_messages(): void
{
config(['mailflow.auto_reply_enabled' => true]);
@@ -134,6 +134,36 @@ class PaymentHealthTest extends TestCase
$q=new QrEvidence;$body='<p>32.00</p><div id="qr"></div><script>new QRCode(document.getElementById("qr"),"weixin://wxpay/bizpayurl?pr=fixture-only")</script>';
$this->assertTrue($q->valid($body,'wxpay',3200));$this->assertFalse($q->valid(str_replace('32.00','16.00',$body),'wxpay',3200));$this->assertFalse($q->valid('32.00 微信二维码','wxpay',3200));
}
public function test_cashier_requests_explicitly_accept_html_with_the_original_agent():void
{
Http::fake(['https://pay.airspay.top/*'=>Http::response('cashier',200)]);
$transport=new class extends HttpsTransport {protected function publicAddress(string $host):string{return '93.184.216.34';}};
$transport->request('POST','https://pay.airspay.top/submit.php',['money'=>'32.00']);
Http::assertSent(fn($r)=>$r->hasHeader('Accept','text/html')&&$r->hasHeader('User-Agent','XB-PaymentHealth/1.0')&&$r['money']==='32.00');
Http::assertSentCount(1);
}
public function test_wechat_https_qr_still_requires_exact_host_amount_and_rendering():void
{
$q=new QrEvidence;
$body='<p>32.00</p><script>$("#qrcode").qrcode({text:"https://wxmpurl.cn/fixture-only"});</script>';
$this->assertTrue($q->valid($body,'wxpay',3200));
$this->assertFalse($q->valid($body,'wxpay',1600));
$this->assertFalse($q->valid($body,'alipay',3200));
$this->assertFalse($q->valid('32.00 https://wxmpurl.cn/fixture-only','wxpay',3200));
foreach(['http://wxmpurl.cn/fixture','https://wxmpurl.cn.evil.invalid/fixture','https://sub.wxmpurl.cn/fixture',
'https://wxmpurlXcn/fixture','https://[email protected]/fixture','https://[email protected]/fixture',
'https://wxmpurl.cn:8443/fixture','https://evil.invalid/https://wxmpurl.cn/fixture',
'https://evil.invalid/?next=https://wxmpurl.cn/fixture','https://wxmpurl.cn/','https://wxmpurl.cn/fixture#fragment']as$url){
$this->assertFalse($q->valid(str_replace('https://wxmpurl.cn/fixture-only',$url,$body),'wxpay',3200),$url);
}
}
public function test_wechat_https_cashier_is_healthy_without_following_the_qr_url():void
{
$body='<p>32.00</p><script>$("#qrcode").qrcode({text:"https://wxmpurl.cn/fixture-only"});location.href="https://other.example.invalid/";</script>';
$t=new QueueTransport;$t->responses=[[200,$body]];
$out=(new TestEpayProbe($t,new QrEvidence))->probe(Payment::find(1),'fixture-trade');
$this->assertSame('healthy',$out['status']);$this->assertSame('fresh_cashier_qr',$out['reason']);$this->assertCount(1,$t->calls);
}
private function qrPng(int $pixels):string
{
$matrix=\BaconQrCode\Encoder\Encoder::encode('alipays://platformapi/startapp?appId=fixture-only',\BaconQrCode\Common\ErrorCorrectionLevel::M())->getMatrix();
@@ -0,0 +1,96 @@
<?php
namespace Tests\Feature\Server;
use App\Models\Server;
use App\Models\User;
use App\Protocols\ClashMeta;
use App\Services\ServerService;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\DB;
use Symfony\Component\Yaml\Yaml;
use Tests\TestCase;
class ServerDisplayOrderTest extends TestCase
{
use RefreshDatabase;
protected function beforeRefreshingDatabase(): void
{
config([
'database.default' => 'sqlite',
'database.connections.sqlite.url' => null,
'database.connections.sqlite.database' => ':memory:',
'cache.default' => 'array',
'cache.stores.redis' => ['driver' => 'array'],
]);
DB::purge('sqlite');
Cache::forgetDriver('redis');
}
public function test_user_list_and_clash_subscription_group_regions_and_keep_aliases_with_their_parent(): void
{
$this->node('🇨🇦 加拿大 - 日本中转', 1);
$this->node('🇺🇸 美国 - 金穗', 2);
$this->node('SG01', 3);
$this->node('日本 JP - 02', 4, 'jp01.example.test');
$this->node('🇭🇰 香港 - 太平', 5, 'hk02.example.test');
$hongKong = $this->node('🇭🇰 香港 - 维港', 6, 'hk01.example.test');
$this->node('🇭🇰 香港 - 扬帆', 16, 'hk01.example.test', ['parent_id' => $hongKong->id]);
$japan = $this->node('🇯🇵 日本 JP - 01', 7, 'jp03.example.test');
$this->node('🇯🇵 日本 - 樱雪', 0, 'jp03.example.test', ['parent_id' => $japan->id]);
$this->node('🇭🇰 香港 - 福来', 8, 'vn01.example.test');
$hidden = $this->node('HK03', 9, 'hk03.example.test', ['group_ids' => ['2']]);
$this->node('HK03 分身', 17, 'hk03.example.test', ['parent_id' => $hidden->id]);
$this->node('其他节点', 10);
$user = new User([
'group_id' => 1,
'uuid' => '123e4567-e89b-12d3-a456-426614174000',
'u' => 0,
'd' => 0,
'transfer_enable' => 1073741824,
'expired_at' => 2000000000,
]);
$expected = [
'🇭🇰 香港 - 维港',
'🇭🇰 香港 - 扬帆',
'🇭🇰 香港 - 太平',
'HK03 分身',
'🇭🇰 香港 - 福来',
'🇯🇵 日本 JP - 01',
'🇯🇵 日本 - 樱雪',
'日本 JP - 02',
'SG01',
'🇺🇸 美国 - 金穗',
'🇨🇦 加拿大 - 日本中转',
'其他节点',
];
$servers = ServerService::getAvailableServers($user);
$this->assertSame($expected, array_column($servers, 'name'));
$response = (new ClashMeta($user, $servers))->handle();
$subscription = Yaml::parse($response->getContent());
$this->assertSame($expected, array_column($subscription['proxies'], 'name'));
$this->assertSame($expected, collect($subscription['proxy-groups'])
->firstWhere('name', '自动选择')['proxies']);
}
private function node(string $name, int $sort, ?string $sni = null, array $overrides = []): Server
{
return Server::create(array_replace([
'name' => $name,
'type' => Server::TYPE_HYSTERIA,
'host' => 'relay.example.test',
'port' => '443',
'server_port' => 443,
'group_ids' => ['1'],
'rate' => 1,
'sort' => $sort,
'show' => true,
'protocol_settings' => ['version' => 2, 'tls' => ['server_name' => $sni]],
], $overrides));
}
}