dsh-mobile-plugin 0.5.146 → 0.5.148
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/extension-registry/README.md +8 -1
- package/lib/panel/index.html +20 -20
- package/lib/routes/control-plane.js +8 -4
- package/package.json +13 -13
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// 2026-11-30:回环 health 探针超时/出错时已收到的数据不再丢弃,按已应答结算;纯静默超时仍是 unknown。
|
|
1
2
|
// 2026-11-30:桌面 config 路由收 ipVersionPolicy(三档枚举,与手机端同一句拒绝文案),status 包装回显已存值。
|
|
2
3
|
// 2026-11-30:出码路由支持 ?include= 勾选预览:只换二维码内容,不落盘、不作废票据。
|
|
3
4
|
// 2026-11-28:新增语音面板配置口(/api/relay/voice/config),纳入网页访问窗口。
|
|
@@ -140,12 +141,15 @@ function probeTcpResponse(host, port, timeoutMs) {
|
|
|
140
141
|
socket.write('GET /api/mobile/v1/health HTTP/1.1\r\nHost: probe\r\nAccept: application/json\r\nConnection: close\r\n\r\n');
|
|
141
142
|
});
|
|
142
143
|
socket.on('data', (chunk) => { chunks.push(chunk); });
|
|
143
|
-
|
|
144
|
-
socket.once('error', () => finish({ answered: false, body: null }));
|
|
145
|
-
socket.once('close', () => {
|
|
144
|
+
const settleAnswered = () => {
|
|
146
145
|
try { finish({ answered: true, body: JSON.parse(probeBodyOf(Buffer.concat(chunks))) }); }
|
|
147
146
|
catch { finish({ answered: true, body: null }); }
|
|
148
|
-
}
|
|
147
|
+
};
|
|
148
|
+
// 超时/出错时若已经收到字节,那就是一份应答(哪怕对方拖着不关 socket、连接被 RST),
|
|
149
|
+
// 不能按「没人答」清掉判据;一个字节都没收到才继续留 unknown。
|
|
150
|
+
socket.once('timeout', () => chunks.length ? settleAnswered() : finish({ answered: false, body: null }));
|
|
151
|
+
socket.once('error', () => chunks.length ? settleAnswered() : finish({ answered: false, body: null }));
|
|
152
|
+
socket.once('close', settleAnswered);
|
|
149
153
|
});
|
|
150
154
|
}
|
|
151
155
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-mobile-plugin",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.148",
|
|
4
4
|
"description": "Mobile API (/api/mobile/v1) and relay client for the DSH mobile app — desktop profile build (dsh 0.2.x, peers resolved by the host)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"icon": "./icon.png",
|
|
@@ -117,22 +117,22 @@
|
|
|
117
117
|
"yaml": "2.9.1"
|
|
118
118
|
},
|
|
119
119
|
"dshMobileReleaseNotes": {
|
|
120
|
-
"version": "0.5.
|
|
120
|
+
"version": "0.5.148",
|
|
121
121
|
"kinds": [
|
|
122
122
|
"fix"
|
|
123
123
|
],
|
|
124
124
|
"notes": {
|
|
125
|
-
"zh-Hans": "-
|
|
126
|
-
"zh-Hant": "-
|
|
127
|
-
"en": "-
|
|
128
|
-
"ja": "-
|
|
129
|
-
"ko": "
|
|
130
|
-
"de": "
|
|
131
|
-
"es": "
|
|
132
|
-
"fr": "
|
|
133
|
-
"pt": "
|
|
134
|
-
"ru": "
|
|
135
|
-
"tr": "
|
|
125
|
+
"zh-Hans": "- 修复端口被别的程序占用、对方回了健康应答却一直不关连接时,插件误判端口可用、手机约每半小时掉线一次的问题;现在能正确识别并自动换到备用端口。",
|
|
126
|
+
"zh-Hant": "- 修正通訊埠被其他程式占用、對方回了健康應答卻一直不關連線時,外掛誤判連線埠可用、手機約每半小時斷線一次的問題;現在能正確辨識並自動切換到備用連線埠。",
|
|
127
|
+
"en": "- Fixed an issue where, if another program took the plugin's port and sent a health reply but kept the connection open, the plugin mistook the port as free and the phone went offline about every half hour. It now detects this correctly and switches to a spare port.",
|
|
128
|
+
"ja": "- プラグインの通信ポートが別のプログラムに占有され、相手がヘルス応答を返したまま接続を閉じない場合、プラグインがポートを空いていると誤判定し、スマートフォンが約30分ごとにオフラインになる問題を修正しました。正しく検出し、予備ポートへ自動的に切り替えます。",
|
|
129
|
+
"ko": "다른 프로그램이 플러그인 통신 포트를 점유했지만 헬스 응답을 보낸 뒤 연결을 닫지 않을 때, 플러그인이 포트가 비어 있다고 오판해 휴대폰이 약 30분마다 오프라인되던 문제를 수정했습니다. 이제 이를 올바르게 감지하고 예비 포트로 자동 전환합니다.",
|
|
130
|
+
"de": "Behoben: Wenn ein anderes Programm den Port des Plugins belegt, eine Health-Antwort sendet, die Verbindung aber offen hält, hielt das Plugin den Port für frei und das Telefon ging etwa alle halbe Stunde offline. Es erkennt dies jetzt korrekt und wechselt automatisch auf einen Ersatzport.",
|
|
131
|
+
"es": "Se corrigió un problema en el que, si otro programa ocupaba el puerto del plugin y enviaba una respuesta de estado sin cerrar la conexión, el plugin creía que el puerto estaba libre y el teléfono se desconectaba cada media hora. Ahora lo detecta correctamente y cambia a un puerto alternativo.",
|
|
132
|
+
"fr": "Correction d'un problème où, lorsqu'un autre programme occupait le port du plugin et envoyait une réponse de santé sans fermer la connexion, le plugin considérait le port comme libre et le téléphone passait hors ligne environ toutes les demi-heures. Il détecte désormais correctement ce cas et bascule automatiquement sur un port de secours.",
|
|
133
|
+
"pt": "Corrigido um problema em que, quando outro programa ocupava a porta do plugin e enviava uma resposta de saúde sem fechar a conexão, o plugin achava que a porta estava livre e o telefone ficava offline cerca de meia em meia hora. Agora ele detecta corretamente e muda automaticamente para uma porta reserva.",
|
|
134
|
+
"ru": "Исправлена проблема, когда другая программа занимала порт плагина, отправляла ответ о работоспособности, но не закрывала соединение: плагин считал порт свободным, и телефон терял связь примерно каждые полчаса. Теперь это определяется правильно, и плагин автоматически переключается на резервный порт.",
|
|
135
|
+
"tr": "Başka bir program eklentinin portunu kapladığında ve bir sağlık yanıtı gönderip bağlantıyı kapatmadığında, eklentinin portu boş sanıp telefonun yaklaşık yarım saatte bir çevrimdışı kalmasına yol açan sorun düzeltildi. Artık bunu doğru tespit ediyor ve otomatik olarak yedek porta geçiyor."
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
138
|
}
|