Created
November 24, 2025 03:33
-
-
Save xxnuo/375e4acd478bb689f39d58c1d3a173ea to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 这里是部分关键配置项,将这些设置加入到你原有的配置文件里即可。 | |
| 测试 Windows/macOS/Linux/Android 都支持代理和微服正常共存:都能在通过代理接管网络(包括 Tun 模式),后台运行微服客户端时,任意浏览器和软件里访问微服 App。 | |
| 桌面微服客户端无需调整配置,Android 微服客户端网络模式使用代理模式(客户端模式 Proxy),iOS 暂未测试,理论上也可行。 | |
| 配置兼容 cl*sh 系内核: | |
| ```yaml | |
| tun: | |
| dns-hijack: | |
| - "any:53" | |
| - "tcp://any:53" | |
| - "any:853" | |
| - "tcp://any:853" | |
| auto-route: true | |
| auto-redirect: true | |
| auto-detect-interface: true | |
| strict-route: true | |
| route-exclude-address: | |
| - 6.6.6.6/32 | |
| - 2000::6666/128 | |
| - fc03:1136:3800::/40 | |
| - 192.168.0.0/16 | |
| - 10.0.0.0/8 | |
| - 172.16.0.0/12 | |
| - 224.0.0.0/4 | |
| dns: | |
| ipv6: true | |
| respect-rules: true | |
| enhanced-mode: fake-ip | |
| fake-ip-range: 198.18.0.1/16 | |
| fake-ip-filter-mode: blacklist | |
| fake-ip-filter: | |
| - "+.lan" | |
| - "+.local" | |
| - "+.localhost" | |
| - "+.home.arpa" | |
| - "localhost.ptlogin2.qq.com" | |
| - "+.msftconnecttest.com" | |
| - "+.msftncsi.com" | |
| - "+.heiyu.space" | |
| default-nameserver: | |
| - system | |
| nameserver-policy: | |
| "+.heiyu.space": | |
| - system | |
| proxies: | |
| - name: "懒猫微服" | |
| type: http | |
| server: 127.0.0.1 | |
| port: 31085 | |
| skip-cert-verify: true | |
| rules: | |
| - PROCESS-NAME,adb,全球直连 | |
| - PROCESS-NAME,懒猫微服,全球直连 | |
| - PROCESS-NAME,lzc-core.darwin,全球直连,no-resolve | |
| - DOMAIN-SUFFIX,heiyu.space,懒猫微服 | |
| - DOMAIN-SUFFIX,lazycat.cloud,全球直连 | |
| - DOMAIN-SUFFIX,lazycatmicroserver.com,全球直连 | |
| ``` | |
| 关键配置原理: | |
| 1. Tun 网卡接管 DNS 查询请求,并排除微服使用到的一些网络地址让他们直连; | |
| 2. DNS 设置使用 fake-ip 模式加速普通网络访问,并将微服域名放到排除规则,防止微服解析到假 IP; | |
| 3. DNS 将 heiyu.space 的请求转发到系统交由微服网卡解析;这里其实填写规则将 heiyu.space 交由 fc03:1136:3800::1 这个地址解析也能实现访问,但是微服网络诊断会报错 heiyu.space 的 DNS 解析被劫持,索性直接交由 system 处理,这时候不会误报; | |
| 4. Proxies 字段里写上微服内置的一个 http 代理服务器,然后在 Rules 里规定将 heiyu.space 的请求都通过微服内置 http 代理服务器访问,实现在外部、任意浏览器访问微服应用。 | |
| 官方网络相关攻略:https://developer.lazycat.cloud/network.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment