Documentation
¶
Index ¶
- Constants
- func AddSessionURLAndReload(rt container.Runtime, containerName string, domain string) error
- func CleanupSquidIfUnused(rt container.Runtime)
- func EnsureNetworks(rt container.Runtime)
- func GenerateSquidConfig(subnet string, domains []string, extraURLs []string) string
- func GetNetworkSubnet(rt container.Runtime, networkName string) (string, error)
- func GetProxyEnvVars(rt container.Runtime) []string
- func NormalizeAllowlistEntry(value string) (string, error)
- func RegisterSessionURLs(containerName string, urls []string) error
- func RemoveSessionURLs(rt container.Runtime, containerName string)
- func StartSquidProxy(rt container.Runtime, containerName string, extraURLs []string) error
Constants ¶
const ( InternalNetwork = "exitbox-int" EgressNetwork = "exitbox-egress" SquidContainer = "exitbox-squid" )
Variables ¶
This section is empty.
Functions ¶
func AddSessionURLAndReload ¶ added in v0.1.3
AddSessionURLAndReload adds a domain to a container's session URLs and hot-reloads Squid so the change takes effect immediately.
func CleanupSquidIfUnused ¶
CleanupSquidIfUnused stops squid if no agent containers are running.
func EnsureNetworks ¶
EnsureNetworks creates the shared networks if they don't exist.
func GenerateSquidConfig ¶
GenerateSquidConfig generates the squid.conf content.
func GetNetworkSubnet ¶
GetNetworkSubnet returns the subnet for a network.
func GetProxyEnvVars ¶
GetProxyEnvVars returns proxy environment variable flags for container run.
func NormalizeAllowlistEntry ¶
NormalizeAllowlistEntry normalizes a domain for Squid dstdomain ACL. Ported from lib/network.sh:normalize_allowlist_entry.
func RegisterSessionURLs ¶ added in v0.1.1
RegisterSessionURLs writes a session file for a container's extra URLs.
func RemoveSessionURLs ¶ added in v0.1.1
RemoveSessionURLs removes a container's session file and regenerates squid config.
Types ¶
This section is empty.