netproxy

package
v0.219.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: MIT Imports: 4 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 netproxy routes the server's outbound HTTP through the configured http_proxy for the allowed sites (gofer-29gi). Install replaces the proxy function of http.DefaultTransport, so every client built on it — a nil Transport or a Clone — follows the current config without being rewired.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func For

func For(target *url.URL) *url.URL

For is the configured proxy for target, nil when it does not apply.

func Install

func Install(cfg func() config.HTTPProxyConfig)

Install makes http.DefaultTransport ask cfg (read per request, so a config reload applies at once) which proxy to use.

func Proxy

func Proxy(req *http.Request) (*url.URL, error)

Proxy is an http.Transport Proxy func: the configured proxy for an allowed host, else the environment's (HTTPS_PROXY / NO_PROXY).

Types

This section is empty.

Jump to

Keyboard shortcuts

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