MCPcopy Create free account

hub / github.com/docker/go-connections / functions

Functions176 in github.com/docker/go-connections

↓ 23 callersMethodClose
Close stops forwarding traffic and close both ends of the Proxy.
proxy/proxy.go:19
↓ 14 callersFunctiongetCertAndKey
returns the names of pre-generated key and certificate files.
tlsconfig/config_test.go:29
↓ 11 callersFunctionClient
Client returns a TLS configuration meant to be used by a client.
tlsconfig/config.go:208
↓ 11 callersMethodRun
Run starts forwarding traffic back and forth between the front and back-end addresses.
proxy/proxy.go:17
↓ 10 callersMethodClose
()
proxy/network_proxy_test.go:21
↓ 10 callersFunctiontempSocketPath
tempSocketPath returns a temporary socket path short enough to avoid exceeding Unix-domain socket path length limits on some platforms.
sockets/unix_socket_test.go:16
↓ 9 callersFunctionNewUnixSocketWithOpts
NewUnixSocketWithOpts creates a Unix socket with the specified options. On Unix platforms, socket permissions are 0000 by default, i.e. no access for
sockets/unix_socket.go:81
↓ 9 callersFunctionParsePortSpecs
ParsePortSpecs receives port specs in the format of ip:public:private/proto and parses these in to the internal types
nat/nat.go:124
↓ 8 callersMethodProto
Proto returns the protocol of a Port
nat/nat.go:63
↓ 8 callersFunctionServer
Server returns a TLS configuration meant to be used by a server.
tlsconfig/config.go:233
↓ 7 callersMethodLocalAddr
()
proxy/network_proxy_test.go:22
↓ 7 callersMethodPort
Port returns the port number of a Port
nat/nat.go:72
↓ 7 callersMethodRun
()
proxy/network_proxy_test.go:20
↓ 6 callersFunctionNewEchoServer
(t *testing.T, proto, address string)
proxy/network_proxy_test.go:35
↓ 6 callersFunctionNewProxy
NewProxy creates a Proxy according to the specified frontendAddr and backendAddr.
proxy/proxy.go:27
↓ 6 callersFunctionparsePortRange
parsePortRange parses and validates the specified string as a port range (e.g., "8000-9000").
nat/parse.go:17
↓ 5 callersMethodInt
Int returns the port number of a Port as an int. It assumes [Port] is valid, and returns 0 otherwise.
nat/nat.go:79
↓ 5 callersFunctionParsePortSpec
ParsePortSpec parses a port specification string into a slice of PortMappings
nat/nat.go:173
↓ 5 callersFunctiongetMultiCert
returns the name of a pre-generated, multiple-certificate CA file with both RSA and ECDSA certs.
tlsconfig/config_test.go:24
↓ 5 callersFunctionrunTest
(t *testing.T, path string, l net.Listener, echoStr string)
sockets/unix_socket_test.go:37
↓ 4 callersMethodAccept
Accept implements the Accept method in the Listener interface; it waits for the next call and returns a generic Conn. It returns a [net.ErrClosed] if
sockets/inmem_socket.go:47
↓ 4 callersMethodDial
Dial establishes a connection with the in-memory listener. The network and addr parameters are accepted for compatibility with conventional dialer AP
sockets/inmem_socket.go:75
↓ 4 callersFunctionSplitProtoPort
SplitProtoPort splits a port(range) and protocol, formatted as "<portnum>/[<proto>]" "<startport-endport>/[<proto>]". It returns an empty string for b
nat/nat.go:101
↓ 4 callersFunctiondefaultConfig
defaultConfig is the default config used by both client and server TLS configuration.
tlsconfig/config.go:68
↓ 4 callersFunctionparsePortNumber
parsePortNumber parses rawPort into an int, unwrapping strconv errors and returning a single "out of range" error for any value outside 0–65535.
nat/parse.go:43
↓ 4 callersFunctiontestProxy
(t *testing.T, proto string, proxy Proxy)
proxy/network_proxy_test.go:116
↓ 3 callersFunctionNewUnixSocket
NewUnixSocket creates a Unix socket with the specified path and group. On Unix platforms, the socket is owned by root:gid and has permissions 0660.
sockets/unix_socket_unix.go:69
↓ 3 callersMethodPrintf
(format string, args ...any)
proxy/logger.go:4
↓ 3 callersMethodString
()
nat/nat.go:152
↓ 3 callersFunctionWithChmod
WithChmod modifies socket file's access mode. Abstract Unix sockets have no filesystem representation, so this option returns an error wrapping [erro
sockets/unix_socket_unix.go:47
↓ 3 callersFunctionWithChown
WithChown modifies the socket file's uid and gid. Abstract Unix sockets have no filesystem representation, so this option returns an error wrapping [
sockets/unix_socket_unix.go:26
↓ 3 callersFunctionisAbstractSocket
isAbstractSocket reports whether path is an abstract Unix socket address. Go recognizes two representations of abstract socket addresses: - On Linux
sockets/unix_socket.go:113
↓ 3 callersFunctionnewTestTrustRoot
()
tlsconfig/systempool_test.go:34
↓ 2 callersMethodAddr
Addr returns the socket's addr string to satisfy net.Listener
sockets/inmem_socket.go:40
↓ 2 callersMethodDialContext
DialContext establishes a connection with the in-memory listener. The network and addr parameters are accepted for compatibility with conventional di
sockets/inmem_socket.go:87
↓ 2 callersMethodFrontendAddr
FrontendAddr returns the address on which the proxy is listening.
proxy/proxy.go:21
↓ 2 callersFunctionSort
Sort sorts a list of ports using the provided predicate This function should compare `i` and `j`, returning true if `i` is considered to be less than
nat/sort.go:31
↓ 2 callersFunctionSortPortMap
SortPortMap sorts the list of ports and their respected mapping. The ports will explicit HostPort will be placed first.
nat/sort.go:66
↓ 2 callersFunctionWithAdditionalUsersAndGroups
WithAdditionalUsersAndGroups modifies the socket file's DACL to grant access to additional users and groups. It sets [BasePermissions] on the socket
sockets/unix_socket_windows.go:44
↓ 2 callersFunctionWithBasePermissions
WithBasePermissions sets a default DACL, which allows Administrators and LocalSystem full access (similar to defaults used in [moby]); - D:P: DACL wi
sockets/unix_socket_windows.go:33
↓ 2 callersFunctionadjustMinVersion
adjustMinVersion sets the MinVersion on `config`, the input configuration. It assumes the current MinVersion on the `config` is the lowest allowed.
tlsconfig/config.go:131
↓ 2 callersFunctioncertPool
certPool returns an X.509 certificate pool from `caFile`, the certificate file.
tlsconfig/config.go:83
↓ 2 callersFunctionfakeSystemCertPool
()
tlsconfig/systempool_test.go:138
↓ 2 callersFunctiongenerateCertificate
(signer crypto.Signer, out io.Writer, isCA bool)
tlsconfig/fixtures/generate.go:36
↓ 2 callersFunctiongetSecurityDescriptor
getSecurityDescriptor returns the DACL for the Unix socket. By default, it grants [BasePermissions]. Additional users and groups are granted generic
sockets/unix_socket_windows.go:112
↓ 2 callersFunctionsystemRootTrustedX509
()
tlsconfig/systempool_test.go:130
↓ 2 callersFunctiontestProxyAt
(t *testing.T, proto string, proxy Proxy, addr string)
proxy/network_proxy_test.go:95
↓ 2 callersFunctionwellKnownAccountName
wellKnownAccountName returns the localized account name for a well-known SID. Windows defines many built-in users and groups by stable well-known SID
sockets/unix_socket_windows_test.go:19
↓ 2 callersFunctionwithSDDL
withSDDL applies the given SDDL to the socket. It returns an error when failing parse the SDDL, or if the DACL was defaulted. TODO(thaJeztah); this i
sockets/unix_socket_windows.go:61
↓ 1 callersFunctionClientDefault
ClientDefault returns a secure-enough TLS configuration for the client TLS configuration.
tlsconfig/config.go:63
↓ 1 callersMethodClose
Close closes the listener. It will be unavailable for use once closed.
sockets/inmem_socket.go:57
↓ 1 callersFunctionNewInmemSocket
NewInmemSocket creates an in-memory only [net.Listener]. The addr argument can be any string, but is used to satisfy the [net.Listener.Addr] part of t
sockets/inmem_socket.go:31
↓ 1 callersFunctionNewPort
NewPort creates a new instance of a Port given a protocol and port number or port range
nat/nat.go:30
↓ 1 callersFunctionNewTCPProxy
NewTCPProxy creates a new TCPProxy.
proxy/tcp_proxy.go:19
↓ 1 callersFunctionNewUDPProxy
NewUDPProxy creates a new UDPProxy.
proxy/udp_proxy.go:57
↓ 1 callersFunctionParsePort
ParsePort parses the port number string and returns an int
nat/nat.go:42
↓ 1 callersFunctionParsePortRange
ParsePortRange parses and validates the specified string as a port range (e.g., "8000-9000").
nat/parse.go:11
↓ 1 callersFunctionParsePortRangeToInt
ParsePortRangeToInt parses the port range string and returns start/end ints
nat/nat.go:54
↓ 1 callersFunctionServerDefault
ServerDefault returns a secure-enough TLS configuration for the server TLS configuration.
tlsconfig/config.go:58
↓ 1 callersMethodclientLoop
(client *net.TCPConn, quit chan bool)
proxy/tcp_proxy.go:40
↓ 1 callersFunctionconfigureNpipeTransport
(any, string)
sockets/sockets_unix.go:5
↓ 1 callersFunctionconfigureUnixTransport
(tr *http.Transport, addr string)
sockets/sockets.go:53
↓ 1 callersFunctiongenerateCertAndKey
()
tlsconfig/fixtures/generate.go:82
↓ 1 callersFunctiongenerateMultiCert
generates a multiple-certificate CA file with both RSA and ECDSA certs and returns the filename so that cleanup can be deferred.
tlsconfig/fixtures/generate.go:57
↓ 1 callersFunctiongetCert
getCert returns a Certificate from the CertFile and KeyFile in 'options', if the key is encrypted, the Passphrase in 'options' will be used to decrypt
tlsconfig/config.go:179
↓ 1 callersFunctiongetCertAndEncryptedKey
returns the names of pre-generated, encrypted private key and corresponding certificate file
tlsconfig/config_test.go:35
↓ 1 callersFunctiongetPrivateKey
getPrivateKey returns the private key in 'keyBytes', in PEM-encoded format. It returns an error if the file could not be decoded or was protected by a
tlsconfig/config.go:162
↓ 1 callersFunctionisValidMinVersion
isValidMinVersion checks that the input value is a valid tls minimum version
tlsconfig/config.go:124
↓ 1 callersFunctionlistenUnix
(path string, opts ...SockOption)
sockets/unix_socket_unix.go:73
↓ 1 callersFunctionnewConnTrackKey
(addr *net.UDPAddr)
proxy/udp_proxy.go:27
↓ 1 callersMethodreplyLoop
(proxyConn *net.UDPConn, clientAddr *net.UDPAddr, clientKey *connTrackKey)
proxy/udp_proxy.go:78
↓ 1 callersFunctionsplitParts
(rawport string)
nat/nat.go:156
↓ 1 callersFunctiontoInt
(s string)
nat/sort.go:105
↓ 1 callersFunctionvalidateProto
(proto string)
nat/nat.go:112
MethodBackendAddr
BackendAddr returns the TCP proxied address.
proxy/tcp_proxy.go:105
MethodBackendAddr
BackendAddr returns the proxied address.
proxy/proxy.go:23
MethodBackendAddr
BackendAddr returns the backend address.
proxy/stub_proxy.go:23
MethodBackendAddr
BackendAddr returns the proxied UDP address.
proxy/udp_proxy.go:165
FunctionBenchmarkParsePortSpecs
(b *testing.B)
nat/nat_test.go:877
FunctionBenchmarkSortPortMap
(b *testing.B)
nat/sort_test.go:81
MethodClose
()
proxy/network_proxy_test.go:71
MethodClose
()
proxy/network_proxy_test.go:93
MethodClose
Close stops forwarding the traffic.
proxy/tcp_proxy.go:99
MethodClose
Close does nothing.
proxy/stub_proxy.go:17
MethodClose
Close stops forwarding the traffic.
proxy/udp_proxy.go:152
FunctionConfigureTransport
ConfigureTransport configures the specified [http.Transport] according to the specified proto and addr. If the proto is unix (using a unix socket to
sockets/sockets.go:29
MethodFrontendAddr
FrontendAddr returns the TCP address on which the proxy is listening.
proxy/tcp_proxy.go:102
MethodFrontendAddr
FrontendAddr returns the frontend address.
proxy/stub_proxy.go:20
MethodFrontendAddr
FrontendAddr returns the UDP address on which the proxy is listening.
proxy/udp_proxy.go:162
MethodLen
()
nat/sort.go:13
MethodLen
()
nat/sort.go:45
MethodLess
(i, j int)
nat/sort.go:21
MethodLess
Less sorts the port so that the order is: 1. port with larger specified bindings 2. larger port 3. port with tcp protocol
nat/sort.go:52
MethodLocalAddr
()
proxy/network_proxy_test.go:70
MethodLocalAddr
()
proxy/network_proxy_test.go:92
MethodNetwork
Network returns the addr string, satisfies net.Addr
sockets/inmem_socket.go:13
FunctionNewStubProxy
NewStubProxy creates a new StubProxy
proxy/stub_proxy.go:26
FunctionNewTCPSocket
NewTCPSocket creates a TCP socket listener with the specified address and the specified tls configuration. If TLSConfig is set, will encapsulate the T
sockets/tcp_socket.go:12
FunctionNewUnixSocket
NewUnixSocket creates a new Unix socket. It sets [BasePermissions] on the socket path and grants the given additional users and groups to generic rea
sockets/unix_socket_windows.go:97
MethodPrintf
(_ string, _ ...any)
proxy/logger.go:9
next →1–100 of 176, ranked by callers