mirror of
https://github.com/XTLS/Xray-examples.git
synced 2024-11-24 17:41:29 +00:00
d35c6f5aaa
Update vmess_ws_tls.json comment translate Update vmess_tcp_tls.json comment translate Update vless_ws_tls.json comment trnslate Update vless_tcp_xtls.json comment translate Update vless_tcp_tls.json comment translate Update trojan_tcp_tls.json comment translate Create README.ENG.md Update README.md add link README.ENG.md Update README.md add link README.ENG.md Create README.ENG.md Update README.md add link README.ENG.md Create README.ENG.md Update client.json comment transalate Update server.json comment translate Update README.md add english translate Update README.md add english link Create README.ENG.md Update Caddyfile comment translate Update client.json comment translate Update server.json comment translate Update README.md add link README.ENG.md Create RREADME.ENG.md Update config_client_tcp_tls.json translate comment Update config_client_ws_tls.json translate comment Update config_server.json comment translate Update README.md add link README.ENG.md Create README.ENG.md Update config_client.json comment translate Update config_server.json comment translate Update client.json translate comment Update server.json translate comment Update README.md add link README.ENG.md Create README.ENG.md Update server.json translate comment Update README.md add link README.ENG.md Update README.md Create README.ENG.md Co-authored-by: lk29 <12291632+lk29@users.noreply.github.com>
3.9 KiB
3.9 KiB
Shadowsocks 2022
服务端 JSON
{
"inbounds": [
{
"port": 1234,
"protocol": "shadowsocks",
"settings": {
"method": "2022-blake3-aes-128-gcm",
"password": "{{ psk }}",
"network": "tcp,udp"
}
}
],
"outbounds": [
{
"protocol": "freedom"
}
]
}
服务端 JSON (多用户)
{
"inbounds": [
{
"port": 1234,
"protocol": "shadowsocks",
"settings": {
"method": "2022-blake3-aes-128-gcm",
"password": "{{ server psk }}",
"clients": [
{
"password": "{{ user psk }}",
"email": "my user"
}
],
"network": "tcp,udp"
}
}
],
"outbounds": [
{
"protocol": "freedom"
}
]
}
服务端 JSON (中转)
{
"inbounds": [
{
"port": 1234,
"protocol": "shadowsocks",
"settings": {
"method": "2022-blake3-aes-128-gcm",
"password": "{{ relay psk }}",
"clients": [
{
"address": "server",
"port": 1234,
"password": "{{ server/user psk }}",
"email": "my server"
}
],
"network": "tcp,udp"
}
}
],
"outbounds": [
{
"protocol": "freedom"
}
]
}
客户端 JSON
{
"inbounds": [
{
"port": 10801,
"protocol": "socks",
"settings": {
"udp": true
}
},
{
"port": 10802,
"protocol": "http"
}
],
"outbounds": [
{
"protocol": "shadowsocks",
"settings": {
"servers": [
{
"address": "{{ host }}",
"port": 1234,
"method": "2022-blake3-aes-128-gcm",
"password": "{{ psk }}"
}
]
}
}
]
}
客户端 JSON (UDP over TCP)
{
"inbounds": [
{
"port": 10801,
"protocol": "socks",
"settings": {
"udp": true
}
},
{
"port": 10802,
"protocol": "http"
}
],
"outbounds": [
{
"protocol": "shadowsocks",
"settings": {
"servers": [
{
"address": "{{ host }}",
"port": 1234,
"method": "2022-blake3-aes-128-gcm",
"password": "{{ psk }}",
"uot": true
}
]
}
}
]
}
客户端 JSON (多用户)
{
"inbounds": [
{
"port": 10801,
"protocol": "socks",
"settings": {
"udp": true
}
},
{
"port": 10802,
"protocol": "http"
}
],
"outbounds": [
{
"protocol": "shadowsocks",
"settings": {
"servers": [
{
"address": "{{ host }}",
"port": 1234,
"method": "2022-blake3-aes-128-gcm",
"password": "{{ server psk }}:{{ user psk }}"
}
]
}
}
]
}
客户端 JSON (中转)
{
"inbounds": [
{
"port": 10801,
"protocol": "socks",
"settings": {
"udp": true
}
},
{
"port": 10802,
"protocol": "http"
}
],
"outbounds": [
{
"protocol": "shadowsocks",
"settings": {
"servers": [
{
"address": "{{ host }}",
"port": 1234,
"method": "2022-blake3-aes-128-gcm",
"password": "{{ relay psk }}:{{ user psk }}"
}
]
}
}
]
}
Password
Shadowsocks 2022 使用与 WireGuard 类似的预共享密钥作为密码。
使用 openssl rand -base64 <长度>
以生成与 shadowsocks-rust 兼容的密钥,长度取决于所使用的加密方法。
加密方法 | 密钥长度 |
---|---|
2022-blake3-aes-128-gcm | 16 |
2022-blake3-aes-256-gcm | 32 |
2022-blake3-chacha20-poly1305 | 32 |
在 Go 实现中,32 位密钥始终工作。