mirror of
https://github.com/eycorsican/leaf.git
synced 2026-12-05 08:01:26 +00:00
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.
36 lines
665 B
JSON
36 lines
665 B
JSON
{
|
|
"log": {
|
|
"level": "info",
|
|
"output": "console"
|
|
},
|
|
"inbounds": [
|
|
{
|
|
"tag": "socks-in",
|
|
"address": "127.0.0.1",
|
|
"port": 1080,
|
|
"protocol": "socks",
|
|
"settings": {}
|
|
}
|
|
],
|
|
"outbounds": [
|
|
{
|
|
"tag": "anytls",
|
|
"protocol": "plugin",
|
|
"settings": {
|
|
"path": "./target/debug/libanytls_cabi_go.dylib",
|
|
"host": "203.0.113.10",
|
|
"port": 443,
|
|
"args": "{\"password\":\"change-me\",\"server_name\":\"server.example.com\",\"fingerprint\":\"chrome\"}"
|
|
}
|
|
}
|
|
],
|
|
"router": {
|
|
"rules": [
|
|
{
|
|
"type": "FINAL",
|
|
"target": "anytls"
|
|
}
|
|
]
|
|
}
|
|
}
|