全球主机交流论坛

标题: 求助sing-box分流问题 [打印本页]

作者: cai    时间: 2023-1-17 16:06
标题: 求助sing-box分流问题
如下用sing-box配置naive节点,有多个用户
{
      "type": "naive",
      "tag": "naive-in",
      "network": "tcp",
      "listen": "::",
      "listen_port": 443,
      "tcp_fast_open": true,
      "sniff": true,
      "sniff_override_destination": false,
      "domain_strategy": "prefer_ipv4",
      "udp_timeout": 300,
      "proxy_protocol": false,
      "users": [
        {
          "username": "user1",
          "password": ""
        },
        {
          "username": "user2",
          "password": ""
        },
        {
          "username": "user3",
          "password": ""
        }
      ],
      "tls": {
        "enabled": true,
        "min_version": "1.2",
        "max_version": "1.3",
        "alpn": ["h2",
                 "http/1.1"],
        "certificate_path": "/usr/local/etc/sing-box/cert.pem",
        "key_path": "/usr/local/etc/sing-box/key.pem"
        }
      },


然后我有几个不同的outbound,分别是out1,out2.....
在分流规则中,我希望不同的用户走不同的outbound,所以这么配置
      {
        "network": "tcp",
        "auth_user": "user1",
        "outbound": "out1"
      },
      {
        "network": "tcp",
        "auth_user": "user2",
        "outbound": "out2"
      },


但是失败,似乎并没有检测到不同用户。
+0800 2023-01-17 14:23:38 INFO [2083906573] inbound/naive[naive-in]: inbound connection from xxxxxx:51511
+0800 2023-01-17 14:23:38 INFO [2083906573] inbound/naive[naive-in]: inbound connection to xxxxxx:443
+0800 2023-01-17 14:23:38 INFO [1797004494] inbound/naive[naive-in]: inbound connection from xxxxx:51511
+0800 2023-01-17 14:23:38 INFO [1797004494] inbound/naive[naive-in]: inbound connection to xxxxxx:443


请问大佬们,naive到底支不支持这样分流,支持的话要怎么配置才可以呢?
作者: cai    时间: 2023-1-17 16:22
顶一下
作者: cai    时间: 2023-1-17 19:18
晚上大佬多,再顶一下
作者: 在7楼    时间: 2023-1-30 20:21
本来想去GitHub搜下有没有方案,结果搜到了你提的issue哈哈哈哈
作者: cai    时间: 2023-1-30 22:29
在7楼 发表于 2023-1-30 20:21
本来想去GitHub搜下有没有方案,结果搜到了你提的issue哈哈哈哈

还是提issue靠谱,是个bug,已经解决了




欢迎光临 全球主机交流论坛 (https://443502.xyz/) Powered by Discuz! X3.4