This commit is contained in:
vet
2026-04-14 15:20:00 +07:00
parent 3332ec541a
commit 4ce37703b3
8 changed files with 192 additions and 27 deletions

View File

@@ -193,10 +193,11 @@ cat <<'EOF'
userID = userID || await window.__deployTestReadLocalForage("IM_USERID");
token = token || await window.__deployTestReadLocalForage("IM_TOKEN");
const operationID = `deploy-test-${Date.now()}`;
const gatewayOrigin = window.location.protocol === "https:" ? window.location.origin : "http://54.116.29.247";
const config = {
platformID: 5,
apiAddr: apiAddr || "http://54.116.29.247/api/im",
wsAddr: wsAddr || "ws://54.116.29.247/msg_gateway",
apiAddr: apiAddr || `${gatewayOrigin}/api/im`,
wsAddr: wsAddr || `${gatewayOrigin.replace(/^http/, "ws")}/msg_gateway`,
dataDir: "./",
logLevel: 5,
isLogStandardOutput: true,
@@ -268,8 +269,8 @@ await window.__deployTestResetBrowserStorage()
await window.__deployTestManualInitDB()
清理后按这个顺序重测:
1. 关闭其它 http://54.116.29.247:5173 标签页
2. 刷新页面
1. 关闭其它 http://54.116.29.247:5173 / https://54.116.29.247 标签页
2. 打开 https://54.116.29.247/ 并刷新页面(首次访问需接受自签名证书)
3. 重新粘贴本脚本输出的整段 JS刷新会清掉已安装的 probe
4. 再登录
5. 观察 counts 是否从 0 变 1以及 /var/log/nginx/openim-pc-proxy-access.log 是否出现 /msg_gateway