1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 02:09:37 +02:00

Anonymize IP stored in Redis too

This commit is contained in:
Chocobozzz 2024-02-29 10:09:03 +01:00
parent 4af8f5a581
commit 4b857f50c8
No known key found for this signature in database
GPG key ID: 583A612D890159BE
4 changed files with 65 additions and 13 deletions

View file

@ -0,0 +1,9 @@
import Bluebird from "bluebird";
import { PeerTubeServer } from "@peertube/peertube-server-commands";
module.exports = async function sendViews(options) {
const { url, videoId, viewers } = options;
const server = new PeerTubeServer({ url });
await Bluebird.map(viewers, (viewer) => {
return server.views.simulateView({ id: videoId, xForwardedFor: viewer.xForwardedFor }).catch((err) => console.error("Cannot simulate viewer", err));
}, { concurrency: 500 });
};