全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 1804|回复: 4

[疑问] 求助sing-box分流问题

[复制链接]
发表于 2023-1-17 16:06:58 | 显示全部楼层 |阅读模式
如下用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到底支不支持这样分流,支持的话要怎么配置才可以呢?
 楼主| 发表于 2023-1-17 19:18:50 | 显示全部楼层
晚上大佬多,再顶一下
发表于 2023-1-30 20:21:34 | 显示全部楼层
本来想去GitHub搜下有没有方案,结果搜到了你提的issue哈哈哈哈
 楼主| 发表于 2023-1-30 22:29:05 | 显示全部楼层
在7楼 发表于 2023-1-30 20:21
本来想去GitHub搜下有没有方案,结果搜到了你提的issue哈哈哈哈

还是提issue靠谱,是个bug,已经解决了
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2024-5-3 20:05 , Processed in 0.060253 second(s), 9 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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