Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swithc to a managed implementation of HttpListener #289

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified KeePassHttp.plgx
Binary file not shown.
5 changes: 4 additions & 1 deletion KeePassHttp/KeePassHttp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down
6 changes: 6 additions & 0 deletions KeePassHttp/KeePassHttp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@
<Reference Include="Newtonsoft.Json">
<HintPath>.\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="Mono.Net.HttpListener">
<HintPath>.\Mono.Net.HttpListener.dll</HintPath>
</Reference>
<Reference Include="Mono.Security">
<HintPath>.\Mono.Security.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
Expand Down
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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"
Expand Down
Binary file modified mono/KeePassHttp.dll
Binary file not shown.