Documentation
¶
Index ¶
- Constants
- func TorConstructor() (caddy.Destructor, error)
- type Config
- type Tor
- type TorProxy
- type TorResponse
- func (t *TorResponse) Body() []byte
- func (t *TorResponse) Header() http.Header
- func (t *TorResponse) Redirect() error
- func (t *TorResponse) ReplaceBody(scheme, to, host string) error
- func (t *TorResponse) Write(body []byte) (int, error)
- func (t *TorResponse) WriteBody() error
- func (t *TorResponse) WriteHeader(status int)
Constants ¶
View Source
const DefaultOnionServicePort = 4242
DefaultOnionServicePort is the port used to serve the onion service on
Variables ¶
This section is empty.
Functions ¶
func TorConstructor ¶ added in v0.3.0
func TorConstructor() (caddy.Destructor, error)
TorConstructor return a new instance of Tor client struct. Used to manage the Tor client's life cycle
Types ¶
type Tor ¶
type Tor struct { // Socks5 proxy port Host string Port int DataDir string Torrc string DebugMode bool LogFile string // contains filtered or unexported fields }
Tor instance config struct
func (*Tor) IsInstalled ¶ added in v0.3.0
IsInstalled checks the Tor client using the `tor --version` command
func (*Tor) SetDefaults ¶
func (t *Tor) SetDefaults()
SetDefaults sets the default values for prometheus config if the fields are empty
type TorProxy ¶
type TorProxy struct { Config Config // contains filtered or unexported fields }
func (TorProxy) CaddyModule ¶ added in v0.3.0
func (TorProxy) CaddyModule() caddy.ModuleInfo
CaddyModule returns the Caddy module information.
type TorResponse ¶
type TorResponse struct {
// contains filtered or unexported fields
}
func (*TorResponse) Body ¶
func (t *TorResponse) Body() []byte
Body returns response's body. This method should only get called after WriteBody()
func (*TorResponse) Header ¶
func (t *TorResponse) Header() http.Header
Header returns response headers
func (*TorResponse) Redirect ¶ added in v0.2.1
func (t *TorResponse) Redirect() error
Redirect redirects the request to the previous response's Location header.
func (*TorResponse) ReplaceBody ¶
func (t *TorResponse) ReplaceBody(scheme, to, host string) error
func (*TorResponse) WriteBody ¶
func (t *TorResponse) WriteBody() error
func (*TorResponse) WriteHeader ¶
func (t *TorResponse) WriteHeader(status int)
WriteHeader Writes the given status code to response
Click to show internal directories.
Click to hide internal directories.