Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultOnionServicePort = 4242
DefaultOnionServicePort is the port used to serve the onion service on
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Tor ¶
type Tor struct { // Socks5 proxy port Port int DataDir string Torrc string DebugMode bool LogFile string // contains filtered or unexported fields }
Tor instance config struct
func (*Tor) ParseTor ¶
func (t *Tor) ParseTor(c *caddy.Controller) error
ParseTor parses advanced config for Tor client
func (*Tor) SetDefaults ¶
func (t *Tor) SetDefaults()
SetDefaults sets the default values for prometheus config if the fields are empty
func (*Tor) Start ¶
func (t *Tor) Start(c *caddy.Controller)
type TorProxy ¶
type TorProxy struct { Next httpserver.Handler Config Config }
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) 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.