mirror of
https://github.com/eycorsican/leaf.git
synced 2026-12-05 08:01:26 +00:00
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.
36 lines
615 B
JSON
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"
|
|
}
|
|
]
|
|
}
|
|
}
|