Guest User

XTLS-Reality-Vision

a guest
Dec 20th, 2024
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 2.73 KB | Source Code | 0 0
  1. ## Server
  2.  
  3. ```json
  4. {
  5.   "log": {
  6.     "disabled": false,
  7.     "level": "warn",
  8.     "timestamp": true
  9.   },
  10.   "outbounds": [
  11.     {
  12.       "tag": "direct-out",
  13.       "type": "direct"
  14.     },
  15.     {
  16.       "tag": "block",
  17.       "type": "block"
  18.     },
  19.     {
  20.       "tag": "dns-out",
  21.       "type": "dns"
  22.     }
  23.   ],
  24.   "inbounds": [
  25.     {
  26.       "type": "vless",
  27.       "tag": "vless-in",
  28.       "listen": "::",
  29.       "listen_port": 443,
  30.       "users": [
  31.         {
  32.           "uuid": "", // uuidgen
  33.           "flow": "xtls-rprx-vision"
  34.         }
  35.       ],
  36.       "tls": {
  37.         "enabled": true,
  38.         "server_name": "apple.com", // Must support TLS v1.3 and HTTP/2
  39.         "reality": {
  40.           "enabled": true,
  41.           "handshake": {
  42.             "server": "apple.com", // Must support TLS v1.3 and HTTP/2
  43.             "server_port": 443
  44.           },
  45.           "private_key": "", // docker run -it --rm ghcr.io/sagernet/sing-box generate reality-keypair
  46.           "short_id": [
  47.             "" // openssl rand -hex 8
  48.           ]
  49.         }
  50.       }
  51.     }
  52.   ]
  53. }
  54. ```
  55.  
  56.  
  57.  
  58. ## Client
  59. ```json
  60. {
  61.   "log": {
  62.     "level": "info",
  63.     "timestamp": true
  64.   },
  65.   "dns": {
  66.     "servers": [
  67.       {
  68.         "tag": "doh",
  69.         "address": "https://dns.quad9.net/dns-query",
  70.         "address_resolver": "noenc",
  71.         // "address_strategy": ""
  72.       },
  73.       {
  74.         "tag": "noenc",
  75.         "address": "9.9.9.9"
  76.       }
  77.     ]
  78.   },
  79.   "inbounds": [
  80.     {
  81.       "type": "tun",
  82.       "tag": "tun-in",
  83.       "interface_name": "utun128",
  84.       "inet4_address": [
  85.         "172.19.0.1/30"
  86.       ],
  87.       "inet6_address": [
  88.         "fd17:1ef8:426a:4632::/64"
  89.       ],
  90.       "mtu": 1500,
  91.       "auto_route": true,
  92.       "strict_route": true,
  93.       "sniff": true
  94.     }
  95.   ],
  96.   "outbounds": [
  97.     {
  98.       "type": "vless",
  99.       "tag": "vless-out",
  100.       "detour": "direct-out",
  101.       "server": "<yourserverip>",
  102.       "server_port": 443,
  103.       "uuid": "",
  104.       "flow": "xtls-rprx-vision",
  105.       "tls": {
  106.         "enabled": true,
  107.         "server_name": "apple.com",
  108.         "utls": {
  109.           "enabled": true,
  110.           "fingerprint": "firefox"
  111.         },
  112.         "reality": {
  113.           "enabled": true,
  114.           "public_key": "",
  115.           "short_id": ""
  116.         }
  117.       }
  118.     },
  119.     {
  120.       "type": "direct",
  121.       "tag": "direct-out"
  122.     },
  123.     {
  124.       "type": "block",
  125.       "tag": "block"
  126.     },
  127.     {
  128.       "type": "dns",
  129.       "tag": "dns-out"
  130.     }
  131.   ],
  132.   "route": {
  133.     "rules": [
  134.       {
  135.         "inbound": "tun-in",
  136.         "outbound": "vless-out"
  137.       },
  138.       {
  139.         "protocol": "dns",
  140.         "outbound": "dns-out"
  141.       }
  142.     ],
  143.     "auto_detect_interface": true
  144.   }
  145. }
  146. ```
  147.  
  148.  
Advertisement
Add Comment
Please, Sign In to add comment