A quick and dirty Windows Service to start and stop network services on-demand.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Adam Pippin d1cbec25cb Add README 4 months ago
KnockKnock.CLI Add project files. 4 months ago
KnockKnock.Lib Add project files. 4 months ago
KnockKnock.Service Add project files. 4 months ago
.gitattributes Add .gitignore and .gitattributes. 4 months ago
.gitignore Add .gitignore and .gitattributes. 4 months ago
KnockKnock.sln Add project files. 4 months ago
README.md Add README 4 months ago

README.md

KnockKnock

A Windows Service for providing services on-demand.

Overview

KnockKnock acts as a TCP proxy, accepting connections and then forwarding all traffic between a client and upstream. It allows you to register commands to run when the service is idle (no open connections) and active (incoming connection(s)).

For example, when forwarding connections to a Hyper-V VM, you could suspend the VM when there are no active connections, and resume it whenever a user attempts to connect.

(Personally, this is how I use it--allowing my development VM to be suspended automatically when I am not connected to it through RDP.)

TODO / Limitations

This is basically the minimum viable app that solves my own problem. I slapped it together in less than an hour.

Configuration is hardcoded: it only forwards :1234 -> 10.200.0.10:3306; it always runs SuspendVM and ResumeVM against the Debian Hyper-V machine. The socket code is kind of janky and some activity patterns will make it explode.

It works for me to proxy a Microsoft Remote Desktop Connection session through to a Hyper-V VM available on-demand.

License

None. Do not redistribute.