Skip to content

Commit daf4d41

Browse files
committedOct 21, 2019
Update INSTALL.md, and add README.md and FAQs.md
1 parent 2d99e35 commit daf4d41

File tree

3 files changed

+96
-3
lines changed

3 files changed

+96
-3
lines changed
 

‎FAQs.md

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
Frequently-Asked Questions
2+
==========================
3+
4+
**Can I use other upstream DNS servers?**
5+
6+
Yes, you can use other public DNS servers from other providers like Google, Cloudflare and Quad9. You can even use your own DNS services.
7+
8+
**How do I prevent the IP address and DNS query information being output?**
9+
10+
Edit ```log.conf``` and upgrade the rule in the [rules] from *INFO* to *NOTICE* like the following:
11+
```
12+
[rules]
13+
ds_.NOTICE >stdout; local
14+
```
15+
16+
If you wish to customize the log format or to redirect the output to log files, please consult the documentation at [zlog](https://hardysimpson.github.io/zlog/UsersGuide-EN.html#htoc14) for more information.
17+
18+
**Do I need to run DohService as superuser?**
19+
20+
If you are not listening on port 443 (IANA designated port for HTTPS), you do not need and should not run DohService as superuser.
21+
22+
I will recommend running DohService under another port number (higher than 1024 which will avoid the need for superuser privileges). You can specify the port number via the ```--port```. Example to listen on port 10443,
23+
```
24+
DohService --port=10443 --dns=208.67.222.222,208.67.220.220 <SSL-key-file> <SSL-cert-fullchain-file>
25+
```
26+
27+
If you are running DohService as another user, please ensure that the user has read-write access to log.conf and the folder.
28+
29+
**DohService fails to run with error: "unable to init log from log.conf"**
30+
31+
Please ensure that the user has read-write access to log.conf and the folder. If this cannot be done, please add the ```rotate lock file``` parameter in log.conf
32+
```
33+
[global]
34+
rotate lock file = /tmp/dohservice.lock
35+
```
36+
37+
**Why is libjemalloc.so bundled in DohService.zip?**
38+
39+
[jemalloc](http://jemalloc.net/) is a malloc implementation that helps to avoid memory fragmentation that could happen for long running applications.
40+
41+
I have chosen not to link to jemalloc directly in the DohService. Instead, if you are interested to use jemalloc, you can start inject it into the DohService at runtime like this:
42+
```
43+
$bash> LD_PRELOAD=/opt/dohservice/libjemalloc.so /opt/dohservice/DohService ...
44+
```
45+
46+
**How do I run DohService as a daemon service?**
47+
48+
DohService is not designed to run as a daemon service. However, you can run DohService under other process control systems like [supervisord](http://supervisord.org/) or runit.
49+
50+
The following is the configuration for supervisord which runs the DohService under *www-data* user.
51+
```
52+
[program:dohservice]
53+
environment=LD_PRELOAD="/opt/dohservice/libjemalloc.so"
54+
command=/opt/dohservice/DohService --port=10443 --dns=208.67.222.222,208.67.220.220 /etc/letsencrypt/live/dns.example.com/privkey.pem /etc/letsencrypt/live/dns.example.com/fullchain.pem
55+
directory=/opt/dohservice
56+
user=www-data
57+
autorestart=true
58+
stdout_logfile=/var/log/supervisor/dohservice_stdout.log
59+
stderr_logfile=/var/log/supervisor/dohservice_stderr.log
60+
```

‎INSTALL.md

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
Building
22
========
33

4+
DohService was developed on Ubuntu 16.04 LTS (x64). It should compile on other later Ubuntu releases.
5+
46
Install additional dependencies for development as superuser
57
```
68
$> apt-get install libz-dev libbz2-dev automake autoconf bison flex make wget
@@ -16,12 +18,14 @@ Then go to deps-src and build the rest of the dependencies as developer user
1618
$> cd deps-src && make
1719
```
1820

21+
If you encounter issues, you may file a ticket on the project website at github,
22+
or check the [FAQs.md](FAQs.md) file.
23+
1924
Getting SSL certificate
2025
=======================
2126

22-
I use acme.sh from [acme.sh)(https://github.com/Neilpang/acme.sh) to prepare the SSL certificate
23-
on my local development node. You can also use [https://certbot.eff.org/](certbot) for your public
24-
DOH service.
27+
I use [acme.sh](https://github.com/Neilpang/acme.sh) to prepare the SSL certificate
28+
on my local development node. You can also use [https://certbot.eff.org/](certbot) to get a free SSL certificate for your public DOH service.
2529

2630
Running
2731
=======
@@ -33,6 +37,8 @@ and your full-chain cert file (containing both the CA and SSL certificates).
3337
$> ./DohService --port=10443 --dns=8.8.8.8,8.8.4.4 <keyfile> <certfile>
3438
```
3539

40+
On FireFox and other DOH-supported web browsers, you can then use this URL **https://[hostname]:10443/dns-query** to resolve the hostnames in the URLs against the DohService.
41+
3642
Testing
3743
=======
3844

‎README.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
About DohService
2+
================
3+
4+
DohService receives incoming DNS query requests from supported web browsers using DNS-over-HTTPS (DOH) protocol, and then resolves the hostnames in these requests using other upstream DNS services on port 53.
5+
6+
When Mozilla announced rollout of DOH, critics criticized its decision as DOH can break DNS-based content filters that had been put in place to deny access to explicit, obscene or otherwise objectionable web sites.
7+
8+
Personally, I like the idea of a secure DNS service as I often access the web on my laptop using public Wifi services where there are risks of DNS poisoning and data privacy issues.
9+
10+
With DohService, I can now setup my personal DOH service on a publicly-accessible Internet server. When I configure DohService to use [OpenDNS](https://www.opendns.com/) as the upstream DNS servers, I can also register the DohService's IP address and have a more customized web site filtering experience through OpenDNS filtering options.
11+
12+
With this setup, I have a more personalized DNS filtering capability (through OpenDNS) along with the privacy protection offered by DOH.
13+
14+
Building
15+
========
16+
17+
To build the DohService, please refer to the [INSTALL.md](INSTALL.md) file.
18+
19+
Questions and Issues
20+
====================
21+
22+
Please check out the [FAQs.md](FAQs,md) or file a ticket on the issues section at the project web site on github.
23+
24+
License
25+
=======
26+
27+
DohService is licensed under zlib license. Please check the [LICENSE.md](LICENSE.md) file for more details.

0 commit comments

Comments
 (0)
Please sign in to comment.