httpclient

package
v0.66.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2026 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

Package httpclient provides a centralized HTTP client configuration for pipeleek. It offers a retryable HTTP client with cookie support, custom headers, proxy configuration, TLS settings, and SOCKS proxy support.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPipeleekHTTPClient

func GetPipeleekHTTPClient(cookieUrl string, cookies []*http.Cookie, defaultHeaders map[string]string) *resty.Client

GetPipeleekHTTPClient creates a Resty HTTP client applying the global TLS, proxy, retry, and timeout settings.

func GetPipeleekStandardHTTPClient added in v0.66.0

func GetPipeleekStandardHTTPClient() *http.Client

GetPipeleekStandardHTTPClient creates a standard-library HTTP client with Pipeleek's transport settings.

func GetPipeleekTransport added in v0.66.0

func GetPipeleekTransport() *http.Transport

GetPipeleekTransport returns a configured *http.Transport using the current global client options (TLS, proxy, SOCKS). Use this to inject Pipeleek's transport settings into third-party HTTP client libraries (e.g. Resty, go-github) that manage their own request lifecycle but should still share the same network configuration.

func SetHTTPTimeout added in v0.66.0

func SetHTTPTimeout(d time.Duration)

SetHTTPTimeout sets the per-request timeout applied to all Pipeleek-managed HTTP clients. A zero value (the default) means no timeout.

func SetIgnoreProxy added in v0.48.0

func SetIgnoreProxy(ignore bool)

func SetInsecureSkipVerify added in v0.66.0

func SetInsecureSkipVerify(skip bool)

SetInsecureSkipVerify controls TLS certificate verification for all Pipeleek-managed HTTP clients. Defaults to true (skip verification) to support self-hosted targets with self-signed certificates. Set to false to enforce certificate validation.

func SetProxy added in v0.66.0

func SetProxy(proxyURL string)

SetProxy sets a proxy URL for all Pipeleek-managed HTTP clients. Accepts both HTTP ("http://host:port") and SOCKS5 ("socks5://host:port") URLs. When non-empty, it takes precedence over the HTTP_PROXY environment variable.

Types

This section is empty.

Jump to

Keyboard shortcuts

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