Files
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

36 lines
615 B
JSON

{
"log": {
"level": "debug",
"output": "console"
},
"inbounds": [
{
"tag": "socks-in",
"address": "127.0.0.1",
"port": 1080,
"protocol": "socks",
"settings": {}
}
],
"outbounds": [
{
"tag": "ss-cabi",
"protocol": "plugin",
"settings": {
"path": "./target/debug/libshadowsocks_cabi_rs.dylib",
"host": "51.15.225.65",
"port": 5667,
"args": "chacha20-ietf-poly1305;d5d701eb8283"
}
}
],
"router": {
"rules": [
{
"type": "FINAL",
"target": "ss-cabi"
}
]
}
}