Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pimp up query argument handling #58

Merged
merged 1 commit into from
Aug 12, 2024
Merged

pimp up query argument handling #58

merged 1 commit into from
Aug 12, 2024

Conversation

cryptix
Copy link
Member

@cryptix cryptix commented Aug 11, 2024

query() now supports a few more calling conventions

const q = window.goFuncs.query
q("the.pizza.site", "AAA")
q("the.pizza.site", {type: "AAA"})
q("the.pizza.site", {type: "AAA", dohurl: "doh.some.site"})
q({domain: "the.pizza.site", type: "AAA", dohurl: "doh.some.site"})

duStr := du.String()
duUrl, err := url.Parse(duStr)
if err == nil {
dohResolver = duUrl.Host
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Collaborator

@adam-burns adam-burns Aug 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 here.

@adam-burns adam-burns merged commit d24f9e6 into master Aug 12, 2024
1 check failed
@adam-burns adam-burns deleted the query-argument branch August 12, 2024 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants