SagerNet / sing-box

The universal proxy platform
https://sing-box.sagernet.org/
Other
15.38k stars 1.89k forks source link

Unable to connect to hysteria2 using userpass type #1844

Closed Hiradpi closed 2 weeks ago

Hiradpi commented 2 weeks ago

Operating system

Android , Arch linux LTS

System version

latest

Installation type

Third-party graphical clients that advertise themselves as using sing-box (Android)

If you are using a graphical client, please provide the version of the client.

nekobox version 1.2.9 , nekoray 3.26 , sing-box version 1.9.0

Version

No response

Description

{
            "domain_strategy": "prefer_ipv4",
            "down_mbps": 0,
            "password": "user1:mypassword",
            "server": "domain",
            "server_port": 443,
            "tag": "proxy",
            "tls": {
                "alpn": "h3",
                "certificate": "",
                "disable_sni": false,
                "enabled": true,
                "insecure": false,
                "server_name": ""
            },
            "type": "hysteria2",
            "up_mbps": 0
}

outbound config for client i get 403 auth error invalid hash

and servers config (related part)

auth:
  type: userpass  
  userpass:
    user1: mypassword

but when i change the type to password and set a password insted of userpass it works fine

Reproduction

just try to connect to a hysteria2 server using userpass

Logs

ERROR[0059] [2379516189 1.10s] inbound/mixed[mixed-in]: process connection from 127.0.0.1:35446: authentication failed, status code: 403

Supporter

Integrity requirements

CASCfans commented 2 weeks ago

same issue

nekohasekai commented 2 weeks ago

nekobox and nekoray use a modified fork of sing-box, especially hysteria related protocols. Please open an issue for sing-box itself according to the issue template, or send this issue to the relevant third-party project.