mirror of
https://github.com/SagerNet/sing.git
synced 2025-04-02 03:17:37 +03:00
udpnat2: Set upstream to writer
This commit is contained in:
parent
b5f9e70ffd
commit
524a6bd0d1
2 changed files with 4 additions and 1 deletions
|
@ -104,3 +104,7 @@ func (c *Conn) SetReadDeadline(t time.Time) error {
|
|||
func (c *Conn) SetWriteDeadline(t time.Time) error {
|
||||
return os.ErrInvalid
|
||||
}
|
||||
|
||||
func (c *Conn) Upstream() any {
|
||||
return c.writer
|
||||
}
|
||||
|
|
|
@ -55,7 +55,6 @@ func (s *Service) NewPacket(bufferSlices [][]byte, source M.Socksaddr, destinati
|
|||
if !loaded {
|
||||
ok, ctx, writer, onClose := s.prepare(source, destination, userData)
|
||||
if !ok {
|
||||
println(2)
|
||||
s.metrics.Rejects++
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue