Documentation
¶
Overview ¶
Package masque copy and modify from https://github.com/Diniboy1123/usque/blob/d0eb96e7e5c56cce6cf34a7f8d75abbedba58fef/api/masque.go
Index ¶
- Constants
- func ConnectTunnel(ctx context.Context, quicConn *quic.Conn, connectUri string) (*http3.Transport, *connectip.Conn, error)
- func GenerateCert(privKey *ecdsa.PrivateKey) ([][]byte, error)
- func PrepareTlsConfig(privKey *ecdsa.PrivateKey, peerPubKey *ecdsa.PublicKey, sni string, ...) (*tls.Config, error)
- type DialQuicFn
- type IpConn
- type L4Client
Constants ¶
View Source
const ( ConnectSNI = "consumer-masque.cloudflareclient.com" ConnectURI = "https://cloudflareaccess.com" )
View Source
const (
L4ConnectSNI = "consumer-masque-proxy.cloudflareclient.com"
)
Variables ¶
This section is empty.
Functions ¶
func ConnectTunnel ¶
func ConnectTunnel(ctx context.Context, quicConn *quic.Conn, connectUri string) (*http3.Transport, *connectip.Conn, error)
ConnectTunnel establishes a QUIC connection and sets up a Connect-IP tunnel with the provided endpoint. Endpoint address is used to check whether the authentication/connection is successful or not. Requires modified connect-ip-go for now to support Cloudflare's non RFC compliant implementation.
func GenerateCert ¶
func GenerateCert(privKey *ecdsa.PrivateKey) ([][]byte, error)
func PrepareTlsConfig ¶
func PrepareTlsConfig(privKey *ecdsa.PrivateKey, peerPubKey *ecdsa.PublicKey, sni string, insecure bool) (*tls.Config, error)
PrepareTlsConfig creates a TLS configuration using the provided certificate and SNI (Server Name Indication). It also verifies the peer's public key against the provided public key.
Types ¶
type DialQuicFn ¶
type IpConn ¶
type L4Client ¶
type L4Client struct {
// contains filtered or unexported fields
}
func NewL4Client ¶
func NewL4Client(runCtx context.Context, dialFn DialQuicFn) *L4Client
Click to show internal directories.
Click to hide internal directories.