/
robat
/
Vnprobat
Обзор
Документация
Войти
/
robat
/
Vnprobat
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
config
99 строк
3 KB
robat
Update: config
24 июл 2026, 09:50
Верифицирован
24 июл 2026, 09:50
cf358d5
Код
Авторство
О чём код?
// REFERENCE: // https://github.com/XTLS/Xray-examples // https://xtls.github.io/config/ // Common config files, whether server or client, have 5 parts. Plus newbie interpretation: // ┌─ 1*log Log Settings - What to write, where to write (evidence available when errors occur) // ├─ 2_dns DNS Settings - How to query DNS (prevent DNS pollution, prevent snooping, avoid matching domestic sites to foreign servers, etc.) // ├─ 3_routing Routing Settings - How to classify and process traffic (whether to filter ads, split domestic/international traffic) // ├─ 4_inbounds Inbound Settings - What traffic can flow into Xray // └─ 5_outbounds Outbound Settings - Where the traffic flowing out of Xray goes { // 1_Log Settings "log": { "loglevel": "warning", // Content from least to most: "none", "error", "warning", "info", "debug" "access": "/home/vpsadmin/xray_log/access.log", // Access record "error": "/home/vpsadmin/xray_log/error.log" // Error record }, // 2_DNS Settings "dns": { "servers": [ "https+local://1.1.1.1/dns-query", // Prefer 1.1.1.1 DoH query, sacrifices speed but prevents ISP snooping "localhost" ] }, // 3_Routing Settings "routing": { "domainStrategy": "IPIfNonMatch", "rules": [ // 3.1 Prevent local server loop issues: e.g., intranet attacks or abuse, wrong local loops, etc. { "ip": [ "geoip:private" // Routing condition: rules named "private" in the geoip file (local) ], "outboundTag": "block" // Routing strategy: hand over to outbound "block" processing (blackhole blocking) }, { // 3.2 Prevent server from directly connecting to domestic (CN) IPs "ip": ["geoip:cn"], "outboundTag": "block" }, // 3.3 Block Ads { "domain": [ "geosite:category-ads-all" // Routing condition: rules named "category-ads-all" in the geosite file (various ad domains) ], "outboundTag": "block" // Routing strategy: hand over to outbound "block" processing (blackhole blocking) } ] }, // 4_Inbound Settings // 4.1 Here only one simplest vless+xtls inbound is written, because this is Xray's most powerful mode. If needed, please add others based on templates. "inbounds": [ { "port": 443, "protocol": "vless", "settings": { "users": [ { "id": "", // Fill in your UUID "flow": "xtls-rprx-vision", "level": 0, "email": "vpsadmin@yourdomain.com" } ], "decryption": "none", "fallbacks": [ { "dest": 80 // Default fallback to the probe-resistant proxy } ] }, "streamSettings": { "method": "tcp", "security": "tls", "tlsSettings": { "alpn": "http/1.1", "certificates": [ { "certificateFile": "/home/vpsadmin/xray_cert/xray.crt", "keyFile": "/home/vpsadmin/xray_cert/xray.key" } ] } } } ], // 5_Outbound Settings "outbounds": [ // 5.1 The first outbound is the default rule, freedom is direct connection (VPS is already on the external network, so direct connection) { "tag": "direct", "protocol": "freedom" }, // 5.2 Blocking rule, blackhole protocol sends traffic into a black hole (blocking) { "tag": "block", "protocol": "blackhole" } ] }