With Avayi, temporary registrations can be created using avahi-publish , and permanent registrations can be created by writing a static service file. See man 1 avahi-publish for earlier and man 5 avahi.service for later for more man 5 avahi.service .
With Bonjour, the dns-sd tool can be used to register a proxy server:
dns-sd -P <Name> <Type> <Domain> <Port> <Host> <IP> [<TXT>...]
If the service to which you are registered as a proxy server already has a unicast DNS host name, something like this will work:
$ dns-sd -P Google _http._tcp local 80 google.com google.com path=/ Registering Service Google._http._tcp.local host google.com port 80 TXT path=/ 4:23:00.928 Got a reply for service Google._http._tcp.local.: Name now registered and active ^C
If it does not have a host name, a unique name must be used for the host:
$ dns-sd -P Google _http._tcp local 80 google.local 74.125.237.144 path=/ Registering Service Google._http._tcp.local host google.local port 80 TXT path=/ 4:16:48.208 Got a reply for record google.local: Name now registered and active 4:16:48.208 Got a reply for service Google._http._tcp.local.: Name now registered and active ^C
source share