// ==UserScript==
// @name ipfs link redirctor
// @namespace http://tampermonkey.net/
// @version 0.2
// @description Replaces ipfs links with user configured host
// @author TheDailySpank
// @match *://*/ipfs/*
// @match *://*/ipns/*
// @match *://*/*
// @grant none
// @run-at document-end
// ==/UserScript==
(function() {
'use strict';
var ipfsHost = "http://127.0.0.1:8080" // default settings if running ipfs daemon on local machine
// ipfs.io gateway
// var ipfsHost = "https://ipfs.io"
// Cloudflare gateway
// var ipfsHost = "https://cloudflare-ipfs.com"
var anchors = document.querySelectorAll('a');
for (var i = 0; i < anchors.length; i++) {
var regex = /.*(\/ipfs\/Qm\w.*)/g;
anchors[i].href = anchors[i].href.replace(regex, ipfsHost + '
1');
}
})();// ==UserScript==
// @name New script kkgithub.com
// @namespace Violentmonkey Scripts
// @match https://raw.kkgithub.com/TheDailySpank/ipfs-redirector/master/ipfs-redirector.js*
// @grant none
// @version 1.0
// @author -
// @description 2024/6/7 13:07:26
// ==/UserScript==
【油猴脚本】将网页中的IPFS链接自动转到本地的IPFS节点,以便加速加载

评论
《 “【油猴脚本】将网页中的IPFS链接自动转到本地的IPFS节点,以便加速加载” 》 有 4 条评论
-
在本地启动好IPFS后,可以试着打开下面的网址(Wikipedia):
http://127.0.0.1:8080/ipfs/bafybeiazgazbrj6qprr4y5hx277u4g2r5nzgo3jnxkhqx56doxdqrzms6y/wiki/%E6%9D%B1%E7%BE%85%E9%A6%AC%E5%B8%9D%E5%9C%8B -
https://cdn.ipfsscan.io/ 基于IPFS的CDN,可以在本地IPFS节点pin住CID。
-
基于IPFS的纯浏览器文件分享应用,除了有点慢以外: https://www.dreamlink.cloud/
发表回复