Skip to content

anasrar/proxyport

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

proxyport

Simple reverse proxy for port on localhost:* and mapping to *.localhost.

Build

CGO_ENABLED=0 go build -o proxyport -trimpath -ldflags="-s -w -X 'main.Version=0.0.1'" cmd/proxyport/main.go

Usage

sudo proxyport -d foo -p 3000 -d bar -p 5000

Instead of access with http://localhost:3000, now you can access with http://foo.localhost. Same as http://bar.localhost it will map to http://localhost:5000.

Possible Improvements

  • Daemon mode.
  • PORT=$(proxyport domain foo) && echo "$PORT" to get random available port and assign to env $PORT.

Built With

About

Simple reverse proxy for port on localhost:* and mapping to *.localhost

Resources

License

Stars

Watchers

Forks

Contributors

Languages