Option to trust X-Forwarded-For behind a reverse proxy

Aperta
#10 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

@shiwng ci sta già lavorando.

Dal 26/11/2026.

  • #13 di @shiwng — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
rust
Ambito
networking

Direzione di ricerca

Start by locating GetPlayerEndpoint, the ip: identifier handling, and the server configuration code that reads server.cfg; trace how connection headers reach those entry points. Add coverage for a trusted proxy, an untrusted source, and a two proxy chain, then update docs/hosting.md. The linked open pull request #13 indicates this work is already underway.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement good first issue hosting

Behind a TLS reverse proxy every player appears to connect from the proxy's address, because the server does not read X-Forwarded-For. GetPlayerEndpoint and the ip: identifier are then the same for everyone.

Wanted
  • A server.cfg setting listing trusted proxy addresses, off by default.
  • When the connection comes from a trusted proxy, take the client address from X-Forwarded-For (the right-most address not in the trusted list).
  • Never trust the header from any other source: it is trivially forged.
Done when

Tests cover a trusted proxy, an untrusted source sending the header, and a chain of two proxies. docs/hosting.md is updated.

Lingua principale
Rust
Stelle
3
Fork
1
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di CodingRule/SixM

Tutte le issue di CodingRule/SixM

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.