YunoHost-Apps / adguardhome_ynh

AdGuard Home package for YunoHost: Network-wide ads & trackers blocking DNS server
https://adguard.com/adguard-home.html
GNU General Public License v3.0
14 stars 12 forks source link

enable DOH/DOQ using Let's Encrypt certs out of the box #154

Closed OniriCorpe closed 1 month ago

OniriCorpe commented 6 months ago

Problem

Solution

is someone OK to test this?

PR Status

TODO

Current state

For the package

For AdGuard Home itself

A screenshot of the AdGuard Home front-end, showing the "Encryption settings", with all things validated

yunohost-bot commented 6 months ago

:v: Test Badge

yunohost-bot commented 6 months ago

:v: Test Badge

yunohost-bot commented 6 months ago

Alrighty! Test Badge

yunohost-bot commented 6 months ago

:carousel_horse: Test Badge

yunohost-bot commented 6 months ago

:sunflower: Test Badge

OniriCorpe commented 6 months ago

Dec 26 17:32:39 AdGuardHome[6139]: 2023/12/26 17:32:39.360985 [fatal] web: https: listen tcp 0.0.0.0:443: bind: address already in use

siiiiggghhhhhh πŸ™ƒ

yunohost-bot commented 6 months ago

:stuck_out_tongue_winking_eye: Test Badge

yunohost-bot commented 6 months ago

May the CI gods be with you! Test Badge

yunohost-bot commented 6 months ago

May the CI gods be with you! Test Badge

yunohost-bot commented 6 months ago

:sunflower: Test Badge

yunohost-bot commented 6 months ago

:v: Test Badge

OniriCorpe commented 6 months ago

I feel like Hal changing a light bulb πŸ˜“

yunohost-bot commented 6 months ago

Meow :cat2: Test Badge

OniriCorpe commented 6 months ago

about https://github.com/YunoHost-Apps/adguardhome_ynh/pull/154/commits/f65fc16f3f8c6bec7665cb46f4d9696155743d2f: dnsmasq uses port 53 on localhost and AGH uses port 53 on outsides IP (local or public ones if needed) (you can see this with netstat -tulpn | grep ":53 ")

and that's OK

except for YNH, as dnsmasq uses port 53 on localhost, the port is used and YNH refuses to give it to AGH for outsides IP: WARNING Failed to provision ports : Port 53 is already used by another process or app.

so I had to remove the port from the manifest.toml and hardcode it in config and scripts it's OK since port 53 for DNS stuff is mandatory, so it would never change tho

yunohost-bot commented 6 months ago

:rocket: Test Badge

OniriCorpe commented 6 months ago

A screenshot of the AdGuard Home front-end, showing the "Encryption settings", with all things validated

as for now:

so DoH & DoQ are not working and needs more testing

yunohost-bot commented 6 months ago

:carousel_horse: Test Badge

yunohost-bot commented 6 months ago

Meow :cat2: Test Badge

OniriCorpe commented 6 months ago

!testme

and time to sleep Zzz

yunohost-bot commented 6 months ago

Meow :cat2: Test Badge

yunohost-bot commented 6 months ago

Alrighty! Test Badge

yunohost-bot commented 6 months ago

Fingers crossed! Test Badge

results:

yunohost-bot commented 6 months ago

Alrighty! Test Badge

results:

yunohost-bot commented 6 months ago

:v: Test Badge

yunohost-bot commented 6 months ago

Alrighty! Test Badge

yunohost-bot commented 6 months ago

May the CI gods be with you! Test Badge

yunohost-bot commented 6 months ago

Meow :cat2: Test Badge

yunohost-bot commented 6 months ago

:stuck_out_tongue_winking_eye: Test Badge

yunohost-bot commented 6 months ago

Meow :cat2: Test Badge

Ddataa commented 5 months ago

I have to find time to test this, hopefully this week

OniriCorpe commented 5 months ago

I have to find time to test this, hopefully this week

it will be really appreciated! ^w^

I have to finish the reverse proxy part, but for now I need a break :)

OniriCorpe commented 5 months ago

also, sorry this PR has become gigantic, it wasn't supposed to /o\

yunohost-bot commented 5 months ago

:bug: Test Badge

OniriCorpe commented 1 month ago

DoT is working πŸŽ‰

a screenshot showing a successful DoT request using an adguardhome instance from an iPhone

yunohost-bot commented 1 month ago

Fingers crossed! Test Badge

yunohost-bot commented 1 month ago

Living in the future, are we? Test Badge

OniriCorpe commented 1 month ago

as for now

DoH is working:

└─▢ q example.com MX @https://adguard..example.com
example.com. 23h52m10s MX 0 .

DoT is working:

└─▢ q example.com MX @tls://adguard.example.com:853
example.com. 23h52m5s MX 0 .

DoQ is working:

└─▢ q example.com MX @quic://adguard.example.com:784
example.com. 23h55m53s MX 0 .
yunohost-bot commented 1 month ago

Meow :cat2: Test Badge

yunohost-bot commented 1 month ago

:book: Test Badge

OniriCorpe commented 1 month ago

@Ddataa the PR is now ready for review and I asked for testers on the forum: https://forum.yunohost.org/t/adguard-adguard-home-package-for-yunohost/9075/11?u=oniricorpe

yunohost-bot commented 1 month ago

Fingers crossed! Test Badge

yunohost-bot commented 1 month ago

Living in the future, are we? Test Badge

yunohost-bot commented 1 month ago

May the CI gods be with you! Test Badge

yunohost-bot commented 1 month ago

Living in the future, are we? Test Badge

OniriCorpe commented 1 month ago

during my tests, i found that even if DoH is deactivated, AGH still reply to DoH requests

i opened an upstream issue: https://github.com/AdguardTeam/AdGuardHome/issues/6994

tituspijean commented 1 month ago

Works well on Firefox desktop.

Does not work on Android with the Private DNS setting (only accepts the domain name, as no slash or colon are accepted): the connection is lost after setting it up.

OniriCorpe commented 1 month ago

Does not work on Android with the Private DNS setting (only accepts the domain name, as no slash or colon are accepted): the connection is lost after setting it up.

I don’t understand your issue πŸ˜…

tituspijean commented 1 month ago

Pictures will be more understandable :)

OniriCorpe commented 1 month ago

did it used to work before this update?

i cannot find any info on this option... does it use standard DNS (port 53)? DoH? anything else? uh

edit: hmmm okay that seems to be the issue: https://github.com/AdguardTeam/AdGuardHome/issues/5123 so i can't do anything, bad luck

tituspijean commented 1 month ago

Found the issue! Somehow upon upgrading, the DoQ and DoT port got reassigned. In my YunoHost settings I actually have remnants of the old parameters (listed first):

adguard_DoQ_port: '784'
adguard_DoT_port: '853'
...
port_dns_over_quic: 785
port_dns_over_tls: 854

The latter are the ones put in /var/www/adguardhome/AdGuardHome.yaml now. If I revert them to default ports 784 and 853, restart the service, make sure the ports are redirected from my router... the Android Private DNS setting works. The queries are confirmed to be DoT by Adguard.