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
相关推荐
love530love1 小时前
【笔记】在 MSYS2(MINGW64)中安装 python-maturin 的记录
运维·开发语言·人工智能·windows·笔记·python
yan123683 小时前
Linux 驱动之设备树
android·linux·驱动开发·linux驱动
吐泡泡_3 小时前
进程间通信(消息队列)
linux
Li-Yongjun5 小时前
5G-A:开启通信与行业变革的新时代
运维·服务器·5g
待什么青丝5 小时前
【Ubuntu】摸鱼技巧之虚拟机环境复制
linux·运维·ubuntu
Demisse5 小时前
[MongoDB] 认识MongoDB以及在Windows和Linux上安装MongoDB
linux·windows·mongodb
中杯可乐多加冰5 小时前
采用Bright Data+n8n+AI打造自动化新闻助手:每天5分钟实现内容日更
运维·人工智能·自动化·大模型·aigc·n8n
东临碣石826 小时前
【AI论文】SWE-rebench:一个用于软件工程代理的任务收集和净化评估的自动化管道
运维·自动化
独行soc6 小时前
2025年渗透测试面试题总结-匿名[校招]高级安全工程师(代码审计安全评估)(题目+回答)
linux·安全·web安全·面试·职场和发展·渗透测试
LB21126 小时前
Maven(黑马)
linux·服务器·maven