Fixing ClashX Connection Issues: Complete Troubleshooting Guide

Article 8 cover image

Problem Diagnosis Process

When ClashX cannot connect, a systematic diagnosis process can help you quickly identify the issue. Following the correct troubleshooting order can avoid wasting time on wrong directions.

Quick Diagnosis Checklist

First perform these basic checks:

Сеть Connection
Can you access other websites
ClashX Status
Is the app running properly
Proxy Settings
Is системный прокси enabled
Node Status
Is selected node valid

View Error Messages

ClashX error messages provide important clues:

View Log Steps

1. Click строка меню ClashX icon

2. Select "Help" > "Show Logs"

3. Look for lines containing "error", "failed", "timeout"

4. Record error codes and timestamps

🔍
Diagnostic Tip

Use process of elimination: test if all nodes cannot connect, or only specific nodes. This helps determine if it's a node issue or local configuration issue.

Connection Failure Troubleshooting

Common Connection Error Types

Take appropriate measures based on different error messages:

Error Type Symptom Possible Cause Решение
Connection timeout Long wait with no response Node failure or сеть blockage Switch nodes
Connection refused Immediately rejected Wrong port or service not running Check port configuration
Authentication failed Authentication failure prompt Wrong пароль or key Update подписка or modify config
Network unreachable Сеть unreachable Local сеть problem Check сеть connection

Node Connection Testing

Systematically test node availability:

  1. Click "Proxy" > "Benchmark"
  2. Wait for all nodes to complete testing
  3. Select node with lowest latency
  4. If all nodes fail, update подписка

Подписка Update Issues

If connection issues are caused by подписка:

🔄
Подписка Refresh Steps

1. Check if ссылка подписки is valid
2. Manually update подписка config
3. If update fails, contact service provider
4. Backup plan: use backup файл конфигурации

DNS Problem Resolution

DNS Failure Symptoms

DNS issues typically show these symptoms:

  • Webpage shows "cannot resolve domain name"
  • Can ping IP but cannot access domain
  • Some websites work, some don't
  • Connection speed abnormally slow

Modify Настройка DNS

Optimize ClashX DNS settings:

Recommended Настройка DNS

dns:
  enable: true
  ipv6: false
  enhanced-mode: fake-ip
  fake-ip-range: 198.18.0.1/16

  # 国内 DNS
  nameserver:
    - 119.29.29.29
    - 223.5.5.5
    - 114.114.114.114

  # 国外 DNS (加密)
  fallback:
    - tls://1.1.1.1:853
    - tls://8.8.8.8:853
    - https://dns.google/dns-query

  # 分流规则
  fallback-filter:
    geoip: true
    geoip-code: CN
    ipcidr:
      - 240.0.0.0/4
      - 0.0.0.0/32

Clear DNS Cache

Flush system and ClashX DNS cache:

Clear Cache Commands

# macOS 清除系统 DNS 缓存
sudo dscacheutil -flushcache
sudo killall -HUP mDNSResponder

# 重启 ClashX 以清除应用缓存

DNS Leak Testing

Verify DNS is working correctly:

🧪
DNS Testing Method

Visit dnsleaktest.com to check if DNS queries are properly proxied. If displayed DNS серверы don't match your configuration, there is a DNS leak.

Certificate Error Handling

Certificate Error Types

Certificate issues you may encounter when accessing HTTPS websites:

🔐
Common Certificate Errors

• Certificate expired
• Certificate not trusted
• Certificate domain mismatch
• Man-in-the-middle attack warning

Install ClashX Certificate

Steps to resolve certificate trust issues:

  1. Click ClashX menu > "Certificate" > "Install CA Certificate to System"
  2. Enter administrator пароль to confirm установка
  3. Open "Keychain Access" app
  4. Find ClashX CA certificate
  5. Double-click certificate, expand "Trust" option
  6. Set "When using this certificate" to "Always Trust"

Certificate Issue Troubleshooting

If problems persist after installing certificate:

  • Check if system time is correct (certificates are time-sensitive)
  • Regenerate and reinstall certificate
  • Check if other security software is interfering
  • Try disabling HTTPS decryption feature

Special Website Certificate Issues

Some banking or payment websites may be incompatible with HTTPS decryption. You can add DOMAIN rules to let these websites go DIRECT, bypassing proxy.

Сеть Configuration Issues

System Proxy Settings Check

Verify macOS системный прокси configuration:

HTTP Proxy
127.0.0.1:7890
HTTPS Proxy
127.0.0.1:7890
SOCKS5 Proxy
127.0.0.1:7891

Брандмауэр Configuration

Ensure брандмауэр doesn't block ClashX:

Брандмауэр Settings Steps

1. Open "System Preferences" > "Security & Конфиденциальность"

2. Click "Брандмауэр" tab

3. Click "Брандмауэр Options"

4. Ensure ClashX is allowed to accept incoming connections

Port Conflict Check

Check if ClashX ports are occupied:

Check Port Commands

# 检查端口占用
sudo lsof -i :7890
sudo lsof -i :7891
sudo lsof -i :9090

# 如果端口被占用,可以在 ClashX 配置中修改端口

VPN Conflict Issues

Running multiple прокси-инструментs simultaneously may cause conflicts:

⚠️
Avoid VPN Conflicts

When using ClashX, it's recommended to close other VPN or прокси-инструментs (like ShadowsocksX, V2RayU, Surge, etc.). If you must use them simultaneously, ensure they use different ports.

Advanced Troubleshooting

Complete ClashX Reset

When other methods don't work, try complete reset:

Reset Steps

# 1. 完全退出 ClashX
# 2. 删除配置文件
rm -rf ~/.config/clash

# 3. 删除日志文件
rm -rf ~/Library/Logs/ClashX

# 4. 重新启动 ClashX
# 5. 重新添加订阅或配置
💾
Important Reminder

Be sure to backup your файл конфигурацииs and ссылка подпискиs before resetting! You can copy ~/.config/clash directory to a safe location.

Reinstall ClashX

If the app itself has problems:

  1. Completely quit ClashX
  2. Move ClashX.app to Trash
  3. Empty Trash
  4. Download latest version from official GitHub
  5. Install and reconfigure

Use Расширенный режим

If system режим прокси doesn't work, try enhanced mode:

Расширенный режим Benefits

Enhanced mode can capture трафик from apps that don't follow системный прокси settings. Check "Расширенный режим" in ClashX menu to enable.

Seek Help

If above methods don't solve the problem:

  • Search GitHub Issues for similar problems
  • Join Telegram community for help
  • Contact your proxy service provider technical support
  • Provide detailed log information for diagnosis
Resource Purpose Link
GitHub Issues Report bugs and issues github.com/ClashX-Pro/ClashX
官方文档 View detailed documentation clash.wiki
社区论坛 Share experiences Various tech forums