Kör relay kötüye kullanım koruması
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.
| Kontrol | Durum |
|---|---|
| Blind payload forwarding | Uygulandı |
| Signed freshness and replay suppression | Uygulandı |
| Previous-hop rate limiting and quarantine | Uygulandı |
| Privacy-safe runtime evidence | Uygulandı |
| Nodeboard operator visibility | Uygulandı |
| Plaintext or payload inspection | Yasak |
| User, route, or social-graph analytics | Yasak |
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.
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 sabiti | Güncel varsayılan |
|---|---|
MAX_BLIND_RELAY_SEEN_ROUTES | 8192 route IDs |
BLIND_RELAY_ROUTE_REPLAY_WINDOW_SECS | 600 seconds |
BLIND_RELAY_PREVIOUS_HOP_RATE_LIMIT | 120 requests / 60 seconds |
BLIND_RELAY_PREVIOUS_HOP_FAILURE_THRESHOLD | 12 scored failures / 300 seconds |
BLIND_RELAY_PREVIOUS_HOP_QUARANTINE_SECS | 300 seconds |
MAX_BLIND_RELAY_PREVIOUS_HOP_BUCKETS | 4096 buckets |
BLIND_RELAY_MAX_ENVELOPE_AGE_SECS | 600 seconds |
BLIND_RELAY_MAX_FUTURE_SKEW_SECS | 120 seconds |
BLIND_RELAY_DELIVERY_RECEIPT_MAX_AGE_SECS | 120 seconds |
MAX_BLIND_RELAY_FORWARD_ATTEMPTS | 3 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.
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.
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.
system_stats.discovery_status.peer_store.runtime.blind_relay
system_stats.discovery_status.peer_store.peer_health_summary
| Sayaç grubu | Alanlar |
|---|---|
| Giriş ve sonuç | received, terminal, forwarded, rejected |
| Doğrulama ve koruma | invalid_signature, envelope_too_large, ttl_exhausted, no_route, invalid_endpoint, loop_detected, replay_dropped, timestamp_rejected, rate_limited, quarantined, quarantine_started |
| Transport ve retry | backpressure_dropped, forward_failed, retry_attempted, retry_succeeded, retry_exhausted |
| Sentetik kanıt | probe_attempted, probe_succeeded, probe_failed, two_hop_probe_attempted, two_hop_probe_succeeded, two_hop_probe_failed |
| Gerçek teslimat ve tazelik | verified_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.
status | Anlam |
|---|---|
idle | Henüz relay veya probe evidence yok. |
observing | Kısmi evidence var, readiness kurulmadı. |
stale | Önceki başarı evidence artık fresh değil. |
ready | Fresh accepted work veya proof var, active transport attention yok. |
protecting | Koruma sayaçları aktif ve relay çalışıyor. |
degraded | Forwarding veya probe failure araştırılmalı. |
attention | Backpressure 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.
- Descriptor ve bootstrap recovery freshness durumunu doğrulayın.
- Ready demeden önce
accepted_total,accepted_percentve last accepted age karşılaştırın. real_relay_readyile synthetic readiness'i ayırın; yalnız ilki authenticated client-originated terminal receipt kanıtıdır.- 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.
| Katman | Repository yolu | Rol |
|---|---|---|
| Rust relay API | crates/aeronyx-server/src/api/chat_peer.rs | Envelope doğrular; loop, replay, freshness, rate, quarantine, retry ve terminal receipt kurallarını uygular. |
| Rust PeerStore | crates/aeronyx-server/src/services/peer_store.rs | Bounded counters, peer health, readiness ve proof classification tutar. |
| Rust health API | crates/aeronyx-server/src/api/vpn_health.rs | Local privacy-safe health JSON yayınlar. |
| Rust reporter | crates/aeronyx-server/src/management/reporter.rs | Heartbeat metadata içinde aggregate status taşır. |
| Backend observability | privacy_network/api/vpn_observability.py | Operator console'a owner-scoped metadata döndürür. |
| Nodeboard types | types/index.ts | Blind relay ve peer health type tanımlar. |
| Nodeboard detail ve i18n | app/dashboard/nodes/[id]/page.tsx and lib/i18n/index.ts | Localized 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.
- Her relay path içinde
payload_b64opaque kalmalıdır. - Yalnız aggregate counter veya bounded reason bucket ekleyin.
- Counter'ları route, endpoint, user, receiver veya message metadata ile join etmeyin.
- Synthetic probe değerlerini encrypted message, packet ve byte totals içine katmayın.
- Semantik değişince Rust tests, Nodeboard types ve tüm dilleri güncelleyin.