mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-11-23 05:09:21 +02:00
Fix an issue with ss2022 generics
This commit is contained in:
parent
92795677f9
commit
c21595a937
|
@ -119,7 +119,8 @@ func (i *MultiUserInbound) Process(ctx context.Context, network net.Network, con
|
||||||
|
|
||||||
func (i *MultiUserInbound) NewConnection(ctx context.Context, conn net.Conn, metadata M.Metadata) error {
|
func (i *MultiUserInbound) NewConnection(ctx context.Context, conn net.Conn, metadata M.Metadata) error {
|
||||||
inbound := session.InboundFromContext(ctx)
|
inbound := session.InboundFromContext(ctx)
|
||||||
user, _ := A.UserFromContext[User](ctx)
|
userInt, _ := A.UserFromContext[int](ctx)
|
||||||
|
user := i.users[userInt]
|
||||||
inbound.User = &protocol.MemoryUser{
|
inbound.User = &protocol.MemoryUser{
|
||||||
Email: user.Email,
|
Email: user.Email,
|
||||||
Level: uint32(user.Level),
|
Level: uint32(user.Level),
|
||||||
|
@ -146,7 +147,8 @@ func (i *MultiUserInbound) NewConnection(ctx context.Context, conn net.Conn, met
|
||||||
|
|
||||||
func (i *MultiUserInbound) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata M.Metadata) error {
|
func (i *MultiUserInbound) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata M.Metadata) error {
|
||||||
inbound := session.InboundFromContext(ctx)
|
inbound := session.InboundFromContext(ctx)
|
||||||
user, _ := A.UserFromContext[User](ctx)
|
userInt, _ := A.UserFromContext[int](ctx)
|
||||||
|
user := i.users[userInt]
|
||||||
inbound.User = &protocol.MemoryUser{
|
inbound.User = &protocol.MemoryUser{
|
||||||
Email: user.Email,
|
Email: user.Email,
|
||||||
Level: uint32(user.Level),
|
Level: uint32(user.Level),
|
||||||
|
|
|
@ -120,7 +120,8 @@ func (i *RelayInbound) Process(ctx context.Context, network net.Network, connect
|
||||||
|
|
||||||
func (i *RelayInbound) NewConnection(ctx context.Context, conn net.Conn, metadata M.Metadata) error {
|
func (i *RelayInbound) NewConnection(ctx context.Context, conn net.Conn, metadata M.Metadata) error {
|
||||||
inbound := session.InboundFromContext(ctx)
|
inbound := session.InboundFromContext(ctx)
|
||||||
user, _ := A.UserFromContext[User](ctx)
|
userInt, _ := A.UserFromContext[int](ctx)
|
||||||
|
user := i.destinations[userInt]
|
||||||
inbound.User = &protocol.MemoryUser{
|
inbound.User = &protocol.MemoryUser{
|
||||||
Email: user.Email,
|
Email: user.Email,
|
||||||
Level: uint32(user.Level),
|
Level: uint32(user.Level),
|
||||||
|
@ -147,7 +148,8 @@ func (i *RelayInbound) NewConnection(ctx context.Context, conn net.Conn, metadat
|
||||||
|
|
||||||
func (i *RelayInbound) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata M.Metadata) error {
|
func (i *RelayInbound) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata M.Metadata) error {
|
||||||
inbound := session.InboundFromContext(ctx)
|
inbound := session.InboundFromContext(ctx)
|
||||||
user, _ := A.UserFromContext[User](ctx)
|
userInt, _ := A.UserFromContext[int](ctx)
|
||||||
|
user := i.destinations[userInt]
|
||||||
inbound.User = &protocol.MemoryUser{
|
inbound.User = &protocol.MemoryUser{
|
||||||
Email: user.Email,
|
Email: user.Email,
|
||||||
Level: uint32(user.Level),
|
Level: uint32(user.Level),
|
||||||
|
|
Loading…
Reference in New Issue