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

self endpoint unspecified returns socket bind addr over UDP #31

Open
jwhited opened this issue Jan 19, 2021 · 0 comments
Open

self endpoint unspecified returns socket bind addr over UDP #31

jwhited opened this issue Jan 19, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@jwhited
Copy link
Owner

jwhited commented Jan 19, 2021

with this config:

.:5353 {
  debug
  wgsd example.com. wg0 {
    self
  }
}

querying for the host info returns:

% dig @<redacted> -p 5353 xmgkylsmekjzm7vkc3maxxfvvjf3mpayf6uj4fwwu66tf4hltzpq====._wireguard._udp.example.com. SRV
[...]
;; ADDITIONAL SECTION:
xmgkylsmekjzm7vkc3maxxfvvjf3mpayf6uj4fwwu66tf4hltzpq====._wireguard._udp.example.com. 0	IN AAAA	::
xmgkylsmekjzm7vkc3maxxfvvjf3mpayf6uj4fwwu66tf4hltzpq====._wireguard._udp.example.com. 0	IN TXT "txtvers=1" "pub=uwysLkwik5Z+qhbYC9y1qku2PBgvqJ4W1qe9MvDrnl8=" "allowed="

using tcp we get the actual addr:

% dig +tcp @<redacted>-p 5353 xmgkylsmekjzm7vkc3maxxfvvjf3mpayf6uj4fwwu66tf4hltzpq====._wireguard._udp.example.com. SRV
[...]
;; ADDITIONAL SECTION:
xmgkylsmekjzm7vkc3maxxfvvjf3mpayf6uj4fwwu66tf4hltzpq====._wireguard._udp.example.com. 0	IN A 172.31.1.108
xmgkylsmekjzm7vkc3maxxfvvjf3mpayf6uj4fwwu66tf4hltzpq====._wireguard._udp.example.com. 0	IN TXT "txtvers=1" "pub=uwysLkwik5Z+qhbYC9y1qku2PBgvqJ4W1qe9MvDrnl8=" "allowed="

We populate the A/AAAA data from the dns.ResponseWriter.LocalAddr() which comes from https://github.com/miekg/dns/blob/master/server.go

@jwhited jwhited added the bug Something isn't working label Jan 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant