Documentation
¶
Overview ¶
Package http implements a BitTorrent frontend via the HTTP protocol as described in BEP 3 and BEP 23.
Index ¶
Constants ¶
View Source
const ( // DefaultAnnounceRoute is the default url path to listen announce // requests if nothing else provided DefaultAnnounceRoute = "/announce" // DefaultScrapeRoute is the default url path to listen scrape // requests if nothing else provided DefaultScrapeRoute = "/scrape" )
View Source
const Name = "http"
Name - registered name of the frontend
Variables ¶
This section is empty.
Functions ¶
func NewFrontend ¶
NewFrontend builds and starts http bittorrent frontend from provided configuration
Types ¶
type Config ¶
type Config struct { frontend.ListenOptions ReadTimeout time.Duration `cfg:"read_timeout"` WriteTimeout time.Duration `cfg:"write_timeout"` IdleTimeout time.Duration `cfg:"idle_timeout"` EnableKeepAlive bool `cfg:"enable_keepalive"` UseTLS bool `cfg:"tls"` TLSCertPath string `cfg:"tls_cert_path"` TLSKeyPath string `cfg:"tls_key_path"` AnnounceRoutes []string `cfg:"announce_routes"` ScrapeRoutes []string `cfg:"scrape_routes"` PingRoutes []string `cfg:"ping_routes"` ParseOptions }
Config represents all configurable options for an HTTP BitTorrent Frontend
type ParseOptions ¶
type ParseOptions struct { frontend.ParseOptions RealIPHeader string `cfg:"real_ip_header"` }
ParseOptions is the configuration used to parse an Announce Request.
If AllowIPSpoofing is true, IPs provided via BitTorrent params will be used. If RealIPHeader is not empty string, the value of the first HTTP Header with that name will be used.
Click to show internal directories.
Click to hide internal directories.