Commit Graph
3 Commits
Author SHA1 Message Date
eric 730e8a6dae docs: a configuration reference, and what each choice exposes
docs/configuration.md lists every JSON option, environment variable and
command-line flag: what it does, what it accepts, and what happens when it
is left out, with the .conf keys mapped onto them. Options that decide
whether traffic stays behind the proxy are marked.

docs/security.md explains those choices together: names looked up outside
the proxy, where unmatched traffic goes, direct fallback, IPv6 under TUN,
certificate checks, logs, and how the protocols fare on filtered networks,
without presenting any as safe from a censor. It ends with a configuration
to start from, which has been run.

examples/README.md says what each example is for and what to change before
deploying one. The README links all three and no longer names the TUN
stacks that were replaced.
2026-12-04 09:55:40 +08:00
eric 00eb09a0cb feat(plugins): add the AnyTLS and ShadowTLS v3 reference plugins
Two protocols leaf does not implement, each a thin Go adapter over the
library existing implementations use: anytls/sing-anytls for AnyTLS, and
sing-shadowtls with metacubex/utls for ShadowTLS, at sing-box v1.14.4's pins.

AnyTLS keeps TLS inside the plugin, since its padding scheme is defined over
TLS records, and shares one client per outbound so a server's own scheme
carries to the next connection. ShadowTLS is a transport under a chain,
usually Shadowsocks.

The ShadowTLS adapter signs the session ID itself rather than through uTLS's
hook: with a browser fingerprint that hook sends Go's own ClientHello, and
breaks on a HelloRetryRequest.

Each has unit tests against the library's server, READMEs, and example
configs. Both binaries are GPL-3.0, from their libraries.
2026-12-03 19:31:53 +08:00
eric 32944836ce docs: describe the plugin system, and add the example chains
The README gains a Plugins section: what a plugin is, the six that ship with
the tree, how one is configured as an outbound, why `path` must have a
directory part, why nothing is ever scanned for, why leaf refuses a library
anyone can rewrite, and why the optional `sha256` is worth setting. It says
plainly what none of that buys -- a plugin runs with leaf's privileges, so the
checks establish which file was loaded, not that it is friendly -- and how to
vet one with `--verify-plugin` first. It also covers building a leaf that can
load plugins at all, which neither the releases nor CI produce: the Linux
releases are static against musl and have no dynamic loader to call.

examples/ carries configs that run. The shadowsocks one connects through the
Rust plugin; the TLS ones chain a transport plugin under Trojan across the
Rust and Go implementations, with Windows variants where the paths differ,
and both READMEs give the server side needed to try them.
2026-12-03 19:31:53 +08:00