From cc7539e195c3c8ff772527e0fc62a8faeb787508 Mon Sep 17 00:00:00 2001 From: varjolintu Date: Fri, 23 Jun 2017 14:34:57 +0300 Subject: [PATCH] Added experimental support for UDP port sending and updated README --- README.md | 11 +++++++++++ keepassxc-browser/background/keepass.js | 2 ++ keepassxc-browser/manifest.json | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 06ad9d0..0ff43a0 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,17 @@ For testing purposes, please use following unofficial KeePassXC [release's](http Get the extension for [Firefox](https://addons.mozilla.org/en-US/firefox/addon/keepassxc-browser/) or [Chrome/Chromium](https://chrome.google.com/webstore/detail/keepassxc-browser/iopaggbpplllidnfmcghoonnokmjoicf). +## How it works +There are two methods which you can use keepassxc-browser to connect to KeePassXC: + +1. keepassxc-browser communicates directly with KeePassXC via stdin/stdout. This method launches KeePassXC every time you start the browser and closes when you exit. +This can cause unsaved changes not to be saved. If you use this method it's important to enable `Automatically save after every change` from KeePassXC's preferences. + +2. keepassxc-browser communicated with KeePassXC through [keepassxc-proxy](https://github.com/varjolintu/keepassxc-proxy). The proxy handles listening stdin/stdout +and transfers these messages through a localhost UDP port 19700 (configurable) to KeePassXC. This means KeePassXC can be used and started normally without inteference from +Native Messaging API. keepassxc-browser starts only the proxy application and there's no risk of shutting down KeePassXC or losing any unsaved changes. keepassxc-proxy +is still under development. If you want, you are free to write your own proxy that handles the traffic. + ## Protocol Transmitting messages between KeePassXC and keepassxc-browser is totally rewritten. This is still under development. diff --git a/keepassxc-browser/background/keepass.js b/keepassxc-browser/background/keepass.js index 5ea2538..ebe1344 100644 --- a/keepassxc-browser/background/keepass.js +++ b/keepassxc-browser/background/keepass.js @@ -13,6 +13,7 @@ keepass.requiredKeePassXC = 214; keepass.nativeHostName = "com.varjolintu.keepassxc_browser"; keepass.nativePort = null; keepass.keySize = 24; +keepass.proxyPort = 19700; keepass.latestVersionUrl = "https://raw.githubusercontent.com/keepassxreboot/keepassxc/develop/CHANGELOG"; keepass.cacheTimeout = 30 * 1000; // milliseconds keepass.databaseHash = "no-hash"; //no-hash = KeePassXC is too old and does not return a hash value @@ -500,6 +501,7 @@ keepass.changePublicKeys = function(tab, callback) { var message = { "action": "change-public-keys", "publicKey": key, + "proxyPort": keepass.proxyPort, "nonce": nonce } diff --git a/keepassxc-browser/manifest.json b/keepassxc-browser/manifest.json index ba93f8c..9abb9d3 100644 --- a/keepassxc-browser/manifest.json +++ b/keepassxc-browser/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 2, "name": "keepassxc-browser", - "version": "0.1.10", + "version": "0.2.0", "description": "KeePassXC integration for modern web browsers", "author": "Sami Vänttinen", "icons": {