dsrp

command module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 8, 2022 License: Unlicense Imports: 6 Imported by: 0

README

DSRP

Dead Simple Reverse Proxy.

Usage

$ dsrp -h
Usage of dsrp:
  -crt string
        [REQ] certificate file
  -if string
        [OPT] the interface to listen on (default "127.0.0.1")
  -key string
        [REQ] key file
  -port uint
        [OPT] the port to listen on (default 443)
  -url string
        [REQ] the target url to forward requests to

dsrp -crt ./server.crt -key ./server.key -port 8443 -url http://localhost:9876

Create a self signed certificate

There are probably better ways, but it does the trick for a self hosted nextcloud deployment.

OUT="$(ip route | grep default | cut -d ' ' -f 3)"
PORT='443'
openssl req -x509 -newkey rsa:4096 -sha256 -days 3650 -nodes \
  -keyout server.key -out server.crt -subj "/CN=$OUT:$PORT" \
  -addext "subjectAltName=DNS:$OUT,DNS:localhost,IP:127.0.0.1"

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL