feat: user roles - admins and users limited to the machines given to them, user editor with machines, password sign-in and its lock; direct address without Cloudflare as the agents' fallback and in the installer; version 0.1.2

This commit is contained in:
redtea committed 2026-10-15 10:56:19 +03:00
1 parent 36dc12b69d
commit 021da93229
29 files changed
+844 -97

No files matched your search

+2 -2
View File
@@ -52,7 +52,7 @@ func (a *Agent) reportShip(ctx context.Context, job string, m *shipMeter, cancel
defer t.Stop()
for {
body, _ := json.Marshal(m.snapshot())
req, _ := http.NewRequestWithContext(ctx, http.MethodPost, a.cfg.Host+"/api/agent/fs/job/"+job+"/progress", bytes.NewReader(body))
req, _ := http.NewRequestWithContext(ctx, http.MethodPost, a.host()+"/api/agent/fs/job/"+job+"/progress", bytes.NewReader(body))
a.authHeaders(req)
req.Header.Set("Content-Type", "application/json")
if resp, err := a.http.Do(req); err == nil {
@@ -213,7 +213,7 @@ func (a *Agent) doShipOut(parent context.Context, env proto.TaskEnvelope) proto.
}
func (a *Agent) relayURL(id string, i int) string {
return a.cfg.Host + "/api/agent/fs/relay/" + id + "/" + strconv.Itoa(i)
return a.host() + "/api/agent/fs/relay/" + id + "/" + strconv.Itoa(i)
}
// shipRelay posts the tar stream in pieces, a few at once; the last carries