-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.html
77 lines (66 loc) · 5.44 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<head>
<meta charset="utf-8">
<style>
body {
max-width: 60em;
margin: auto;
padding: 1em;
line-height: 1.5em;
font-family: sans-serif;
overflow-wrap: break-word;
}
</style>
<title>ipfsearch - decentralized resilient search</title>
</head>
<body onload="onLoad()">
<h1>ipfsearch<sup>beta</sup></h1>
<div id="app" style="visibility: hidden;">
<div v-if="showmeta">
<p>Start by entering a link to an index in the box below.</p>
<form method="GET" action="">
<input type="text" name="index" size="50" id="meta" placeholder="starts with http://, /ipfs/ or /ipns/"></input>
<input type="submit" value="Load index metadata" />
</form>
</div>
<span v-else-if="showsearchbox">
<p></p>Loaded <i>"{{indexName}}"</i>, compiled by <i>"{{indexAuthor}}"</i> on {{indexTimestamp}}</p>
<input type='text' placeholder="search" id="searchbox" /><button type="submit" onclick="searchTriggered()">Start search</button>
</span>
<p v-if="error">❌ {{error}}</p>
<p><iframe v-if="!showmeta" style="width: 100%" id="resultPage" frameBorder="0" seamless="seamless" v-bind:src="resultPage"></iframe>
</p>
<div v-if="showmeta">
<hr>
<h2>About</h2>
<h3>What does ipfsearch do?</h3>
<p>You search through indices that do not live on one server (are decentralized). The searching and sorting is happening in your browser. This means that all your activity is <b>anonymous</b> and no one can see what you search for -- your search
terms never leave your browser.</p>
<h3>What indexes can I search through?</h3>
<p>The reference index (maintained by me) is <b>Wikipedia article abstracts</b>: <code><a href="?index=/ipns/wikipedia.ipfsearch.xyz">/ipns/wikipedia.ipfsearch.xyz</a></code> AKA <code><a href="?index=/ipns/Qmdy6hkJWgsx4RQatotn48x1j57M3thSMSoKQQG6BpGPsa">/ipns/Qmdy6hkJWgsx4RQatotn48x1j57M3thSMSoKQQG6BpGPsa</a></code>.</p>
<p>If you want to create your own index, the instructions on how to do it and a library to help you are <a href="https://github.com/tensojka/ipfsearch-index/">here</a>.</p>
<p>One index I've come across is the <b>The Pirate Bay Dump</b>, you can find it here: <code><a href="?index=/ipns/12D3KooWPqVNa1w8ywjDjNo7o8SpvC6LHBBU96hMMcXpKteg2zMx">/ipns/12D3KooWPqVNa1w8ywjDjNo7o8SpvC6LHBBU96hMMcXpKteg2zMx</a></code>. The
author writes more about it on <a href="https://www.reddit.com/r/Piracy/comments/8i7fvi/i_have_put_the_tpb_dump_on_ipfsearch_a/">reddit</a>.</p>
<h3>What advantages does it have over a centralized search engine?</h3>
<p>Since there is no one server, there is also no one server that could be taken down. <b>It is impossible to take down an index after it is uploaded to <a href="https://ipfs.io/">IPFS</a>, just like it's impossible to take down a torrent, for example.</b></p>
<p>It also has huge privacy advantages: you search term never leaves your device.</p>
<h3>How does it work?</h3>
<p>Traditionally, when you search for something on the web, you send your query to a server. The server then (basically) takes your query, looks up the relevant documents in its index, ranks the results and sends the results back to you. This
is how search works on Wikipedia, DuckDuckGo or Google.</p>
<p>With IPFS, it is impossible to send your query to a server, because there is no single server. With ipfsearch, your browser first downloads a document that tells it where it can find documents with a given word. Then, it downloads all the
relevant documents and does the ranking <i>itself</i>, on your computer.</p>
<h3>Why is it so slow?</h3>
<p>Most of the delay is caused by IPFSs DHT being slow. The performance of ipfsearch is expected to rapidly improve once the <a href="https://github.com/ipfs/go-ipfs/issues/1396">IPFS DHT</a> gets <a href="https://github.com/libp2p/go-libp2p-kad-dht/issues/88">faster</a>.
Edit a few months later: it is actually getting faster, kudos to IPFS!</p>
<h3>Where can I find it later?</h3>
<p>The newest usable version is always at <a href="http://ipfsearch.xyz">ipfsearch.xyz</a>, or <code>/ipns/ipfsearch.xyz</code>. In case the domain doesn't work, use <code>/ipns/QmSE8g9k5JS1vJ7y5znhSZikmybvdsm3yDj7sbKjPRqsJW</code>.</p>
<h3>How can I access this if ipfsearch.xyz is down?</h3>
<p>Download IPFS from <a href="https://ipfs.io/docs/install/">the official website</a>, start the daemon on your computer and dial http://localhost:8080/ipns/ipfsearch.xyz in a browser.</p>
<p>If you're getting CORS errors, you must first edit your configuration: <code>$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["*"]'</code>.</p>
<h2>Source and license</h2>
<p>You can find the source code of this at <a href="https://github.com/tensojka/ipfsearch-webapp">Github</a>. Issues and PRs are welcome there.</p>
<p>The ipfsearch webapp is licensed under the GNU Affero GPL 3.</p>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.min.js"></script>
<script src="view.js"></script>
<script src="bundle.js"></script>