mirror of
https://github.com/nxshock/gonx.git
synced 2024-11-27 17:11:01 +05:00
Simple reverse proxy server
.gitattributes | ||
.gitignore | ||
config.go | ||
consts.go | ||
go.mod | ||
go.sum | ||
gonx.conf | ||
gonx.service | ||
LICENSE | ||
listener.go | ||
main.go | ||
mapping.go | ||
PKGBUILD | ||
README.md |
gonx
Simple reverse proxy server.
Features:
- Simple TCP redirection
- Simple static file server
Usage
-
Install package
-
Edit config in
/etc/gonx.conf
-
Start application with systemd:
systemctl start gonx.service
Config example
LogLevel = "DEBUG" # Log level (DEBUG, INFO, WARN, ERROR)
TlsKeysDir = "/etc/letsencrypt/live" # Path to TLS-certificates generated by Certbot
TlsListenAddr = ":443" # TLS listen address
HttpListenAddr = ":80" # HTTP listen address
AcmeChallengePath = "/var/lib/letsencrypt" # Path for ACME challenge files
# Map of hostname -> redirect URL
[TLS]
"git.host.com" = "tcp://127.0.0.1:8001" # TCP redirect
"www.host.com" = "file:///srv/http" # simple static file server from `/srv/http`