mirror of
https://github.com/nikdoof/hapz2m.git
synced 2026-01-30 02:18:22 +00:00
Add config options for ListenAddr & Interfaces
These options are helpful when the bridge is running on a multi-homed device like a wireless router.
This commit is contained in:
@@ -51,6 +51,10 @@ type Bridge struct {
|
||||
Username string
|
||||
Password string
|
||||
|
||||
// address and interfaces to bind to
|
||||
ListenAddr string
|
||||
Interfaces []string
|
||||
|
||||
DebugMode bool
|
||||
|
||||
ctx context.Context
|
||||
@@ -118,6 +122,9 @@ func (br *Bridge) StartHAP() error {
|
||||
return err
|
||||
}
|
||||
|
||||
br.server.Addr = br.ListenAddr
|
||||
br.server.Ifaces = br.Interfaces
|
||||
|
||||
if br.DebugMode {
|
||||
haplog.Debug.Enable()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user