netproxy

package
v0.1.4502 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: MIT Imports: 31 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 decides which proxy magpie's own requests to vendors go through. An app started from the Dock or the Start menu has no HTTPS_PROXY in its environment, so without this every call to a vendor that is only reachable through a proxy hangs until the agent gives up.

In order: the proxy set in magpie's settings (or "direct" for none), the usual *_PROXY variables, the system's proxy (macOS network settings, Windows Internet Options, a Linux desktop's GNOME gsettings or KDE kioslaverc), then the login shell's *_PROXY (shell.go). Loopback is never proxied, nor, unless a provider has a proxy of its own, a host on the user's own network (lan.go).

Index

Constants

View Source
const DeadProxy = "http://127.0.0.1:9"

DeadProxy is where a CLI is sent for a saved proxy that is gone: a port nothing listens on, so its requests fail where a missing proxy would have sent them straight out.

Variables

View Source
var Elsewhere func(req *http.Request) (res *http.Response, ok bool, err error)

Elsewhere sends a request that Go's own TLS can't carry another way, before a transport of Dispatch's dials it: ok false leaves the request to the transport. internal/provider sets it for OpenCode Zen's free tier, which answers a client that isn't Bun's 429 (zen_bun.go); nil leaves every request to its transport.

View Source
var ErrClientCertOverHTTPSProxy = errors.New("a provider with a client certificate or a CA of its own can't be reached through an https:// proxy, which would be shown them too: give it an http:// or socks5:// proxy, or none")

ErrClientCertOverHTTPSProxy is why a request made with a provider's own TLS identity isn't sent through an https:// proxy: the proxy's own TLS is dialled with the same config, so it could be shown the certificate, and its own be taken for being signed by the provider's CA.

View Source
var ErrUncheckedOverHTTPSProxy = errors.New("a provider whose certificate isn't checked can't be reached through an https:// proxy, whose certificate would go unchecked with it: give it an http:// or socks5:// proxy, or none")

ErrUncheckedOverHTTPSProxy is why a request to a host whose certificate is not checked isn't sent through an https:// proxy: the proxy's own TLS is dialled with the same config, so its certificate would go unchecked too.

View Source
var HTTP1 func(u *url.URL) bool

HTTP1 says a request to u goes over HTTP/1.1 only, whatever its transport offers. internal/provider sets it to the ChatGPT backend's host, which Codex itself speaks HTTP/1.1 to; nil leaves every request to its transport.

View Source
var PingAfter, PingWait = 10 * time.Second, 10 * time.Second

PingAfter and PingWait: an HTTP/2 connection that has had no frame for PingAfter is pinged, and dropped when no answer comes within PingWait. The health check is the only probe of a connection whose path has died silently, so a turn in flight on it waits for the next one: PingAfter is how long a vendor's silence before a turn's first byte can cost (#4936, a first try read EOF 20.5s in on a connection whose tunnel a NAT or a relay had dropped). The budget PingAfter+PingWait is also the margin a body under uploadBytes needs on a slow uplink, a ping queued behind it answered only after the last byte (#3909): 20s covers 64KB at about 3KB/s.

View Source
var PingAgain = 5 * time.Minute

PingAgain is how long a connection still silent after its first health ping waits for the next (CalmHTTP2): gRPC's servers, Google's among them, count a ping that comes sooner after the last, with nothing sent between, as a strike, and end the connection at the third.

View Source
var SSHTimeout = 15 * time.Second

SSHTimeout bounds an SSH login: the TCP connection, the handshake and the authentication together.

Functions

func AgainOverHTTP1 added in v0.1.3185

func AgainOverHTTP1(ctx context.Context, get func(context.Context) error) error

AgainOverHTTP1 runs get, and once more with every request under its context over HTTP/1.1 (OverHTTP1) when it failed with the connection broken off (BrokeOff) while ctx is live. get starts over, or goes on from what it kept, as its caller does.

func Bridge added in v0.1.584

func Bridge(socks *url.URL) (string, error)

Bridge is the http:// address of a proxy on loopback carrying what it is given through the SOCKS5 proxy socks, one for each, kept while magpie runs.

func BrokeOff added in v0.1.3185

func BrokeOff(err error) bool

BrokeOff says err is a transfer the connection broke off: the connection failed or dropped (a net.Error, a reset, unexpected EOF), or an HTTP/2 stream or connection was ended under it (a stream error such as INTERNAL_ERROR, GOAWAY, a lost connection). A context that ended is no such thing: the caller stopped it.

func CAPool

func CAPool(ca string) (*x509.CertPool, error)

CAPool is caPool for a caller outside: the system's roots with the PEM file ca's beside them.

func CalmHTTP2 added in v0.1.3256

func CalmHTTP2(t *http.Transport) error

CalmHTTP2 has t, a transport to the vendors, speak HTTP/2 with a health check of magpie's own instead of Go's (HTTP2Health). Go's pings a connection each time it has read no frame for PingAfter, and the ping's own answer is a frame, so a vendor silent for minutes before a turn's first byte is pinged every 10s for all of them. Google's front end counts the pings it gets while it has sent nothing and ends the connection: GOAWAY ENHANCE_YOUR_CALM "too_many_pings" after about four minutes of gemini thinking through Antigravity, and the turn was lost and sent again (zdevoz on Discord). gRPC's servers, Google's among them, take a ping as abuse when it comes within 5 minutes of the last one with no HEADERS or DATA sent between (keepalive.md: GRPC_ARG_HTTP2_MIN_RECV_PING_INTERVAL_WITHOUT_DATA_MS).

Here the first ping of a silence still goes out PingAfter into it, so a connection whose path died before or as a request went out is found as soon as before (#2843, #4936), and dropped when no answer comes within PingWait. A silence starts at the vendor's last HEADERS or DATA, or at a request handed to the connection. A ping answered shows the path alive, and the next waits PingAgain: a 4-minute wait for a first byte has one ping, not twenty-four. A path that dies later in a long wait is found at the next ping, or by the request's own wait for its answer.

t's settings are read now: CalmHTTP2 is called once t is set up, and a clone of t is calmed again with its own connections (Dispatch).

func CertSHA256

func CertSHA256(c *x509.Certificate) string

CertSHA256 is c's fingerprint as a pin is kept: the SHA-256 of its DER, in lower-case hex.

func CheckClientCert

func CheckClientCert(cert, key, ca string) error

CheckClientCert says why a provider's TLS identity can't be used: a certificate without its key or a key without its certificate, a pair that doesn't load or has run out, a CA file with no certificate. nil with none set.

func CheckResolve

func CheckResolve(rules map[string][]string) (map[string][]string, error)

CheckResolve says why rules can't be kept, and returns them as they are kept: host names in lower case, places trimmed, repeated places left out. nil for none. A host is a name (not an address or a URL), and has at least one place: an IP address, with a port if the place is not on the URL's, or "dns:" and the name to follow.

func CheckSSH

func CheckSSH(ctx context.Context, p settings.NamedProxy) (string, error)

CheckSSH logs in to the SSH server of p once, and says the key it presented (authorized_keys form): the one to trust, when p trusts none yet. A server whose key differs from the trusted one is refused (HostKeyChangedError).

func Choice added in v0.1.427

func Choice(ctx context.Context) string

Choice is the proxy ctx names (With), "" when it names none — for a CLI run on a provider's behalf, whose *_PROXY is set from it (EnvWith).

func CloseSSH

func CloseSSH(id string)

CloseSSH ends the tunnel of the saved proxy id: it was deleted, or its host key is to be learnt again.

func ColonHex

func ColonHex(pin string) string

ColonHex is a pin as people read fingerprints: AB:CD:….

func Describe

func Describe() (proxy, source string)

Describe says, for the settings page, what a request to u would use.

func DialSOCKS added in v0.1.584

func DialSOCKS(ctx context.Context, socks *url.URL, addr string) (net.Conn, error)

DialSOCKS connects to addr (host:port) through the SOCKS5 proxy socks, the user and password in its address used when it has them. The host is sent by name, as Go's own transport sends it, so the proxy resolves it.

func Dispatch added in v0.1.418

func Dispatch(base *http.Transport) http.RoundTripper

Dispatch is a RoundTripper sending a request through base, unless its context names a provider's own proxy (With): then through a clone of base kept for that proxy alone. Connections are so reused among the requests going through one proxy and never carried to another — HTTP/2 ones, which a transport shares by host whatever proxy they were dialled through, among them. A move of the global proxy (the settings) drops the idle connections the old one dialled, which a transport, pooling by target host alone, would have carried over the switch (#4523). A request HTTP1 names, one to a host its provider asked HTTP/1.1 of (WithHTTP1), every request under OverHTTP1 (a download trying again after its HTTP/2 transfer broke off), and one to a host whose HTTP/2 connection carried a TLS record that didn't decrypt (recordError, for h2Broken after) go through a clone kept for HTTP/1.1 (http1Only), and one to a host whose certificate the provider's user said not to check (WithUncheckedTLS) through a clone kept for that host alone (uncheckTLS), and one made with a provider's own TLS identity (WithClientCert) through a clone kept for it (clientTLS). A host whose IPv6 is taken but goes nowhere is dialed over IPv4 (v4Fallback), and one on the user's own network is given lanDial to connect (lanDialCap).

func Downloads

func Downloads(ctx context.Context) context.Context

Downloads is ctx for magpie's downloads of plugins — the plugins list, npm's registry, GitHub, the plugins repo's dist branch, Bun itself — which go through the proxy Settings sets for them (PluginProxy) when it names one (JonahFu on X: GitHub reached only through a proxy, the vendors without). Its "" leaves ctx as it is, so they follow the global proxy as every other request does.

func Env added in v0.1.53

func Env(env []string) []string

Env is env (the process's own when nil) for an agent's CLI that magpie starts — a sign-in, or a subscription's run — told to use the proxy magpie's own requests would: the CLI reads only *_PROXY, which an app started from the Dock or the Start menu doesn't have, so a proxy set in magpie or the system's alone left it trying the vendor directly. A proxy set in magpie replaces any in env and "direct" drops them; the system's is only added where env names none. Loopback never goes through it, since a CLI calls back to magpie there.

func EnvDownloads

func EnvDownloads(env []string) []string

EnvDownloads is Env for a program magpie starts to download plugins (bun add and update, git): plugin downloads' proxy (Downloads), or, when that names none, Env's.

func EnvForBun added in v0.1.1139

func EnvForBun(env []string) []string

EnvForBun is env for a bun that magpie starts (bun add, update, remove, run, or an agent CLI's bun add -g): its *_PROXY with a SOCKS5 one bridged (ForBun). Bun takes only http:// and https:// proxies, and with a socks5:// one every registry fetch failed as UnsupportedProxyProtocol (#1409), which a Mac with only a SOCKS system proxy hands it through Env.

func EnvForBunWith added in v0.1.1280

func EnvForBunWith(choice string, env []string, loopback bool) ([]string, error)

EnvForBunWith is EnvWith's env (the proxy choice names, see With) for a Bun-built CLI magpie runs on a provider's behalf — Claude Code, for its subscription's requests, warm-ups, usage and sign-ins — with a SOCKS5 proxy bridged as EnvForBun bridges it. Given socks5:// as it was, Claude Code failed every request as UnsupportedProxyProtocol, after minutes of its own retries (#2651). loopback says the CLI reaches this computer's loopback, where a bridge listens; one that doesn't (Claude Code in a WSL distro under NAT) can't be bridged. A SOCKS proxy left in env, there or where the bridge can't start, is an error, at once: the CLI would fail with it every time.

func EnvWith added in v0.1.418

func EnvWith(choice string, env []string) []string

EnvWith is Env for a CLI run on one provider's behalf, whose own proxy is choice (see With): "" is Env's.

func For

func For(u *url.URL) (*url.URL, error)

For is the proxy a request to u goes through; nil means direct.

func ForBun added in v0.1.584

func ForBun(proxy string) string

ForBun is a proxy's address as the plugin host's Bun can use it: a SOCKS5 one is bridged, any other is as it is.

func Func

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

Func is an http.Transport Proxy function: the proxy the request's context names (With), or else the global one, which a host on the user's own network goes around (onLAN).

func HTTP2Health added in v0.1.1291

func HTTP2Health() *http.HTTP2Config

HTTP2Health is the HTTP/2 setting of a transport to the vendors. Every request to one host shares one HTTP/2 connection, and one gone silent without closing (a proxy's way out died, a NAT forgot the flow) was given every new request, each waiting for its transport's ResponseHeaderTimeout while the kernel took the writes, until a restart (#2843). A ping finds it, and the requests on it fail, so a group moves on and the next request dials anew. A live vendor answers a ping whatever its streams are doing, so a long wait for a first byte is never cut by it. But a ping's answer restarts the clock, so a wait of minutes is pinged every PingAfter, which Google's front end ends the connection for: the gateway's transports ping by CalmHTTP2 instead, and this is for http.DefaultTransport's short requests.

func Held added in v0.1.1169

func Held(ctx context.Context) error

Held is the error ctx holds its requests with (Hold), nil when it holds none.

func Hold added in v0.1.1169

func Hold(ctx context.Context, err error) context.Context

Hold is ctx for work magpie was not asked to do and must not send: no request made with it through Func, or a transport Dispatch made, leaves the machine; each fails with err before it dials (#1518, allowance reads while the user has them read only when asked).

func HostKeyFingerprint

func HostKeyFingerprint(authorized string) string

HostKeyFingerprint is the SHA256 fingerprint of a key in authorized_keys form, as `ssh-keygen -l` prints it; "" for one that doesn't parse.

func Install

func Install()

Install routes http.DefaultTransport (and so http.DefaultClient) through Func, and http.DefaultClient's requests made on a provider's behalf (With) through a transport of that provider's proxy (Dispatch). Its HTTP/2 connections are checked by Go's own pings (HTTP2Health), and the requests magpie sends on its own are written down (probelog).

func IsSOCKS added in v0.1.584

func IsSOCKS(u *url.URL) bool

IsSOCKS is whether the proxy's address is a SOCKS5 one.

func LocalIP added in v0.1.2244

func LocalIP(ip net.IP) bool

LocalIP says ip is on this computer or the local network: a loopback, private (10/8, 172.16/12, 192.168/16, fc00::/7) or link-local address. Carrier-grade NAT (100.64/10) is not: it is a Tailscale address, but also an ISP's.

func LocalName added in v0.1.2244

func LocalName(host string) bool

LocalName reports whether host, a name, resolves (in lanWait) to at least one address and every address it resolves to is on this computer or the local network (LocalIP). A name that doesn't resolve, or doesn't in time, is not: what can't be read is unknown, and unknown is masked.

func NormalPin

func NormalPin(s string) string

NormalPin is a typed SHA-256 fingerprint as a pin is kept: lower-case hex, its colons, spaces and a "sha256:" before it taken out; "" for one that isn't 64 hex digits.

func OpenSSH

func OpenSSH(p settings.NamedProxy) (string, func(), error)

OpenSSH stands a tunnel for an SSH proxy not saved yet (a check of what is being typed): its address, and a func that ends it. A key it trusts on first use is kept in it alone.

func OverHTTP1 added in v0.1.3185

func OverHTTP1(ctx context.Context) context.Context

OverHTTP1 is ctx for requests that go over HTTP/1.1 to every host, through a transport Dispatch made: a download whose HTTP/2 transfer broke off part way tries again with it (AgainOverHTTP1). Some proxies cut an HTTP/2 stream mid-file (unexpected EOF, a stream reset, GOAWAY) while they carry HTTP/1.1 to the same host whole, and a download that tried again over HTTP/2 broke the same way on every try (biubiu8802 on X: the update said "download broke off" each time, while the proxy served other downloads). It is kept through With.

func Parse

func Parse(s string) (*url.URL, error)

Parse reads a proxy address; a bare host:port is an HTTP proxy. A saved proxy ("@id") is read as the address it stands for, its login in it; one that is gone is an error.

func Redact added in v0.1.1221

func Redact(raw string) string

Redact is a proxy address as magpie may show it: in a log line, an error, a status or the GUI (#852, #1886). Its user and password are left out, and the rest kept as it was written (no scheme added to one written without). A malformed address is "", because its userinfo cannot be safely separated. Requests still go through the address itself; only what is shown of it goes through here.

func Resolve

func Resolve(choice string) string

Resolve is a proxy choice as the proxy it stands for: a saved proxy (settings.NamedProxy, "@id") as its address with its login, any other choice as it is. A reference to a proxy that isn't there is kept as it is, and Parse refuses it: a request meant for a proxy never goes direct for want of one.

func SSHReady

func SSHReady(ctx context.Context, p settings.NamedProxy) error

SSHReady logs in to the saved SSH proxy p through the tunnel requests take (nil when it is logged in already), so a check can say why it can't carry them: a refused login reaches a request only as a SOCKS failure.

func SetLookup added in v0.1.2244

func SetLookup(f func(ctx context.Context, host string) ([]net.IPAddr, error)) (restore func())

SetLookup has names resolved by f, for a test that must not reach the network, and forgets what earlier lookups found; restore puts the system's resolver back.

func TrustEnvRoots

func TrustEnvRoots(t *http.Transport)

TrustEnvRoots has t take, beside the system's roots, the roots in the files and folders those variables name. Nothing is taken off: a server signed by a root the system trusts is trusted as before, and one signed by none of them is refused as before. With none set, or none holding a certificate, t is left as it is.

func Watch added in v0.1.2664

func Watch() func() bool

Watch is a check a transport of its own makes before each request: it says the global proxy in magpie's settings moved since the check's last call, and the caller closes its transport's idle connections, which would carry the request after a switch through the old proxy. The setting is read at dial time (Func), but a transport pools by target host, and its HTTP/2 connections by the authority alone, so a connection dialled through the old proxy carries the requests after a switch too, until it is dropped. Dropping the idle connections sends the request after it through the proxy in force; one a request is still reading is left to finish. Each check keeps its own last value, so each transport sees, and answers, a move on the first request it sends after it (#4523, #4824). The first call sees no move.

func With added in v0.1.418

func With(ctx context.Context, choice string) context.Context

With is ctx for requests made on behalf of one provider, whose own proxy is choice (issue #237: Codex through a proxy, a vendor at home without): "" follows the global one, "direct" goes through none, anything else is the proxy's address (http://, https://, socks5://; host:port means http). Requests made with it through Func, or through a transport Dispatch made, take that proxy. A choice ctx already names is replaced, "" too: a request magpie makes for one provider while serving another's (a web search asked of Codex in a turn served by a provider set to "direct", #1522) goes through its own provider's proxy, never the one it was made under. A provider's leave not to check its certificate (WithUncheckedTLS) goes the same way: it is the outer provider's, and dropped here, and so is its ask for HTTP/1.1 (WithHTTP1), its own TLS identity (WithClientCert) and its host rules (WithResolve).

func WithClientCert

func WithClientCert(ctx context.Context, cert, key, ca, pin string, bases ...string) context.Context

WithClientCert is ctx for requests made on behalf of a provider that shows the server a certificate of its own (cert and key, PEM files), or trusts a CA of its own for the server's (ca, a PEM file), or both: a request through a transport Dispatch made to the host of one of bases, over https, goes through a transport kept for that identity alone, which shows the certificate when the server asks for one and takes a server certificate signed by ca beside the system's roots. Any other host — a redirect elsewhere, an image or a balance URL on another host — is sent without them, and an https:// proxy is refused for it, as the proxy's TLS would be dialled with them (clientTLS). With (a request made for another provider) drops it.

pin, the SHA-256 of a server certificate the user trusted as it is (Zhangzhangi on X: a magpie at home on a domain of its own with a self-signed certificate), has the certificate's chain and name left unchecked at those hosts, and the handshake refused unless the server's own certificate is that one (pinTLS).

func WithHTTP1 added in v0.1.3133

func WithHTTP1(ctx context.Context, bases ...string) context.Context

WithHTTP1 is ctx for requests made on behalf of a provider the user added and asked to be spoken HTTP/1.1 to (kepner_53726 on Discord: a company gateway whose HTTP/2 connections broke mid-reply with "tls: bad record MAC", while HTTP/1.1 to it held): a request through a transport Dispatch made to the host of one of bases goes over HTTP/1.1 only, through a transport kept for HTTP/1.1. Any other host is spoken to as before. With (a request made for another provider) drops it.

func WithResolve

func WithResolve(ctx context.Context, rules map[string][]string) context.Context

WithResolve is ctx for requests made on behalf of a provider the user added whose host names are connected to addresses of their choosing, as curl's --resolve does (@quantum_lsfc on X: a managed network sends some domains to an internal L4 SNI gateway, an IP in the base URL fails, and /etc/hosts can't be edited). rules maps a host name to the places its TCP connection is made, in order: an IP address (with a port of its own if it names one), or "dns:<name>", the addresses that name resolves to when the connection is made, so a rotation of its records is followed. The URL, so the TLS server name and the Host header, stays as it was; only where the connection goes changes. A place that doesn't connect is followed by the next, and when none does the host is dialled as if there were no rule. A request that goes through a proxy is sent to the proxy as before: the proxy connects to the name itself, so no rule applies to it. With (a request made for another provider) drops it. CheckResolve is what a saved rule is held to.

func WithUncheckedTLS added in v0.1.1258

func WithUncheckedTLS(ctx context.Context, bases ...string) context.Context

WithUncheckedTLS is ctx for requests made on behalf of a provider the user added whose HTTPS server they asked magpie not to check the certificate of (#2383, fangzhengjin: vLLM on the LAN, Ollama behind a self-signed cert, a company CA): a request through a transport Dispatch made to the host of one of bases, over https, has its certificate taken as it is, through a transport kept for that host alone. Any other host — a redirect elsewhere, an image or a balance URL on another host — is checked as before, and an https:// proxy is refused for it (uncheckTLS). With (a request made for another provider) drops it.

Types

type HostKeyChangedError

type HostKeyChangedError struct{ Was, Now string }

HostKeyChangedError is an SSH server presenting a key other than the one trusted for it.

func (*HostKeyChangedError) Error

func (e *HostKeyChangedError) Error() string

type PinMismatchError

type PinMismatchError struct{ Host, Got, Want string }

PinMismatchError is why a server whose certificate was pinned isn't spoken to: it showed another one.

func (*PinMismatchError) Error

func (e *PinMismatchError) Error() string

type Proxy

type Proxy struct {
	URL    string
	HTTP   string
	SOCKS  string
	Bypass []string
}

Proxy is the system's proxy: one address, and the hosts that skip it. HTTP and SOCKS are the system's entries for plain http:// requests and for SOCKS, each alone, for a client that reads them so (Codex's reqwest takes macOS' HTTP entry and nothing else for an http:// URL).

func System

func System() Proxy

System reads the system proxy, at most every 15 seconds while one is set and every 2 while none is. One read runs at a time, outside the lock. A read that fails keeps what was read before, and the one after it holds nobody.

type Why

type Why struct {
	Why, Addr, Was, Now string
	Err                 error
}

Why is a proxy's failure said so the user can act on it: Why is an English sentence the page translates, its {addr}, {was} and {now} filled from the fields, and Err the error it explains, shown beside it. A failed check of a saved proxy said only Go's words before ("malformed HTTP response "SSH-2.0-OpenSSH_9.6"" for an SSH server typed as a proxy, @laiuuui on X).

func Explain

func Explain(address, msg string) *Why

Explain is why a request through the proxy at address (http://, https://, socks5://, as Parse reads it) failed with msg, said as Why; nil when msg is nothing it knows. msg is Go's error text, its proxy login already taken out.

func ExplainServer

func ExplainServer(ctx context.Context, address, msg string) *Why

ExplainServer is Explain, and when the error text can't tell what answered (Go reads a real OpenSSH banner, "SSH-2.0-OpenSSH_9.6p1 Ubuntu-3ubuntu13.20", as an HTTP status line with a malformed code), it reads the first bytes the server sends: an SSH server says "SSH-" before anything is sent to it. Only a check the user asked for calls this, never a request.

func SSHForwardWhy

func SSHForwardWhy(p settings.NamedProxy, msg string) *Why

SSHForwardWhy is why a request through a logged-in SSH proxy failed, from the error its local SOCKS end gave: the server's own address, not the tunnel's, is the one to check. nil when the error says nothing an SSH server is known for.

func (*Why) Error

func (w *Why) Error() string

func (*Why) Unwrap

func (w *Why) Unwrap() error

Directories

Path Synopsis
Package sshtest is an SSH server on loopback for tests of magpie's SSH proxy: it logs a user in by password or key and answers each direct-tcpip channel (ssh -D's CONNECT) with an http.Handler of its own, so nothing a test sends through it leaves the machine.
Package sshtest is an SSH server on loopback for tests of magpie's SSH proxy: it logs a user in by password or key and answers each direct-tcpip channel (ssh -D's CONNECT) with an http.Handler of its own, so nothing a test sends through it leaves the machine.

Jump to

Keyboard shortcuts

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