Skip to content
/ lodev Public

Simple SSL enabled reverse proxy server for local development

License

Notifications You must be signed in to change notification settings

vandot/lodev

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lodev

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.

local mode

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.

Installation

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

Configuration

lodev comes preconfigured for all supported platforms to act as a HTTPS reverse proxy server behind *.dev.lo or {COMPUTER_NAME}.local domain.

*.dev.lo

On MacOS and Linux it will ask for sudo password

lodev install

On Windows run inside elevated command prompt or Powershell

lodev.exe install

{COMPUTER_NAME}.local

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

Start

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

*.dev.lo

On MacOS and Linux

lodev start

On Windows inside elevated command prompt or Powershell

lodev.exe start

{COMPUTER_NAME}.local

On MacOS and Linux

lodev start --local

On Windows inside elevated command prompt or Powershell

lodev.exe start --local

Uninstallation

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.

License

BSD 3-Clause License

About

Simple SSL enabled reverse proxy server for local development

Resources

License

Stars

Watchers

Forks