mirror of
https://github.com/SagerNet/sing-shadowsocks.git
synced 2025-04-03 20:07:40 +03:00
Fix missing protocol in metadata
This commit is contained in:
parent
ad926ed792
commit
14c8cee479
4 changed files with 5 additions and 3 deletions
2
go.mod
2
go.mod
|
@ -3,7 +3,7 @@ module github.com/sagernet/sing-shadowsocks
|
|||
go 1.18
|
||||
|
||||
require (
|
||||
github.com/sagernet/sing v0.0.0-20220629043543-849d16c37bbb
|
||||
github.com/sagernet/sing v0.0.0-20220630111757-30b5895320a5
|
||||
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d
|
||||
lukechampine.com/blake3 v1.1.7
|
||||
)
|
||||
|
|
4
go.sum
4
go.sum
|
@ -1,8 +1,8 @@
|
|||
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
|
||||
github.com/klauspost/cpuid/v2 v2.0.12 h1:p9dKCg8i4gmOxtv35DvrYoWqYzQrvEVdjQ762Y0OqZE=
|
||||
github.com/klauspost/cpuid/v2 v2.0.12/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuObKfj5c0PQa7c=
|
||||
github.com/sagernet/sing v0.0.0-20220629043543-849d16c37bbb h1:uWSKHyuyi8wIyVDzIvaOqck3yT0gIWonW8JQNRCg8Ok=
|
||||
github.com/sagernet/sing v0.0.0-20220629043543-849d16c37bbb/go.mod h1:lR0Mc9cBSAgFLGgXWtj5D1X191KeQ/S+LHOhRhuINBo=
|
||||
github.com/sagernet/sing v0.0.0-20220630111757-30b5895320a5 h1:/JHYZ6IY4Q0hkxN2NXaFj8lTJloikj8dekOTsGudrFo=
|
||||
github.com/sagernet/sing v0.0.0-20220630111757-30b5895320a5/go.mod h1:3ZmoGNg/nNJTyHAZFNRSPaXpNIwpDvyIiAUd0KIWV5c=
|
||||
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d h1:sK3txAijHtOK88l68nt020reeT1ZdKLIYetKl95FzVY=
|
||||
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/sys v0.0.0-20220627191245-f75cf1eec38b h1:2n253B2r0pYSmEV+UNCQoPfU/FiaizQEK5Gu4Bq4JE8=
|
||||
|
|
|
@ -466,6 +466,7 @@ process:
|
|||
if err != nil {
|
||||
goto returnErr
|
||||
}
|
||||
metadata.Protocol = "shadowsocks"
|
||||
metadata.Destination = destination
|
||||
s.udpNat.NewPacket(ctx, sessionId, buffer, metadata, func(natConn N.PacketConn) N.PacketWriter {
|
||||
return &serverPacketWriter{s, conn, natConn, session, s.udpBlockCipher}
|
||||
|
|
|
@ -369,6 +369,7 @@ process:
|
|||
goto returnErr
|
||||
}
|
||||
|
||||
metadata.Protocol = "shadowsocks"
|
||||
metadata.Destination = destination
|
||||
s.udpNat.NewContextPacket(ctx, sessionId, buffer, metadata, func(natConn N.PacketConn) (context.Context, N.PacketWriter) {
|
||||
return &shadowsocks.UserContext[U]{ctx, user}, &serverPacketWriter{s.Service, conn, natConn, session, s.uCipher[user]}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue