Add support for setting interface name and wireguard port (#1467)

This PR adds support for setting the
wireguard interface name and port
with the netbird up command
This commit is contained in:
Maycon Santos
2024-01-15 15:53:23 +01:00
committed by GitHub
parent ace588758c
commit e9c967b27c
6 changed files with 240 additions and 134 deletions

View File

@ -192,6 +192,17 @@ func (s *Server) Login(callerCtx context.Context, msg *proto.LoginRequest) (*pro
s.latestConfigInput.RosenpassEnabled = msg.RosenpassEnabled
}
if msg.InterfaceName != nil {
inputConfig.InterfaceName = msg.InterfaceName
s.latestConfigInput.InterfaceName = msg.InterfaceName
}
if msg.WireguardPort != nil {
port := int(*msg.WireguardPort)
inputConfig.WireguardPort = &port
s.latestConfigInput.WireguardPort = &port
}
s.mutex.Unlock()
inputConfig.PreSharedKey = &msg.PreSharedKey