mozilla-vpn-client
mozilla-vpn-client copied to clipboard
Install socks proxy as a Windows service
Description
Time for some more wild experiments in the VPN extension's proxy. This time we try to make it autonomous as a windows service. For now, this just starts the service using a fixed port number (8123) but eventually we will probably want to make this dynamic (or use named pipes).
In this PR:
- Finally get around to testing named pipe support on Windows.
- Add firewall code to automatically install the split tunneling rules.
- Add a
WinSvcThread
class to handle the Windows service glue. - Generate a sensible logfile so that we can inspect what the service is doing.
- Add a new service in the Wix installer to start the proxy automatically.
Regarding named pipes, I think ultimately that would be the best way to run this service, since it allows us to perform verification of the client application. And in theory Firefox supports connecting to them as a SOCKS proxy. However, I cannot get it to work locally. I suspect that Firefox has some kind of sandboxing permissions around named pipe access which is preventing the extension from connecting to them. This is probably worthy of some future research into how we want to setup the security around the VPN extension.
Reference
i.e Jira or Github issue URL
Checklist
- [ ] My code follows the style guidelines for this project
- [ ] I have not added any packages that contain high risk or unknown licenses (GPL, LGPL, MPL, etc. consult with DevOps if in question)
- [ ] I have performed a self review of my own code
- [ ] I have commented my code PARTICULARLY in hard to understand areas
- [ ] I have added thorough tests where needed