lodev is a simple reverse proxy server for local development with SSL termination.
Obsoletes using ngrok or manually configuring combination of mkcert, dnsmasq and nginx/caddy. It provides HTTPS endpoint under https://*.dev.lo
or https://{COMPUTER_NAME}.local
and by default proxies all requests to http://127.0.0.1:3000
.
It uses locert to generate and install locally trusted SSL certs and lodns for DNS name resolution.
As described in locert docs, to enable support for custom CA in Firefox on Windows and MacOS per official document inside about:config
set security.enterprise_roots.enabled
to true
.
Note: current implementaion doesn't work with Firefox on Linux, implementation planned in the future.
With flag --local
it will generate certificate that is valid for {COMPUTER_NAME}.local
domain. Using .local it enables for local mDNS server to resolves hostname to all other devices inside local network.
Using your mobile access http://{COMPUTER_NAME}.local/ca
to download CA certificate and install it.
Follow these manuals to install it on your iOS or Android device.
Download correct binary from the latest release and place it somewhere in the PATH.
Or pipe the install script to bash
curl -sSfL https://raw.githubusercontent.com/vandot/lodev/main/install.sh | bash
Or build it locally
nimble install lodev
lodev comes preconfigured for all supported platforms to act as a HTTPS reverse proxy server behind *.dev.lo
or {COMPUTER_NAME}.local
domain.
On MacOS and Linux it will ask for sudo password
lodev install
On Windows run inside elevated command prompt or Powershell
lodev.exe install
On MacOS and Linux it will ask for sudo password
lodev install --local
On Windows run inside elevated command prompt or Powershell
lodev.exe install --local
Service will bind to a well-known port 443
. By default service will proxy all requests to 127.0.0.1:3000
. You can specify different destination port using -p=8000
.
On Linux add CAP_NET_BIND_SERVICE capability to the lodev binary to able to bind port 443 as a non-root user.
sudo setcap cap_net_bind_service=+eip lodev
On MacOS and Linux
lodev start
On Windows inside elevated command prompt or Powershell
lodev.exe start
On MacOS and Linux
lodev start --local
On Windows inside elevated command prompt or Powershell
lodev.exe start --local
On MacOS and Linux run
lodev uninstall [--local]
On Windows run inside elevated command prompt or Powershell
lodev.exe uninstall [--local]
and remove the binary.
BSD 3-Clause License