> For the complete documentation index, see [llms.txt](https://nexitally-1.gitbook.io/nexitally-wen-dang-zhong-xin/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nexitally-1.gitbook.io/nexitally-wen-dang-zhong-xin/nexitally-wen-dang-dao-hang/openclash-she-zhi.md).

# Openclash 设置

### **一、 订阅** <a href="#e4-b8-80-e3-80-81-e8-ae-a2-e9-98-85" id="e4-b8-80-e3-80-81-e8-ae-a2-e9-98-85"></a>

<mark style="color:red;">**自行修改配置文件或者使用第三方转换过的订阅配置有可能导致断网、不稳定、流媒体解锁失效等问题，请使用官网提供的原版订阅。**</mark>

1\. 复制订阅连接

<figure><img src="/files/9WDw90oo9mIm2sONAuv4" alt=""><figcaption></figcaption></figure>

2\. 打开 openclash，配置文件订阅

<figure><img src="/files/Gby1oA9kOu78ZeA5g0h9" alt=""><figcaption></figcaption></figure>

3\. 黏贴订阅地址并保存

<figure><img src="/files/VDnR77Dwpy3D1gC5U7Pa" alt=""><figcaption></figcaption></figure>

4\. 设置订阅自动更新，更新配置

<mark style="color:red;">**务必关闭订阅的自动更新，下图为配图错误**</mark>

<mark style="color:red;">**务必关闭订阅的自动更新，下图为配图错误**</mark>

<mark style="color:red;">**务必关闭订阅的自动更新，下图为配图错误**</mark>

<figure><img src="/files/fEun0LPVAOxqZnYbjNXe" alt=""><figcaption></figcaption></figure>

### **二、 Openclash设置** <a href="#e4-ba-8c-e3-80-81-e5-85-a8-e5-b1-80-e8-ae-be-e7-bd-ae-ef-bc-88-e4-bb-85-e9-9c-80-e5-9c-a8-e6-9c-80-e" id="e4-ba-8c-e3-80-81-e5-85-a8-e5-b1-80-e8-ae-be-e7-bd-ae-ef-bc-88-e4-bb-85-e9-9c-80-e5-9c-a8-e6-9c-80-e"></a>

<mark style="color:red;">**请严格根据下面的说明进行设置，避免繁杂的可设置项导致的奇怪问题。**</mark>

1\. 模式设置

<figure><img src="/files/uRJo7Qn3Curp0loTg7En" alt=""><figcaption></figcaption></figure>

2\. DNS 设置

<figure><img src="/files/KpFEfwZoAXiht8h59lbh" alt=""><figcaption></figcaption></figure>

3\. 禁用覆写

下图红框内的选项需全部<mark style="color:red;">禁用</mark>

下面红框内的勾选项请<mark style="color:red;">不要选择</mark>

<figure><img src="/files/PcjcJF2rl4W60Z2tkguL" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/YvxVV1q7MMfoIIJrejzi" alt=""><figcaption></figcaption></figure>

4\. GEO 数据库订阅

<figure><img src="/files/k9OcJRQVsma3c1ZPIpGn" alt=""><figcaption></figcaption></figure>

5\. 大陆白名单订阅

<figure><img src="/files/XWbLNDLWlHljcUQmsill" alt=""><figcaption></figcaption></figure>

6\. 应用配置

<figure><img src="/files/OQTca7wFrSyraPSP2K2f" alt=""><figcaption></figcaption></figure>

### **三、 节点选择** <a href="#e4-b8-89-e3-80-81-e8-8a-82-e7-82-b9-e9-80-89-e6-8b-a9" id="e4-b8-89-e3-80-81-e8-8a-82-e7-82-b9-e9-80-89-e6-8b-a9"></a>

选择 Yacd 控制面板

<figure><img src="/files/p9jBZ0GKnDgTeZnxzKBJ" alt=""><figcaption></figcaption></figure>

选择节点

<figure><img src="/files/2xjjaKrUAT129ahSsq0o" alt=""><figcaption></figcaption></figure>

### **四、 起飞** <a href="#e5-9b-9b-e3-80-81-e8-b5-b7-e9-a3-9e" id="e5-9b-9b-e3-80-81-e8-b5-b7-e9-a3-9e"></a>

测速

<figure><img src="/files/Anu21JsaDTAy6lxyuTuS" alt=""><figcaption></figcaption></figure>

晚高峰油管

<figure><img src="/files/YBeaPYeRsdaA84uwflmj" alt=""><figcaption></figcaption></figure>

### **五、其他** <a href="#e4-ba-94-e3-80-81-e5-85-b6-e4-bb-96" id="e4-ba-94-e3-80-81-e5-85-b6-e4-bb-96"></a>

1\. Openclash 固件更新

<figure><img src="/files/hJHTbNeDWczxiaO2hUb6" alt=""><figcaption></figcaption></figure>

2\. 假如家里路由级已经解决了科学上网，那么手机等终端设备是没必要再重复开启代理的，不然速度会更慢，性 能开销也属浪费，但是当出了家门，连到公司 Wi-Fi，又或者在咖啡厅，那么又需要开启代理。OK，这个过程 完全是固定模式，有办法自动吗？YES。

A. Shadowrocket 自动切换

<figure><img src="/files/mK4y7RrclsreT8aDv1ot" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/JaTYG14MsIo4nQYooqDx" alt=""><figcaption></figcaption></figure>

B. Surge 自动切换（参考文档：<https://1991421.cn/2021/02/06/44d2c58d/）>

**配置 主配置文件，增加以下配置**

\[Script]\
script1 = type=event,event-name=network-changed,script-path=wifi-changed.js

**wifi-changed.js 脚本内容如下**

const WIFI\_DONT\_NEED\_PROXYS = \[“软路由连接的 WI-FI SSID”];\
const CURRENT\_WIFI\_SSID\_KEY = ‘current\_wifi\_ssid’;\
if (wifiChanged()) {\
const mode = WIFI\_DONT\_NEED\_PROXYS.includes($network.wifi.ssid)\
? ‘direct’\
: ‘rule’;\
$surge.setOutboundMode(mode);\
$notification.post(\
‘Surge’,\
\`Wi-Fi changed to ${$network.wifi.ssid || ‘cellular’}\`,\
\`use ${mode} mode\`\
);\
}\
function wifiChanged() {\
const currentWifiSSid = $persistentStore.read(CURRENT\_WIFI\_SSID\_KEY);\
const changed = currentWifiSSid !== $network.wifi.ssid;\
changed && $persistentStore.write($network.wifi.ssid,\
CURRENT\_WIFI\_SSID\_KEY);\
return changed;\
}\
$done();
