anyoneproxy

package
v0.72.2 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2025 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Address

func Address() string

Address returns the SOCKS5 address used for Anyone routing.

func DialerForAddr

func DialerForAddr() tcp.DialerForAddr

DialerForAddr returns a tcp.DialerForAddr that routes through the Anyone SOCKS5 proxy. It automatically BYPASSES the proxy for loopback, private, and link-local addresses to allow local/dev networking (e.g. localhost, 10.0.0.0/8, 192.168.0.0/16, fc00::/7, fe80::/10).

func Enabled

func Enabled() bool

Enabled reports whether Anyone proxy routing is active. Defaults to true, using SOCKS5 at localhost:9050, unless explicitly disabled via SetDisabled(true) or environment variable ANYONE_DISABLE=1. ANYONE_SOCKS5 may override the proxy address.

func NewHTTPClient

func NewHTTPClient() *http.Client

NewHTTPClient returns an *http.Client that routes all TCP connections via the Anyone SOCKS5 proxy. If Anyone proxy is not enabled, it returns http.DefaultClient.

func Running

func Running() bool

Running returns true if Anyone proxy is enabled and reachable at Address(). It attempts a short TCP dial and returns false on failure.

func SetDisabled

func SetDisabled(v bool)

SetDisabled allows binaries to disable Anyone routing via a flag (e.g. --disable-anonrc).

Types

This section is empty.

Jump to

Keyboard shortcuts

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