mirror of
https://github.com/nxshock/gonx.git
synced 2026-12-03 23:19:33 +05:00
Simple reverse proxy server
- Go 93.3%
- HTML 4%
- Shell 1.5%
- Uno 1.2%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .gitattributes | ||
| .gitignore | ||
| app.go | ||
| config.go | ||
| consts.go | ||
| defaultErrorPage.html | ||
| fileserver.go | ||
| go.mod | ||
| go.sum | ||
| gonx.service | ||
| gonx.uno | ||
| handlers.go | ||
| LICENSE | ||
| listener.go | ||
| main.go | ||
| mapping.go | ||
| PKGBUILD | ||
| README.md | ||
| responsewriter.go | ||
| sniff.go | ||
gonx
Simple reverse proxy server.
Features:
- Simple TCP redirection
- Simple static file server
Usage
-
Install package
-
Edit config in
/etc/gonx.uno -
Start application with systemd:
systemctl start gonx.service
Config example
Config stored in UNO format
// Log level (DEBUG, INFO, WARN, ERROR)
LogLevel: DEBUG
// Path to TLS-certificates generated by Certbot
TlsKeysDir: /etc/letsencrypt/live
// TLS listen address
TlsListenAddr: :443
// HTTP listen address
HttpListenAddr: :80
// Path for ACME challenge files
AcmeChallengePath: /var/lib/letsencrypt
// Map of hostname -> redirect URL
TLS:
// TCP redirect
. git.host.com: tcp://127.0.0.1:8001
// serve unix socket
. unix.host.com: unix:///var/lib/app/app.socket"
// simple static file server from `/srv/http`
. www.host.com: file:///srv/http"