tbserve

package
v0.0.0-...-943de35 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2022 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateReplaceString

func GenerateReplaceString(urlparts []string) string

GenerateReplaceString generates the string to replace in the JSON file.

Types

type Client

type Client struct {
	TBD      *tbget.TBDownloader
	TBS      *TBSupervise.Supervisor
	Onion    *i2pdotonion.I2POnionService
	DarkMode bool
	Host     string
	Port     int
	// contains filtered or unexported fields
}

Client manages and supervises a Tor Browser instance.

func NewClient

func NewClient(verbose bool, lang, OS, arch, mirror string, content *embed.FS, nounpack bool) (*Client, error)

NewClient creates a new Client.

func NewFirefoxClient

func NewFirefoxClient(verbose bool, lang, os, arch, mirror string, content *embed.FS) (*Client, error)

NewFirefoxClient creates a new Client.

func (*Client) GenerateMirrorJSON

func (m *Client) GenerateMirrorJSON() (string, error)

GenerateMirrorJSON generates the JSON file for the mirror.

func (*Client) GetAddress

func (m *Client) GetAddress() string

GetAddress returns the address of the client.

func (*Client) GetHost

func (m *Client) GetHost() string

GetHost returns the hostname of the client.

func (*Client) GetPort

func (m *Client) GetPort() string

GetPort returns the port of the client.

func (*Client) Hostname

func (m *Client) Hostname() string

Hostname Returns the hostname of the client, if it has one.

func (*Client) Page

func (m *Client) Page() (string, error)

Page generates the HTML for the panel.

func (*Client) PageHTML

func (m *Client) PageHTML() []byte

PageHTML returns the HTML for the page heading

func (*Client) Serve

func (m *Client) Serve() error

Serve serve the control panel locally

func (*Client) ServeHTTP

func (m *Client) ServeHTTP(rw http.ResponseWriter, rq *http.Request)

ServeHTTP handles HTTP requests.

func (*Client) Shutdown

func (m *Client) Shutdown(ctx context.Context) error

func (*Client) TorOffStatusHTML

func (m *Client) TorOffStatusHTML(ours bool) []byte

TorOffStatusHTML returns the HTML for "Tor Status" section the page

func (*Client) TorOnStatusHTML

func (m *Client) TorOnStatusHTML(ours bool) []byte

TorOnStatusHTML returns the HTML for "Tor Status" section the page

Jump to

Keyboard shortcuts

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