This page permanently redirects to gemini://code.pfad.fr/pages/.

pages package - code.pfad.fr/pages

import "code.pfad.fr/pages"

Functions

func ComputeHash

func ComputeHash(cleartext string) ([]byte, error)

func CustomizedNotFoundFile

func CustomizedNotFoundFile(fsys fs.FS, notFoundName string) http.Handler

CustomizedNotFoundFile check if a {name}.redirect file is present and redirects there.

func HashChecker

func HashChecker(hash string) (func(cleartext string) error, error)

func HideDirWithoutIndex

func HideDirWithoutIndex(fs fs.FS, indexName string) fs.FS

indexName is usually "index.html"

func HijackNotFoundResponse

func HijackNotFoundResponse(w http.ResponseWriter, notFoundResponse func(w http.ResponseWriter)) http.ResponseWriter

func NewRequestCounter

func NewRequestCounter(pushURL string, hosts []string) (func(proto string, ipv int, host string), error)

func RedirectHandler

func RedirectHandler(newHost string) http.Handler

func ServerHeader

func ServerHeader() string

func ToPunyCode

func ToPunyCode(hostname string) (string, error)

Types

type Server

type Server struct {
	GetCertificate func(*tls.ClientHelloInfo) (*tls.Certificate, error)
	CountRequest   func(proto string, ipv int, host string)

	HttpHandlers   map[string]http.Handler   // the keys must be punycode encoded, see [ToPunyCode]
	GeminiHandlers map[string]gemini.Handler // the keys must be punycode encoded, see [ToPunyCode]
}

func (*Server) Serve

func (s *Server) Serve(httpLn net.Listener, geminiLn net.Listener, http3Conn net.PacketConn)

Files

=> auth.go | fs.go | metrics.go | not_found.go | redirect.go | server.go

Directories

=> cmd/http-redirect | cmd/http3get6 | cmd/keygen | cmd/map64 | cmd/pages | packetconn

Forge

=> https://codeberg.org/pfad.fr/pages

git clone

https://codeberg.org/pfad.fr/pages.git
git@codeberg.org:pfad.fr/pages.git
Proxy Information
Original URL
gemini://code.pfad.fr/pages
Status Code
Success (20)
Meta
text/gemini; charset=utf-8
Capsule Response Time
333.688529 milliseconds
Gemini-to-HTML Time
0.944362 milliseconds

This content has been proxied by September (ba2dc).