* Add split tunneling (#17) * refactor imports * remove bandwidth tests from hooks * add autoclikers for call join * add autoclikers for call join * refactor - split to classes, update namings * display bot api in console * mute audio as a separate js script * fix NUL byte in udp for windows * update readme, collapse call webview, edit tab names * fix ports allocation when target is taken * fix ports allocation when target is taken * increment release version --------- Co-authored-by: senya <76913432+senya-sh@users.noreply.github.com> Co-authored-by: kulikov <user@Mac.lan>
15 lines
1.0 KiB
JavaScript
15 lines
1.0 KiB
JavaScript
const { contextBridge, ipcRenderer } = require('electron');
|
|
|
|
contextBridge.exposeInMainWorld('bridge', {
|
|
onRelayLog: function(cb) { ipcRenderer.on('relay-log', function(e, data) { cb(data.tabId, data.msg); }); },
|
|
getHookCode: function(tabId, url) { return ipcRenderer.invoke('get-hook-code', tabId, url); },
|
|
setTunnelMode: function(tabId, mode) { return ipcRenderer.invoke('set-tunnel-mode', tabId, mode); },
|
|
startRelay: function(tabId) { return ipcRenderer.invoke('start-relay', tabId); },
|
|
closeTab: function(tabId) { return ipcRenderer.invoke('close-tab', tabId); },
|
|
startBot: function(settings) { return ipcRenderer.invoke('start-bot', settings); },
|
|
stopBot: function() { return ipcRenderer.invoke('stop-bot'); },
|
|
onCreateBotTab: function(cb) { ipcRenderer.on('create-bot-tab', function(e, data) { cb(data); }); },
|
|
getCallCreatorCode: function(scriptFile) { return ipcRenderer.invoke('get-call-creator-code', scriptFile); },
|
|
onBotError: function(cb) { ipcRenderer.on('bot-error', function(e, msg) { cb(msg); }); }
|
|
});
|