惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
MyScale Blog
MyScale Blog
U
Unit 42
M
MIT News - Artificial intelligence
小众软件
小众软件
P
Proofpoint News Feed
雷峰网
雷峰网
L
LangChain Blog
S
SegmentFault 最新的问题
腾讯CDC
F
Fortinet All Blogs
A
About on SuperTechFans
WordPress大学
WordPress大学
Vercel News
Vercel News
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
G
Google Developers Blog
大猫的无限游戏
大猫的无限游戏
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
D
Docker
N
Netflix TechBlog - Medium
Apple Machine Learning Research
Apple Machine Learning Research
Recent Announcements
Recent Announcements
D
DataBreaches.Net
Stack Overflow Blog
Stack Overflow Blog

依云's Blog

Wayfire支持不缩放Xwayland啦 - 依云's Blog 使用wayvnc远程访问无头Wayfire会话 - 依云's Blog pacfiles: 高速的 pacman -F 替代品 用 Android 手机当电脑的话筒 - 依云's Blog 使用 ffmpeg 对音频文件进行响度归一化 - 依云's Blog 使用 nftables 屏蔽大量 IP - 依云's Blog YubiKey 初体验 - 依云's Blog fcitx5 码表同步方案 - 依云's Blog 我正在使用的火狐扩展(2024年版) - 依云's Blog 使用 PipeWire 实现自动应用均衡器 如果你发现你的 OOM Killer 在乱杀进程 使用 atuin 管理 shell 命令历史 btrfs 元数据满了怎么办 btrfs 翻车记 在 nspawn 里运行 docker Linux 上的字体配置与故障排除 新的 PaddleOCR 部署方案 使用 EasyEffects 调整 Bose 音箱的体验 让离线软件真正离线 我所讨厌的网页行为 tmux 状态栏优化 Google Chrome 中的字体设置 从 getmail6 到 offlineimap 微信消息通知的困扰 Qt 的字体渲染问题 Wayfire 迁移进展(四):不那么 high 的 DPI Wayfire 迁移进展(二):Xwayland HiDPI 以及 waybar Wayfire 迁移进展 不同情况下的图形效果 Wayland 初体验
dnscrypt + dnsmasq
依云 · 2012-11-10 · via 依云's Blog

安装过程没什么特别的就不说了。

启动 dnscrypt-proxy。由于 systemd 实在太复杂,一时半会搞不明白,所以我直接手动启动了:

sudo dnscrypt-proxy --local-address=0.0.0.0:35535 --user=nobody --logfile=/var/log/dnscrypt.log --daemonize

然后测试下:

>>> dig -p 35535 twitter.com @localhost

; <<>> DiG 9.9.2 <<>> -p 35535 twitter.com @localhost
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 65004
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 8192
;; QUESTION SECTION:
;twitter.com.                   IN      A

;; ANSWER SECTION:
twitter.com.            16      IN      A       199.59.148.82
twitter.com.            16      IN      A       199.59.149.230
twitter.com.            16      IN      A       199.59.150.39

;; Query time: 267 msec
;; SERVER: 127.0.0.1#35535(127.0.0.1)
;; WHEN: Sat Nov 10 15:07:01 2012
;; MSG SIZE  rcvd: 88

It works!

然后配置 dnsmasq。

server=127.0.0.1#35535
bogus-nxdomain=67.215.65.132

bogus-nxdomain那行是为 OpenDNS 加的,类似于国内 ISP 的「114 页面」。dnscrypt 默认使用 OpenDNS 的服务器,暂时不知道其它提供加密 DNS 的服务器地址,所以只好这样了。

然后重启 dnsmasq 就 OK 了。

说点题外话。其实很多服务进程启动起来很简单,比如 sshd,改好配置文件后直接运行就可以了。再比如 mongod 和 privoxy,手动启动还方便指定配置文件什么的。我的个人电脑不是服务器,不需要复杂的各种管理。虽然说不是服务器,但重启次数还是不需要和 Windows 比的。所以,systemd 给我带来了一堆麻烦,却没能解决我遇到的任何问题