## Improved

- Improved connectivity for P2P connections
- The connection to the signalling server can now be disconnected while in the background or when explicitly disconnected.
  - These features use a patch that has not been incorporated upstream.
This commit is contained in:
vorotamoroz
2025-09-04 11:44:49 +01:00
parent ec72ece86d
commit 2b94fd9139
4 changed files with 42 additions and 19 deletions

50
package-lock.json generated
View File

@@ -23,7 +23,7 @@
"octagonal-wheels": "^0.1.38",
"qrcode-generator": "^1.4.4",
"svelte-check": "^4.1.7",
"trystero": "^0.21.7",
"trystero": "github:vrtmrz/trystero#9e892a93ec14eeb57ce806d272fbb7c3935256d8",
"xxhash-wasm-102": "npm:xxhash-wasm@^1.0.2"
},
"devDependencies": {
@@ -8752,9 +8752,9 @@
}
},
"node_modules/path-scurry/node_modules/lru-cache": {
"version": "11.1.0",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.1.0.tgz",
"integrity": "sha512-QIXZUBJUx+2zHUdQujWejBkcD9+cs94tLn0+YL8UrCh+D5sCXZ4c7LaEH48pNwRY3MLDgqUFyhlCyjJPf1WP0A==",
"version": "11.2.1",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.1.tgz",
"integrity": "sha512-r8LA6i4LP4EeWOhqBaZZjDWwehd1xUJPCJd9Sv300H0ZmcUER4+JPh7bqqZeqs1o5pgtgvXm+d9UGrB5zZGDiQ==",
"dev": true,
"license": "ISC",
"engines": {
@@ -10365,20 +10365,29 @@
}
},
"node_modules/trystero": {
"version": "0.21.7",
"resolved": "https://registry.npmjs.org/trystero/-/trystero-0.21.7.tgz",
"integrity": "sha512-SdpxC9Q29bDBUdIWvkELHvOlmpelHAbjgclXR6cPeUWeLkbyY8ku2ZCJjozO4L2CLOMiclOoMKdmtpYLAwZvIw==",
"version": "0.21.8",
"resolved": "git+ssh://git@github.com/vrtmrz/trystero.git#9e892a93ec14eeb57ce806d272fbb7c3935256d8",
"integrity": "sha512-LUlmTTSxgomyYvU1K05snl18+GLAxqO4W8P9lePLbRnZVJyGZUVXMM4/aW9384GtIf0VLJquloWqz9PriJZg2w==",
"license": "MIT",
"dependencies": {
"@noble/secp256k1": "^1.7.1",
"@noble/secp256k1": "^3.0.0",
"@supabase/supabase-js": "^2.49.8",
"@waku/discovery": "^0.0.8",
"@waku/sdk": "^0.0.31",
"firebase": "^12.0.0",
"firebase": "^12.2.1",
"libp2p": "^2.8.8",
"mqtt": "^5.13.0"
}
},
"node_modules/trystero/node_modules/@noble/secp256k1": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/@noble/secp256k1/-/secp256k1-3.0.0.tgz",
"integrity": "sha512-NJBaR352KyIvj3t6sgT/+7xrNyF9Xk9QlLSIqUGVUYlsnDTAUqY8LOmwpcgEx4AMJXRITQ5XEVHD+mMaPfr3mg==",
"license": "MIT",
"funding": {
"url": "https://paulmillr.com/funding/"
}
},
"node_modules/ts-api-utils": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.0.1.tgz",
@@ -17147,9 +17156,9 @@
},
"dependencies": {
"lru-cache": {
"version": "11.1.0",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.1.0.tgz",
"integrity": "sha512-QIXZUBJUx+2zHUdQujWejBkcD9+cs94tLn0+YL8UrCh+D5sCXZ4c7LaEH48pNwRY3MLDgqUFyhlCyjJPf1WP0A==",
"version": "11.2.1",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.1.tgz",
"integrity": "sha512-r8LA6i4LP4EeWOhqBaZZjDWwehd1xUJPCJd9Sv300H0ZmcUER4+JPh7bqqZeqs1o5pgtgvXm+d9UGrB5zZGDiQ==",
"dev": true
}
}
@@ -18229,17 +18238,24 @@
}
},
"trystero": {
"version": "0.21.7",
"resolved": "https://registry.npmjs.org/trystero/-/trystero-0.21.7.tgz",
"integrity": "sha512-SdpxC9Q29bDBUdIWvkELHvOlmpelHAbjgclXR6cPeUWeLkbyY8ku2ZCJjozO4L2CLOMiclOoMKdmtpYLAwZvIw==",
"version": "git+ssh://git@github.com/vrtmrz/trystero.git#9e892a93ec14eeb57ce806d272fbb7c3935256d8",
"integrity": "sha512-LUlmTTSxgomyYvU1K05snl18+GLAxqO4W8P9lePLbRnZVJyGZUVXMM4/aW9384GtIf0VLJquloWqz9PriJZg2w==",
"from": "trystero@github:vrtmrz/trystero#9e892a93ec14eeb57ce806d272fbb7c3935256d8",
"requires": {
"@noble/secp256k1": "^1.7.1",
"@noble/secp256k1": "^3.0.0",
"@supabase/supabase-js": "^2.49.8",
"@waku/discovery": "^0.0.8",
"@waku/sdk": "^0.0.31",
"firebase": "^12.0.0",
"firebase": "^12.2.1",
"libp2p": "^2.8.8",
"mqtt": "^5.13.0"
},
"dependencies": {
"@noble/secp256k1": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/@noble/secp256k1/-/secp256k1-3.0.0.tgz",
"integrity": "sha512-NJBaR352KyIvj3t6sgT/+7xrNyF9Xk9QlLSIqUGVUYlsnDTAUqY8LOmwpcgEx4AMJXRITQ5XEVHD+mMaPfr3mg=="
}
}
},
"ts-api-utils": {

View File

@@ -95,7 +95,7 @@
"octagonal-wheels": "^0.1.38",
"qrcode-generator": "^1.4.4",
"svelte-check": "^4.1.7",
"trystero": "^0.21.7",
"trystero": "github:vrtmrz/trystero#9e892a93ec14eeb57ce806d272fbb7c3935256d8",
"xxhash-wasm-102": "npm:xxhash-wasm@^1.0.2"
}
}

View File

@@ -174,6 +174,13 @@ export class P2PReplicator
if (this.settings.P2P_Enabled && this.settings.P2P_AutoStart) {
setTimeout(() => void this.open(), 100);
}
const rep = this._replicatorInstance;
rep?.allowReconnection();
return Promise.resolve(true);
}
$everyBeforeSuspendProcess(): Promise<boolean> {
const rep = this._replicatorInstance;
rep?.disconnectFromServer();
return Promise.resolve(true);
}
}

Submodule src/lib updated: 4cedb17db1...c00f62f060