naive: add fallback and masquerade support

Aperta
#4,693 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

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

Direzione di ricerca

The issue links a branch with the proposed Naive inbound changes; start by reviewing that comparison against testing and the existing Hysteria2 behavior. Check the touched protocol/naive/... and option/... packages and their tests, then verify the documented English and Chinese options. Done means fallback and masquerade behavior, startup validation, documentation, and the reported build and vet checks are covered.

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

Descrizione

Hi,

I have a patch that adds fallback and masquerade support to the Naive inbound, mirroring the existing Hysteria2 behavior:

  • Requests that are not valid Naive requests (non-CONNECT, missing Naive padding, failed authentication) are no longer rejected with a bare 400 / 407. They are reverse proxied to a local HTTP server (fallback) or served by sing-box itself (masquerade), so the inbound behaves like an ordinary website under active probing.
  • masquerade supports the file, proxy and string types (reusing the Hysteria2Masquerade options), plus the URL form.
  • fallback and masquerade are mutually exclusive and validated at startup.
  • Documentation updated for both English and Chinese.

Branch (rebased on current testing):

https://github.com/SagerNet/sing-box/compare/testing...gslvly:naive-fallback?expand=1

This repository currently only allows collaborators to create pull requests, so I could not open a PR directly. If the change is of interest, I can open a PR once access is granted, or the branch above can be pulled directly.

Build and vet pass for the touched packages (go build ./protocol/naive/... ./option/..., go vet ./protocol/naive/... ./option/...).

Thanks.

Lingua principale
Go
Stelle
40.4k
Fork
5k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

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 SagerNet/sing-box

Tutte le issue di SagerNet/sing-box

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.