sing-box icon indicating copy to clipboard operation
sing-box copied to clipboard

Shadowsocks 的多用户结构报错

Open zeetex opened this issue 3 years ago • 3 comments

Welcome

  • [X] Yes, I'm using the latest major release. Only such installations are supported.
  • [X] Yes, I'm using the latest Golang release. Only such installations are supported.
  • [X] Yes, I've searched similar issues on GitHub and didn't find any.
  • [X] Yes, I've included all information below (version, FULL config, FULL log, etc).

Description of the problem

关于 Shadowsocks 的多用户结构,sing-box v1.2.6 只有加密方法 2022-blake3-aes-128-gcm 和 2022-blake3-aes-256-gcm 不报错,2022-blake3-chacha20-poly1305 报错为

FATAL[0000] create service: parse inbound[0]: invalid argument

aes-256-gcm 或 chacha20-ietf-poly1305 等传统加密方法则报错为

FATAL[0000] create service: parse inbound[0]: unsupported method: aes-256-gcm

如果换成自编译的最新开发版 https://github.com/SagerNet/sing-box/commit/841ef1acaf16191ec3df74d9553ef1a9249979f0 ,则 aes-256-gcm 或 chacha20-ietf-poly1305 等传统加密方法不报错,但 2022-blake3-chacha20-poly1305 仍然报同样的错误。

Version of sing-box

操作系统为 Windows 10,sing-box 正式版本为 v1.2.6
$ sing-box version
sing-box version 1.2.6

Environment: go1.20.3 windows/amd64
Tags: with_gvisor,with_quic,with_wireguard,with_utls,with_reality_server,with_clash_api
Revision: 4e0742dbb372c89f596a8b1602ee2e9e22898e2b
CGO: disabled

sing-box 的开发版为自编译的 https://github.com/SagerNet/sing-box/commit/841ef1acaf16191ec3df74d9553ef1a9249979f0

$ sing-box version
sing-box version v1.2.6-35-g841ef1a

Environment: go1.20.3 windows/amd64
Tags: with_quic,with_wireguard,with_acme,with_ech,with_utls,with_reality_server,with_gvisor,with_clash_api
Revision: 841ef1acaf16191ec3df74d9553ef1a9249979f0
CGO: disabled

Server and client configuration file

{
    "inbounds": [
        {
            "type": "shadowsocks",
            "listen_port": 12345,
            "method": "2022-blake3-chacha20-poly1305",
            "password": "xd4MjlOIWipRdPCw9npBC6sfNG713MyKK+L/8zTI0lg=",
            "users": [
                {
                    "name": "sekai",
                    "password": "4d4FW433BFrlzdYeRXQfkHJNMFr4VqLC/3aGTslBJv8="
                }
            ]
        }
    ]
}

Server and client log file

FATAL[0000] create service: parse inbound[0]: invalid argument
FATAL[0000] create service: parse inbound[0]: unsupported method: none
FATAL[0000] create service: parse inbound[0]: unsupported method: aes-128-gcm
FATAL[0000] create service: parse inbound[0]: unsupported method: aes-192-gcm
FATAL[0000] create service: parse inbound[0]: unsupported method: aes-256-gcm
FATAL[0000] create service: parse inbound[0]: unsupported method: chacha20-ietf-poly1305
FATAL[0000] create service: parse inbound[0]: unsupported method: xchacha20-ietf-poly1305

zeetex avatar Apr 26 '23 12:04 zeetex

Description of the problem

我也遇到了相同的問題,在用加密方法 2022-blake3-aes-128-gcm 和 2022-blake3-aes-256-gcm 不报错,2022-blake3-chacha20-poly1305 报错为: FATAL[0000] create service: parse inbound[0]: invalid argument

Version of sing-box

詳細資料 操作系统为 Debian GNU/Linux 10,sing-box 版本为 v1.3-beta10
~ sing-box version                                   
sing-box version 1.3-beta10

Environment: go1.20.3 linux/amd64
Tags: with_gvisor,with_quic,with_wireguard,with_utls,with_reality_server,with_clash_api
Revision: d3b41dfc0128957953a4d8173953e01818680318
CGO: disabled

Server and client configuration file

詳細資料
"inbounds": [
    {
        "type": "shadowsocks",
        "tag": "shadowsocks-in",
        "listen": "::",
        "listen_port": 443,
        "sniff": true,
        "sniff_override_destination": true,
        "domain_strategy": "ipv4_only",
        "method": "2022-blake3-chacha20-poly1305",
        "password": "ubjium9HiY00NDIkYS0hgmNfPQoFTochl4a+NBPBB30=",
        "users": [
          {
            "name": "yagmi",
            "password": "Sf67UtvPE2KD1DD6Dgn/rE435Ob1xdGU3BnBj/LVEc0="
          }
        ]
    }
]

Server and client log file

詳細資料
FATAL[0000] create service: parse inbound[0]: invalid argument

yagmi14 avatar May 02 '23 07:05 yagmi14

Is there any particular reason that you chose 2022-blake3-chacha20-poly1305? This method does not have native multi-user (EIH) support.

database64128 avatar May 02 '23 07:05 database64128

看起来是协议原因 2022-blake3-chacha20-poly1305 不支持多用户,传统的加密方法支持是 https://github.com/SagerNet/sing-box/commit/c0d6dde95b0af6850993ae70f387f32eab8a7540 新引入的。

zeetex avatar May 02 '23 14:05 zeetex