|
|
@ -50,6 +50,7 @@ func New() *tailcfg.Hostinfo {
|
|
|
|
GoVersion: runtime.Version(),
|
|
|
|
GoVersion: runtime.Version(),
|
|
|
|
Machine: condCall(unameMachine),
|
|
|
|
Machine: condCall(unameMachine),
|
|
|
|
DeviceModel: deviceModel(),
|
|
|
|
DeviceModel: deviceModel(),
|
|
|
|
|
|
|
|
PushDeviceToken: pushDeviceToken(),
|
|
|
|
Cloud: string(cloudenv.Get()),
|
|
|
|
Cloud: string(cloudenv.Get()),
|
|
|
|
NoLogsNoSupport: envknob.NoLogsNoSupport(),
|
|
|
|
NoLogsNoSupport: envknob.NoLogsNoSupport(),
|
|
|
|
AllowsUpdate: envknob.AllowsRemoteUpdate(),
|
|
|
|
AllowsUpdate: envknob.AllowsRemoteUpdate(),
|
|
|
@ -153,12 +154,16 @@ func GetEnvType() EnvType {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var (
|
|
|
|
var (
|
|
|
|
|
|
|
|
pushDeviceTokenAtomic atomic.Value // of string
|
|
|
|
deviceModelAtomic atomic.Value // of string
|
|
|
|
deviceModelAtomic atomic.Value // of string
|
|
|
|
osVersionAtomic atomic.Value // of string
|
|
|
|
osVersionAtomic atomic.Value // of string
|
|
|
|
desktopAtomic atomic.Value // of opt.Bool
|
|
|
|
desktopAtomic atomic.Value // of opt.Bool
|
|
|
|
packagingType atomic.Value // of string
|
|
|
|
packagingType atomic.Value // of string
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// SetPushDeviceToken sets the device token for use in Hostinfo updates.
|
|
|
|
|
|
|
|
func SetPushDeviceToken(token string) { pushDeviceTokenAtomic.Store(token) }
|
|
|
|
|
|
|
|
|
|
|
|
// SetDeviceModel sets the device model for use in Hostinfo updates.
|
|
|
|
// SetDeviceModel sets the device model for use in Hostinfo updates.
|
|
|
|
func SetDeviceModel(model string) { deviceModelAtomic.Store(model) }
|
|
|
|
func SetDeviceModel(model string) { deviceModelAtomic.Store(model) }
|
|
|
|
|
|
|
|
|
|
|
@ -176,6 +181,11 @@ func deviceModel() string {
|
|
|
|
return s
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func pushDeviceToken() string {
|
|
|
|
|
|
|
|
s, _ := pushDeviceTokenAtomic.Load().(string)
|
|
|
|
|
|
|
|
return s
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func desktop() (ret opt.Bool) {
|
|
|
|
func desktop() (ret opt.Bool) {
|
|
|
|
if runtime.GOOS != "linux" {
|
|
|
|
if runtime.GOOS != "linux" {
|
|
|
|
return opt.Bool("")
|
|
|
|
return opt.Bool("")
|
|
|
|