immortalwrt / homeproxy

The modern ImmortalWrt proxy platform for ARM64/AMD64 (powered by sing-box)
GNU General Public License v2.0
280 stars 87 forks source link

Allow for two DNS servers and non-standard port as supported by chinadns-ng #75

Closed ShadowOfTheDay closed 3 months ago

ShadowOfTheDay commented 5 months ago

Currently, only one DNS server is allowed for both dns_server and china_dns_server, and specification of non-standard port is not possible in LuCI. But in fact, chinadns-ng allows up to two DNS servers for both trust-dns and china-dns, and allows non-standard port. Setting two DNS servers can increase stability compared with one server in case it fails. Non-standard port may be necessary for some use cases, e.g., DNS over HTTPS as implemented by https-dns-proxy. As a workaround, it is possible to use UCI command to achieve the goal, for example:

uci set homeproxy.config.china_dns_server='127.0.0.1#5054,127.0.0.1#5053'

And it works as expected. However, the input value is not considered as a valid IP address in LuCI, making it not possible to further modify other settings in LuCI. It will be great if such setting can be allowed in future versions.

1715173329 commented 5 months ago

I know it but it would be very complex to implement a validation.

1715173329 commented 3 months ago

implemented in dev