Updated named pipe path

This commit is contained in:
varjolintu
2018-03-12 10:50:16 +02:00
parent 4bc5d09832
commit 759507e444
2 changed files with 6 additions and 5 deletions
+4 -3
View File
@@ -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. 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. 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\<username>\kpxc_server`.
``` ```
Copyright (C) 2017 Sami Vänttinen <sami.vanttinen@protonmail.com> Copyright (C) 2017-2018 Sami Vänttinen <sami.vanttinen@protonmail.com>
Copyright (C) 2017 Andy Brandt <andy@brandt.tech> Copyright (C) 2017-2018 Andy Brandt <andy@brandt.tech>
This program is free software: you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
+2 -2
View File
@@ -29,8 +29,8 @@ impl<W: Write> Write for ProxySocket<W> {
#[cfg(windows)] #[cfg(windows)]
pub fn connect() -> io::Result<ProxySocket<PipeClient>> { pub fn connect() -> io::Result<ProxySocket<PipeClient>> {
let temp_path = env::var("TEMP").unwrap(); let username = env::var("USERNAME").unwrap();
let pipe_name = format!("\\\\.\\pipe\\{}\\kpxc_server", temp_path); let pipe_name = format!("\\\\.\\pipe\\keepassxc\\{}\\kpxc_server", username);
let client = PipeClient::connect(pipe_name)?; let client = PipeClient::connect(pipe_name)?;
Ok(ProxySocket { inner: client }) Ok(ProxySocket { inner: client })
} }