diff options
Diffstat (limited to 'packages/meshbay-client/src/preload.js')
| -rw-r--r-- | packages/meshbay-client/src/preload.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/meshbay-client/src/preload.js b/packages/meshbay-client/src/preload.js index 7ffdf66..96d6790 100644 --- a/packages/meshbay-client/src/preload.js +++ b/packages/meshbay-client/src/preload.js @@ -47,6 +47,12 @@ contextBridge.exposeInMainWorld('meshbay', { // which CORS refuses and which is not a credential anyway. fetch: (url, init) => ipcRenderer.invoke('hub:fetch', url, init), + // Resolve STUN `stun:host:port` URLs to `stun:ip:port` using Node's resolver. + // Chromium's P2P socket manager fails STUN hostnames outright in some + // restricted-resolver environments; the renderer cannot do DNS, so it asks + // here. Unresolvable entries are dropped. + resolveStun: (urls) => ipcRenderer.invoke('ice:resolve-stun', urls), + // The device's hub key. Generated, held and used entirely in the main // process: the interface asks for a signature and never sees a key, because // it is the part of this application that parses hostile input. |