找回密码
 立即注册
CeraNetworksBGVM服务器主机交流IP归属甄别会员请立即修改密码
查看: 39|回复: 6

请教大佬X

[复制链接]

33

主题

237

回帖

847

积分

高级会员

积分
847
发表于 2024-1-21 05:24:11 | 显示全部楼层 |阅读模式
是这样,机子在US,需要拉SG专门看流媒体,但除此之外其余情况比如google啥的需要走UA,相当于US纯拉后面俩,全程US不用,就是一个一拖二的链式,在v2我会,但最近换X-ui在配置里怎么改都不生效,请教大佬!
[ol]
  • {
  •   "api": {
  •     "services": [
  •       "HandlerService",
  •       "LoggerService",
  •       "StatsService"
  •     ],
  •     "tag": "api"
  •   },
  •   "inbounds": [
  •     {
  •       "listen":"127.0.0.1",
  •       "port":1089,
  •       "protocol":"socks",
  •           "tag": "in",
  •       "settings":{
  •         "udp":true
  •             }
  •         },
  •         {
  •       "listen": "127.0.0.1",
  •       "port": 62789,
  •       "protocol": "dokodemo-door",
  •       "settings": {
  •         "address": "127.0.0.1"
  •       },
  •       "tag": "api"
  •     }
  •   ],
  •   "outbounds": [
  •     {
  •       "protocol": "freedom",
  •       "settings": {}
  •     },
  •     {
  •       "protocol": "blackhole",
  •       "settings": {},
  •       "tag": "blocked"
  •     },
  •     {
  •       "tag": "给流媒体专门走一个",
  •       "protocol": "vmess",
  •       "streamSettings": {
  •         "network": "ws",
  •         "security": "tls",
  •         "tlsSettings": {
  •           "allowInsecure": false
  •         },
  •         "wsSettings": {
  •           "path": "XXX"
  •         }
  •       },
  •       "mux": {
  •         "enabled": true,
  •         "concurrency": 8
  •       },
  •       "settings": {
  •         "vnext": [
  •           {
  •             "address": "XXX",
  •             "port": XXX,
  •             "network": "tcp,udp",
  •             "users": [
  •               {
  •                 "id": "XXX",
  •                 "security": "auto",
  •                 "alterId": 0
  •               }
  •             ]
  •           }
  •         ]
  •       }
  •     },
  •         {
  •       "tag": "其他的走这个",
  •       "protocol": "shadowsocks",
  •        "settings": {
  •        "servers": [
  •                     {
  •                         "address": "XXX",
  •                         "port": XXX,
  •                         "method": "XXX",
  •                         "password": "XXX",
  •                         "ota": false,
  •                         "level": 1
  •                       }
  •                                         ]
  •                              }
  •     }
  •   ],
  •   "policy": {
  •     "levels": {
  •       "0": {
  •         "handshake": 10,
  •         "connIdle": 100,
  •         "uplinkOnly": 2,
  •         "downlinkOnly": 3,
  •         "statsUserUplink": true,
  •         "statsUserDownlink": true,
  •         "bufferSize": 10240
  •       }
  •     },
  •     "system": {
  •       "statsInboundDownlink": true,
  •       "statsInboundUplink": true
  •     }
  •   },
  •   "routing": {
  •     "rules": [
  •       {
  •         "inboundTag": [
  •           "in"
  •         ],
  •                 "type": "field",
  •         "outboundTag": "给流媒体专门走一个",
  •         "domain": [
  •           "geosite:netflix",
  •           "geosite:disney"
  •         ]
  •       },
  •           {
  •         "inboundTag": [
  •           "in"
  •         ],
  •         "outboundTag": "其他的走这个",
  •         "type": "field"
  •       },
  •       {
  •         "ip": [
  •           "geoip:private"
  •         ],
  •         "outboundTag": "blocked",
  •         "type": "field"
  •       },
  •       {
  •         "outboundTag": "blocked",
  •         "protocol": [
  •           "bittorrent"
  •         ],
  •         "type": "field"
  •       }
  •     ]
  •   },
  •   "stats": {}
  • }[/ol]复制代码
  • 回复

    使用道具 举报

    14

    主题

    113

    回帖

    416

    积分

    中级会员

    积分
    416
    发表于 2024-1-21 05:33:56 | 显示全部楼层
        {       "protocol": "freedom",       "settings": {}     },     {       "protocol": "blackhole",       "settings": {},       "tag": "blocked"     },
    回复

    使用道具 举报

    14

    主题

    113

    回帖

    416

    积分

    中级会员

    积分
    416
    发表于 2024-1-21 05:35:03 | 显示全部楼层
    上面删除试试
    回复

    使用道具 举报

    33

    主题

    237

    回帖

    847

    积分

    高级会员

    积分
    847
     楼主| 发表于 2024-1-21 05:44:29 | 显示全部楼层

    大大的小太阳 发表于 2024-1-21 05:35

    上面删除试试

    这样分出去了,但很奇怪,我模拟UA离线情况,最后所有的流量走了SG,感觉routing写的还是不对
    回复

    使用道具 举报

    3

    主题

    17

    回帖

    225

    积分

    中级会员

    积分
    225
    发表于 2024-1-21 05:35:00 | 显示全部楼层
    outbounds_1
    outbounds_2
    outbounds_3
    1当默认代理us
    2当sg
    3备用
    大概思路就是这样
    routing里面指定域名走1还是走2
          {
            "type": "field",
            "domains": [
              "domain:baidu.com",
              "domain:qq.com",
            ],
            "outboundTag": "outbounds_1"
          },
          {
            "type": "field",
            "domains": [
              "domain:baidu.com",
              "domain:qq.com",
            ],
            "outboundTag": "outbounds_2"
          },
    回复

    使用道具 举报

    33

    主题

    237

    回帖

    847

    积分

    高级会员

    积分
    847
     楼主| 发表于 2024-1-21 06:18:40 | 显示全部楼层

    stu 发表于 2024-1-21 06:18

    outbounds_1
    outbounds_2
    outbounds_3

    好哥哥还不是这个意思,就是默认走UA,US纯拉SG和UA,只不过在流媒体的时候走SG,其余包括正常访问流量走UA
    回复

    使用道具 举报

    33

    主题

    237

    回帖

    847

    积分

    高级会员

    积分
    847
     楼主| 发表于 2024-1-21 06:51:59 | 显示全部楼层

    stu 发表于 2024-1-21 06:18

    outbounds_1
    outbounds_2
    outbounds_3

    就是走UA的时候不需要指定域名,给SG分好之外的,全给UA
    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    Archiver|手机版|小黑屋|HS2V主机综合交流论坛

    GMT+8, 2024-6-2 12:08 , Processed in 0.053316 second(s), 3 queries , Gzip On, Redis On.

    Powered by Discuz! X3.5

    © 2001-2023 Discuz! Team.

    快速回复 返回顶部 返回列表