以下是一个示例的 X-ui 分流配置文件,用于将 Socks 流量分流至指定的服务器:

{
  'policy': {
    'socks': {
      'type': 'field',
      'outboundTag': 'socks-out'
    },
    'direct': {
      'type': 'field',
      'outboundTag': 'direct-out'
    }
  },
  'rules': [
    {
      'type': 'field',
      'inboundTag': ['socks-in'],
      'outboundTag': 'socks',
      'network': 'tcp,udp'
    },
    {
      'type': 'field',
      'outboundTag': 'direct',
      'network': 'tcp,udp',
      'domain': ['geosite:cn']
    },
    {
      'type': 'field',
      'outboundTag': 'direct',
      'network': 'tcp,udp',
      'ip': ['geoip:cn']
    },
    {
      'type': 'field',
      'outboundTag': 'socks',
      'network': 'tcp,udp',
      'domain': ['geosite:geolocation-!cn']
    }
  ],
  'outbounds': [
    {
      'tag': 'direct-out',
      'protocol': 'freedom',
      'settings': {}
    },
    {
      'tag': 'socks-out',
      'protocol': 'socks',
      'settings': {
        'servers': [
          {
            'address': 'socks-server-ip',
            'port': 1080,
            'users': [
              {
                'user': 'your-username',
                'pass': 'your-password'
              }
            ]
          }
        ]
      }
    }
  ]
}

请将上述配置文件中的socks-server-ip替换为实际的 Socks 服务器 IP 地址,your-usernameyour-password 替换为实际的 Socks 账号和密码。

保存配置文件后,将其导入到 X-ui 中,然后将需要通过 Socks 代理的设备的代理设置指向 X-ui 服务器即可实现 Socks 流量的分流。

X-ui 分流配置文件:Socks 流量代理设置

原文地址: https://www.cveoy.top/t/topic/bX3J 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录