From e639fa667467825d58003ccbb0b2812d8289cd05 Mon Sep 17 00:00:00 2001 From: Hinton Date: Fri, 18 Dec 2020 15:47:48 +0100 Subject: [PATCH] Make fingerprint validation optional, update readme with debug info for native messaging --- README.md | 12 ++++++++ src/app/accounts/settings.component.html | 10 ++++++ src/app/accounts/settings.component.ts | 11 +++++++ src/app/services.module.ts | 2 +- src/locales/en/messages.json | 6 ++++ src/main/nativeMessaging.main.ts | 15 +++++---- src/services/nativeMessaging.service.ts | 39 ++++++++++++++---------- 7 files changed, 72 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index bc305b47..a4976a6a 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,18 @@ npm install npm run electron ``` +**Debug Native Messaging** + +Native Messaging (communication with the browser extension) works by having the browser start a lightweight proxy application baked into our desktop binary. To setup an environment which allows +for easy debugging you will need to build the application for distribution, i.e. `npm run dist:`, start the dist version and enable desktop integration. This will write some manifests +to disk, Consult the [native manifests](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Native_manifests#Manifest_location) documentation for more details of the manigest +format, and the exact locations for the different platforms. *Note* that disabling the desktop integration will delete the manifests, and the files will need to be updated again. + +The generated manifests are pre-configured with the production ID for the browser extensions. In order to use them with the development builds, the browser extension ID of the development build +needs to be added to the `allowed_extensions` section of the manifest. These IDs are generated by the browser, and can be found in the extension settings within the browser. + +It will then be possible to run the desktop application as usual using `npm run electron` and communicate with the browser. + # Contribute Code contributions are welcome! Please commit any pull requests against the `master` branch. Learn more about how to contribute by reading the [`CONTRIBUTING.md`](CONTRIBUTING.md) file. diff --git a/src/app/accounts/settings.component.html b/src/app/accounts/settings.component.html index e7c9965e..a223f7c4 100644 --- a/src/app/accounts/settings.component.html +++ b/src/app/accounts/settings.component.html @@ -98,6 +98,16 @@ {{'enableBrowserIntegrationDesc' | i18n}} +
+
+ +
+ {{'enableBrowserIntegrationFingerprintDesc' | i18n}} +