Troubleshooting 8-minute read

HTTPS Certificate Errors When Using a Proxy: HTTPS Errors Explained

Troubleshoot HTTPS certificate errors by checking your device clock, HTTPS inspection, DNS, and proxy nodes—in order, from simplest to most complex.

Note the error, then compare with a direct connection

Don’t click “Continue” yet. Note the full hostname in the address bar, the browser error code, and the certificate issuer, validity dates, and Subject Alternative Names (SANs) shown on the warning page. Compare the same HTTPS URL only: example.com and www.example.com are different hostnames, and the initial URL and the one you’re redirected to may use different certificates.

Common Chrome / Edge errorsCheck first
NET::ERR_CERT_DATE_INVALIDCheck whether your device’s date matches the actual date and whether the certificate is expired or not yet valid.
NET::ERR_CERT_AUTHORITY_INVALIDCheck the issuer and certificate chain, and whether traffic passes through an organization’s gateway or local HTTPS inspection.
NET::ERR_CERT_COMMON_NAME_INVALIDCheck whether the certificate SAN covers the current hostname and whether you’ve reached the wrong site.
ERR_PROXY_CONNECTION_FAILEDCheck whether the browser can connect to the proxy’s listening address; this is not a website certificate validation error.

On the same device, browser, and network, test a direct connection first, then test through the proxy with your original settings. For the direct test, turn off Clash system proxy and TUN, and check for browser proxy extensions or other system proxies. Setting the policy group to DIRECT alone does not bypass Clash DNS or traffic interception. Reopen the browser after switching to reduce the effect of existing connections. If the target site is already inaccessible over a direct connection, record that as “direct connection unavailable”; it does not show whether the site’s certificate is valid.

Step 1: Check your device’s clock

The clock affects certificate validity checks, not proxy node speed tests. For example, if a certificate becomes valid at 00:00 UTC on October 21 but your device clock is still on October 20, the browser may report that the certificate is not yet valid. Check the date, time, and time zone. A different displayed time zone is not necessarily a problem; what matters is whether your device shows the correct actual time.

  • Windows 11: Go to Settings → Time & language → Date & time. Turn on Set time automatically, then try Sync now under Additional settings.
  • macOS: Go to System Settings → General → Date & Time. Check that Set time and date automatically is enabled and verify the selected time zone.

After syncing, retry the original URL and another HTTPS site that normally works. If multiple sites show date-related errors on both connection paths, check your device clock first. If only one site fails, and the same expired certificate appears on another device with the correct time and a different network, contact the site operator. Switching proxy nodes cannot fix an expired website certificate.

Step 2: Check the issuer and HTTPS inspection

Ordinary forwarding through Clash or mihomo does not issue certificates for destination websites. When you access HTTPS through an HTTP proxy, the browser typically uses CONNECT to establish a tunnel and still validates the website certificate. TUN changes how traffic is intercepted; it does not mean HTTPS is being decrypted. If several unrelated sites show the same organization or security software as the issuer after you switch connection paths, first check whether that path uses HTTPS inspection.

  • Managed devices: Give your administrator the error code, hostname, and issuer, and ask whether an organization gateway or managed trust policy is in use. Don’t install root certificates from an error page or subscription.
  • Personal devices: Check whether your security software has encrypted connection scanning enabled, and whether another proxy or debugging tool is running. Compare with a trusted network to distinguish device-side effects from network-side ones.
  • Public Wi-Fi: Complete authentication using your operating system’s network prompt. A captive portal can interfere with connections before sign-in; don’t use the certificate warning for the original site to open the login page.

Step 3: Check the hostname, rules, and DNS path

If the browser requests example.com but the certificate SAN lists only another domain, the request may have reached the wrong site. DNS interference isn’t the only possible cause: a misconfigured virtual host, a public network’s captive portal, or a different DNS resolution path in the browser can produce similar symptoms. Don’t replace the hostname in the address bar with an IP to test the certificate. That changes the identity the browser validates and may also change which certificate the server selects.

  1. Check which rule matched. Open the client’s Connections or Logs page, find the new request for the original hostname, and note the matched rule, policy group, and actual outbound. In rule mode, rules are generally evaluated in order, and the first matching rule determines where traffic goes. Having the system proxy enabled doesn’t mean the domain uses a proxy node; it may match DIRECT.
  2. Check which resolver was used. Run nslookup example.com in a terminal to see the response from the resolver used by that command, but this doesn’t prove the browser or proxy got the same result. Browser Secure DNS, mihomo DNS settings, and connections where the proxy resolves the hostname remotely may all use different paths. Record results from a trusted network for comparison; different IPs returned by a CDN are not, by themselves, evidence of DNS interference.
  3. Test TUN separately. Compare “system proxy only” with “TUN enabled,” keeping the policy group and node unchanged. If the issue occurs only with TUN, check tun.dns-hijack and dns.enhanced-mode in the active configuration. For example, any:53 applies to matching traditional DNS traffic; it does not automatically turn browser DoH requests sent over HTTPS into ordinary DNS queries.

With fake-ip enabled, addresses in the configured range may be synthetic addresses mihomo uses to map domain names. For example, if the configuration uses 198.18.0.1/16, seeing a response in that range does not mean the website’s public IP has been altered. Check the connection log for the target domain and actual outbound to see where the request went. Don’t clear rules or replace DNS wholesale just because you see a synthetic address.

Step 4: Keep rules fixed and compare nodes one at a time

Keep the device, network, browser, and URL unchanged. Manually pin node A in the policy group and reopen the target page; then switch to node B and repeat. Check the Connections page each time to confirm the actual outbound, so an automatic health-check group doesn’t switch nodes during testing. If A consistently fails while B works, the issue is likely related to A’s exit, DNS resolution, or upstream route—but a single failure still doesn’t prove that the node is decrypting HTTPS.

To rule out browser extensions and browser proxy settings, turn off TUN and test explicitly through the local HTTP proxy from the command line. The example assumes mihomo’s mixed-port is 7890 and is listening on localhost; change the port to match the one shown in your client. Replace the example URL with the HTTPS address that reports the error. In Windows PowerShell, use curl.exe.

curl -v --connect-timeout 10 --max-time 20 \
  --noproxy "" --proxy http://127.0.0.1:7890 https://example.com/

The example above uses backslashes for line continuation; in PowerShell, put the command on one line. --noproxy "" clears the proxy bypass list. Verbose output helps pinpoint the stage of failure: if it can’t connect to 127.0.0.1:7890, check the local listener; if CONNECT fails, check proxy forwarding and the outbound; if certificate validation fails only after the tunnel is established, check the website certificate. curl and browsers may use different certificate trust stores. If their results differ, compare the specific errors rather than treating either result as definitive.

Wrap up: Choose a fix based on the scope of the issue

  • Multiple sites fail on one device: Fix time synchronization first, then check local certificate trust and security software. If the issue occurs only on one network, check that network’s captive portal or managed proxy.
  • One site fails across devices and networks: If the same expired certificate, hostname mismatch, or certificate chain error appears, send the evidence to the site operator. There’s no need to reinstall Clash repeatedly.
  • Failure occurs only with a specific node or TUN path: Keep the error codes, issuers, matched rules, node names, and core versions from both tests. Before sharing logs, remove subscription URLs, access tokens, and proxy credentials.

Once access is restored, retry the full URL that originally failed. Confirm that the browser no longer shows a certificate warning and that the outbound route is the one you expect. Being able to open other sites—or opening the original site only after bypassing the warning—doesn’t mean the issue is fixed.

Download Clash