Feature request: opt-in destination-CIDR denial for direct origin connections

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

@omrzk ci sta già lavorando.

Dal 21/10/2026.

  • #643 di @omrzk — aperta

Valutazione

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

Direzione di ricerca

Start by reading the existing direct HTTP and CONNECT connection paths and the getaddrinfo() result handling to find where resolved addresses are selected for connecting. Check how runtime configuration directives are parsed and how IPv4 and IPv6 addresses are represented. Done means an opt-in CIDR denial directive skips denied resolved addresses without another DNS lookup, denies the connection when all addresses are denied, and is covered for both connection types and address families. PR #643 is already open for this issue.

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

Descrizione

Tinyproxy version

1.11.3 (Homebrew, macOS).

Issue

A runtime directive such as DenyDestination <CIDR> to reject selected destination ranges on direct origin connections.

Hostname filtering alone cannot block an allowed hostname that resolves to a private address. The proposed behavior would:

  • Be disabled by default.
  • Check each address returned by the existing getaddrinfo() call before connecting.
  • Skip denied addresses and connect using the same validated sockaddr, without another DNS lookup.
  • Return a policy denial if every resolved address is denied.
  • Cover direct HTTP and CONNECT connections, including IPv4 and IPv6.

PR #395 proposed DNS-based subnet matching for upstream selection. Issue #566 discussed that missing behavior and concerns about extra DNS lookups. This proposal has a narrower scope to validate addresses already resolved for a direct connection without changing upstream selection or introducing additional DNS queries.

Lingua principale
C
Stelle
6.1k
Fork
768
Merge medio
15g 3h
PR unite (30g)
1

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

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 tinyproxy/tinyproxy

Tutte le issue di tinyproxy/tinyproxy

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.