// Assign functions to handle specific Hotline transaction types
mobius.RegisterHandlers(srv)
- s, err := bonjour.Register(srv.Config.Name, "_hotline._tcp", "", *basePort, []string{"txtv=1", "app=hotline"}, nil)
- if err != nil {
- slogger.Error("Error registering Hotline server with Bonjour", "err", err)
+ if srv.Config.EnableBonjour {
+ s, err := bonjour.Register(srv.Config.Name, "_hotline._tcp", "", *basePort, []string{"txtv=1", "app=hotline"}, nil)
+ if err != nil {
+ slogger.Error("Error registering Hotline server with Bonjour", "err", err)
+ }
+ defer s.Shutdown()
}
- defer s.Shutdown()
// Serve Hotline requests until program exit
log.Fatal(srv.ListenAndServe(ctx))
IgnoreFiles:
- '^\.' # Ignore all files starting with ".". Leave this set if you are using the PreserveResourceForks option.
- '^@' # Ignore all files starting with "@"
+
+# Enable service announcement on local network with Bonjour
+EnableBonjour: false
\ No newline at end of file
MaxConnectionsPerIP int `yaml:"MaxConnectionsPerIP"` // Max connections per IP
PreserveResourceForks bool `yaml:"PreserveResourceForks"` // Enable preservation of file info and resource forks in sidecar files
IgnoreFiles []string `yaml:"IgnoreFiles"` // List of regular expression for filtering files from the file list
+ EnableBonjour bool `yaml:"EnableBonjour"` // Enable service announcement on local network with Bonjour
}