From 759507e444f2ae2b6eaf12e1ee03721e2744ec6c Mon Sep 17 00:00:00 2001 From: varjolintu Date: Mon, 12 Mar 2018 10:50:16 +0200 Subject: [PATCH] Updated named pipe path --- README.md | 7 ++++--- src/proxy_socket.rs | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 76a57e6..e477331 100644 --- a/README.md +++ b/README.md @@ -4,11 +4,12 @@ Application that works as a proxy between Native Messaging browser extension and This is still under development. Installing the proxy needs manual changes to JSON scripts installed for Native Messaging. See [this page](https://developer.chrome.com/extensions/nativeMessaging) for further information. -keepassxc-proxy listens stdin from keepassxc-browser extension and transfers the data to Unix domain socket `/tmp/kpxc_server` which KeePassXC listens. +keepassxc-proxy listens stdin from keepassxc-browser extension and transfers the data to Unix domain socket `XDG_RUNTIME_DIR` or `/tmp/kpxc_server` which KeePassXC listens. +With Windows this is a named pipe under `keepassxc\\kpxc_server`. ``` -Copyright (C) 2017 Sami Vänttinen -Copyright (C) 2017 Andy Brandt +Copyright (C) 2017-2018 Sami Vänttinen +Copyright (C) 2017-2018 Andy Brandt This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/proxy_socket.rs b/src/proxy_socket.rs index 50c2ed4..40f11ef 100644 --- a/src/proxy_socket.rs +++ b/src/proxy_socket.rs @@ -29,8 +29,8 @@ impl Write for ProxySocket { #[cfg(windows)] pub fn connect() -> io::Result> { - let temp_path = env::var("TEMP").unwrap(); - let pipe_name = format!("\\\\.\\pipe\\{}\\kpxc_server", temp_path); + let username = env::var("USERNAME").unwrap(); + let pipe_name = format!("\\\\.\\pipe\\keepassxc\\{}\\kpxc_server", username); let client = PipeClient::connect(pipe_name)?; Ok(ProxySocket { inner: client }) }