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.
51 lines
980 B
JSON
51 lines
980 B
JSON
{
|
|
"log": {
|
|
"level": "info",
|
|
"output": "console"
|
|
},
|
|
"inbounds": [
|
|
{
|
|
"tag": "socks-in",
|
|
"address": "127.0.0.1",
|
|
"port": 1080,
|
|
"protocol": "socks",
|
|
"settings": {}
|
|
}
|
|
],
|
|
"outbounds": [
|
|
{
|
|
"tag": "shadowtls-chain",
|
|
"protocol": "chain",
|
|
"settings": {
|
|
"actors": ["shadowtls", "ss"]
|
|
}
|
|
},
|
|
{
|
|
"tag": "shadowtls",
|
|
"protocol": "plugin",
|
|
"settings": {
|
|
"path": "./target/debug/libshadowtls_cabi_go.dylib",
|
|
"args": "{\"password\":\"change-me\",\"server_name\":\"www.example.com\",\"fingerprint\":\"chrome\"}"
|
|
}
|
|
},
|
|
{
|
|
"tag": "ss",
|
|
"protocol": "shadowsocks",
|
|
"settings": {
|
|
"address": "203.0.113.10",
|
|
"port": 443,
|
|
"method": "aes-128-gcm",
|
|
"password": "change-me-too"
|
|
}
|
|
}
|
|
],
|
|
"router": {
|
|
"rules": [
|
|
{
|
|
"type": "FINAL",
|
|
"target": "shadowtls-chain"
|
|
}
|
|
]
|
|
}
|
|
}
|