🔥 移除旧版云端同步和备份功能入口 https://github.com/siyuan-note/siyuan/issues/5405

This commit is contained in:
Liang Ding 2022-07-14 21:50:46 +08:00
parent 8e7fafbdfe
commit 51230a99c3
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
22 changed files with 63 additions and 177 deletions

View file

@ -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)