mirror of
https://github.com/SagerNet/sing.git
synced 2025-04-03 20:07:38 +03:00
Fix ss 2022 lastRemoteSeen
This commit is contained in:
parent
ffb0ba34c3
commit
869224c157
1 changed files with 1 additions and 4 deletions
|
@ -441,7 +441,6 @@ func (c *clientPacketConn) ReadPacket(buffer *buf.Buffer) (*M.AddrPort, error) {
|
|||
if !c.session.filter.ValidateCounter(packetId, math.MaxUint64) {
|
||||
return nil, ErrPacketIdNotUnique
|
||||
}
|
||||
c.session.remoteSeen = time.Now().Unix()
|
||||
} else if sessionId == c.session.lastRemoteSessionId {
|
||||
if !c.session.lastFilter.ValidateCounter(packetId, math.MaxUint64) {
|
||||
return nil, ErrPacketIdNotUnique
|
||||
|
@ -455,14 +454,13 @@ func (c *clientPacketConn) ReadPacket(buffer *buf.Buffer) (*M.AddrPort, error) {
|
|||
} else {
|
||||
c.session.lastRemoteSessionId = c.session.remoteSessionId
|
||||
c.session.lastFilter = c.session.filter
|
||||
c.session.lastRemoteSeen = c.session.remoteSeen
|
||||
c.session.lastRemoteSeen = time.Now().Unix()
|
||||
c.session.lastRemoteCipher = c.session.remoteCipher
|
||||
c.session.filter = new(wgReplay.Filter)
|
||||
}
|
||||
}
|
||||
c.session.remoteSessionId = sessionId
|
||||
c.session.remoteCipher = remoteCipher
|
||||
c.session.remoteSeen = time.Now().Unix()
|
||||
c.session.filter.ValidateCounter(packetId, math.MaxUint64)
|
||||
}
|
||||
|
||||
|
@ -491,7 +489,6 @@ type udpSession struct {
|
|||
packetId uint64
|
||||
remoteSessionId uint64
|
||||
lastRemoteSessionId uint64
|
||||
remoteSeen int64
|
||||
lastRemoteSeen int64
|
||||
cipher cipher.AEAD
|
||||
remoteCipher cipher.AEAD
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue