3602700c8be4

feat: Native WebSocket transport at port+1 with mDNS wsport TXT (v2.13.32, native v0.1.12)

time
2026-04-30 18:56 UTC · 6 months ago
machine
koh2
parent
c7028334127c
6 files manifest.firefox.json+1 −1manifest.json+1 −1package.json+1 −1src/background/messages.ts+1 −0src/background/sync.ts+18 −2src/shared/sync-types.ts+6 −0
manifest.firefox.json+1 −1
@@ -1,7 +1,7 @@11 {22   "manifest_version": 3,33   "name": "Peach",4-  "version": "2.13.31",4+  "version": "2.13.32",55   "description": "Zero-knowledge password manager",66   "browser_specific_settings": {77     "gecko": {

view file

manifest.json+1 −1
@@ -1,7 +1,7 @@11 {22   "manifest_version": 3,33   "name": "Peach",4-  "version": "2.13.31",4+  "version": "2.13.32",55   "description": "Zero-knowledge password manager",66   "action": {77     "default_popup": "src/popup/index.html",

view file

package.json+1 −1
@@ -1,6 +1,6 @@11 {22   "name": "peach",3-  "version": "2.13.31",3+  "version": "2.13.32",44   "description": "Zero-knowledge password manager",55   "type": "module",66   "scripts": {

view file

src/background/messages.ts+1 −0
@@ -113,6 +113,7 @@113113             deviceName: peer.name,114114             host: peer.host,115115             port: peer.port,116+            wsPort: peer.wsPort,116117             x25519PublicKey: peer.x25519PublicKey,117118             alreadyPaired,118119           },

view file

src/background/sync.ts+18 −2
@@ -40,6 +40,7 @@4040 type HostPeer = {4141   host: string;4242   port: number;43+  ws_port?: number | null;4344   x25519_public_key: string;4445   device_id: string;4546   name: string;@@ -59,7 +60,7 @@5960   | { type: "TRUST_DEVICE_OK" }6061   | { type: "REMOVE_TRUSTED_DEVICE_OK" }6162   | { type: "ROTATE_IDENTITY_OK"; public_key_hex: string }62-  | { type: "ADVERTISING"; port: number }63+  | { type: "ADVERTISING"; port: number; ws_port?: number | null }6364   | { type: "STOP_ADVERTISING_OK" }6465   | { type: "PEER_DISCOVERED"; peer: HostPeer }6566   | { type: "PEER_LOST"; device_id: string }@@ -69,12 +70,24 @@6970   | { type: "DISCONNECTED"; connection_id: string }7071   | { type: "SYNC_RECEIVED"; connection_id: string; data: string }7172   | { type: "SESSION_KEY"; connection_id: string; key: string }72-  | { type: "STATUS"; advertising: boolean; tcp_port?: number | null; connections: string[] }73+  | {74+      type: "STATUS";75+      advertising: boolean;76+      tcp_port?: number | null;77+      ws_port?: number | null;78+      connections: string[];79+    }7380   | { type: "ERROR"; connection_id?: string | null; message: string };7481 7582 export interface PeerInfo {7683   host: string;7784   port: number;85+  /**86+   * WebSocket port advertised in mDNS `wsport`. Mobile clients (Android via87+   * Capacitor) connect through this; extension/desktop clients ignore it and88+   * use the raw TCP `port` instead.89+   */90+  wsPort?: number;7891   name: string;7992   pairing: boolean;8093   deviceId: string;@@ -91,6 +104,7 @@91104 export interface NativeSyncStatus {92105   advertising: boolean;93106   tcpPort?: number;107+  wsPort?: number;94108   connections: string[];95109 }96110 @@ -381,6 +395,7 @@381395   return {382396     advertising: response.advertising,383397     tcpPort: response.tcp_port ?? undefined,398+    wsPort: response.ws_port ?? undefined,384399     connections: response.connections,385400   };386401 }@@ -431,6 +446,7 @@431446   return {432447     host: peer.host,433448     port: peer.port,449+    wsPort: peer.ws_port ?? undefined,434450     name: peer.name,435451     pairing: peer.pairing ?? false,436452     deviceId: peer.device_id,

view file

src/shared/sync-types.ts+6 −0
@@ -99,6 +99,12 @@9999   deviceName: string;100100   host: string;101101   port: number;102+  /**103+   * WebSocket port advertised by the peer (mDNS `wsport`). The Capacitor104+   * Android bridge connects through this; the desktop extension uses raw105+   * TCP via the native messaging host and ignores it.106+   */107+  wsPort?: number;102108   x25519PublicKey: string;103109   alreadyPaired: boolean;104110 }

view file