mirror of
https://github.com/wyx2685/V2bX.git
synced 2025-01-22 09:58:14 -05:00
修正singbox内核hy2用户列表问题
This commit is contained in:
parent
55b20f5550
commit
96b457d679
@ -63,20 +63,22 @@ func (b *Sing) AddUsers(p *core.AddUsersParams) (added int, err error) {
|
||||
us := make([]option.HysteriaUser, len(p.Users))
|
||||
for i := range p.Users {
|
||||
us[i] = option.HysteriaUser{
|
||||
Name: string(p.Users[i].Id),
|
||||
Name: p.Users[i].Uuid,
|
||||
AuthString: p.Users[i].Uuid,
|
||||
}
|
||||
}
|
||||
err = b.inbounds[p.Tag].(*inbound.Hysteria).AddUsers(us)
|
||||
case "hysteria2":
|
||||
us := make([]option.Hysteria2User, len(p.Users))
|
||||
id := make([]int, len(p.Users))
|
||||
for i := range p.Users {
|
||||
us[i] = option.Hysteria2User{
|
||||
Name: string(p.Users[i].Id),
|
||||
Name: p.Users[i].Uuid,
|
||||
Password: p.Users[i].Uuid,
|
||||
}
|
||||
id[i] = p.Users[i].Id
|
||||
}
|
||||
err = b.inbounds[p.Tag].(*inbound.Hysteria2).AddUsers(us)
|
||||
err = b.inbounds[p.Tag].(*inbound.Hysteria2).AddUsers(us, id)
|
||||
}
|
||||
if err != nil {
|
||||
return 0, err
|
||||
|
2
go.mod
2
go.mod
@ -231,4 +231,4 @@ require (
|
||||
)
|
||||
|
||||
//github.com/apernet/hysteria/core v1.3.5-0.20240201034858-bb99579bb92c => /root/hysteria/core
|
||||
replace github.com/sagernet/sing-box v1.9.0 => github.com/wyx2685/sing-box_mod v0.0.3
|
||||
replace github.com/sagernet/sing-box v1.9.0 => github.com/wyx2685/sing-box_mod v0.0.4
|
||||
|
4
go.sum
4
go.sum
@ -800,8 +800,8 @@ github.com/vishvananda/netns v0.0.4 h1:Oeaw1EM2JMxD51g9uhtC0D7erkIjgmj8+JZc26m1Y
|
||||
github.com/vishvananda/netns v0.0.4/go.mod h1:SpkAiCQRtJ6TvvxPnOSyH3BMl6unz3xZlaprSwhNNJM=
|
||||
github.com/vultr/govultr/v2 v2.17.2 h1:gej/rwr91Puc/tgh+j33p/BLR16UrIPnSr+AIwYWZQs=
|
||||
github.com/vultr/govultr/v2 v2.17.2/go.mod h1:ZFOKGWmgjytfyjeyAdhQlSWwTjh2ig+X49cAp50dzXI=
|
||||
github.com/wyx2685/sing-box_mod v0.0.3 h1:UYLZZzoAzdai+ehsc2kSQJq9p9WQ5wVaZWuZtPddLOQ=
|
||||
github.com/wyx2685/sing-box_mod v0.0.3/go.mod h1:Q5C14BKQoRzkJ+JPGuMdffHZEoOrlU1zsiBkTtfPoA0=
|
||||
github.com/wyx2685/sing-box_mod v0.0.4 h1:fEZnkrtUwqJS/6M3drSdv9RXyRvhnuD2UV6rK5U6rLA=
|
||||
github.com/wyx2685/sing-box_mod v0.0.4/go.mod h1:Q5C14BKQoRzkJ+JPGuMdffHZEoOrlU1zsiBkTtfPoA0=
|
||||
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
|
||||
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ=
|
||||
github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y=
|
||||
|
Loading…
Reference in New Issue
Block a user