fix: force-close user connections on removal, fix UDP upload/download counters, use self-hosted releases
- service.go: call CloseUserConnections() before RemoveUsers() so banned/reset users are disconnected immediately instead of waiting for natural timeout (upstream issue #32, PR pending 4+ months) - conntracker.go: swap UnwrapPacketReader/Writer upload/download counters for UDP PacketConn path — Reader=upload, Writer=download to match TCP path (upstream issue #55) - xbctl/main.go: change downloadBase to JP01 Gitea so xbctl upgrade pulls self-hosted patched releases instead of upstream
This commit is contained in:
@@ -791,14 +791,14 @@ func (c *trackedPacketConn) UnwrapPacketReader() (N.PacketReader, []N.CountFunc)
|
||||
if c.us == nil {
|
||||
return c.PacketConn, nil
|
||||
}
|
||||
return c.PacketConn, []N.CountFunc{c.makeCountFunc(&c.us.download)}
|
||||
return c.PacketConn, []N.CountFunc{c.makeCountFunc(&c.us.upload)}
|
||||
}
|
||||
|
||||
func (c *trackedPacketConn) UnwrapPacketWriter() (N.PacketWriter, []N.CountFunc) {
|
||||
if c.us == nil {
|
||||
return c.PacketConn, nil
|
||||
}
|
||||
return c.PacketConn, []N.CountFunc{c.makeCountFunc(&c.us.upload)}
|
||||
return c.PacketConn, []N.CountFunc{c.makeCountFunc(&c.us.download)}
|
||||
}
|
||||
|
||||
func (c *trackedPacketConn) Upstream() any { return c.PacketConn }
|
||||
|
||||
Reference in New Issue
Block a user