easy-xray/template_config_client.jsonc
2023-11-09 12:35:40 +03:00

138 lines
3.6 KiB
JSON

// This config is based on
// https://github.com/XTLS/Xray-examples/blob/main/VLESS-TCP-XTLS-Vision-REALITY/REALITY.ENG.md
{
"log": {
"access": "none",
"error": "",
"loglevel": "warning",
"dnsLog": false
},
// client-side inbound configuration
"inbounds": [
{
"tag": "socks",
"port": 800,
"listen": "127.0.0.1",
"protocol": "socks",
// used to make transparent proxies, see https://xtls.github.io/en/config/inbound.html#sniffingobject
"sniffing": {
"enabled": true,
"destOverride": [
"http",
"tls"
]
},
// settings of inbound `protocol` (see above)
"settings": {
"auth": "noauth",
"udp": true
}
},
{
"tag": "http",
"port": 801,
"listen": "127.0.0.1",
"protocol": "http",
// used to make transparent proxies, see https://xtls.github.io/en/config/inbound.html#sniffingobject
"sniffing": {
"enabled": true,
"destOverride": [
"http",
"tls"
],
"routeOnly": false
},
// settings of inbound `protocol` (see above)
"settings": {
"auth": "noauth",
"udp": true
}
}
],
// client-side outbound configuration
"outbounds": [
{
"tag": "proxy",
"protocol": "vless",
// VLESS settings
"settings": {
"vnext": [
{
// IPv4 or IPv6 address of your xray server, or its domain name
"address": "server_address",
"port": 443,
"users": [
{
// should match server side
"id": "client_id",
"email": "client_email",
"encryption": "none",
"flow": "xtls-rprx-vision"
}
]
}
]
},
// settings of transport protocol, https://xtls.github.io/en/config/transport.html#streamsettingsobject
"streamSettings": {
"network": "tcp",
// transport layer encription, xtls + fallback
"security": "reality",
"realitySettings": {
// tls client hello fingerprint; here client appears as chrome to websites
"fingerprint": "chrome",
// fake server name which client is attempting to connect in the TLS handshake
"serverName": "www.youtube.com",
// optional; if true, outputs debug information
"show": false,
// paired with privateKey from server config
"publicKey": "public_key",
// user short id
"shortId": "short_id"
}
}
},
{
// this outbound is to guide traffic to local sites not through the server
// but directly from the client; `tag` is just a label of oubound
"tag": "direct",
"protocol": "freedom",
"settings": {}
}
],
// Forward each inbound connections to corresponding `outboundTag`. If no rules match,
// the traffic is sent out by the first outbound in `outbounds` section.
"routing": {
"domainStrategy": "AsIs",
"rules": [
{
"type": "field",
"domain": [
"geosite:cn",
"domain:ru",
"domain:by",
"domain:ir"
],
"outboundTag": "direct"
},
{
"type": "field",
"ip": [
"geoip:cn",
"geoip:ru",
"geoip:by",
"geoip:ir"
],
"outboundTag": "direct"
},
{
"type": "field",
"inboundTag": [
"api"
],
"outboundTag": "api",
"enabled": true
}
]
}
}