NetworkCommons / sig0namectl

Open dynamic DNS name management with SIG(0) update delegation.
https://sig0namectl.networkcommons.org
GNU Affero General Public License v3.0
12 stars 3 forks source link

WASM exposed query() function uses golang doh-client which hardcodes defacto default DOH path component #59

Closed adam-burns closed 3 months ago

adam-burns commented 3 months ago

Referring to query() in wrapper_js.go:

dohurl also supports receiving a full url but actually only takes the host from that. we would need to patch github.com/shynome/doh-client for it to construct it's url differently here https://github.com/shynome/doh-client/blob/3b78e35dadc53df5cf253bde3692e59507584a92/conn.go#L30

_Originally posted by @cryptix in https://github.com/NetworkCommons/sig0namectl/pull/58#discussion_r1713031368_

adam-burns commented 3 months ago

It's good that dohurl supports the full URL, as the JS function findDOHEndpoint() in pure.js in its current form picks up the dohUrl as a single URL string, not as components. Javascipt should only query our SVCB RR entries for each enabled zone which will work as long as the defacto example path in RFC8484 is used, which is also used as the default path in BIND9 and its DOH configuration.

Issue raised in doh-client project https://github.com/shynome/doh-client/issues/1.

adam-burns commented 3 months ago

Issue in doh-client fixed in https://github.com/shynome/doh-client/commit/5d1eb76d85f647f674870bc43c50fbb6f75dff8a by allowing server variable to be a URL, and if so, ingests the whole endpoint, including the path component.