1.7 KiB
1.7 KiB
hide
| hide | |
|---|---|
|
Server Configuration
Currently, smartdns provides three server modes: UDP, TCP, and DOT.
UDP Server
-
Configure with the
bindparameter. For example:bind 0.0.0.0:53@eth0 bind [::]:53@eth0 bind :53@eth0Options:
- @eth0 indicates that it only provides services on the corresponding NIC.
- [::]:53 indicates that it listens to both IPV6 and IPV4 addresses.
- :53 represents listening to IPV4 addresses.
TCP Server
-
Configure with the
bind-tcpparameter. For example:bind-tcp 0.0.0.0:53@eth0 bind-tcp [::]:53@eth0 bind-tcp :53@eth0 -
Optional, the
tcp-idle-timeparameter controls the TCP idle disconnect time.tcp-idle-time 120
DOT Server
-
Configure with the
bind-tcpparameter. For example:bind-tcp 0.0.0.0:53@eth0 bind-tcp [::]:53@eth0 bind-tcp :53@eth0 -
Set certificate and key files
bind-cert-file smartdns-cert.pem bind-cert-key-file smartdns-key.pem bind-cert-key-pass passOptions:
bind-cert-file: Specifies the certificate file path.bind-cert-key-file: Specifies the certificate key file path.bind-cert-key-pass: Specifies the password for the certificate key file. (Optional)
Note:
If these three parameters are not specified, smartdns will automatically generate a self-signed cert
smartdns-cert.pemandsmartdns-key.pemkey file in the/etc/smartdnsdirectory, with CN as smartdns. -
Optional, the
tcp-idle-timeparameter controls the TCP idle disconnect time.tcp-idle-time 120