Files
dsh_ai1net_server/归档/域名迁移_ai1net_20260919/_g11.sh
T
admin ce8e6ceed9 chore(工作区): 纳入版本控制基线(回收 411 MB 过程产物)
回收 411 MB(470 M → 58.8 M),全部经回收站,可恢复:
- 待清理/(146.2 M,含 relay 分片 128 M 与 42 项过程目录)
- tmp/(32.4 M,按接续棒命名的过程临时区)
- .workbuddy/tmp/(39.5 M)
- 4 份 workbuddy.db 冗余副本(101 M,09-23 事故的坏副本 / 抢救产物)
- tmp/im16/gw/centrifugo 二进制(63.9 M,可重下)+ 缓存残留

入库范围:常驻规则(CODEBUDDY.md / README.md / state.py)、在途接续入口与
接续包、docs/、交付物/、交接单/、归档/、scripts/、.codebuddy/、
.workbuddy/memory/;共 398 件,其中 >60 KB 的 26 件全为文档。

排除(.gitignore):tmp/、待清理/、运行态日志与缓存、*.db 与 DB 备份整目录、
打包二进制(*.tar.gz / *.tgz)、记忆修复前备份。
2026-09-24 07:51:03 +08:00

26 lines
1.5 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
set -u
TOKEN=$(/usr/local/bin/node /opt/dshs/mksess.cjs guest 2>&1 | tail -1)
if [ ${#TOKEN} -ne 64 ]; then echo "mksess 失败: $TOKEN"; exit 1; fi
echo "临时会话已建(token 长度 ${#TOKEN})"
echo
echo "=== [1] 平台直连 3080(Host=guest.ai1net.com,带 cookie)==="
curl -s -o /tmp/_a -w "code=%{http_code} size=%{size_download} loc=%{redirect_url}\n" --max-time 20 \
-H "Host: guest.ai1net.com" -H "Accept: text/html" -H "Cookie: sid=$TOKEN" http://127.0.0.1:3080/
head -c 120 /tmp/_a | tr -d '\n'; echo
echo
echo "=== [2] 完整链路 nginx443(--resolve 直指本机,Host=guest.ai1net.com)==="
curl -sk -o /tmp/_b -w "code=%{http_code} size=%{size_download} loc=%{redirect_url}\n" --max-time 20 \
--resolve guest.ai1net.com:443:127.0.0.1 -H "Accept: text/html" -H "Cookie: sid=$TOKEN" \
https://guest.ai1net.com/
head -c 120 /tmp/_b | tr -d '\n'; echo
echo
echo "=== [3] 旧域对照(Host=guest.alotbuy.com,同 cookie)==="
curl -sk -o /tmp/_c -w "code=%{http_code} size=%{size_download} loc=%{redirect_url}\n" --max-time 20 \
--resolve guest.alotbuy.com:443:127.0.0.1 -H "Accept: text/html" -H "Cookie: sid=$TOKEN" \
https://guest.alotbuy.com/
head -c 120 /tmp/_c | tr -d '\n'; echo
echo
echo "=== [4] 清理临时会话 ==="
sudo -u postgres psql -p 15432 -d dshs -Atc "DELETE FROM sessions WHERE user_agent='poc-curl2'" 2>&1 | grep -v 'could not change'
sudo -u postgres psql -p 15432 -d dshs -Atc "SELECT count(*) FROM sessions WHERE user_agent='poc-curl2'" 2>&1 | grep -v 'could not change'