<commit_before># 配置OpenWrt路由器智能自动翻墙

## OpenWrt路由器用dnsmasq转发国内重要域名查询

OpenWrt默认自带dnsmasq，我们只要配置一下就好了。ssh登陆OpenWrt路由器后:

- 建立dnsmasq.d目录：

		root@OpenWrt:~# mkdir /etc/dnsmasq.d
		root@OpenWrt:~# echo "conf-dir=/etc/dnsmasq.d" >> /etc/dnsmasq.conf

- OpenWrt安装GNU wget以支持https下载，下载国内重要网站名单，用国内域名服务器查询iP地址

		root@OpenWrt:~# cd /etc/dnsmasq.d
		root@OpenWrt:/etc/dnsmasq.d# opkg install wget
		root@OpenWrt:/etc/dnsmasq.d# wget -4 --no-check-certificate -O /etc/dnsmasq.d/accelerated-domains.china.conf https://github.com/felixonmars/dnsmasq-china-list/raw/master/accelerated-domains.china.conf
		root@OpenWrt:/etc/dnsmasq.d# wget -4 --no-check-certificate -O /etc/dnsmasq.d/bogus-nxdomain.china.conf https://github.com/felixonmars/dnsmasq-china-list/raw/master/accelerated-domains.china.conf

	注：accelerated-domains.china.conf文件中的条目举例：

		server=/10010.com/114.114.114.114
		server=/115.com/114.114.114.114

	意思是，访问10010.com这个结尾的域名时，dnsmasq会转发到国内的域名服务器192.168.127.12进行dns查询。

## 其他域名，转发到shdowsocks-libev ss-tunnel指定的端口dns查询
	<commit_msg>03.5.md: fixed link<commit_after># 配置OpenWrt路由器智能自动翻墙

## OpenWrt路由器用dnsmasq转发国内重要域名查询

OpenWrt默认自带dnsmasq，我们只要配置一下就好了。ssh登陆OpenWrt路由器后:

- 建立dnsmasq.d目录：

		root@OpenWrt:~# mkdir /etc/dnsmasq.d
		root@OpenWrt:~# echo "conf-dir=/etc/dnsmasq.d" >> /etc/dnsmasq.conf

- OpenWrt安装GNU wget以支持https下载，下载国内重要网站名单，用国内域名服务器查询iP地址

		root@OpenWrt:~# cd /etc/dnsmasq.d
		root@OpenWrt:/etc/dnsmasq.d# opkg install wget
		root@OpenWrt:/etc/dnsmasq.d# wget -4 --no-check-certificate -O /etc/dnsmasq.d/accelerated-domains.china.conf https://github.com/felixonmars/dnsmasq-china-list/raw/master/accelerated-domains.china.conf
		root@OpenWrt:/etc/dnsmasq.d# wget -4 --no-check-certificate -O /etc/dnsmasq.d/bogus-nxdomain.china.conf https://github.com/felixonmars/dnsmasq-china-list/raw/master/bogus-nxdomain.china.conf

	注：accelerated-domains.china.conf文件中的条目举例：

		server=/10010.com/114.114.114.114
		server=/115.com/114.114.114.114

	意思是，访问10010.com这个结尾的域名时，dnsmasq会转发到国内的域名服务器192.168.127.12进行dns查询。

## 其他域名，转发到shdowsocks-libev ss-tunnel指定的端口dns查询
	
{'fraction_non_alphanumeric': 0.14423540762180415, 'fraction_numerical': 0.049686444766039554, 'mean_word_length': 4.908831908831909, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 6, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '860214', 'n_tokens_mistral': 1234, 'n_tokens_neox': 1169, 'n_words': 84}