-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
hide: | ||
- toc | ||
--- | ||
|
||
# Docker | ||
|
||
## 说明 | ||
|
||
SmartDNS提供了Docker镜像方便进行快速安装。 | ||
|
||
## 配置 | ||
|
||
创建配置文件/etc/smartdns/smartdns.conf,添加如下必须的配置项目: | ||
|
||
``` | ||
bind [::]:53 | ||
server 8.8.8.8 | ||
server 1.1.1.1 | ||
``` | ||
|
||
## 启动镜像 | ||
|
||
``` | ||
docker run -d --name smartdns --restart=always -p 53:53/udp -v /etc/smartdns:/etc/smartdns pymumu/smartdns:latest | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
hide: | ||
- toc | ||
--- | ||
|
||
# Docker | ||
|
||
## Description | ||
|
||
SmartDNS provides a Docker image for quick installation. | ||
|
||
## Configuration | ||
|
||
Create the configuration file /etc/smartdns/smartdns.conf and add the following configuration: | ||
|
||
``` | ||
bind [::]:53 | ||
server 8.8.8.8 | ||
server 1.1.1.1 | ||
``` | ||
|
||
## Run image | ||
|
||
``` | ||
docker run -d --name smartdns --restart=always -p 53:53/udp -v /etc/smartdns:/etc/smartdns pymumu/smartdns:latest | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[Unit] | ||
Description=SmartDNS Server | ||
After=network.target | ||
Before=network-online.target | ||
Before=nss-lookup.target | ||
Wants=nss-lookup.target | ||
StartLimitBurst=0 | ||
StartLimitIntervalSec=60 | ||
|
||
[Service] | ||
Type=forking | ||
PIDFile=/run/smartdns.pid | ||
EnvironmentFile=/etc/default/smartdns | ||
ExecStart=/usr/sbin/smartdns -p /run/smartdns.pid $SMART_DNS_OPTS | ||
Restart=always | ||
RestartSec=2 | ||
TimeoutStopSec=15 | ||
|
||
[Install] | ||
WantedBy=multi-user.target | ||
Alias=smartdns.service |