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
相关推荐
何中应1 天前
如何给虚拟机系统扩容
linux·运维·服务器
缘友一世1 天前
tmux 共享终端:AI 模型执行命令的实时审计方案
linux·llm·tmux·agent终端交互审计
沐雪轻挽萤1 天前
无人系统:Ubuntu 操作系统全景架构与实战工程指南
linux·运维·ubuntu
白緢1 天前
嵌入式 Linux + 内核开发高频问题及排查
java·linux·运维
学编程就要猛1 天前
JavaEE初阶:网络编程
运维·服务器·网络
hughnz1 天前
钻井自动化案例研究
运维·自动化
ILL11IIL1 天前
Docker容器技术
运维·docker·容器
蜡笔小新..1 天前
Linux下Matplotlib使用Times New Roman字体的解决方案
linux·运维·matplotlib
飞yu流星1 天前
文件压缩、文本内容、文本编辑
运维·服务器
洪流之源1 天前
图像格式转换与内存对齐详解
linux