fix(client): 下发 host 为空时还原为 cN 服务器地址,修复进战斗短命连接

This commit is contained in:
TermiNexus committed 2026-10-20 11:19:09 +08:00
1 parent aa3bcba363
commit 82ee3fd8a4
2 files changed
+17 -2

No files matched your search

+1 -1
View File
@@ -1 +1 @@
{"version":"d033b7162e9fa34f","base":"/play/static/js/unpacked/","count":127,"files":{"module_00806.js":"// ============================================================\n// Module ID: 806\n// ============================================================\n;(window.__modules__ = window.__modules__ || {})[806] = (t, n, i) => {\n \"use strict\";\n var r = i(19487),\n e = {\n childContextTypes: !0,\n contextType: !0,\n contextTypes: !0,\n defaultProps: !0,\n displayName: !0,\n getDefaultProps: !0,\n getDerivedStateFromError: !0,\n getDerivedStateFromProps: !0,\n mixins: !0,\n propTypes: !0,\n type: !0,\n },\n u = { name: !0, length: !0, prototype: !0, caller: !0, callee: !0, arguments: !0, arity: !0 },\n s = { $$typeof: !0, compare: !0, defaultProps: !0, displayName: !0, propTypes: !0, type: !0 },\n o = {};\n function _(t) {\n return r.isMemo(t) ? s : o[t.$$typeof] || e;\n }\n ((o[r.ForwardRef] = { $$typeof: !0, render: !0, defaultProps: !0, displayName: !0, propTypes: !0 }),\n (o[r.Memo] = s));\n var h = Object.defineProperty,\n a = Object.getOwnPropertyNames,\n c = Object.getOwnPropertySymbols,\n l = Object.getOwnPropertyDescriptor,\n f = Object.getPrototypeOf,\n v = Object.prototype;\n t.exports = function t(n, i, r) {\n if (\"string\" != typeof i) {\n if (v) {\n var e = f(i);\n e && e !== v && t(n, e, r);\n }\n var s = a(i);\n c && (s = s.concat(c(i)));\n for (var o = _(n), p = _(i), w = 0; w < s.length; ++w) {\n var d = s[w];\n if (!(u[d] || (r && r[d]) || (p && p[d]) || (o && o[d]))) {\n var g = l(i, d);\n try {\n h(n, d, g);\n } catch (t) {}\n }\n }\n }\n return n;\n };\n};\n","module_00905.js":"// ============================================================\n// Module ID: 905\n// ============================================================\n;(window.__modules__ = window.__modules__ || {})[905] = (t) => {\n \"use strict\";\n t.exports = \"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED\";\n};\n","module_01510.js":"// ============================================================\n// Module ID: 1510\n// ============================================================\n;(window.__modules__ = window.__modules__ || {})[1510] = (t, n, i) => {\n !(function (t, n, i, r, e) {\n \"use strict\";\n var u,\n s,\n o,\n _,\n h,\n a,\n c,\n l,\n f,\n v,\n p,\n w,\n d,\n g,\n m,\n k,\n z = n.$_$.ob,\n b = n.$_$.w4,\n q = i.$_$.e,\n y = n.$_$.he,\n $ = n.$_$.xj,\n x = n.$_$.h5,\n j = n.$_$.o1,\n S = n.$_$.gd,\n C = i.$_$.d,\n E = n.$_$.r5,\n T = n.$_$.ud,\n I = i.$_$.f,\n A = n.$_$.nf,\n R = r.$_$.s1,\n P = e.$_$.n,\n N = n.$_$.rf,\n M = n.$_$.dd,\n O = n.$_$.sj,\n D = i.$_$.r,\n L = i.$_$.b,\n B = e.$_$.f,\n U = n.$_$.yb,\n F = n.$_$.c,\n G = e.$_$.f1,\n H = n.$_$.ge,\n W = e.$_$.l,\n V = n.$_$.nj,\n K = n.$_$.ke;\n function Y(t) {\n var n = t.zuy_1;\n if (null != n) return n;\n z(\"codec_appId\");\n }\n function X() {}\n function J() {}\n function Z(t) {\n var n = t.cuz_1;\n if (null != n) return n;\n z(\"codec_questToAchievementMap\");\n }\n function Q() {}\n function tt(t) {\n var n = t.fuz_1;\n if (null != n) return n;\n z(\"codec_itemIdMap\");\n }\n function nt() {}\n function it() {\n ((this.iuz_1 = new R(A(I), null)), (this.juz_1 = new R(A(P), null)));\n }\n function rt() {\n (B.call(this),\n (this.nuz_1 = new R(A(I), null)),\n (this.ouz_1 = new R(A(P), null)),\n (this.quz_1 = new O(-621796162, 1132145095)),\n (this.ruz_1 = new O(1635469714, 1785333818)),\n (this.suz_1 = new O(-773564903, 1989636776)),\n (this.tuz_1 = new O(497901439, 366177258)),\n this.tay(),\n (this.uuz_1 = this.quz_1));\n }\n function et(t) {\n var n = N;\n return t.xuz_1.e2b(\n t,\n M(\n \"protocol\",\n 1,\n n,\n function (t) {\n return et(t);\n },\n null,\n ),\n );\n }\n function ut() {\n ((this.xuz_1 = new R(A(I), null)), (this.zuz_1 = new O(-1272608814, 1097348888)));\n }\n function st() {\n return ((t = H(y(ot))), ot.call(t), t);\n var t;\n }\n function ot() {}\n function _t(t) {\n var n = N;\n return t.fv0_1.e2b(\n t,\n M(\n \"protocol\",\n 1,\n n,\n function (t) {\n return _t(t);\n },\n null,\n ),\n );\n }\n function ht(t) {\n var n = N;\n return t.gv0_1.e2b(\n t,\n M(\n \"modelRegistry\",\n Line truncated
{"version":"18a538259d2f8c3a","base":"/play/static/js/unpacked/","count":127,"files":{"module_00806.js":"// ============================================================\n// Module ID: 806\n// ============================================================\n;(window.__modules__ = window.__modules__ || {})[806] = (t, n, i) => {\n \"use strict\";\n var r = i(19487),\n e = {\n childContextTypes: !0,\n contextType: !0,\n contextTypes: !0,\n defaultProps: !0,\n displayName: !0,\n getDefaultProps: !0,\n getDerivedStateFromError: !0,\n getDerivedStateFromProps: !0,\n mixins: !0,\n propTypes: !0,\n type: !0,\n },\n u = { name: !0, length: !0, prototype: !0, caller: !0, callee: !0, arguments: !0, arity: !0 },\n s = { $$typeof: !0, compare: !0, defaultProps: !0, displayName: !0, propTypes: !0, type: !0 },\n o = {};\n function _(t) {\n return r.isMemo(t) ? s : o[t.$$typeof] || e;\n }\n ((o[r.ForwardRef] = { $$typeof: !0, render: !0, defaultProps: !0, displayName: !0, propTypes: !0 }),\n (o[r.Memo] = s));\n var h = Object.defineProperty,\n a = Object.getOwnPropertyNames,\n c = Object.getOwnPropertySymbols,\n l = Object.getOwnPropertyDescriptor,\n f = Object.getPrototypeOf,\n v = Object.prototype;\n t.exports = function t(n, i, r) {\n if (\"string\" != typeof i) {\n if (v) {\n var e = f(i);\n e && e !== v && t(n, e, r);\n }\n var s = a(i);\n c && (s = s.concat(c(i)));\n for (var o = _(n), p = _(i), w = 0; w < s.length; ++w) {\n var d = s[w];\n if (!(u[d] || (r && r[d]) || (p && p[d]) || (o && o[d]))) {\n var g = l(i, d);\n try {\n h(n, d, g);\n } catch (t) {}\n }\n }\n }\n return n;\n };\n};\n","module_00905.js":"// ============================================================\n// Module ID: 905\n// ============================================================\n;(window.__modules__ = window.__modules__ || {})[905] = (t) => {\n \"use strict\";\n t.exports = \"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED\";\n};\n","module_01510.js":"// ============================================================\n// Module ID: 1510\n// ============================================================\n;(window.__modules__ = window.__modules__ || {})[1510] = (t, n, i) => {\n !(function (t, n, i, r, e) {\n \"use strict\";\n var u,\n s,\n o,\n _,\n h,\n a,\n c,\n l,\n f,\n v,\n p,\n w,\n d,\n g,\n m,\n k,\n z = n.$_$.ob,\n b = n.$_$.w4,\n q = i.$_$.e,\n y = n.$_$.he,\n $ = n.$_$.xj,\n x = n.$_$.h5,\n j = n.$_$.o1,\n S = n.$_$.gd,\n C = i.$_$.d,\n E = n.$_$.r5,\n T = n.$_$.ud,\n I = i.$_$.f,\n A = n.$_$.nf,\n R = r.$_$.s1,\n P = e.$_$.n,\n N = n.$_$.rf,\n M = n.$_$.dd,\n O = n.$_$.sj,\n D = i.$_$.r,\n L = i.$_$.b,\n B = e.$_$.f,\n U = n.$_$.yb,\n F = n.$_$.c,\n G = e.$_$.f1,\n H = n.$_$.ge,\n W = e.$_$.l,\n V = n.$_$.nj,\n K = n.$_$.ke;\n function Y(t) {\n var n = t.zuy_1;\n if (null != n) return n;\n z(\"codec_appId\");\n }\n function X() {}\n function J() {}\n function Z(t) {\n var n = t.cuz_1;\n if (null != n) return n;\n z(\"codec_questToAchievementMap\");\n }\n function Q() {}\n function tt(t) {\n var n = t.fuz_1;\n if (null != n) return n;\n z(\"codec_itemIdMap\");\n }\n function nt() {}\n function it() {\n ((this.iuz_1 = new R(A(I), null)), (this.juz_1 = new R(A(P), null)));\n }\n function rt() {\n (B.call(this),\n (this.nuz_1 = new R(A(I), null)),\n (this.ouz_1 = new R(A(P), null)),\n (this.quz_1 = new O(-621796162, 1132145095)),\n (this.ruz_1 = new O(1635469714, 1785333818)),\n (this.suz_1 = new O(-773564903, 1989636776)),\n (this.tuz_1 = new O(497901439, 366177258)),\n this.tay(),\n (this.uuz_1 = this.quz_1));\n }\n function et(t) {\n var n = N;\n return t.xuz_1.e2b(\n t,\n M(\n \"protocol\",\n 1,\n n,\n function (t) {\n return et(t);\n },\n null,\n ),\n );\n }\n function ut() {\n ((this.xuz_1 = new R(A(I), null)), (this.zuz_1 = new O(-1272608814, 1097348888)));\n }\n function st() {\n return ((t = H(y(ot))), ot.call(t), t);\n var t;\n }\n function ot() {}\n function _t(t) {\n var n = N;\n return t.fv0_1.e2b(\n t,\n M(\n \"protocol\",\n 1,\n n,\n function (t) {\n return _t(t);\n },\n null,\n ),\n );\n }\n function ht(t) {\n var n = N;\n return t.gv0_1.e2b(\n t,\n M(\n \"modelRegistry\",\n Line truncated
@@ -7320,7 +7320,22 @@
or().ldq(t);
}),
(nt(_S).jdq = function (t) {
Pc(Z(Rc)).r7j(t.mdi(), t.ndi().g1(0), t.odi());
// 本地镜像修正:服务端下发的 RemoteEndpointData 可能 host 为空(表示「沿用当前服务器」)。
// 官方页面下当前 host 就是 cN.3dtank.com,没问题;但本地镜像 host 是 localhost,
// 空 host 会让客户端连到 ws://localhost:<port>/ → 无监听 → 每秒重连(短命连接)。
// 这里在 host 为空时用 serve 注入的 __HORNET_SRV__ 还原成 cN.3dtank.com。
var RawHost = t.mdi();
var Port = t.ndi().g1(0);
var Proto = t.odi();
var Host = RawHost;
if (!Host || 0 === String(Host).length) {
var Srv = Number(window.__HORNET_SRV__) || 0;
if (Srv > 0) Host = "c" + Srv + ".3dtank.com";
}
if (!Port) Port = 9090;
if (!Proto) Proto = "WSS";
console.log("[_reconnectFast] host=" + JSON.stringify(RawHost) + " port=" + Port + " proto=" + Proto + " → " + Host + ":" + Port);
Pc(Z(Rc)).r7j(Host, Port, Proto);
}),
(nt(lS).b7k = function () {
var t;