Skip to content

z0rr0/ogo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ogo

Simple HTTP file server in Go with OpenBSD security features (pledge/unveil).

Note: This is a development/learning project, not intended for production use.

Build

go build -o ogo

# build for Raspberry PI OpenBSD with security features
GOOS=openbsd GOARCH=arm64 go build -o ogo

Usage

./ogo -d <directory> [-a <address>] [-t <timeout>] [-v]

Flags

Flag Default Description
-d . Directory to serve
-a :8080 Listen address
-t 5s Shutdown timeout
-v false Debug logging

Example

./ogo -d /var/www -a :8080 -t 10s -v

Linter

golangci-lint -c golangci.yml run
gosec ./...
govulncheck ./...
staticcheck ./...

OpenBSD Security

On OpenBSD, uses pledge (stdio, rpath, inet, dns) and unveil (read-only access to served directory).

License

See LICENSE file.

About

Simple file server for OpenBSD written on Go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors