Initial Commit
This commit is contained in:
91
en/docs/install/asus.md
Normal file
91
en/docs/install/asus.md
Normal file
@@ -0,0 +1,91 @@
|
||||
---
|
||||
hide:
|
||||
- toc
|
||||
---
|
||||
|
||||
# ASUS router native firmware / Merlin firmware
|
||||
|
||||
Note: Merlin firmware is derived from ASUS firmware and can theoretically be used directly with the ASUS package. However, it is currently unverified. If you have any questions, please submit an issue.
|
||||
|
||||
## Prepare
|
||||
|
||||
When using this software, you need to confirm whether the router supports U disk and prepare a USB disk.
|
||||
|
||||
## Enable SSH login
|
||||
|
||||
Log in to the management interface, click `System Management`-> Click `System Settings` and configure `Enable SSH` to `Lan Only`.
|
||||
The SSH login username and password are the same as the management interface.
|
||||
|
||||
## Install `Download Master`
|
||||
|
||||
In the management interface, click `USB related application`-> click `Download Master` to download.
|
||||
After the download is complete, enable `Download Master`. If you do not need the download function, you can uninstall `Download Master` here, but make sure that Download Master is enabled before uninstalling.
|
||||
|
||||
## Install SmartDNS
|
||||
|
||||
Upload the software to the router's `/tmp/mnt/sda1` directory using winscp. (or copy the network neighborhood to the sda1 shared directory)
|
||||
|
||||
```shell
|
||||
ipkg install smartdns.xxxxxxx.mipsbig.ipk
|
||||
```
|
||||
|
||||
## Restart router
|
||||
|
||||
After the router is started, use `nslookup -querytype=ptr smartdns` to query the domain name.
|
||||
See if the `name` item in the command result is displayed as `smartdns` or `hostname`, such as `smartdns`
|
||||
|
||||
```shell
|
||||
pi@raspberrypi:~/code/smartdns_build $ nslookup -querytype=ptr smartdns
|
||||
Server: 192.168.1.1
|
||||
Address: 192.168.1.1#53
|
||||
|
||||
Non-authoritative answer:
|
||||
smartdns name = smartdns.
|
||||
```
|
||||
|
||||
## Note
|
||||
|
||||
In the above process, smartdns will be installed to the root directory of the U disk and run in optware mode.
|
||||
Its directory structure is as follows: (only smartdns related files are listed here)
|
||||
|
||||
```shell
|
||||
USB DISK
|
||||
└── asusware.mipsbig
|
||||
├── bin
|
||||
├── etc
|
||||
| ├── smartdns
|
||||
| | └── smartdns.conf
|
||||
| └── init.d
|
||||
| └── S50smartdns
|
||||
├── lib
|
||||
├── sbin
|
||||
├── usr
|
||||
| └── sbin
|
||||
| └── smartdns
|
||||
....
|
||||
```
|
||||
|
||||
To modify the configuration, you can use ssh to login to the router and use the vi command to modify it.
|
||||
|
||||
```shell
|
||||
vi /opt/etc/smartdns/smartdns.conf
|
||||
```
|
||||
|
||||
`smartdns.conf` example:
|
||||
|
||||
```shell
|
||||
# set listen port
|
||||
bind []:53
|
||||
# set upstream servers
|
||||
server 1.1.1.1
|
||||
server-tls 8.8.8.8
|
||||
# set domain rules
|
||||
address /example.com/1.2.3.4
|
||||
domain-rule /example.com/ -address 1.2.3.4
|
||||
```
|
||||
|
||||
It can also be modified from Network Neighborhood. From the neighbor sharing directory `sda1` you can't see the `asusware.mipsbig` directory, but you can directly enter `asusware.mipsbig\etc\init.d` in `File Manager` to modify it.
|
||||
|
||||
```shell
|
||||
\\192.168.1.1\sda1\asusware.mipsbig\etc\init.d
|
||||
```
|
||||
59
en/docs/install/entware.md
Normal file
59
en/docs/install/entware.md
Normal file
@@ -0,0 +1,59 @@
|
||||
---
|
||||
hide:
|
||||
- toc
|
||||
---
|
||||
|
||||
# EntWare
|
||||
|
||||
## Prepare
|
||||
|
||||
When using this software, you need to confirm whether the router supports USB disk and prepare a USB disk.
|
||||
|
||||
## Install SmartDNS
|
||||
|
||||
Upload the software to `/tmp` directory of the router using winscp, and run the following command to install.
|
||||
|
||||
```shell
|
||||
ipkg install smartdns.xxxxxxx.mipsbig.ipk
|
||||
```
|
||||
|
||||
## Modify the smartdns configuration
|
||||
|
||||
```shell
|
||||
Vi /opt/etc/smartdns/smartdns.conf
|
||||
```
|
||||
|
||||
`smartdns.conf` example:
|
||||
|
||||
```shell
|
||||
# set listen port
|
||||
bind []:53
|
||||
# set upstream servers
|
||||
server 1.1.1.1
|
||||
server-tls 8.8.8.8
|
||||
# set domain rules
|
||||
address /example.com/1.2.3.4
|
||||
domain-rule /example.com/ -address 1.2.3.4
|
||||
```
|
||||
|
||||
Note: if you need to support IPV6, you can set the work-mode to `2`, this will disable the DNS service of dnsmasq, and smartdns run as the primary DNS server. Change `SMARTDNS_WORKMODE` in the file `/opt/etc/smartdns/smartdns-opt.conf` to `2`.
|
||||
|
||||
```shell
|
||||
SMARTDNS_WORKMODE="2"
|
||||
```
|
||||
|
||||
## Restart the router to take effect
|
||||
|
||||
After the router is started, use `nslookup -querytype=ptr smartdns` to query the domain name.
|
||||
See if the `name` item in the command result is displayed as `smartdns` or `hostname`, such as `smartdns`
|
||||
|
||||
```shell
|
||||
Pi@raspberrypi:~/code/smartdns_build $ nslookup -querytype=ptr smartdns
|
||||
Server: 192.168.1.1
|
||||
Address: 192.168.1.1#53
|
||||
|
||||
Non-authoritative answer:
|
||||
smartdns name = smartdns.
|
||||
```
|
||||
|
||||
Note: If the service does not start automatically, you need to set optware/entware to start automatically. For details, see the optware/entware documentation.
|
||||
84
en/docs/install/linux.md
Normal file
84
en/docs/install/linux.md
Normal file
@@ -0,0 +1,84 @@
|
||||
---
|
||||
hide:
|
||||
- toc
|
||||
---
|
||||
|
||||
# Standard Linux system installation/Raspberry Pi, X86_64 system
|
||||
|
||||
## Installation
|
||||
|
||||
Download the installation package like `smartdns.xxxxxxxx.arm-debian-all.deb` and upload it to the Linux system. Run the following command to install
|
||||
|
||||
```shell
|
||||
dpkg -i smartdns.xxxxxxxx.arm-debian-all.deb
|
||||
```
|
||||
|
||||
For X86-64 system, download the installation package like `smartdns.xxxxxxxx.x86_64-linux-all.tar.gz` and upload it to the Linux system. Run the following command to install
|
||||
|
||||
```shell
|
||||
tar zxf smartdns.xxxxxxxx.x86_64-linux-all.tar.gz
|
||||
cd smartdns
|
||||
chmod +x ./install
|
||||
./install -i
|
||||
```
|
||||
|
||||
**For Ubuntu system:**
|
||||
|
||||
- `systemd-resolved` occupies TCP53 and UDP53 ports. You need to manually resolve the port occupancy problem or modify the SmartDNS listening port
|
||||
|
||||
- Log files in `/var/log/smartdns/smartdns.log`
|
||||
|
||||
## Configuration
|
||||
|
||||
After the installation is complete, you can configure the upstream server to smartdns. Refer to the `Configuration Parameters` for specific configuration parameters.
|
||||
In general, you only need to add `server [IP]:port`, `server-tcp [IP]:port` configuration items.
|
||||
Configure as many upstream DNS servers as possible, including servers at home and abroad. Please refer to the `Configuration Parameters` section for configuration parameters.
|
||||
|
||||
```shell
|
||||
vi /etc/smartdns/smartdns.conf
|
||||
```
|
||||
|
||||
`smartdns.conf` example:
|
||||
|
||||
```shell
|
||||
# set listen port
|
||||
bind []:53
|
||||
# set upstream servers
|
||||
server 1.1.1.1
|
||||
server-tls 8.8.8.8
|
||||
# set domain rules
|
||||
address /example.com/1.2.3.4
|
||||
domain-rule /example.com/ -address 1.2.3.4
|
||||
```
|
||||
|
||||
## Start Service
|
||||
|
||||
```shell
|
||||
systemctl enable smartdns
|
||||
systemctl start smartdns
|
||||
```
|
||||
|
||||
## Forwarding DNS request to SmartDNS
|
||||
|
||||
Modify the DNS server of the local router and configure the DNS server as SmartDNS.
|
||||
|
||||
- Log in to the router on the local network and configure the Raspberry Pi to assign a static IP address.
|
||||
- Modify the WAN port or DHCP DNS to the Raspberry Pi IP address.
|
||||
|
||||
Note:
|
||||
I. Each router configuration method is different. Please search Baidu for related configuration methods.
|
||||
II. some routers may not support configuring custom DNS server. in this case, please modify the PC's, mobile phone's DNS server to the ip of Raspberry Pi.
|
||||
|
||||
## Check if the service is configured successfully
|
||||
|
||||
Query domain name with `nslookup -querytype=ptr smartdns`
|
||||
Check if the `name` item in the command result is displayed as `smartdns` or `hostname`, such as `smartdns`
|
||||
|
||||
```shell
|
||||
pi@raspberrypi:~/code/smartdns_build $ nslookup -querytype=ptr smartdns
|
||||
Server: 192.168.1.1
|
||||
Address: 192.168.1.1#53
|
||||
|
||||
Non-authoritative answer:
|
||||
smartdns name = smartdns.
|
||||
```
|
||||
60
en/docs/install/openwrt.md
Normal file
60
en/docs/install/openwrt.md
Normal file
@@ -0,0 +1,60 @@
|
||||
---
|
||||
hide:
|
||||
- toc
|
||||
---
|
||||
|
||||
# OpenWrt
|
||||
|
||||
## Installation
|
||||
|
||||
Upload the software to the /root directory of the router with winscp or other tool, and execute the following command to install it.
|
||||
|
||||
```shell
|
||||
opkg install smartdns.xxxxxxxx.xxxx.ipk
|
||||
opkg install luci-app-smartdns.xxxxxxxx.xxxx.all.ipk
|
||||
```
|
||||
|
||||
- Note: For versions before OpenWrt 19.07, please install `luci-app-smartdns.xxxxxxxxx.all-luci-compat-all` package.
|
||||
|
||||
## Configuration
|
||||
|
||||
Log in to the OpenWrt management page and open `Services`->`SmartDNS` to configure SmartDNS.
|
||||
|
||||
- Add upstream DNS server configuration to `Upstream Servers`. It is recommended to configure multiple DNS servers at home and abroad.
|
||||
- Specify the IP address of a specific domain name in `Domain Address`, which can be used for ad blocking.
|
||||
|
||||
## Start Service
|
||||
|
||||
There are two ways to use the SmartDNS service, `one is directly as the primary DNS service`, `the other is as the upstream of dnsmasq`.
|
||||
By default, SmartDNS uses the first method. You can choose according to your needs in the following two ways.
|
||||
|
||||
## Method 1: SmartDNS as primary DNS Server
|
||||
|
||||
- **Enable SmartDNS as primary DNS Server**
|
||||
|
||||
Log in to the router, click on `Services`->`SmartDNS`->`port`, input port `53`, smartdns will run as primary DNS Server.
|
||||
|
||||
- **Check if the service is configured successfully**
|
||||
|
||||
Query domain name with `nslookup -querytype=ptr smartdns`
|
||||
See if the `name` item in the command result is displayed as `smartdns` or `hostname`, such as `smartdns`
|
||||
|
||||
```shell
|
||||
pi@raspberrypi:~/code/smartdns_build $ nslookup -querytype=ptr smartdns
|
||||
Server: 192.168.1.1
|
||||
Address: 192.168.1.1#53
|
||||
|
||||
Non-authoritative answer:
|
||||
smartdns name = smartdns.
|
||||
```
|
||||
|
||||
## Note
|
||||
|
||||
- When the port of smartdns is 53, it will automatically take over dnsmasq as the primary dns. When configuring other ports, dnsmasq is re-enabled as primary dns.
|
||||
- If an exception occurs during this process, you can use the following command to restore dnsmasq as the primary DNS
|
||||
|
||||
```shell
|
||||
uci delete dhcp.@dnsmasq[0].port
|
||||
uci commit dhcp
|
||||
/etc/init.d/dnsmasq restart
|
||||
```
|
||||
71
en/docs/install/wsl.md
Normal file
71
en/docs/install/wsl.md
Normal file
@@ -0,0 +1,71 @@
|
||||
---
|
||||
hide:
|
||||
- toc
|
||||
---
|
||||
|
||||
|
||||
# Windows 10 WSL Installation/WSL ubuntu
|
||||
|
||||
## Install Windows 10 WSL ubuntu
|
||||
|
||||
Install the Windows 10 WSL environment and select Ubuntu as default distribution, Please refer to [WSL installation instructions](https://docs.microsoft.com/en-us/windows/wsl/install-win10) for installation steps
|
||||
|
||||
## Install smartdns
|
||||
|
||||
download install package `smartdns.xxxxxxxx.x86_64-linux-all.tar.gz`, and unzip to the `D:\` directory, after decompression, the directory is as follows:
|
||||
|
||||
```shell
|
||||
D:\SMARTDNS
|
||||
├─etc
|
||||
│ ├─default
|
||||
│ ├─init.d
|
||||
│ └─smartdns
|
||||
├─package
|
||||
│ └─windows
|
||||
├─src
|
||||
└─systemd
|
||||
|
||||
```
|
||||
|
||||
Double-click `install.bat` in the `D:\smartdns\package\windows` directory for installation. Please enter the password for `WLS ubuntu` when input password.
|
||||
|
||||
## Configuration
|
||||
|
||||
Edit `smartdns.conf` configuration file in `D:\smartdns\etc\smartdns` directory, you can configure the upstream server to smartdns. Refer to the `Configuration Parameters` for specific configuration parameters.
|
||||
In general, you only need to add `server [IP]:port`, `server-tcp [IP]:port` configuration items.
|
||||
Configure as many upstream DNS servers as possible, including servers at home and abroad. Please refer to the `Configuration Parameters` section for configuration parameters.
|
||||
|
||||
`smartdns.conf` example:
|
||||
|
||||
```shell
|
||||
# set listen port
|
||||
bind []:53
|
||||
# set upstream servers
|
||||
server 1.1.1.1
|
||||
server-tls 8.8.8.8
|
||||
# set domain rules
|
||||
address /example.com/1.2.3.4
|
||||
domain-rule /example.com/ -address 1.2.3.4
|
||||
```
|
||||
|
||||
## Start Service
|
||||
|
||||
Double-click `reload.bat` in the `D:\smartdns\package\windows` directory for reload.
|
||||
|
||||
## Forwarding DNS request to SmartDNS
|
||||
|
||||
Modify the default DNS server for Windows to `127.0.0.1`, with these steps referred to [IP configuration](https://support.microsoft.com/en-us/help/15089/windows-change-tcp-ip-settings)
|
||||
|
||||
## Check if the service is configured successfully
|
||||
|
||||
Query domain name with `nslookup -querytype=ptr smartdns`
|
||||
Check if the `name` item in the command result is displayed as `smartdns` or `hostname`, such as `smartdns`
|
||||
|
||||
```shell
|
||||
pi@raspberrypi:~/code/smartdns_build $ nslookup -querytype=ptr smartdns
|
||||
Server: 192.168.1.1
|
||||
Address: 192.168.1.1#53
|
||||
|
||||
Non-authoritative answer:
|
||||
smartdns name = smartdns.
|
||||
```
|
||||
Reference in New Issue
Block a user