1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-22 11:13:46 +00:00

*Wip* Run proxy app through electron

This commit is contained in:
Hinton
2020-11-23 18:37:04 +01:00
parent 4f466fba43
commit efb7cc98ae
7 changed files with 21 additions and 98 deletions

View File

@@ -0,0 +1,23 @@
import NativeMessage from './nativemessage';
import IPC from './ipc';
// Proxy is a lightweight application which provides bi-directional communication
// between the browser extension and a running desktop application.
//
// Browser extension <-[native messaging]-> proxy <-[ipc]-> desktop
export class NativeMessagingProxy {
private ipc: IPC;
private nativeMessage: NativeMessage;
constructor() {
this.ipc = new IPC();
this.nativeMessage = new NativeMessage(this.ipc);
}
run() {
this.ipc.connect();
this.nativeMessage.listen();
this.ipc.onMessage = this.nativeMessage.send;
}
}