httpd

package
v0.20.1 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: GPL-3.0 Imports: 33 Imported by: 0

Documentation

Overview

Package httpd implements the tor network service.

Index

Constants

This section is empty.

Variables

View Source
var ErrServiceClosed = errors.New("httpd: Service closed")

ErrServiceClosed is returned by the Service's Serve method after a call to Shutdown.

Functions

This section is empty.

Types

type Httpd added in v0.19.0

type Httpd struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Httpd represents a http server in the application.

func New

func New(ctx context.Context, opts service.Options) (*Httpd, error)

New a Httpd struct.

func (*Httpd) Serve added in v0.19.0

func (h *Httpd) Serve() error

Serve accepts incoming HTTP requests over Tor network, or open a local port for proxy server by "WAYBACK_ONION_LOCAL_PORT" env. Use "WAYBACK_ONION_PRIVKEY" to keep the Tor hidden service hostname.

Serve always returns an error.

func (*Httpd) Shutdown added in v0.19.0

func (h *Httpd) Shutdown() error

Shutdown shuts down the httpd server

Jump to

Keyboard shortcuts

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