mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 17:10:12 +01:00
🔥 移除旧版云端同步和备份功能入口 https://github.com/siyuan-note/siyuan/issues/5405
This commit is contained in:
parent
8e7fafbdfe
commit
51230a99c3
22 changed files with 63 additions and 177 deletions
|
|
@ -24,6 +24,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/88250/gulu"
|
||||
"github.com/denisbrodbeck/machineid"
|
||||
"github.com/dustin/go-humanize"
|
||||
)
|
||||
|
||||
|
|
@ -64,6 +65,17 @@ func RandomSleep(minMills, maxMills int) {
|
|||
time.Sleep(time.Duration(r) * time.Millisecond)
|
||||
}
|
||||
|
||||
func GetDeviceID() string {
|
||||
if "std" == Container {
|
||||
machineID, err := machineid.ID()
|
||||
if nil != err {
|
||||
return gulu.Rand.String(12)
|
||||
}
|
||||
return machineID
|
||||
}
|
||||
return gulu.Rand.String(12)
|
||||
}
|
||||
|
||||
func SetNetworkProxy(proxyURL string) {
|
||||
if err := os.Setenv("HTTPS_PROXY", proxyURL); nil != err {
|
||||
logger.Errorf("set env [HTTPS_PROXY] failed: %s", err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue