Kör relay kötüye kullanım koruması

AeroNyx20 Haziran 20266 dk okuma57 görüntüleme

AeroNyx düğümlerinin ciphertext okumadan replay, döngü, aşırı istek ve arızalı peer davranışını sınırlayıp gizlilik güvenli kanıt üretmesi.

Blind Relay Abuse Guard, AeroNyx merkeziyetsiz şifreli iletimin güvenlik sınırıdır. Ciphertext analiz etmeden, kalıcı rota geçmişi oluşturmadan ve operatörü trafik gözlemcisine dönüştürmeden kötüye kullanımı ve kararsız relay davranışını sınırlar.

Durum ve kapsam

Koruma Rust içinde uygulanır; toplu sonuçlar node health metadata ve Nodeboard üzerinden görünür. Görevi sınırlama ve dürüst kanıttır: opaque relay work kabul edildi, korunuyor, bozuldu veya stale olabilir; içerik açıklanmaz.

KontrolDurum
Blind payload forwardingUygulandı
Signed freshness and replay suppressionUygulandı
Previous-hop rate limiting and quarantineUygulandı
Privacy-safe runtime evidenceUygulandı
Nodeboard operator visibilityUygulandı
Plaintext or payload inspectionYasak
User, route, or social-graph analyticsYasak

Kör düğüm değişmezi

Relay routing metadata imzasını doğrulayabilir, sınırlı policy uygulayabilir, opaque envelope iletebilir ve terminal-signed receipt döndürebilir. Payload inceleyemez veya çıkaramaz; rota, kimlik ya da sosyal ilişkiyi yeniden kuran metadata yayınlayamaz.

  • message plaintext, packet payload, media content veya MemChain plaintext
  • DNS content, destination, domain, URL veya browsing history
  • route ID, complete path, endpoint URL veya client public IP
  • full public key, receiver identity, message ID veya social graph
  • private key, voucher secret, wallet-level traffic veya decryption material

Kabul hattı

Her request forwarding capacity tüketmeden önce sınırlı kontrollerden geçer. Aşağıdaki sıra kavramsaldır; kararlar yalnız signed routing metadata ve local aggregate state kullanır, şifresi çözülmüş içeriği kullanmaz.

text
verify signed previous_hop and envelope
apply in-flight backpressure
check timestamp freshness
check route replay cache
apply previous-hop rate/quarantine decision
validate TTL, loop safety, next-hop descriptor, and endpoint
forward opaque ciphertext or terminate into pending store

Replay ve zaman tazeliği koruması

Replay suppression local, kısa süreli ve kapasite sınırlıdır. Signed timestamp eski veya aşırı gelecek tarihli frame'i reddeder. Tablodaki değerler main için güncel runtime default değerleridir, kalıcı protocol sözü değildir; değişiklik test ve docs gerektirir.

Runtime sabitiGüncel varsayılan
MAX_BLIND_RELAY_SEEN_ROUTES8192 route IDs
BLIND_RELAY_ROUTE_REPLAY_WINDOW_SECS600 seconds
BLIND_RELAY_PREVIOUS_HOP_RATE_LIMIT120 requests / 60 seconds
BLIND_RELAY_PREVIOUS_HOP_FAILURE_THRESHOLD12 scored failures / 300 seconds
BLIND_RELAY_PREVIOUS_HOP_QUARANTINE_SECS300 seconds
MAX_BLIND_RELAY_PREVIOUS_HOP_BUCKETS4096 buckets
BLIND_RELAY_MAX_ENVELOPE_AGE_SECS600 seconds
BLIND_RELAY_MAX_FUTURE_SKEW_SECS120 seconds
BLIND_RELAY_DELIVERY_RECEIPT_MAX_AGE_SECS120 seconds
MAX_BLIND_RELAY_FORWARD_ATTEMPTS3 attempts

Önceki hop hız sınırı ve karantina

Rate limit signed previous-hop identity başına uygulanır. 60 saniyede 120 request aşılırsa beş dakikalık local quarantine başlar. Ayrı failure score, beş dakikada 12 saldırgan validation failure sonrası aynı karantinayı başlatır.

text
invalid_previous_hop | invalid_signature | self_loop | route_loop | ttl_exhausted

Yalnız adversarial validation reasons score'a eklenir. Transport timeout, kayıp ACK ve duplicate route retry sağlıklı peer'i cezalandırmaz. Bucket store sınırlıdır ve idle state sona erer; kalıcı communication graph oluşmaz.

İdempotans ve yeniden deneme

Replay window içindeki aynı route ID idempotent success alır: aggregate replay drop kaydedilir ancak envelope ikinci kez teslim veya forward edilmez. Geçici next-hop failure bounded jitter ile en fazla üç kez denenir; kalıcı validation failure yeniden denenmez.

text
duplicate route_id -> accepted=true, reason=duplicate_route, no second delivery
transient next-hop failure -> bounded retry with deterministic jitter
permanent validation failure -> no retry

Toplu runtime sayaçları

Rust aşağıdaki iki path üzerinde coarse cumulative counter ve freshness timestamp sunar. Bunlar node-scoped operational evidence'dır; message log, faturalama analytics'i veya belirli bir conversation kanıtı değildir.

text
system_stats.discovery_status.peer_store.runtime.blind_relay
system_stats.discovery_status.peer_store.peer_health_summary
Sayaç grubuAlanlar
Giriş ve sonuçreceived, terminal, forwarded, rejected
Doğrulama ve korumainvalid_signature, envelope_too_large, ttl_exhausted, no_route, invalid_endpoint, loop_detected, replay_dropped, timestamp_rejected, rate_limited, quarantined, quarantine_started
Transport ve retrybackpressure_dropped, forward_failed, retry_attempted, retry_succeeded, retry_exhausted
Sentetik kanıtprobe_attempted, probe_succeeded, probe_failed, two_hop_probe_attempted, two_hop_probe_succeeded, two_hop_probe_failed
Gerçek teslimat ve tazelikverified_client_onion_deliveries, last_verified_client_onion_delivery_at, last_accepted_at, last_event_at

Kanıt kalitesi anlamları

Quality summary accepted opaque work, synthetic probe, synthetic two-hop proof ve terminal-signed client receipt'i ayırır. real_relay_ready, expected terminal tarafından imzalanmış fresh authenticated client-originated receipt gerektirir. Synthetic evidence App/user traffic olarak gösterilemez.

statusAnlam
idleHenüz relay veya probe evidence yok.
observingKısmi evidence var, readiness kurulmadı.
staleÖnceki başarı evidence artık fresh değil.
readyFresh accepted work veya proof var, active transport attention yok.
protectingKoruma sayaçları aktif ve relay çalışıyor.
degradedForwarding veya probe failure araştırılmalı.
attentionBackpressure veya exhausted retry hemen işlem gerektirir.

proof_scope, client_message_delivery, relay_acceptance, message_delivery, control_plane, single_hop_control_plane, attempted, none ayrımını yapar. Historical totals birikir; readiness fresh evidence ister ve active transport failures durumunu hesaba katar.

Gizlilik güvenli peer sağlığı

peer_health_summary, traffic relationship göstermeden failing/quarantined peer'i ayırmak için kısaltılmış node identifier ve coarse health bucket kullanır. Açık privacy boundary içeren control-plane tanısıdır.

İzinli:

  • kısaltılmış node_id_prefix
  • coarse health ve descriptor state
  • gossip ve route success freshness bucket
  • aggregate route success/failure counts
  • aggregate loop/replay/rate-limit/quarantine counts
  • kalan quarantine süresi ve bounded reason bucket

İzinli değil:

  • full node public keys
  • route IDs veya endpoint lists
  • encrypted blobs veya payload hashes
  • message IDs veya receiver identity
  • client IP, destinations veya DNS
  • social graph veya iletişim ilişkileri

Operatör akışı

Nodeboard'u açın, node seçin, Discovery ve Security / Relay Protection bölümünü inceleyin. Eğilimleri yalnız node health, reachability, queue pressure ve signed proof freshness ile yorumlayın.

  1. Descriptor ve bootstrap recovery freshness durumunu doğrulayın.
  2. Ready demeden önce accepted_total, accepted_percent ve last accepted age karşılaştırın.
  3. real_relay_ready ile synthetic readiness'i ayırın; yalnız ilki authenticated client-originated terminal receipt kanıtıdır.
  4. protecting, degraded veya attention durumunda user-level log istemeden aggregate bucket ve transport health inceleyin.

Kaynak kod haritası

Altyapı host değiştirdiğinde de geçerli olması için repository-relative path kullanılır. Backend ve Nodeboard ayrı repository'lerde yalnız owner-scoped privacy-safe metadata tüketir.

KatmanRepository yoluRol
Rust relay APIcrates/aeronyx-server/src/api/chat_peer.rsEnvelope doğrular; loop, replay, freshness, rate, quarantine, retry ve terminal receipt kurallarını uygular.
Rust PeerStorecrates/aeronyx-server/src/services/peer_store.rsBounded counters, peer health, readiness ve proof classification tutar.
Rust health APIcrates/aeronyx-server/src/api/vpn_health.rsLocal privacy-safe health JSON yayınlar.
Rust reportercrates/aeronyx-server/src/management/reporter.rsHeartbeat metadata içinde aggregate status taşır.
Backend observabilityprivacy_network/api/vpn_observability.pyOperator console'a owner-scoped metadata döndürür.
Nodeboard typestypes/index.tsBlind relay ve peer health type tanımlar.
Nodeboard detail ve i18napp/dashboard/nodes/[id]/page.tsx and lib/i18n/index.tsLocalized privacy-boundary metniyle Security / Relay Protection gösterir.

Çok atlamalı yönlendirmenin temeli

Multi-hop routing replay resistance, loop containment, bounded retry, peer quarantine ve user traffic ile karışmayan evidence ister. Guard blind-node invariant'ı zayıflatmadan layered encryption ve route diversity temeli sağlar.

Geliştirici kuralları

Her yeni field privacy review'dur. Metric node reliability sorusuna yanıt verirken payload, sender, receiver, path, endpoint veya conversation tanımlamamalıdır.

  1. Her relay path içinde payload_b64 opaque kalmalıdır.
  2. Yalnız aggregate counter veya bounded reason bucket ekleyin.
  3. Counter'ları route, endpoint, user, receiver veya message metadata ile join etmeyin.
  4. Synthetic probe değerlerini encrypted message, packet ve byte totals içine katmayın.
  5. Semantik değişince Rust tests, Nodeboard types ve tüm dilleri güncelleyin.

Düğüm keşfi ve doğrulanabilir şifreli relay teslimatı