server: 平台抽象层+bilibili、服务端加密凭据库、角色中间件;web: 精简页面/路由、macOS 客户端(Swift)与多份方案文档;移除误入库的编译产物
This commit is contained in:
+12
-1
@@ -9,8 +9,9 @@ import (
|
||||
"flag"
|
||||
"log"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"os/signal"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"sync"
|
||||
"syscall"
|
||||
|
||||
@@ -102,6 +103,16 @@ func main() {
|
||||
if id.DeviceID > 0 {
|
||||
return errors.New("设备已配对")
|
||||
}
|
||||
name = strings.TrimSpace(name)
|
||||
if name == "" {
|
||||
name = cfg.Name
|
||||
}
|
||||
if name == "" {
|
||||
name, _ = os.Hostname()
|
||||
}
|
||||
if name == "" {
|
||||
name = "macOS Agent"
|
||||
}
|
||||
did, err := pairing.PairWithCode(cfg.Server, code, name, "core", "0.2.0", id.PublicKey)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user