A-A+

X-ui多IP搭建规则 多IP站群服务器实现源进源出分流

2024年05月24日 个人笔记, 拾到贝壳, 点滴记录 暂无评论 阅读 246 次

Xray相关设置,删除默认规则,用以下规则替换:

  1. {
  2.   "api": {
  3.     "services": [
  4.       "HandlerService",
  5.       "LoggerService",
  6.       "StatsService"
  7.     ],
  8.     "tag""api"
  9.   },
  10.   "inbounds": [
  11.     {
  12.       "listen""127.0.0.1",
  13.       "port"62789,
  14.       "protocol""dokodemo-door",
  15.       "settings": {
  16.         "address""127.0.0.1"
  17.       },
  18.       "tag""api"
  19.     }
  20.   ],
  21.   "outbounds": [
  22.    {
  23.       "tag""ip1",
  24.       "sendThrough""内网IP1",
  25.       "protocol""freedom",
  26.       "settings": {}
  27.     },
  28.     {
  29.       "tag""ip2",
  30.       "sendThrough""内网IP2",
  31.       "protocol""freedom",
  32.       "settings": {}
  33.     },
  34.     {
  35.       "protocol""freedom",
  36.       "settings": {}
  37.     },
  38.     {
  39.       "protocol""blackhole",
  40.       "settings": {},
  41.       "tag""blocked"
  42.     }
  43.   ],
  44.   "policy": {
  45.     "system": {
  46.       "statsInboundDownlink"true,
  47.       "statsInboundUplink"true
  48.     }
  49.   },
  50.   "routing": {
  51.     "rules": [
  52.    {
  53.         "inboundTag": [
  54.           "inbound-端口","inbound-端口"
  55.         ],
  56.         "outboundTag""ip1",
  57.         "type""field"
  58.       },
  59.       {
  60.         "inboundTag": [
  61.           "inbound-端口","inbound-端口"
  62.         ],
  63.         "outboundTag""ip2",
  64.         "type""field"
  65.       },
  66.       {
  67.         "inboundTag": [
  68.           "api"
  69.         ],
  70.         "outboundTag""api",
  71.         "type""field"
  72.       },
  73.       {
  74.         "ip": [
  75.           "geoip:private"
  76.         ],
  77.         "outboundTag""blocked",
  78.         "type""field"
  79.       },
  80.       {
  81.         "outboundTag""blocked",
  82.         "protocol": [
  83.           "bittorrent"
  84.         ],
  85.         "type""field"
  86.       }
  87.     ]
  88.   },
  89.   "stats": {}
  90. }

给我留言

Copyright © 海边拾贝 保留所有权利.   Theme  Ality 鲁ICP备17020531号-1
网站已运行: | 耗时 0.877 秒 | 查询 67 次 | 内存 42.19 MB

用户登录