Simple HTTP file server in Go with OpenBSD security features (pledge/unveil).
Note: This is a development/learning project, not intended for production use.
go build -o ogo
# build for Raspberry PI OpenBSD with security features
GOOS=openbsd GOARCH=arm64 go build -o ogo./ogo -d <directory> [-a <address>] [-t <timeout>] [-v]| Flag | Default | Description |
|---|---|---|
-d |
. |
Directory to serve |
-a |
:8080 |
Listen address |
-t |
5s |
Shutdown timeout |
-v |
false |
Debug logging |
./ogo -d /var/www -a :8080 -t 10s -vgolangci-lint -c golangci.yml run
gosec ./...
govulncheck ./...
staticcheck ./...On OpenBSD, uses pledge (stdio, rpath, inet, dns) and unveil (read-only access to served directory).
See LICENSE file.