Documentation ¶
Index ¶
- func GenerateReplaceString(urlparts []string) string
- type Client
- func (m *Client) GenerateMirrorJSON() (string, error)
- func (m *Client) GetAddress() string
- func (m *Client) GetHost() string
- func (m *Client) GetPort() string
- func (m *Client) Hostname() string
- func (m *Client) Page() (string, error)
- func (m *Client) PageHTML() []byte
- func (m *Client) Serve() error
- func (m *Client) ServeHTTP(rw http.ResponseWriter, rq *http.Request)
- func (m *Client) Shutdown(ctx context.Context) error
- func (m *Client) TorOffStatusHTML(ours bool) []byte
- func (m *Client) TorOnStatusHTML(ours bool) []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateReplaceString ¶
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 ¶
GenerateMirrorJSON generates the JSON file for the mirror.
func (*Client) GetAddress ¶
GetAddress returns the address of the client.
func (*Client) ServeHTTP ¶
func (m *Client) ServeHTTP(rw http.ResponseWriter, rq *http.Request)
ServeHTTP handles HTTP requests.
func (*Client) TorOffStatusHTML ¶
TorOffStatusHTML returns the HTML for "Tor Status" section the page
func (*Client) TorOnStatusHTML ¶
TorOnStatusHTML returns the HTML for "Tor Status" section the page
Click to show internal directories.
Click to hide internal directories.