MCPcopy Create free account

hub / github.com/Invisv-Privacy/masque / functions

Functions66 in github.com/Invisv-Privacy/masque

↓ 29 callersMethodClose
Close closes the Conn, performing necessary cleanup.
http2/conn.go:102
↓ 14 callersMethodWrite
Write writes data to the Conn's IoInc handle if the connection is alive. It returns an error if the connection is closed.
http2/conn.go:94
↓ 10 callersMethodClose
Close closes a Client object. This will kill the datagram receiver loop, and any active stream objects.
http3/client.go:545
↓ 6 callersFunctionRootDir
()
internal/testutils/testutils.go:13
↓ 6 callersMethodreleaseDatagramID
releaseDatagramID releases a datagram flow ID back into the pool for use.
http3/client.go:365
↓ 5 callersMethodSid
Sid returns the unique stream ID of the Conn.
http2/conn.go:79
↓ 4 callersMethodRead
Read reads data from the Conn's IoOut handle if the connection is alive. It returns an error if the connection is closed.
http2/conn.go:85
↓ 4 callersFunctiontransfer
(destination io.WriteCloser, source io.ReadCloser, wg *sync.WaitGroup, logger *slog.Logger)
example/relay-http-proxy/main.go:42
↓ 3 callersMethodCreateTCPStream
CreateTCPStream creates a TCP stream to the given address using the client. This function should ONLY be called after successfully calling ConnectToPr
http2/client.go:229
↓ 3 callersMethodLocalAddr
()
internal/testutils/testutils.go:26
↓ 3 callersMethoddoClose
()
http2/conn.go:53
↓ 2 callersMethodConnectToProxy
ConnectToProxy connects the Client to the proxy.
http2/client.go:101
↓ 2 callersMethodCreateUDPStream
CreateUDPStream creates a UDP stream to the given address using the client. This function should ONLY be called after calling |ConnectToProxy| succes
http2/client.go:540
↓ 2 callersFunctionHandleConnectMasque
HandleConnectMasque creates a new TCP or UDP stream via the relayClient and returns the connected stream upon success.
example/preproxy/main.go:323
↓ 2 callersFunctionIsDisallowedPort
IsDisallowedPort returns true if the given destination port number is a value that will be rejected by Fastly.
config.go:33
↓ 2 callersFunctionNewClient
NewClient creates a new Client instance with the provided parameters.
http2/client.go:73
↓ 2 callersFunctionNewClient
NewClient provides a method that returns a new Client object, creating a new http3.RoundTripper object dedicated to be used with the provided proxy ad
http3/client.go:171
↓ 2 callersMethodRead
Read reads from a datagram stream. Blocks if no data is available. If the provided []byte slice is not large enough for the message, it will be trunca
http3/client.go:564
↓ 2 callersMethodRemoteAddr
()
internal/testutils/testutils.go:30
↓ 2 callersFunctionTLSVerifyFunc
TLSVerifyFunc takes a cert data byte slice and returns a function that can be passed to the tls.Config.VerifyPeerCertificate for pinning.
internal/utils/tls.go:12
↓ 2 callersFunctionTransfer
Transfer copies data from src to dst and closes both when done.
example/preproxy/main.go:299
↓ 2 callersMethodconnCleanup
()
http2/client.go:611
↓ 2 callersMethoddialProxyViaTLS
()
http2/client.go:376
↓ 2 callersFunctionhandleConnectMasque
handleConnectMasque handles a CONNECT request to the proxy and returns the connected stream upon success.
example/relay-http-proxy/main.go:57
↓ 2 callersFunctionisIdleTimeoutError
(err error)
http3/client.go:372
↓ 2 callersMethodmakeNewH2ClientConn
makeNewH2ClientConn must be called while c.mu is held.
http2/client.go:117
↓ 2 callersMethodmakeTLSDialer
()
http2/client.go:312
↓ 2 callersFunctionmakeTLSDialerContext
makeTLSDialerContext makes a context for the TLS dialer. It checks if the context expires before a TLS connection is complete, and returns an error if
http2/client.go:341
↓ 2 callersMethodrefreshRoundTripper
()
http3/client.go:383
↓ 2 callersMethodstopReceiveLoop
()
http3/client.go:328
↓ 1 callersMethodCreateTCPStream
CreateTCPStream creates a TCP Stream through the proxy to the designated destination. Note that destAddr is in ip:port format, where ip CANNOT be a DN
http3/client.go:394
↓ 1 callersMethodCreateUDPStream
CreateUDPStream creates a UDP Stream through the proxy Also starts the receiver loop for datagrams if it hasn't already been started. Returns a Datagr
http3/client.go:441
↓ 1 callersFunctionStreamDataToDatagramChunk
StreamDataToDatagramChunk converts UDP payload data to a CONNECT-UDP datagram chunk. This protocol is for tunneling a UDP stream via an HTTP proxy ser
http2/client.go:395
↓ 1 callersMethodWrite
Write writes to a datagram stream. May block if the stream buffer is full. Note that this function requires prepending 1 to 9 bytes to send the datagr
http3/client.go:584
↓ 1 callersMethodcancelAllUDPStreams
()
http3/client.go:307
↓ 1 callersFunctionconnectToRelay
(certData []byte, logger *slog.Logger)
example/relay-http-proxy/main.go:231
↓ 1 callersMethoddatagramChunkToStreamData
datagramChunkToStreamData converts an encoded datagram chunk into a UDP raw byte slice. The input parameters are the CONNECT-UDP datagram chunk (chunk
http2/client.go:421
↓ 1 callersMethoddatagramReceiveLoop
datagramReceiveLoop pulls datagrams from the quic.Connection object and places them inside of the correct DatagramStream. It performs parsing of the i
http3/client.go:239
↓ 1 callersMethoddecodeLoopUDP
decodeLoopUDP decodes data received from the proxied UDP stream. |udp.transport| should be the TLS connection's reader from proxy. |dst| should be the
http2/client.go:491
↓ 1 callersFunctiondefaultPortList
Assemble the default port list using the global + constant values defined above. This returns a TCP and UDP port list.
example/preproxy/main.go:45
↓ 1 callersMethoddialProxyViaH2
dialProxyViaH2 returns a H2 transport struct with TLS settings. Note: the H2 transport handles the networking operations internally. |prot| is called
http2/client.go:348
↓ 1 callersMethoddialProxyViaTLSOnce
dialProxyViaTLSOnce returns a TCP connection with TLS. |prot| is called before connecting if not nil.
http2/client.go:367
↓ 1 callersFunctiondialerControlProtect
(prot SocketProtector, logger *slog.Logger)
http2/android.go:16
↓ 1 callersMethodencodeLoopUDP
encodeLoopUDP encodes data and sends it to the proxied UDP stream. |udp.transport| should be the TLS connection's reader from proxy. |src| should be t
http2/client.go:449
↓ 1 callersMethodgetNewDatagramID
getNewDatagramID gets a new H3_DATAGRAM Flow ID to be used with a UDP stream.
http3/client.go:345
↓ 1 callersFunctiongetNextTcpStreamID
()
http2/conn.go:13
↓ 1 callersFunctiongetNextUdpStreamID
()
http2/conn.go:19
↓ 1 callersMethodgetReadyH2ClientConnOpt
(addr string, lowlatency bool)
http2/client.go:132
↓ 1 callersFunctionhandleReq
(c net.Conn, logger *slog.Logger)
example/relay-http-proxy/main.go:119
↓ 1 callersFunctioninitDisallowedPortsBitset
()
config.go:25
↓ 1 callersFunctionloadPortFile
loadPortFile loads the provided port file. It returns a list of TCP and UDP ports to forward. The format of the file is tcp:port_number or udp:port_n
example/preproxy/main.go:63
↓ 1 callersFunctionrunProxyStatusHTTPServer
()
example/relay-http-proxy/main.go:249
↓ 1 callersFunctionsanitizeOptionsWithDefaults
sanitizeOptionsWithDefaults sets the default values for ProxyOptions.
http3/client.go:152
↓ 1 callersMethodstartReceiveLoop
startReceiveLoop starts datagramReceiveLoop with a given quic.Connection, first checking if it already has been started.
http3/client.go:289
MethodClose
Close closes a DatagramStream, returning its flow ID to the pool by calling its closeTrigger().
http3/client.go:597
MethodSetDeadline
(t time.Time)
internal/testutils/testutils.go:34
MethodSetReadDeadline
(t time.Time)
internal/testutils/testutils.go:38
MethodSetWriteDeadline
(t time.Time)
internal/testutils/testutils.go:42
FunctionTestCreateTCPStream
(t *testing.T)
http2/client_test.go:97
FunctionTestCreateTCPStream
(t *testing.T)
http3/client_test.go:164
FunctionTestCreateUDPStream
(t *testing.T)
http2/client_test.go:196
FunctionTestCreateUDPStream
(t *testing.T)
http3/client_test.go:96
FunctionTestMain
(m *testing.M)
http2/client_test.go:33
FunctionTestMain
(m *testing.M)
http3/client_test.go:32
Functionmain
()
example/relay-http-proxy/main.go:271
Functionmain
Starts running the preproxy on localaddr by tunneling connections thru the given proxyaddr to the final destination targetServer for the ports configu
example/preproxy/main.go:100