ubuntu clash 配合smartdns

下载安装clash

下载安装smartdns

github 下载地址

配置

配置smartdns

  1. 设置smartdns配置端口,修改为没有占用的端口号,其他的都不用修改,官方推荐默认参数最佳!
    编辑vim /etc/smartdns/smartdns.conf
bash 复制代码
server-name smartdns
bind [::]:553 # 填写一个没有占用的端口号
  1. 启动
bash 复制代码
# 启动
sudo systemctl start smartdns
# 查看状态
sudo systemctl status smartdns
  1. 检查端口是否开启服务
shell 复制代码
ss -tunl | grep 553 

配置clash

修改部分:nameserver和fallback都填smartdns的服务端口. 其他的dns服务器不用添加。

在clash的yaml配置文件中:

yaml 复制代码
nameserver:
	127.0.0.1:553
fallback:
	127.0.0.1:553
相关推荐
木心月转码ing2 小时前
WSL+Cpp开发环境配置
linux
蝎子莱莱爱打怪1 天前
Centos7中一键安装K8s集群以及Rancher安装记录
运维·后端·kubernetes
崔小汤呀1 天前
最全的docker安装笔记,包含CentOS和Ubuntu
linux·后端
何中应1 天前
vi编辑器使用
linux·后端·操作系统
何中应1 天前
Linux进程无法被kill
linux·后端·操作系统
何中应1 天前
rm-rf /命令操作介绍
linux·后端·操作系统
何中应1 天前
Linux常用命令
linux·操作系统
葛立国1 天前
从 / 和 /dev 说起:Linux 文件系统与挂载点一文理清
linux
DianSan_ERP2 天前
电商API接口全链路监控:构建坚不可摧的线上运维防线
大数据·运维·网络·人工智能·git·servlet
哇哈哈20212 天前
信号量和信号
linux·c++