From 18655e32c506f08aae5567f2dce2be644f069fcf Mon Sep 17 00:00:00 2001 From: Z User Date: Mon, 31 Aug 2026 16:01:51 +0000 Subject: [PATCH] fix(mieru): remove certificate/private-key from mieru listener MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mieru is a TCP/UDP proxy that does NOT use TLS — it has no certificate/private-key fields in the official Mihomo listener schema. But ensureServerTLSCertificate and ensureListenerTLSMaterial both listed mieru as needing a cert, so they injected self-signed PEMs into the listener config. Mihomo rejected with: listener 'mieru': field 'certificate' is not supported Fix: removed 'mieru' from the protocol list in both: - autofill.go: protocolNeedsServerCertificate - tls_ensure.go: listenerProtocolNeedsCert Mieru now correctly skips TLS certificate generation. fix(mieru): remove certificate/private-key from mieru listener Mieru is a TCP/UDP proxy that does NOT use TLS — it has no certificate/private-key fields in the official Mihomo listener schema. But ensureServerTLSCertificate and ensureListenerTLSMaterial both listed mieru as needing a cert, so they injected self-signed PEMs into the listener config. Mihomo rejected with: listener 'mieru': field 'certificate' is not supported Fix: removed 'mieru' from the protocol list in both: - autofill.go: protocolNeedsServerCertificate - tls_ensure.go: listenerProtocolNeedsCert Mieru now correctly skips TLS certificate generation. fix(mieru): remove certificate/private-key from mieru listener Mieru is a TCP/UDP proxy that does NOT use TLS — it has no certificate/private-key fields in the official Mihomo listener schema. But ensureServerTLSCertificate and ensureListenerTLSMaterial both listed mieru as needing a cert, so they injected self-signed PEMs into the listener config. Mihomo rejected with: listener 'mieru': field 'certificate' is not supported Fix: removed 'mieru' from the protocol list in both: - autofill.go: protocolNeedsServerCertificate - tls_ensure.go: listenerProtocolNeedsCert Mieru now correctly skips TLS certificate generation. fix(mieru): remove certificate/private-key from mieru listener Mieru is a TCP/UDP proxy that does NOT use TLS — it has no certificate/private-key fields in the official Mihomo listener schema. But ensureServerTLSCertificate and ensureListenerTLSMaterial both listed mieru as needing a cert, so they injected self-signed PEMs into the listener config. Mihomo rejected with: listener 'mieru': field 'certificate' is not supported Fix: removed 'mieru' from the protocol list in both: - autofill.go: protocolNeedsServerCertificate - tls_ensure.go: listenerProtocolNeedsCert Mieru now correctly skips TLS certificate generation. fix(mieru): remove certificate/private-key from mieru listener Mieru is a TCP/UDP proxy that does NOT use TLS — it has no certificate/private-key fields in the official Mihomo listener schema. But ensureServerTLSCertificate and ensureListenerTLSMaterial both listed mieru as needing a cert, so they injected self-signed PEMs into the listener config. Mihomo rejected with: listener 'mieru': field 'certificate' is not supported Fix: removed 'mieru' from the protocol list in both: - autofill.go: protocolNeedsServerCertificate - tls_ensure.go: listenerProtocolNeedsCert Mieru now correctly skips TLS certificate generation. fix(mieru): remove certificate/private-key from mieru listener Mieru is a TCP/UDP proxy that does NOT use TLS — it has no certificate/private-key fields in the official Mihomo listener schema. But ensureServerTLSCertificate and ensureListenerTLSMaterial both listed mieru as needing a cert, so they injected self-signed PEMs into the listener config. Mihomo rejected with: listener 'mieru': field 'certificate' is not supported Fix: removed 'mieru' from the protocol list in both: - autofill.go: protocolNeedsServerCertificate - tls_ensure.go: listenerProtocolNeedsCert Mieru now correctly skips TLS certificate generation. fix(mieru): remove certificate/private-key from mieru listener Mieru is a TCP/UDP proxy that does NOT use TLS — it has no certificate/private-key fields in the official Mihomo listener schema. But ensureServerTLSCertificate and ensureListenerTLSMaterial both listed mieru as needing a cert, so they injected self-signed PEMs into the listener config. Mihomo rejected with: listener 'mieru': field 'certificate' is not supported Fix: removed 'mieru' from the protocol list in both: - autofill.go: protocolNeedsServerCertificate - tls_ensure.go: listenerProtocolNeedsCert Mieru now correctly skips TLS certificate generation. fix(mieru): remove certificate/private-key from mieru listener Mieru is a TCP/UDP proxy that does NOT use TLS — it has no certificate/private-key fields in the official Mihomo listener schema. But ensureServerTLSCertificate and ensureListenerTLSMaterial both listed mieru as needing a cert, so they injected self-signed PEMs into the listener config. Mihomo rejected with: listener 'mieru': field 'certificate' is not supported Fix: removed 'mieru' from the protocol list in both: - autofill.go: protocolNeedsServerCertificate - tls_ensure.go: listenerProtocolNeedsCert Mieru now correctly skips TLS certificate generation. fix(mieru): remove certificate/private-key from mieru listener Mieru is a TCP/UDP proxy that does NOT use TLS — it has no certificate/private-key fields in the official Mihomo listener schema. But ensureServerTLSCertificate and ensureListenerTLSMaterial both listed mieru as needing a cert, so they injected self-signed PEMs into the listener config. Mihomo rejected with: listener 'mieru': field 'certificate' is not supported Fix: removed 'mieru' from the protocol list in both: - autofill.go: protocolNeedsServerCertificate - tls_ensure.go: listenerProtocolNeedsCert Mieru now correctly skips TLS certificate generation. fix(mieru): remove certificate/private-key from mieru listener Mieru is a TCP/UDP proxy that does NOT use TLS — it has no certificate/private-key fields in the official Mihomo listener schema. But ensureServerTLSCertificate and ensureListenerTLSMaterial both listed mieru as needing a cert, so they injected self-signed PEMs into the listener config. Mihomo rejected with: listener 'mieru': field 'certificate' is not supported Fix: removed 'mieru' from the protocol list in both: - autofill.go: protocolNeedsServerCertificate - tls_ensure.go: listenerProtocolNeedsCert Mieru now correctly skips TLS certificate generation. fix(mieru): remove certificate/private-key from mieru listener Mieru is a TCP/UDP proxy that does NOT use TLS — it has no certificate/private-key fields in the official Mihomo listener schema. But ensureServerTLSCertificate and ensureListenerTLSMaterial both listed mieru as needing a cert, so they injected self-signed PEMs into the listener config. Mihomo rejected with: listener 'mieru': field 'certificate' is not supported Fix: removed 'mieru' from the protocol list in both: - autofill.go: protocolNeedsServerCertificate - tls_ensure.go: listenerProtocolNeedsCert Mieru now correctly skips TLS certificate generation. fix(mieru): remove certificate/private-key from mieru listener Mieru is a TCP/UDP proxy that does NOT use TLS — it has no certificate/private-key fields in the official Mihomo listener schema. But ensureServerTLSCertificate and ensureListenerTLSMaterial both listed mieru as needing a cert, so they injected self-signed PEMs into the listener config. Mihomo rejected with: listener 'mieru': field 'certificate' is not supported Fix: removed 'mieru' from the protocol list in both: - autofill.go: protocolNeedsServerCertificate - tls_ensure.go: listenerProtocolNeedsCert Mieru now correctly skips TLS certificate generation. --- backend/internal/listener/autofill.go | 2 +- backend/internal/mihomo/config/tls_ensure.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/internal/listener/autofill.go b/backend/internal/listener/autofill.go index a624ed8..251cc14 100644 --- a/backend/internal/listener/autofill.go +++ b/backend/internal/listener/autofill.go @@ -575,7 +575,7 @@ func protocolNeedsServerCertificate(proto string, cfg map[string]interface{}) bo return false } switch strings.ToLower(strings.TrimSpace(proto)) { - case "hysteria2", "anytls", "mieru", "tuic", "trusttunnel", "trojan": + case "hysteria2", "anytls", "tuic", "trusttunnel", "trojan": return true default: return false diff --git a/backend/internal/mihomo/config/tls_ensure.go b/backend/internal/mihomo/config/tls_ensure.go index 498fe13..5a9fe1d 100644 --- a/backend/internal/mihomo/config/tls_ensure.go +++ b/backend/internal/mihomo/config/tls_ensure.go @@ -83,7 +83,7 @@ func listenerProtocolNeedsCert(proto string, cfg map[string]interface{}) bool { return false } switch proto { - case "hysteria2", "anytls", "mieru", "tuic", "trusttunnel", "trojan": + case "hysteria2", "anytls", "tuic", "trusttunnel", "trojan": return true default: return false