limits: sync streams, listings per author, inbound connections per IP
A peer may hold 4 sync streams and open 1500 a minute; banned peers get none and cannot redial. A node keeps at most 100 unexpired listings per author (--max-per-author); updates, renewals and deletions of held ones still work. At most 16 inbound connections per public IP or IPv6 /64 (--max-conns-per-ip); local and private addresses are exempt. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AeFqV96dVeBX94inzcgZKw
This commit is contained in:
@@ -511,6 +511,8 @@ func (s *server) seal(w http.ResponseWriter, r *http.Request, l *listing.Listing
|
||||
fail(w, http.StatusBadRequest, strings.TrimPrefix(err.Error(), store.ErrInvalid.Error()+": "))
|
||||
case errors.Is(err, store.ErrRevoked):
|
||||
fail(w, http.StatusConflict, "this node's device has been revoked; run 'allmende recover'")
|
||||
case errors.Is(err, store.ErrQuota):
|
||||
fail(w, http.StatusConflict, "this node keeps no more listings for you; delete or let some expire first")
|
||||
case errors.Is(err, context.Canceled):
|
||||
fail(w, http.StatusRequestTimeout, "request cancelled")
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user