rdsh-gateway 0.2.1 → 0.2.2

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.
Files changed (2) hide show
  1. package/dist/join.js +2 -2
  2. package/package.json +1 -1
package/dist/join.js CHANGED
@@ -124,7 +124,7 @@ export async function join(opts) {
124
124
  const ws = wsStreams.get(frame.streamId);
125
125
  if (ws !== undefined) {
126
126
  if (ws.upstream.readyState === ws.upstream.OPEN) {
127
- ws.upstream.send(frame.payload, { binary: true });
127
+ ws.upstream.send(frame.payload, { binary: false }); // DSH WS 为 text(JSON),保持文本帧
128
128
  }
129
129
  else {
130
130
  ws.queue.push(frame.payload);
@@ -243,7 +243,7 @@ export async function join(opts) {
243
243
  wsStreams.set(streamId, { upstream, queue });
244
244
  upstream.on("open", () => {
245
245
  for (const q of queue)
246
- upstream.send(q, { binary: true });
246
+ upstream.send(q, { binary: false });
247
247
  queue.length = 0;
248
248
  });
249
249
  upstream.on("message", (data, isBinary) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rdsh-gateway",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "rdsh host-side component: LAN auth gateway + outbound tunnel endpoint (spawns dsh web)",
5
5
  "license": "MIT",
6
6
  "type": "module",