Minor fixes

This commit is contained in:
世界
2022-08-02 18:47:23 +08:00
parent 49f4145b23
commit cf425de106
3 changed files with 22 additions and 9 deletions

View File

@@ -4,6 +4,7 @@ import (
"context"
"time"
"github.com/sagernet/sing/common"
"github.com/sagernet/sing/common/buf"
M "github.com/sagernet/sing/common/metadata"
N "github.com/sagernet/sing/common/network"
@@ -36,6 +37,13 @@ func (c *PacketConn) WritePacket(buffer *buf.Buffer, destination M.Socksaddr) er
return err
}
func (c *PacketConn) Close() error {
return common.Close(
c.PacketConn,
c.instance,
)
}
func (c *PacketConn) Upstream() any {
return c.PacketConn
}