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

feat: discover from DNS SRV records #138

Merged
merged 3 commits into from
Jan 5, 2023
Merged

feat: discover from DNS SRV records #138

merged 3 commits into from
Jan 5, 2023

Conversation

caarlos0
Copy link
Member

@caarlos0 caarlos0 commented Jan 4, 2023

allow to find entrypoints from _ssh._tcp.DOMAIN SRV records.

refs #135


to try it out, create a DNS entry in a domain you own, for example _ssh._tcp.caarlos0.dev.
You can set any priorities and weights, wishlist will just list them all.
Then, you can use dig to verify it works, e.g.:

dig -t SRV _ssh._tcp.caarlos0.dev +short
1 1 22 s01.caarlos0.dev.                                                                                                                                                                                                                                             
10 2 2222 s01.caarlos0.dev.

You can also customize the name of the endpoints by adding TXT records to the domain root, e.g.:

dig -t TXT caarlos0.dev +short
"wishlist.name s01.caarlos0.dev:2222=confettysh"

Just make sure to use the format wishlist.name {address}:{port}={name}, and it should magically work.

And, to use it, run wishlist --srv.domain caarlos0.dev.

That's it :)

@caarlos0 caarlos0 added the enhancement New feature or request label Jan 4, 2023
Base automatically changed from zeroconf to main January 5, 2023 12:36
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
@caarlos0 caarlos0 merged commit 9759c47 into main Jan 5, 2023
@caarlos0 caarlos0 deleted the srv branch January 5, 2023 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant