Documentation
¶
Index ¶
- Variables
- func DoRequest(client *http.Client, method, url string, body io.Reader) (*http.Response, error)
- func Get(url string) (*http.Response, error)
- func NewClient() (*http.Client, error)
- func NewRequest(method, url string, body io.Reader) (*http.Request, error)
- func Post(url string, body io.Reader) (*http.Response, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // TorBrowserBundleProxyURL is the URL to the local SOCKS5 proxy // started by the Tor Browser Bundle. Set 'ProxyURL' to this if // you're using the have Tor _installed_ on your machine. TorBrowserBundleProxyURL = "socks5://127.0.0.1:9150" // TorServiceProxyURL is the URL to the local SOCKS5 proxy started // by the Tor service/daemon. Set 'ProxyURL' to this if you have // Tor _installed_ on your machine. TorServiceProxyURL = "socks5://127.0.0.1:9050" // ProxyURL is the URL of the local SOCKS5 proxy used to make // requests over Tor. Defaults to TorBrowserBundleProxyURL. // // Local proxy port used to make requests over Tor can be set with // TOR_PORT environment variable (in which case ProxyURL gets set // to "127.0.0.1:${TOR_PORT}"). ProxyURL = TorBrowserBundleProxyURL )
Functions ¶
func DoRequest ¶
DoRequest performs the given request through Tor, using socks5://127.0.0.1:9150 (change ProxyURL to use different proxy). If client is nil, a client is created (with NewClient).
func NewRequest ¶
NewRequest creates a *http.Request with the User-Agent set to what Tor Browser uses.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.