1
0
mirror of https://github.com/fumiama/tienyik.git synced 2026-06-04 23:10:26 +08:00
Files
tienyik/cfg.go
2025-11-24 17:35:20 +08:00

50 lines
693 B
Go

package tienyik
import (
"crypto/rand"
"encoding/base64"
"io"
"strings"
)
const (
Version = 103010001
AppVersion = "3.1.0"
)
const (
DeviceTypePC = 25
DeviceTypeMAC = 45
DeviceTypeWEB = 60
)
const (
AppModelTOC = "1"
AppModelTOB = "2"
AppModelPHONE = "3"
)
const (
DeviceNameEdge = "Edge浏览器"
)
// alos sysVersion
const (
DeviceModelMacOS = "Macintosh; Intel Mac OS X 10_15_7"
)
const (
ArchX86 = "2001"
ArchARM = "2002"
ArchHW = "2003"
)
func NewDeviceCode() string {
sb := &strings.Builder{}
sb.WriteString("web_")
enc := base64.NewEncoder(base64.RawURLEncoding, sb)
io.CopyN(enc, rand.Reader, (32/6+1)*8)
enc.Close()
return sb.String()[:4+32]
}