Files
blog/source/_posts/2025/2025.10/adguard-and-openclash.md
2026-02-07 19:17:19 +08:00

27 lines
1.3 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: Adguard和Openclash共存
updated: ''
cover: https://pic.biss.click/image/a2472a8b-e461-4dbd-b733-e5bc4adaf6b9.webp
tags:
- AdguardHome
- Openclash
- Openwrt
categories: 技术
toc: true
comments: true
abbrlink: '66e66374'
summary: >-
这篇文章介绍了如何在已经安装了 OpenWrt 系统并配置好 OpenClash 和 AdguardHome 的情况下,实现这两者的共存。首先简要说明了
AdguardHome 和 OpenClash 的原理,它们都是通过劫持 DNS 来达到特定目的。然后分别介绍了两种配置方式:一种是在
AdguardHome 中将上游 DNS 服务器设置为 127.0.0.1:7874这种方式相对简单另一种是将 OpenClash 中的 DNS 指向
AdguardHome但可能存在拦截失败的情况。
date: 2025-10-05 15:18:00
---
在之前已经安装了`Openwrt`系统,并且也配置了`OpenClash``AdguardHome`,两者的原理简单看都是劫持`DNS`,所以两者要同时运行,必须经过一定的配置。
无非就这两种方式:
<center><img src="https://pic.biss.click/i/2025/10/05/qyl83t.png" alt="image" /></center>
左边的方式更简单一些,只需要修改`AdguardHome`的上游DNS服务器为`127.0.0.1:7874` 即可;
右边的方式需要将`OpenClash`里的`DNS`指向`AdguardHome`,但是可能有拦截失败的情况(好像没有遇到过)。