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

localhost only #106

Open
pkpowell opened this issue Apr 13, 2022 · 1 comment
Open

localhost only #106

pkpowell opened this issue Apr 13, 2022 · 1 comment

Comments

@pkpowell
Copy link

Is it possible to only publish on localhost and not lan-wide, i.e. the equivalent of dns-sd -lo -P... ?
Use case is to prevent vpn addresses used by some clients from leaking onto the lan.

dns-sd -lo                          (Run dns-sd cmd using local only interface)
@pkpowell
Copy link
Author

The following works (assuming index: 1 is always the loopback interface).

interfaces = []net.Interface{
	net.Interface{
		Index: 1,
	},
}
zeroconf.RegisterProxy(*name, *service, *domain, *port, *host, []string{*ip}, []string{"txtv=0", "lo=1", "la=2"}, interfaces)

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

No branches or pull requests

1 participant