diff --git a/KeePassHttp.plgx b/KeePassHttp.plgx index 65d1352..d59ef36 100644 Binary files a/KeePassHttp.plgx and b/KeePassHttp.plgx differ diff --git a/KeePassHttp/KeePassHttp.cs b/KeePassHttp/KeePassHttp.cs index 832c582..62950cf 100644 --- a/KeePassHttp/KeePassHttp.cs +++ b/KeePassHttp/KeePassHttp.cs @@ -4,7 +4,6 @@ using System.Linq; using System.Text; using System.Threading; -using System.Net; using System.Windows.Forms; using System.Runtime.Remoting.Metadata.W3cXsd2001; using System.Security.Cryptography; @@ -20,6 +19,10 @@ using KeePassLib.Serialization; using System.Resources; +// use mono's implementation of HttpListener to avoid dependency on httpapi.dll +using Mono.Net; +using HttpStatusCode = System.Net.HttpStatusCode; + namespace KeePassHttp { internal delegate void RequestHandler(Request request, Response response, Aes aes); diff --git a/KeePassHttp/KeePassHttp.csproj b/KeePassHttp/KeePassHttp.csproj index a8ae19a..6a89cdc 100644 --- a/KeePassHttp/KeePassHttp.csproj +++ b/KeePassHttp/KeePassHttp.csproj @@ -39,6 +39,12 @@ .\Newtonsoft.Json.dll + + .\Mono.Net.HttpListener.dll + + + .\Mono.Security.dll + diff --git a/README.md b/README.md index ea9b1ea..07461fe 100644 --- a/README.md +++ b/README.md @@ -41,15 +41,20 @@ This plugin is primarily intended for use with [PassIFox for Mozilla Firefox](ht ### KeePassHttp on Linux and Mac -KeePass needs Mono. You can find detailed [installation instructions on the official page of KeePass](http://keepass.info/help/v2/setup.html#mono). +KeePass can run with Mono. You can find detailed [installation instructions on the official page of KeePass](http://keepass.info/help/v2/setup.html#mono). Perry has tested KeePassHttp with Mono 2.6.7 and it appears to work well. With Mono 2.6.7 and a version of KeePass lower than 2.20 he could not get the plgx file to work on linux. -If the plgx file does also not work for you, you can try the two DLL files KeePassHttp.dll and Newtonsoft.Json.dll from directory [mono](https://github.com/pfn/keepasshttp/tree/master/mono) which should work for you. +If the plgx file does also not work for you, you can try the DLL files KeePassHttp.dll, Mono.Net.HttpListener.dll, Mono.Security.dll, and Newtonsoft.Json.dll from directory [mono](mono) which should work for you. With newer versions of Mono and KeePass it seems that the plgx file works pretty fine. More information about it are contained in the following experience report. +KeePass and KeePassHttp can also run with [Wine](https://appdb.winehq.org/objectManager.php?sClass=version&iId=19899&iTestingId=76353). +On Mac, the experience with Wine may be much smoother than with Mono. You'll need to apply +[winetricks](https://wiki.winehq.org/Winetricks) `dotnet40` before installing KeePass with Wine. Tested on Mac with +[WineBottler](http://winebottler.kronenberg.org/) 1.8-rc4. + #### Experience report by dunkelfuerst Just wanted to let you know, I'm running Fedora 18, which currently uses mono v2.10.8: @@ -188,7 +193,9 @@ If a new client has to connect to KeePassHttp, the encryption key is generated a If you want to develop new features or improve existing ones here is a way to build it at your own: -1. copy the file [Newtonsoft.Json.dll](http://json.codeplex.com/releases/) into the sourcecode folder +1. copy dependencies into the sourcecode folder + * [Newtonsoft.Json.dll](http://json.codeplex.com/releases/) + * [Mono.Net.HttpListener.dll & Mono.Security.dll](https://www.nuget.org/packages/Mono.Net.HttpListener/). Download and unzip the nupkg file and the DLLs are under `lib\net40`. 2. delete the directory "bin" from sourcecode 3. delete the directory "obj" from sourcecode 4. delete the file "KeePassHttp.dll" diff --git a/mono/KeePassHttp.dll b/mono/KeePassHttp.dll index 45a84b6..07f88df 100644 Binary files a/mono/KeePassHttp.dll and b/mono/KeePassHttp.dll differ