Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Invisv-Privacy/masque
/ functions
Functions
66 in github.com/Invisv-Privacy/masque
⨍
Functions
66
◇
Types & classes
10
↓ 29 callers
Method
Close
Close closes the Conn, performing necessary cleanup.
http2/conn.go:102
↓ 14 callers
Method
Write
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 callers
Method
Close
Close closes a Client object. This will kill the datagram receiver loop, and any active stream objects.
http3/client.go:545
↓ 6 callers
Function
RootDir
()
internal/testutils/testutils.go:13
↓ 6 callers
Method
releaseDatagramID
releaseDatagramID releases a datagram flow ID back into the pool for use.
http3/client.go:365
↓ 5 callers
Method
Sid
Sid returns the unique stream ID of the Conn.
http2/conn.go:79
↓ 4 callers
Method
Read
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 callers
Function
transfer
(destination io.WriteCloser, source io.ReadCloser, wg *sync.WaitGroup, logger *slog.Logger)
example/relay-http-proxy/main.go:42
↓ 3 callers
Method
CreateTCPStream
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 callers
Method
LocalAddr
()
internal/testutils/testutils.go:26
↓ 3 callers
Method
doClose
()
http2/conn.go:53
↓ 2 callers
Method
ConnectToProxy
ConnectToProxy connects the Client to the proxy.
http2/client.go:101
↓ 2 callers
Method
CreateUDPStream
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 callers
Function
HandleConnectMasque
HandleConnectMasque creates a new TCP or UDP stream via the relayClient and returns the connected stream upon success.
example/preproxy/main.go:323
↓ 2 callers
Function
IsDisallowedPort
IsDisallowedPort returns true if the given destination port number is a value that will be rejected by Fastly.
config.go:33
↓ 2 callers
Function
NewClient
NewClient creates a new Client instance with the provided parameters.
http2/client.go:73
↓ 2 callers
Function
NewClient
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 callers
Method
Read
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 callers
Method
RemoteAddr
()
internal/testutils/testutils.go:30
↓ 2 callers
Function
TLSVerifyFunc
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 callers
Function
Transfer
Transfer copies data from src to dst and closes both when done.
example/preproxy/main.go:299
↓ 2 callers
Method
connCleanup
()
http2/client.go:611
↓ 2 callers
Method
dialProxyViaTLS
()
http2/client.go:376
↓ 2 callers
Function
handleConnectMasque
handleConnectMasque handles a CONNECT request to the proxy and returns the connected stream upon success.
example/relay-http-proxy/main.go:57
↓ 2 callers
Function
isIdleTimeoutError
(err error)
http3/client.go:372
↓ 2 callers
Method
makeNewH2ClientConn
makeNewH2ClientConn must be called while c.mu is held.
http2/client.go:117
↓ 2 callers
Method
makeTLSDialer
()
http2/client.go:312
↓ 2 callers
Function
makeTLSDialerContext
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 callers
Method
refreshRoundTripper
()
http3/client.go:383
↓ 2 callers
Method
stopReceiveLoop
()
http3/client.go:328
↓ 1 callers
Method
CreateTCPStream
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 callers
Method
CreateUDPStream
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 callers
Function
StreamDataToDatagramChunk
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 callers
Method
Write
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 callers
Method
cancelAllUDPStreams
()
http3/client.go:307
↓ 1 callers
Function
connectToRelay
(certData []byte, logger *slog.Logger)
example/relay-http-proxy/main.go:231
↓ 1 callers
Method
datagramChunkToStreamData
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 callers
Method
datagramReceiveLoop
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 callers
Method
decodeLoopUDP
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 callers
Function
defaultPortList
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 callers
Method
dialProxyViaH2
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 callers
Method
dialProxyViaTLSOnce
dialProxyViaTLSOnce returns a TCP connection with TLS. |prot| is called before connecting if not nil.
http2/client.go:367
↓ 1 callers
Function
dialerControlProtect
(prot SocketProtector, logger *slog.Logger)
http2/android.go:16
↓ 1 callers
Method
encodeLoopUDP
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 callers
Method
getNewDatagramID
getNewDatagramID gets a new H3_DATAGRAM Flow ID to be used with a UDP stream.
http3/client.go:345
↓ 1 callers
Function
getNextTcpStreamID
()
http2/conn.go:13
↓ 1 callers
Function
getNextUdpStreamID
()
http2/conn.go:19
↓ 1 callers
Method
getReadyH2ClientConnOpt
(addr string, lowlatency bool)
http2/client.go:132
↓ 1 callers
Function
handleReq
(c net.Conn, logger *slog.Logger)
example/relay-http-proxy/main.go:119
↓ 1 callers
Function
initDisallowedPortsBitset
()
config.go:25
↓ 1 callers
Function
loadPortFile
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 callers
Function
runProxyStatusHTTPServer
()
example/relay-http-proxy/main.go:249
↓ 1 callers
Function
sanitizeOptionsWithDefaults
sanitizeOptionsWithDefaults sets the default values for ProxyOptions.
http3/client.go:152
↓ 1 callers
Method
startReceiveLoop
startReceiveLoop starts datagramReceiveLoop with a given quic.Connection, first checking if it already has been started.
http3/client.go:289
Method
Close
Close closes a DatagramStream, returning its flow ID to the pool by calling its closeTrigger().
http3/client.go:597
Method
SetDeadline
(t time.Time)
internal/testutils/testutils.go:34
Method
SetReadDeadline
(t time.Time)
internal/testutils/testutils.go:38
Method
SetWriteDeadline
(t time.Time)
internal/testutils/testutils.go:42
Function
TestCreateTCPStream
(t *testing.T)
http2/client_test.go:97
Function
TestCreateTCPStream
(t *testing.T)
http3/client_test.go:164
Function
TestCreateUDPStream
(t *testing.T)
http2/client_test.go:196
Function
TestCreateUDPStream
(t *testing.T)
http3/client_test.go:96
Function
TestMain
(m *testing.M)
http2/client_test.go:33
Function
TestMain
(m *testing.M)
http3/client_test.go:32
Function
main
()
example/relay-http-proxy/main.go:271
Function
main
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