func (p *PermitCommand) Allow(ctx context.Context, req *socks5.Request) (context.Context, bool) { r := shared.AcceptedIP(req.DestAddr.IP) && shared.AcceptedPort(req.DestAddr.Port) if r { allowedConnects.Inc() } else { deniedConnects.Inc() } return ctx, r }
func (p PermitCommand) Allow(req *socks5.Request) bool { return shared.AcceptedIP(req.DestAddr.IP) && shared.AcceptedPort(req.DestAddr.Port) }