natto

package module
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: BSD-2-Clause Imports: 5 Imported by: 0

README

natto

austere gemini/spartan server for openbsd (might work on other platforms...?)

  • inetd-based
  • tls handled by relayd
  • does unveil/pledge on openbsd
  • spartan support 💪

setup

relayd.conf will need something like this:

protocol "gemini" {
  tls keypair gemini
}
protocol "spartan"

relay "gemini" {
  listen on 0.0.0.0 port 1965 tls
  protocol gemini
  forward to ::1 port 1965
}

relay "spartan" {
  listen on 0.0.0.0 port 300
  protocol spartan
  forward to ::1 port 300
}

and inetd.conf:

[::1]:gemini stream tcp6 nowait gemini /usr/local/bin/natto natto
[::1]:spartan stream tcp6 nowait gemini /usr/local/bin/natto natto -s

you might have to define the gemini service in /etc/services:

gemini 1965/tcp
spartan 300/tcp

karashi

standalone gemini server. handles tls.

negi

standalone spartan and gemini server. doesn't handle tls.

Documentation

Index

Constants

View Source
const Version = "0.1.5"

Variables

View Source
var Types = map[string]string{
	".cgi":  "application/cgi",
	".gmi":  "text/gemini",
	".txt":  "text/plain",
	".jpg":  "image/jpeg",
	".png":  "image/png",
	".jxl":  "image/jxl",
	".webp": "image/webp",
	".mp3":  "audio/mpeg",
	".m4a":  "audio/mp4",
	".mp4":  "video/mp4",
}

Functions

func Cgi added in v0.1.2

func Cgi(w io.Writer, path string, protocol string) error

func Mime added in v0.1.2

func Mime(path string) string

Types

type Capsule

type Capsule interface {
	Handle(string, io.Writer) error
}

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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