mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 Data snapshot save device ID, name and OS https://github.com/siyuan-note/siyuan/issues/8094
This commit is contained in:
parent
9f9afdcfd0
commit
051ddf74ae
7 changed files with 26 additions and 5 deletions
|
|
@ -83,6 +83,14 @@ func GetDeviceID() string {
|
|||
return gulu.Rand.String(12)
|
||||
}
|
||||
|
||||
func GetDeviceName() string {
|
||||
ret, err := os.Hostname()
|
||||
if nil != err {
|
||||
return "unknown"
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
func SetNetworkProxy(proxyURL string) {
|
||||
if err := os.Setenv("HTTPS_PROXY", proxyURL); nil != err {
|
||||
logging.LogErrorf("set env [HTTPS_PROXY] failed: %s", err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue