natto

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2025 License: BSD-2-Clause Imports: 5 Imported by: 0

README

natto

austere gemini/spartan tools 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]:1965 stream tcp6 nowait gemini /usr/local/bin/natto natto
[::1]:300 stream tcp6 nowait gemini /usr/local/bin/natto natto -s

karashi

standalone gemini server. handles tls.

negi

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

okra

very simple gemini client, mostly for testing purposes

Documentation

Index

Constants

View Source
const Version = "0.2.0"

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