Отпечаток сервера для сервера лицензий: internal/hwid (machine-id, UUID платформы через /etc/bj/hw-id от установщика, MAC), передаётся при активации и продлении
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014FsEKyJrYF69Cj9ZXzFLRi
This commit is contained in:
@@ -13,6 +13,7 @@ import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"git.zetit.ru/zuevav/Bridge-and-Join-s/internal/hwid"
|
||||
"io"
|
||||
"log"
|
||||
"net/http"
|
||||
@@ -78,6 +79,7 @@ type licenseReply struct {
|
||||
func licenseCall(ctx context.Context, path string, body map[string]string) (*licenseReply, error) {
|
||||
host, _ := os.Hostname()
|
||||
body["hostname"], body["version"], body["machine"] = host, BuildVersion, machineHash()
|
||||
body["board"], body["mac"] = hwid.Board(), hwid.MAC() // отпечаток сервера: хэши, без самих значений
|
||||
b, _ := json.Marshal(body)
|
||||
req, err := http.NewRequestWithContext(ctx, http.MethodPost, licenseServer+path, bytes.NewReader(b))
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user