mitm: Add /mitm/mobileconfig and /mitm/certificate clash api endpoints

This commit is contained in:
世界
2025-02-03 09:09:41 +08:00
parent 1fe983a81b
commit 5361d2acec
4 changed files with 91 additions and 0 deletions

View File

@@ -91,6 +91,10 @@ func (e *Engine) Close() error {
return nil
}
func (e *Engine) ExportCertificate() *x509.Certificate {
return e.tlsCertificate
}
func (e *Engine) NewConnection(ctx context.Context, this N.Dialer, conn net.Conn, metadata adapter.InboundContext, onClose N.CloseHandlerFunc) {
if e.tlsDecryptionEnabled && metadata.ClientHello != nil {
err := e.newTLS(ctx, this, conn, metadata, onClose)