Skip to content

A proxy for simple local development that can route paths to different remote targets

License

Notifications You must be signed in to change notification settings

seanpfeifer/devproxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

devproxy

A reverse proxy for simple local development that can route paths to different remote targets.

This can be useful in cases where you are developing a webapp that needs to make requests to an API that should look like it's on the same host.

Warning

This is intended for local development only. It should not be used in production.

Installation

go install github.com/seanpfeifer/devproxy@latest

Usage

# Set up the reverse proxy to listen on port 9090 (8080 default)
# Proxy /api/* to the local server on port 9191
# Proxy all other paths to the local server on port 9595
devproxy -port 9090 -proxy /api/->http://0.0.0.0:9191 -proxy /->http://0.0.0.0:9595

Options

Option Description Default
-port The port to listen on 8080
-tls Whether to generate a self-signed certificate for TLS false (no HTTPS)
-proxy A proxy rule in the form of /path/to/thing->target

Note

Using a self-signed certificate for HTTPS connections will cause your browser to show a warning. The connection is still encrypted, but the browser cannot verify the identity of the server.

Potential Future Features

  • Support for HTTPS via generating a self-signed cert
  • Loading config from a file

About

A proxy for simple local development that can route paths to different remote targets

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages