sitenet

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: MIT Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package sitenet is the network path Pulse uses to reach indexer sites: searches, .torrent downloads and connection tests. When a proxy is set (e.g. a VPN container's HTTP proxy), site traffic goes through it and never falls back to a direct connection if the proxy is down. Local addresses (Docker service names, LAN and loopback IPs) always connect directly, so self-hosted Torznab endpoints keep working.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Client

func Client(timeout time.Duration) *http.Client

Client returns an HTTP client for indexer sites with the given timeout (0 means none; rely on the request context).

func IsLocalHost

func IsLocalHost(host string) bool

IsLocalHost reports whether host is on this machine or the local network: a single-label name (a Docker service such as "jackett"), *.local / *.lan / *.internal / localhost, or a loopback, private or link-local IP.

func IsProxyError

func IsProxyError(err error) bool

IsProxyError reports whether err came from failing to reach the proxy.

func Proxy

func Proxy() *url.URL

Proxy reports the configured proxy, or nil.

func SetProxy

func SetProxy(raw string) error

SetProxy routes site traffic through raw (http://host:port). Empty clears it, restoring direct connections (and the standard proxy env vars).

func Transport

func Transport() http.RoundTripper

Transport returns the round tripper for requests to indexer sites.

Types

This section is empty.

Jump to

Keyboard shortcuts

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