mirror of
https://github.com/tailscale/tailscale.git
synced 2025-12-02 18:11:59 +00:00
ipn: add Hostname override to Prefs
Overriding the hostname is required for Android, where os.Hostname is often just "localhost". Updates #409 Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -654,6 +654,9 @@ func (b *LocalBackend) SetPrefs(new *Prefs) {
|
||||
oldHi := b.hiCache
|
||||
newHi := oldHi.Clone()
|
||||
newHi.RoutableIPs = append([]wgcfg.CIDR(nil), b.prefs.AdvertiseRoutes...)
|
||||
if h := new.Hostname; h != "" {
|
||||
newHi.Hostname = h
|
||||
}
|
||||
b.hiCache = newHi
|
||||
b.mu.Unlock()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user