mitm.go 307 B

123456789101112131415
  1. package adapter
  2. import (
  3. "context"
  4. "crypto/x509"
  5. "net"
  6. N "github.com/sagernet/sing/common/network"
  7. )
  8. type MITMEngine interface {
  9. Lifecycle
  10. ExportCertificate() *x509.Certificate
  11. NewConnection(ctx context.Context, this N.Dialer, conn net.Conn, metadata InboundContext, onClose N.CloseHandlerFunc)
  12. }