2026-05-08
Clash Proxy and Meituan Intranet Coexistence
2026-05-08 ~ 2026-10-15

The note is generated by CatDesk.

Problem

After enabling Clash system proxy, Meituan intranet sites (*.sankuai.com, *.meituan.com) and internal IPs (33.x.x.x, 11.x.x.x) become inaccessible.

Root Cause Analysis

  1. Fake-IP mode interference — Clash’s fake-ip mode assigns fake IPs (198.18.x.x) to all domains, which means intranet traffic that should match IP-CIDR,10.0.0.0/8,DIRECT rules can never match because the domain was mapped to a fake IP instead of the real internal IP.
  2. Missing domain DIRECT rules — DIRECT rules for intranet domains are positioned too far down in the rule list, so higher-priority rules match first and route traffic through the proxy.
  3. Incomplete system proxy bypass list — macOS’s default proxy bypass list only includes 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16, but not 33.0.0.0/8 or other Meituan internal IP ranges.

Solution (Clash Verge Rev)

Config directory: ~/Library/Application Support/io.github.clash-verge-rev.clash-verge-rev/

2026-05-08
Fake-IP Mode Explained
2026-05-08 ~ 2026-10-15

The note is generated by CatDesk.

What is Fake-IP

Fake-IP is a DNS resolution strategy used by proxy tools like Clash (Mihomo), Clash Verge, and similar transparent proxy software. Instead of performing a real DNS lookup when an application requests a domain, the proxy immediately returns a fabricated IP address from a reserved subnet (typically 198.18.0.0/16). The proxy maintains an internal mapping table between these fake IPs and the original domains, so when traffic is later routed to a fake IP, the proxy knows which domain the traffic was actually destined for.

2025-12-08
SSH转发让A server使用B server的代理
2025-12-08 ~ 2025-12-08

The note is generated by “chatGPT”.

当希望 A 服务器借用 B 服务器的代理网络(例如 Clash/Mihomo 的 7890 端口)时,可以使用 SSH 的端口转发(ssh -L)来实现。
最终效果是:

A 访问 127.0.0.1:本地端口  → 通过 SSH 转发到 B:7890 → B 的 Clash 提供代理功能

1️⃣ 前提条件

  • A 可以 SSH 登录 B

2025-10-24
Proxy set, but ssh -T git@github.com fails
2025-10-24 ~ 2026-10-15

The note is generated by ChatGPT.

Observation — Proxy set, but SSH still fails

Although you set http_proxy / https_proxy (or all_proxy), running:

1
ssh -T git@github.com

still times out or fails.

Root cause — SSH does NOT use the HTTP proxy (key point)

Terminal HTTP/SOCKS environment variables affect HTTP/HTTPS-aware programs (curl, wget, git clone https://…, etc.), but OpenSSH does not honor those variables. SSH opens a raw TCP connection and must be explicitly told to use a proxy — otherwise it tries a direct connection and gets blocked by the network/firewall.

2025-10-22
Root配置全体用户均可用的代理
2025-10-22 ~ 2025-10-22

The note is generated by chatGPT.

🌟 在 Linux 服务器上用 root 配置 Clash 服务


🪶 1. 创建目录并放置文件

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
sudo mkdir -p /opt/mihomo
cd /opt/mihomo


将clash for linux的相关文件移动到/opt/mihomo:
/opt/mihomo/
├── clash-linux        # 主程序(可执行文件)
├── config.yaml        # 配置文件
├── Country.mmdb       # 国家数据库
├── GeoIP.dat          # IP 地理数据库
├── GeoSite.dat        # 网站分类数据库
├── cache.db           # 可选缓存文件

设置权限(root 拥有,程序可执行):

2025-10-16
WSL代理配置指南
2025-10-16 ~ 2025-10-16

The note is generated by DeepSeek.

📋 概述

本指南介绍如何在 WSL (Windows Subsystem for Linux) 中配置和使用 Windows 主机上的 SOCKS5 代理,实现网络访问的代理功能。

🛠️ 配置步骤

1. 创建代理配置文件

创建文件 ~/.bash_proxy 并添加以下内容:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# ==================== 代理管理函数 ====================

# 获取 Windows 主机 IP
get_hostip() {
    cat /etc/resolv.conf | grep nameserver | awk '{print $2}'
}

# 开启代理
proxy_on() {
    export hostip=$(get_hostip)
    export ALL_PROXY="socks5://${hostip}:10810"
    export HTTP_PROXY="socks5://${hostip}:10810"
    export HTTPS_PROXY="socks5://${hostip}:10810"
    export http_proxy="socks5://${hostip}:10810"
    export https_proxy="socks5://${hostip}:10810"
    
    echo "🔓 代理已开启"
    echo "   SOCKS5: socks5://${hostip}:10810"
}

# 关闭代理
proxy_off() {
    unset ALL_PROXY
    unset HTTP_PROXY
    unset HTTPS_PROXY
    unset http_proxy
    unset https_proxy
    unset hostip
    
    echo "🔒 代理已关闭"
}

# 显示代理状态
proxy_status() {
    if [ -n "$ALL_PROXY" ]; then
        echo "🟢 代理状态: 开启"
        echo "   ALL_PROXY=$ALL_PROXY"
        echo "   HTTP_PROXY=$HTTP_PROXY"
        echo "   HTTPS_PROXY=$HTTPS_PROXY"
    else
        echo "🔴 代理状态: 关闭"
    fi
}

# 测试代理连接
proxy_test() {
    echo "🧪 测试代理连接..."
    if curl -s --connect-timeout 10 -I https://www.google.com > /dev/null; then
        echo "✅ 代理连接成功"
    else
        echo "❌ 代理连接失败"
    fi
}

# 快速切换代理
proxy_switch() {
    if [ -n "$ALL_PROXY" ]; then
        proxy_off
    else
        proxy_on
    fi
}

# 显示当前网络信息
proxy_info() {
    echo "🌐 网络信息:"
    echo "   WSL IP: $(hostname -I 2>/dev/null | awk '{print $1}')"
    echo "   Windows IP: $(get_hostip)"
    echo "   代理端口: 10810"
}

2. 修改 Bash 配置文件

在 ~/.bashrc 文件末尾添加以下内容:

2025-10-06
为Git配置代理
2025-10-06 ~ 2025-10-06

❗️The note is generated by DeepSeek.

🔧 配置 Git 使用 HTTP 代理

您可以通过 Git 命令行来设置全局的 HTTP 和 HTTPS 代理。

  1. 设置全局代理:
    打开终端(例如 Windows 的 Git Bash、macOS 的 Terminal 或 Linux 的 Shell),执行以下命令: