mirror of
https://github.com/tomoko-dev9/nntpchan.git
synced 2026-03-28 17:32:35 +01:00
Compare commits
143 Commits
nntp-link-
...
devel
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7727fc76f8 | ||
|
|
bb676336db | ||
|
|
6194db1941 | ||
|
|
229ef83e35 | ||
|
|
12e887316a | ||
|
|
441be15845 | ||
|
|
2366781282 | ||
|
|
69adbaca5a | ||
|
|
dd2f916aed | ||
|
|
ef71260653 | ||
|
|
ac3f0eab94 | ||
|
|
c5605a4412 | ||
|
|
3b1d09072c | ||
|
|
7f56d35762 | ||
|
|
3360eaf924 | ||
|
|
51041e2dc9 | ||
|
|
6e20cb270e | ||
|
|
6019d70382 | ||
|
|
cec6f7cef5 | ||
|
|
40b7e0a88b | ||
|
|
b595024585 | ||
|
|
00fbc305be | ||
|
|
5e3f2eea03 | ||
|
|
7f721eefea | ||
|
|
866196e810 | ||
|
|
8c18b4405d | ||
|
|
578d9f44b3 | ||
|
|
ab38445555 | ||
|
|
98cf765690 | ||
|
|
d742af18b5 | ||
|
|
74a1c044f0 | ||
|
|
adb3e54212 | ||
|
|
1cc4d4e858 | ||
|
|
ec8db8121f | ||
|
|
9cb8998302 | ||
|
|
2f8fd2f2b5 | ||
|
|
790c61cfdb | ||
|
|
7b3ec70a80 | ||
|
|
fcbae8cea1 | ||
|
|
569727cc96 | ||
|
|
f7fc61d493 | ||
|
|
8cbf1f217d | ||
|
|
458232d402 | ||
|
|
fcfd010e5c | ||
|
|
dca5ee7561 | ||
|
|
108f05da32 | ||
|
|
a515ba9d1f | ||
|
|
8611e2e768 | ||
|
|
20dd0c215e | ||
|
|
c91c8c08b1 | ||
|
|
9321a65f1c | ||
|
|
b2a71e1877 | ||
|
|
045e3140ad | ||
|
|
d6f073943e | ||
|
|
47f884ce98 | ||
|
|
9d815479b2 | ||
|
|
2aa2405ba7 | ||
|
|
40d6cf77ad | ||
|
|
e70c4ed84e | ||
|
|
1c61de8880 | ||
|
|
8d146ed6cd | ||
|
|
9a807bbebf | ||
|
|
61fc6d076f | ||
|
|
5a2500dffc | ||
|
|
021721d21e | ||
|
|
2304d3d8fa | ||
|
|
c340d215e0 | ||
|
|
9e0029772c | ||
|
|
1663abcbec | ||
|
|
b58e582f0a | ||
|
|
1cfa104e4c | ||
|
|
dc06baba37 | ||
|
|
838bbc20cd | ||
|
|
487e392d76 | ||
|
|
90276293e1 | ||
|
|
8411568530 | ||
|
|
de51b912ff | ||
|
|
8b206740f8 | ||
|
|
be7e510519 | ||
|
|
abefe50eb6 | ||
|
|
fb06097557 | ||
|
|
7ba0e728af | ||
|
|
f9ea948071 | ||
|
|
a2fd94a83e | ||
|
|
fd1193f73a | ||
|
|
64cd178b2a | ||
|
|
fffd5beea5 | ||
|
|
4b56272fdd | ||
|
|
1f346b9da7 | ||
|
|
cb5f7f2453 | ||
|
|
6ab0e2b17a | ||
|
|
5a8188e33d | ||
|
|
902650ac00 | ||
|
|
6e4c38bc95 | ||
|
|
c08fb8b2fd | ||
|
|
1f4977edc2 | ||
|
|
16c307ab3e | ||
|
|
82b93e9194 | ||
|
|
d3ba0b2725 | ||
|
|
7fe3297264 | ||
|
|
be813b4c04 | ||
|
|
5e1bb7e014 | ||
|
|
29060e32f3 | ||
|
|
d7c70c99a5 | ||
|
|
68a154c6ec | ||
|
|
1e5ff5bba9 | ||
|
|
88e6b2b4d0 | ||
|
|
21e81602e3 | ||
|
|
97188d03b4 | ||
|
|
5a8b51a605 | ||
|
|
ac20b7e0f2 | ||
|
|
be8e9cfbf6 | ||
|
|
4a7129c455 | ||
|
|
ee686d5a86 | ||
|
|
2f8c41d93c | ||
|
|
1d61c06750 | ||
|
|
4e26ced487 | ||
|
|
da82cd1c36 | ||
|
|
ba4c44e148 | ||
|
|
e96786a285 | ||
|
|
67f644fc68 | ||
|
|
40a7f4b3d9 | ||
|
|
ad220c72df | ||
|
|
55ce63f9bf | ||
|
|
c2d6928f0e | ||
|
|
a3293a8527 | ||
|
|
4ec93c9399 | ||
|
|
1610f6672c | ||
|
|
d1d03b8b88 | ||
|
|
b104e39c5b | ||
|
|
13717368f0 | ||
|
|
6b4b455a12 | ||
|
|
d2001461c9 | ||
|
|
cadcbf4c48 | ||
|
|
74cdeb6072 | ||
|
|
b25f64cec0 | ||
|
|
75198f28f2 | ||
|
|
9e309143ad | ||
|
|
85ac33b53d | ||
|
|
bb6af83607 | ||
|
|
653fae1972 | ||
|
|
e70d44a175 | ||
|
|
b0b7d905dd |
30
LICENSE
30
LICENSE
@@ -1,17 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
NOT FOR RECTAL USE PUBLIC LICENSE
|
||||
Version 1.1, Febuary 2015
|
||||
Copyright (c) 2015 Jeff Becker
|
||||
|
||||
Copyright (C) 2015 Jeff Becker <ampernand@gmail.com>
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim or modified
|
||||
copies of this license document, and changing it is allowed as long
|
||||
as the name is changed.
|
||||
|
||||
NOT FOR RECTAL USE PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. NOT for rectal use.
|
||||
1. Don't sue me, it's your fault.
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
17
README.md
17
README.md
@@ -1,16 +1,18 @@
|
||||
# NNTPChan #
|
||||
|
||||
NNTPChan (previously known as overchan) is a decentralized imageboard that uses nntp to synchronize content between many different servers. It utilizes cryptograpghicly signed posts to perform optional/opt-in decentralized moderation (currently work-in-progress)
|
||||
NNTPChan (previously known as overchan) is a decentralized imageboard that uses nntp to synchronize content between many different servers. It utilizes cryptographically signed posts to perform optional/opt-in decentralized moderation.
|
||||
|
||||
This repository contains resources used by the core daemon which is located [here](https://github.com/majestrate/srndv2) along with general documentation, [here](doc/)
|
||||
|
||||
## getting started ##
|
||||
|
||||
If you don't want to compile from source, you can download a precompiled binary [here](https://github.com/majestrate/srndv2/releases) when they are released.
|
||||
|
||||
After you [built and installed the daemon](build-daemon.md) and [set up your database](database-setup.md), clone this repository and start up the daemon
|
||||
After you [built and installed the daemon](doc/build.md) and [set up your database](doc/database.md), clone this repository and start up the daemon
|
||||
|
||||
# clone it
|
||||
git clone https://github.com/majestrate/nntpchan
|
||||
cd nntpchan
|
||||
git clone https://github.com/majestrate/nntpchan ~/nntpchan
|
||||
# get the latest stable release
|
||||
cd ~/nntpchan/
|
||||
git checkout tags/0.2.1
|
||||
|
||||
# set up the workspace
|
||||
srndv2 setup
|
||||
@@ -18,11 +20,12 @@ After you [built and installed the daemon](build-daemon.md) and [set up your dat
|
||||
# run the daemon
|
||||
srndv2 run
|
||||
|
||||
|
||||
Then open http://127.0.0.1:18000/ukko.html in your browser.
|
||||
|
||||
*PLEASE* report any bugs you find while setting up or building [(here)](https://github.com/majestrate/nntpchan/issues) so that the problems get fixed (^:
|
||||
|
||||
For peering requests, questions or support find me on [rizon](https://qchat.rizon.net/?channels=#8chan-dev) as \__uguu\__
|
||||
For peering requests, questions or support find me on [rizon](https://qchat.rizon.net/?channels=#nntpchan) as \__uguu\__
|
||||
|
||||
|
||||
Like this project? Fund it:
|
||||
|
||||
BIN
contrib/static/about.mp3
Normal file
BIN
contrib/static/about.mp3
Normal file
Binary file not shown.
BIN
contrib/static/bg.png
Normal file
BIN
contrib/static/bg.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 550 B |
BIN
contrib/static/clearnet.png
Normal file
BIN
contrib/static/clearnet.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 846 B |
51
contrib/static/faq.html
Normal file
51
contrib/static/faq.html
Normal file
@@ -0,0 +1,51 @@
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="site.css"></link>
|
||||
<title> NNTPChan Frequently Asked Questions</title>
|
||||
</head>
|
||||
<body>
|
||||
<h2>NNTPChan faq </h2>
|
||||
<br/>
|
||||
<hr />
|
||||
<div id="faq">
|
||||
<p>
|
||||
<div>Question: What is nntpchan?</div>
|
||||
<div>NNTPCchan is a federated imageboard that spans across several networks including tor, i2p and anonet. There are no central servers so that as long as 1 server is left the forum will continue to function.</div>
|
||||
</p>
|
||||
<hr />
|
||||
<p>
|
||||
<div>Question: How is this different from *chan? </div>
|
||||
<div>NNTPChan is by design invulnerable to global censorship. All moderation is local to each server.</div>
|
||||
</p>
|
||||
<hr />
|
||||
<p>
|
||||
<div>Question: How does moderation work then? </div>
|
||||
<div>Moderation is done with our special tripcodes (ed25519-sha512 signed posts). Anyone can give moderation suggestions, but that doesn't mean anyone will accept them. Those who trust the actions of a moderator can have their frontend whitelist the moderation actions and have them performed without oversight by another moderator.</div>
|
||||
</p>
|
||||
<hr />
|
||||
<p>
|
||||
<div>Question: How can I remove content from nntpchan completely? </div>
|
||||
<div>‾\(._.)/‾ I don't know. You probably can't unless every server agrees to remove the content, even then, nothing prevents someone from reposting it. You can't delete what you post on the internet.</div>
|
||||
</p>
|
||||
<hr />
|
||||
<p>
|
||||
<div>Question: Do you allow XYZ content? </div>
|
||||
<div>If it violates USA Law or causes problems with my host, no. Otherwise, yes. <b>All posts on this site are the responsibility of the individual poster and not the administration of this server</b>.</div>
|
||||
</p>
|
||||
<hr />
|
||||
<p>
|
||||
<div>Question: I found a bug or I have a feature request where do I go? </div>
|
||||
<div><a href="https://github.com/majestrate/nntpchan/issues">github</a></div>
|
||||
</p>
|
||||
<hr />
|
||||
<p>
|
||||
<div>Please send any questions to ampernand [|at\] gmail {dot} com with subject starting with "nntpchan question" </div>
|
||||
</p>
|
||||
<hr />
|
||||
</div>
|
||||
<audio autoplay="" loop="">
|
||||
<source src="/static/about.mp3" type="audio/mpeg">
|
||||
<embed src="/static/about.mp3">
|
||||
</audio>
|
||||
</body>
|
||||
</html>
|
||||
BIN
contrib/static/fieri.png
Normal file
BIN
contrib/static/fieri.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 858 KiB |
BIN
contrib/static/i2p.png
Normal file
BIN
contrib/static/i2p.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
@@ -18,20 +18,124 @@ function get_longhash(str) {
|
||||
return str;
|
||||
}
|
||||
|
||||
// handle ban command
|
||||
function nntpchan_ban() {
|
||||
nntpchan_mod({
|
||||
parser: get_longhash,
|
||||
name: "ban",
|
||||
handle: function(j) {
|
||||
if (j.banned) {
|
||||
return document.createTextNode(j.banned);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function nntpchan_unban() {
|
||||
nntpchan_mod({
|
||||
name: "unban",
|
||||
handle: function(j) {
|
||||
if (j.result) {
|
||||
return document.createTextNode(j.result);
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function get_board_target() {
|
||||
var e = document.getElementById("nntpchan_board_target");
|
||||
return e.value;
|
||||
}
|
||||
|
||||
function get_key_target() {
|
||||
var e = document.getElementById("nntpchan_key_target");
|
||||
return e.value;
|
||||
}
|
||||
|
||||
function nntpchan_key_del() {
|
||||
nntpchan_admin("pubkey.del", {
|
||||
pubkey: get_key_target()
|
||||
});
|
||||
}
|
||||
|
||||
function nntpchan_key_add() {
|
||||
nntpchan_admin("pubkey.add", {
|
||||
pubkey: get_key_target()
|
||||
});
|
||||
}
|
||||
|
||||
function nntpchan_admin_board(method) {
|
||||
nntpchan_admin(method, {
|
||||
newsgroup: get_board_target()
|
||||
})
|
||||
}
|
||||
|
||||
function nntpchan_admin(method, param) {
|
||||
nntpchan_mod({
|
||||
name:"admin",
|
||||
parser: function(target) {
|
||||
return method;
|
||||
},
|
||||
handle: function(j) {
|
||||
if (j.result) {
|
||||
return document.createTextNode(j.result);
|
||||
} else {
|
||||
return "nothing happened?";
|
||||
}
|
||||
},
|
||||
method: ( param && "POST" ) || "GET",
|
||||
data: param
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// handle delete command
|
||||
function nntpchan_delete() {
|
||||
// get the element
|
||||
var input = document.getElementById("nntpchan_mod_delete");
|
||||
// get the long hash
|
||||
var longhash = get_longhash(input.value);
|
||||
// TODO: check long hash
|
||||
nntpchan_mod({
|
||||
parser: get_longhash,
|
||||
name: "del",
|
||||
handle: function(j) {
|
||||
var elem = document.createElement("div");
|
||||
if (j.deleted) {
|
||||
for ( var idx = 0 ; idx < j.deleted.length ; idx ++ ) {
|
||||
var msg = "deleted: " + j.deleted[idx];
|
||||
var e = document.createTextNode(msg);
|
||||
var el = document.createElement("div");
|
||||
el.appendChild(e);
|
||||
elem.appendChild(el);
|
||||
}
|
||||
}
|
||||
if (j.notdeleted) {
|
||||
for ( var idx = 0 ; idx < j.notdeleted.length ; idx ++ ) {
|
||||
var msg = "not deleted: " + j.notdeleted[idx];
|
||||
var e = document.createTextNode(msg);
|
||||
var el = document.createElement("div");
|
||||
el.appendChild(e);
|
||||
elem.appendChild(el);
|
||||
}
|
||||
}
|
||||
return elem;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function nntpchan_mod(mod_action) {
|
||||
|
||||
// get the element
|
||||
var input = document.getElementById("nntpchan_mod_target");
|
||||
var target = input.value;
|
||||
if (mod_action.parser) {
|
||||
target = mod_action.parser(target);
|
||||
}
|
||||
|
||||
var elem = document.getElementById("nntpchan_mod_result");
|
||||
// clear old results
|
||||
while( elem.firstChild ) {
|
||||
elem.removeChild(elem.firstChild);
|
||||
}
|
||||
|
||||
|
||||
// fire off ajax
|
||||
var ajax = new XMLHttpRequest();
|
||||
ajax.onreadystatechange = function() {
|
||||
@@ -46,29 +150,39 @@ function nntpchan_delete() {
|
||||
var e = document.createTextNode(j.error);
|
||||
elem.appendChild(e);
|
||||
} else {
|
||||
if ( j.deleted ) {
|
||||
for ( var idx = 0 ; idx < j.deleted.length ; idx ++ ) {
|
||||
var deltxt = "deleted " + j.deleted[idx];
|
||||
var e = document.createTextNode(deltxt);
|
||||
elem.appendChild(e);
|
||||
}
|
||||
}
|
||||
if ( j.notdeleted ) {
|
||||
for ( var idx = 0 ; idx < j.notdeleted.length ; idx ++ ) {
|
||||
var deltxt = "failed to delete " + j.notdeleted[idx];
|
||||
var e = document.createTextNode(deltxt);
|
||||
elem.appendChild(e);
|
||||
if (mod_action.handle) {
|
||||
var result = mod_action.handle(j);
|
||||
if (result) {
|
||||
elem.appendChild(result);
|
||||
} else {
|
||||
// fail
|
||||
alert("mod action failed, handler returned nothing");
|
||||
}
|
||||
} else {
|
||||
// fail
|
||||
alert("mod action has no handler");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
} else if (status) {
|
||||
// nah
|
||||
// http error
|
||||
elem.innerHTML = "error: HTTP "+status;
|
||||
}
|
||||
// clear input
|
||||
input.value = "";
|
||||
}
|
||||
}
|
||||
ajax.open("GET", "del/"+longhash);
|
||||
ajax.send();
|
||||
if (mod_action.name) {
|
||||
var url = mod_action.name + "/" + target;
|
||||
ajax.open(mod_action.method || "GET", url);
|
||||
var data = mod_action.data;
|
||||
if (data) {
|
||||
ajax.setRequestHeader("Content-type","text/json");
|
||||
ajax.send(JSON.stringify(data));
|
||||
} else {
|
||||
ajax.send();
|
||||
}
|
||||
} else {
|
||||
alert("mod action has no name");
|
||||
}
|
||||
}
|
||||
|
||||
6
contrib/static/newboard.js
Normal file
6
contrib/static/newboard.js
Normal file
@@ -0,0 +1,6 @@
|
||||
function createBoard() {
|
||||
var form = document.getElementById("postform");
|
||||
var e = document.getElementById("boardname");
|
||||
form.action = form.action + e.value;
|
||||
form.submit();
|
||||
}
|
||||
14
contrib/static/nntpchan.js
Normal file
14
contrib/static/nntpchan.js
Normal file
@@ -0,0 +1,14 @@
|
||||
//
|
||||
// nntpchan.js -- frontend ui niceness
|
||||
//
|
||||
|
||||
|
||||
// insert a backlink for a post given its short hash
|
||||
function nntpchan_backlink(shorthash)
|
||||
{
|
||||
var elem = document.getElementById("postform_message");
|
||||
if ( elem )
|
||||
{
|
||||
elem.value += ">>" + shorthash + "\n";
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,12 @@
|
||||
.thread {
|
||||
margin_right: 20px;
|
||||
margin_bottom: 5px;
|
||||
margin-bottom: 1em;
|
||||
display: inline-block;
|
||||
word-wrap: break-word;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.frontend , .subject {
|
||||
color: #0f0d2d;
|
||||
color: #928BFF;
|
||||
}
|
||||
|
||||
.name {
|
||||
@@ -16,47 +18,236 @@
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.post {
|
||||
background: #d6daf0;
|
||||
padding: 10px;
|
||||
#postform-outer {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
body {
|
||||
background: #eef2ff;
|
||||
|
||||
input {
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
input.button {
|
||||
width: 25%;
|
||||
}
|
||||
|
||||
textarea {
|
||||
width: 350px;
|
||||
}
|
||||
|
||||
#postform-inner {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.post {
|
||||
padding: 10px 10px;
|
||||
}
|
||||
|
||||
pre > p {
|
||||
display: block-inline;
|
||||
}
|
||||
|
||||
.reply, th, .ukko_thread_header {
|
||||
background: #202331;
|
||||
}
|
||||
|
||||
tr {
|
||||
background: #202123;
|
||||
}
|
||||
|
||||
hr {
|
||||
height: 0px;
|
||||
border-width: 1px medium medium;
|
||||
border-color: #b7c5d9;
|
||||
border-style: solid none none;
|
||||
}
|
||||
|
||||
|
||||
a:hover , a:visited:hover {
|
||||
color: #f13333;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #4A4AFF;
|
||||
}
|
||||
|
||||
a:visited {
|
||||
color: #5E00A0;
|
||||
}
|
||||
|
||||
.navbar {
|
||||
position: fixed;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
margin-top: 0px;
|
||||
z-index: 20;
|
||||
box-shadow: 0px 1px 20px rgba(0, 0, 0, 0.15);
|
||||
background: #202331;
|
||||
color: #616383;
|
||||
|
||||
}
|
||||
|
||||
.navbar-sep {
|
||||
color: black;
|
||||
}
|
||||
|
||||
#postform_container {
|
||||
margin-top: 5em;
|
||||
}
|
||||
|
||||
.ukko_thread_header {
|
||||
padding: 5px 5px;
|
||||
margin: 5px 5px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
th {
|
||||
font-size: 10pt;
|
||||
padding-left: 10px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
#captcha_img {
|
||||
background: #d3d3d3;
|
||||
}
|
||||
|
||||
input, textarea {
|
||||
color: whitesmoke;
|
||||
background: #2d2d2d;
|
||||
border-color: #4D28CA;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
html {
|
||||
color: #ededed;
|
||||
background: #262230;
|
||||
height: 100%;
|
||||
font-family: arial,helvetica,sans-serif;
|
||||
font-size: 10pt;
|
||||
margin: 0 4px;
|
||||
padding-left: 4px;
|
||||
padding-right: 4px;
|
||||
}
|
||||
|
||||
.reply {
|
||||
margin-left: 1.8em;
|
||||
display: inline-block;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.frontend {
|
||||
margin-top: 0px;
|
||||
background: #e0f0f0;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.op {
|
||||
background: #eef2ff;
|
||||
margin-right: 20px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.post, .post_body {
|
||||
margin-top: 5px;
|
||||
.post {
|
||||
display: inline;
|
||||
margin-bottom: 5px;
|
||||
padding-right: 3em;
|
||||
padding-bottom: 0.3em;
|
||||
}
|
||||
|
||||
.post_body > p {
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.tripcode {
|
||||
color: #de04ef;
|
||||
}
|
||||
|
||||
@keyframes psych
|
||||
{
|
||||
0% {background-color: red; color: blue; }
|
||||
10% {background-color: yellow; color: red; }
|
||||
20% {background-color: blue; color: green; }
|
||||
30% {background-color: green; color: yellow; }
|
||||
40% {background-color: red; color: blue; }
|
||||
50% {background-color: yellow; color: green; }
|
||||
60% {background-color: blue; color: yellow; }
|
||||
70% {background-color: green; color: blue; }
|
||||
80% {background-color: red; color: green; }
|
||||
90% {background-color: yellow; color: red; }
|
||||
95% {background-color: blue; color: yellow; }
|
||||
100% {background-color: green; color: white; }
|
||||
}
|
||||
|
||||
.psy > p {
|
||||
animation: psych 2s linear infinite;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
|
||||
.memearrows {
|
||||
color: green;
|
||||
}
|
||||
|
||||
.redtext {
|
||||
color: #d50505;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.spoiler {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.spoiler > p {
|
||||
background: black;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.spoiler:hover > p {
|
||||
background: black;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.intro {
|
||||
margin-bottom: 0.75em;
|
||||
}
|
||||
|
||||
.file:not(.multiple) .file-thumbnail {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.file-thumbnail {
|
||||
display: block;
|
||||
margin: 5px 20px 10px;
|
||||
border: medium none;
|
||||
max-width: 300px;
|
||||
max-height: 200px;
|
||||
}
|
||||
|
||||
.reply, .ukko_thread_header , pre {
|
||||
padding: 7px 7px;
|
||||
border-radius: 5px;
|
||||
box-shadow: 1px 1px 3px black;
|
||||
}
|
||||
|
||||
.post_body > pre {
|
||||
background: #3f3f3f;
|
||||
color: #d17600;
|
||||
}
|
||||
|
||||
.post_body > p {
|
||||
margin: 0px 0px;
|
||||
}
|
||||
|
||||
.post_body {
|
||||
display: inline;
|
||||
width: inherit;
|
||||
}
|
||||
|
||||
.post {
|
||||
display: inline-block;
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
#faq > div {
|
||||
margin-left: 20%;
|
||||
width: 50%;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
#captcha_img {
|
||||
background: grey;
|
||||
}
|
||||
BIN
contrib/static/tor.png
Normal file
BIN
contrib/static/tor.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.5 KiB |
@@ -14,8 +14,8 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script type="text/javascript" src="{{board.Prefix}}static/captcha.js"></script>
|
||||
<link rel="stylesheet" href="{{board.Prefix}}static/site.css"></link>
|
||||
<script type="text/javascript" src="{{board.Prefix}}static/nntpchan.js"></script>
|
||||
<title>{{board.Board}}</title>
|
||||
</head>
|
||||
<body>
|
||||
@@ -33,11 +33,11 @@
|
||||
<div class="thread" id="thread_{{OP.PostHash}}">
|
||||
<div clsss="thread_header">
|
||||
</div>
|
||||
{{{OP.RenderPost}}}
|
||||
{{#Replies}}
|
||||
{{{RenderPost}}}
|
||||
{{{OP.Truncate.RenderPost}}}
|
||||
{{#Truncate.Replies}}
|
||||
{{{Truncate.RenderPost}}}
|
||||
<br />
|
||||
{{/Replies}}
|
||||
{{/Truncate.Replies}}
|
||||
</div>
|
||||
<br/>
|
||||
<hr/>
|
||||
|
||||
57
contrib/templates/default/frontpage.mustache
Normal file
57
contrib/templates/default/frontpage.mustache
Normal file
@@ -0,0 +1,57 @@
|
||||
{{!
|
||||
frontpage.mustache -- template for index.html
|
||||
template parameters:
|
||||
- graph ( a list of 4 string tuples: (board, posts_per_hour, posts_per_day, total_posts) )
|
||||
- totalposts ( the number of total posts we have ever seen )
|
||||
- frontend ( the name of the frontend )
|
||||
- prefix ( the site's prefix )
|
||||
}}
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="{{prefix}}static/site.css"></link>
|
||||
<title> {{frontend}} on nntpchan </title>
|
||||
</head>
|
||||
<body>
|
||||
<center>
|
||||
<div class="index-outer">
|
||||
<div class="index-inner">
|
||||
<h1> {{frontend}} on nntpchan </h1>
|
||||
<h2>View the <a href="ukko.html">overboard</a></h2>
|
||||
<h3>Read the <a href="{{prefix}}static/faq.html">FAQ</a></h3>
|
||||
<h3>Join the <a href="https://qchat.rizon.net/?channels=#nntpchan">IRC</a></h3>
|
||||
<h3>Fork on github: <a href="https://github.com/majestrate/nntpchan/">frontend</a> and <a href="https://github.com/majestrate/srndv2/">core</a></h3>
|
||||
<h4>We've Had {{totalposts}} Posts Since August 01 2015 </h4>
|
||||
</div>
|
||||
<div class="index-inner">
|
||||
<table id="board_graph">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th> Board </th>
|
||||
<th> Post per Hour </th>
|
||||
<th> Post per Day </th>
|
||||
<th> Total </th>
|
||||
</tr>
|
||||
{{# graph}}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{prefix}}{{Board}}-0.html">{{Board}}</a>
|
||||
</td>
|
||||
<td>
|
||||
{{Hour}}
|
||||
</td>
|
||||
<td>
|
||||
{{Day}}
|
||||
</td>
|
||||
<td>
|
||||
{{All}}
|
||||
</td>
|
||||
</tr>
|
||||
{{/ graph}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</center>
|
||||
</body>
|
||||
</html>
|
||||
@@ -16,12 +16,63 @@
|
||||
<div> post actions </div>
|
||||
<hr />
|
||||
<div>
|
||||
<label for="nntpchan_mod_delete">delete by url</label>
|
||||
<input id="nntpchan_mod_delete" type="text" />
|
||||
<label for="nntpchan_mod_target">target</label>
|
||||
<input id="nntpchan_mod_target" type="text" />
|
||||
</div>
|
||||
<div>
|
||||
<button onclick="nntpchan_ban()">ban (url)</button>
|
||||
<button onclick="nntpchan_delete()">delete (url)</button>
|
||||
<button onclick="nntpchan_unban()">unban (ip)</button>
|
||||
</div>
|
||||
<button id="nntpchan_mod" onclick="nntpchan_delete()">go</button>
|
||||
<span id="nntpchan_mod_result"></span>
|
||||
</div>
|
||||
<hr />
|
||||
<div>
|
||||
<div> key actions </div>
|
||||
<div>
|
||||
<label for="nntpchan_board_target">pubkey:</label>
|
||||
<input type="text" id="nntpchan_key_target" />
|
||||
</div>
|
||||
<div>
|
||||
<button onclick="nntpchan_key_add()">add key</button>
|
||||
<button onclick="nntpchan_key_del()">remove key</button>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
<div>
|
||||
<div> board actions </div>
|
||||
<div>
|
||||
<label for="nntpchan_board_target">board name:</label>
|
||||
<input type="text" id="nntpchan_board_target" />
|
||||
</div>
|
||||
<div>
|
||||
<button onclick="nntpchan_admin_board('frontend.regen')">regenerate</button>
|
||||
</div>
|
||||
<div>
|
||||
<button onclick="nntpchan_admin_board('frontend.ban')">ban</button>
|
||||
<button onclick="nntpchan_admin_board('frontend.unban')">unban</button>
|
||||
</div>
|
||||
<div>
|
||||
<button onclick="nntpchan_admin_board('frontend.nuke')">nuke</button>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
<div>
|
||||
<div>
|
||||
lightweight actions
|
||||
</div>
|
||||
<div>
|
||||
<button onclick="nntpchan_admin('template.reload')">reload all templates</button>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
<div>
|
||||
<label>very load heavy actions, use with care</label>
|
||||
<div>
|
||||
<button onclick="nntpchan_admin('frontend.regen')">regenerate all pages</button>
|
||||
<button onclick="nntpchan_admin('thumbnail.regen', {threads:1})">regenerate all thumbnails</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="nntpchan_mod_result"></div>
|
||||
<noscript>
|
||||
<b>enable js to use the mod panel kthx</b>
|
||||
</noscript>
|
||||
|
||||
@@ -7,16 +7,40 @@
|
||||
- name ( the name of whatever resource we are on, board/thread )
|
||||
- frontend ( the name of the frontend we are on )
|
||||
- links ( a list of Link Models to display )
|
||||
|
||||
}}
|
||||
<div>
|
||||
<span class="board_title">{{name}}</span>
|
||||
on
|
||||
<span class="frontend_title">{{frontend}}</span>
|
||||
</div>
|
||||
<div class="links">
|
||||
{{# links }}
|
||||
<span class="link"><a href="{{LinkURL}}">{{Text}}</a></span>
|
||||
{{/ links }}
|
||||
</div>
|
||||
<hr />
|
||||
- prefix ( site prefix )
|
||||
}}
|
||||
<div class="navbar">
|
||||
<span class="navbar-name">
|
||||
<span class="board_title">{{name}}</span>
|
||||
on
|
||||
<span class="frontend_title">{{frontend}}</span>
|
||||
</span>
|
||||
<span class="navbar-sep">
|
||||
|
|
||||
</span>
|
||||
<span class="navbar-links">
|
||||
|
||||
<span class="navbar-links-title">
|
||||
Pages:
|
||||
</span>
|
||||
{{# links }}
|
||||
<span class="navbar-link"><a href="{{LinkURL}}">{{Text}}</a></span>
|
||||
{{/ links }}
|
||||
</span>
|
||||
<span class="navbar-sep">
|
||||
|
|
||||
</span>
|
||||
<span class="navbar-links">
|
||||
<span class="navbar-link"><a href="{{prefix}}">front page</a></span>
|
||||
</span>
|
||||
<span class="navbar-sep">
|
||||
|
|
||||
</span>
|
||||
<span class="navbar-links">
|
||||
<span class="navbar-link"><a href="{{prefix}}ukko.html">overboard</a></span>
|
||||
</span>
|
||||
<span class="navbar-sep">
|
||||
|
|
||||
</span>
|
||||
</div>
|
||||
<hr />
|
||||
55
contrib/templates/default/newboard.mustache
Normal file
55
contrib/templates/default/newboard.mustache
Normal file
@@ -0,0 +1,55 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>create new board</title>
|
||||
<link rel="stylesheet" href="{{prefix}}static/site.css" />
|
||||
<script type="text/javascript" src="{{prefix}}static/newboard.js">
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<p>make your first post</p>
|
||||
<hr />
|
||||
<form action="{{prefix}}post/" enctype="multipart/form-data" name="post" method="post" id="postform" >
|
||||
<div id="postform-outer">
|
||||
<div id="postform-inner">
|
||||
<table class="postform">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>
|
||||
Board Name
|
||||
</th>
|
||||
<td>
|
||||
<input type="text" name="name" value="" id="boardname" />
|
||||
<button onclick="createBoard()">Create Board</button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Comment
|
||||
</th>
|
||||
<td>
|
||||
<textarea id="postform_message" type="text" name="message" cols=40 rows=5></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Captcha
|
||||
</th>
|
||||
<td>
|
||||
<img id="captcha_img" src="{{prefix}}captcha/img" alt="captcha" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Solution
|
||||
</th>
|
||||
<td>
|
||||
<input type="text" name="captcha" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,6 +1,20 @@
|
||||
<div class="{{{CSSClass}}}" id="post_{{PostHash}}">
|
||||
<div class="{{CSSClass}}" id="{{PostHash}}">
|
||||
<p class="intro">
|
||||
<label for="delete_{{PostHash}}">
|
||||
<span class="frontend">
|
||||
[[ {{Frontend}} ]]
|
||||
</span>
|
||||
<span class="origin">
|
||||
{{#IsI2P}}
|
||||
<img src="{{Prefix}}static/i2p.png" alt="post from i2p" />
|
||||
{{/IsI2P}}
|
||||
{{#IsTor}}
|
||||
<img src="{{Prefix}}static/tor.png" alt="post from tor" />
|
||||
{{/IsTor}}
|
||||
{{#IsClearnet}}
|
||||
<img src="{{Prefix}}static/clearnet.png" alt="post from clearnet" />
|
||||
{{/IsClearnet}}
|
||||
</span>
|
||||
<span class="subject">
|
||||
{{Subject}}
|
||||
</span>
|
||||
@@ -18,19 +32,20 @@
|
||||
{{Date}}
|
||||
</span>
|
||||
</label>
|
||||
<a href="{{PostURL}}" onclick="">No. {{ShortHash}}</a>
|
||||
{{#OP}}
|
||||
<a href="{{PostURL}}">[reply]</a>
|
||||
{{/OP}}
|
||||
</p>
|
||||
<p class="frontend">
|
||||
[[ {{Frontend}} ]]
|
||||
<a onclick="nntpchan_backlink('{{ShortHash}}');">No. {{ShortHash}}</a>
|
||||
<a href="{{PostURL}}">[reply]</a>
|
||||
<span class="tripcode">{{{Pubkey}}}</span>
|
||||
</p>
|
||||
<div class="files">
|
||||
{{#Attachments}}
|
||||
<a class="file" href="{{Source}}" title="{{Filename}}">
|
||||
<img class="file-thumbnail" src="{{Thumbnail}}" alt="{{Filename}}" />
|
||||
</a>
|
||||
<div class="file">
|
||||
<p class="file_info">
|
||||
<span>File: {{Filename}}</span>
|
||||
</p>
|
||||
<a target="_blank" class="file-link" href="{{Source}}" title="{{Filename}}">
|
||||
<img class="file-thumbnail" src="{{Thumbnail}}" alt="{{Filename}}" />
|
||||
</a>
|
||||
</div>
|
||||
{{/Attachments}}
|
||||
</div>
|
||||
<div class="post_body">{{{RenderBody}}}</div>
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
<html>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="{{prefix}}static/site.css"></link>
|
||||
<meta http-equiv="refresh" content="1; {{redirect_url}}" />
|
||||
<body>
|
||||
<p>post failed: {{reason}}</p>
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
- message_id ( the value of the Message-ID header in the post we made, the truncated sha1 of this is the >>posthash )
|
||||
}}
|
||||
<html>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="{{prefix}}static/site.css"></link>
|
||||
<meta http-equiv="refresh" content="2; {{redirect_url}}" />
|
||||
<body>
|
||||
<pre>posted as {{message_id}}</pre>
|
||||
|
||||
@@ -8,57 +8,62 @@
|
||||
}}
|
||||
<form action="{{post_url}}" enctype="multipart/form-data" name="post" method="post">
|
||||
<input type="hidden" name="reference" value="{{reference}}" />
|
||||
<input type="hidden" name="captcha" value="" id="captcha_input" />
|
||||
<table class="postform">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>
|
||||
Name
|
||||
</th>
|
||||
<td>
|
||||
<input type="text" name="name" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Subject
|
||||
</th>
|
||||
<td>
|
||||
<input type="text" name="subject" value="" />
|
||||
<input type="submit" value="{{button}}" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Comment
|
||||
</th>
|
||||
<td>
|
||||
<textarea type="text" name="message" cols=35 rows=5></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
File
|
||||
</th>
|
||||
<td>
|
||||
<input type="file" name="attachment" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Captcha
|
||||
</th>
|
||||
<td>
|
||||
<img id="captcha_img" src="" alt="captcha" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
</th>
|
||||
<td>
|
||||
<input type="text" name="captcha_solution" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div id="postform-outer">
|
||||
<div id="postform-inner">
|
||||
<table class="postform">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>
|
||||
Name
|
||||
</th>
|
||||
<td>
|
||||
<input type="text" name="name" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Subject
|
||||
</th>
|
||||
<td>
|
||||
<input type="text" name="subject" value="" />
|
||||
<input type="submit" value="{{button}}" class="button" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Comment
|
||||
</th>
|
||||
<td>
|
||||
<textarea id="postform_message" type="text" name="message" cols=40 rows=5></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
File
|
||||
</th>
|
||||
<td>
|
||||
<input type="file" name="attachment" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Captcha
|
||||
</th>
|
||||
<td>
|
||||
<img id="captcha_img" src="{{prefix}}captcha/img" alt="captcha" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Solution
|
||||
</th>
|
||||
<td>
|
||||
<input type="text" name="captcha" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script type="text/javascript" src="{{thread.Prefix}}static/captcha.js"></script>
|
||||
<link rel="stylesheet" href="{{thread.Prefix}}static/site.css"></link>
|
||||
<script type="text/javascript" src="{{thread.Prefix}}static/nntpchan.js"></script>
|
||||
<title> {{thread.OP.Subject}} </title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
<title> ukko / overboard </title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="{{prefix}}static/site.css"></link>
|
||||
</head>
|
||||
<script type="text/javascript" src="{{prefix}}static/nntpchan.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="ukko_threads" class="threads_container">
|
||||
{{#threads}}
|
||||
@@ -19,11 +20,11 @@
|
||||
<div class="thread" id="thread_{{OP.PostHash}}">
|
||||
<div clsss="thread_header">
|
||||
</div>
|
||||
{{{OP.RenderPost}}}
|
||||
{{#Replies}}
|
||||
{{{RenderPost}}}
|
||||
{{{OP.Truncate.RenderPost}}}
|
||||
{{#Truncate.Replies}}
|
||||
{{{Truncate.RenderPost}}}
|
||||
<br />
|
||||
{{/Replies}}
|
||||
{{/Truncate.Replies}}
|
||||
</div>
|
||||
<hr/>
|
||||
{{/threads}}
|
||||
|
||||
23
contrib/tools/thumbs.sh
Executable file
23
contrib/tools/thumbs.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# shell script for regenerating thumbnails
|
||||
#
|
||||
|
||||
if [ "$1" == "" ] ; then
|
||||
echo "usage: $0 webroot_dir"
|
||||
else
|
||||
cd $1/img
|
||||
echo "regenerate missing thumbs in $(pwd)"
|
||||
find . \
|
||||
-type f \
|
||||
-regextype posix-extended \
|
||||
-iregex '.*\.(png|jpg|gif)$' \
|
||||
-not -execdir test -f '../thm/{}' \; \
|
||||
-exec echo 'generating missing thumb for {}' \; \
|
||||
-exec mogrify \
|
||||
-define jpeg:size=500x500 \
|
||||
-thumbnail '250>x250>' \
|
||||
-path '../thm/{}.jpg' \
|
||||
-strip \
|
||||
'{}' \;
|
||||
fi
|
||||
@@ -7,6 +7,8 @@
|
||||
* go 1.4 or higher
|
||||
* libsodium 1.0 or higher
|
||||
* imagemagick
|
||||
* ffmpegthumbnailer
|
||||
* sox
|
||||
|
||||
## debian ##
|
||||
|
||||
@@ -22,7 +24,7 @@ Debian Jessie has go 1.3, we need 1.4 or higher to build the nntpchan daemon so
|
||||
|
||||
# set up a directory for our go distribution
|
||||
mkdir -p $HOME/local
|
||||
cd $$HOME/local
|
||||
cd $HOME/local
|
||||
|
||||
# obtain and unpack go binary distribution
|
||||
wget https://storage.googleapis.com/golang/go1.4.2.linux-amd64.tar.gz -O go-stable.tar.gz
|
||||
@@ -43,12 +45,10 @@ We'll also need to install some dependancies that come with debian:
|
||||
|
||||
# as root
|
||||
|
||||
apt-get update
|
||||
apt-get install libmagickwand-dev libsodium-dev
|
||||
|
||||
|
||||
Now you can build the daemon:
|
||||
apt update
|
||||
apt install imagemagick libsodium-dev ffmpegthumbnailer sox
|
||||
|
||||
Now build the daemon:
|
||||
|
||||
go get github.com/majestrate/srndv2
|
||||
go install github.com/majestrate/srndv2
|
||||
52
doc/peering.md
Normal file
52
doc/peering.md
Normal file
@@ -0,0 +1,52 @@
|
||||
## peering with other nodes ##
|
||||
|
||||
In order to actually be distributed, you need another person to sync posts with, otherwise what's the point right?
|
||||
|
||||
Right now peering information is private, there is no link level authenticatio (yet) so everything is done via either a vpn tunnel or a tor hidden service.
|
||||
|
||||
### Peering via cjdns vpn tunnel ###
|
||||
|
||||
Set up cjdns, read more [here](https://github.com/cjdelisle/cjdns/blob/master/doc/configure.md#connection-interfaces)
|
||||
|
||||
git clone https://github.com/cjdelisle/cjdns
|
||||
cd cjdns && ./do
|
||||
./cjdroute --genconf >> cjdroute.conf
|
||||
./cjdroute < cjdroute.conf
|
||||
|
||||
Get your ipv6 address for cjdns
|
||||
|
||||
ip addr show tun0
|
||||
|
||||
Edit srnd.ini to bind nntp on that ipv6 address, make sure to use the square brances `[` and `]`
|
||||
|
||||
[nntp]
|
||||
...
|
||||
bind=[xxxx:xxxx:xxxx:xxx:xx....]:1199
|
||||
|
||||
|
||||
say you have 2 friends at fc33:3:3::aadd and fc03:9f:123::a3df. right now feeds.ini can't take raw ipv6 addresses so add them to `/etc/hosts`
|
||||
|
||||
# add these lines to /etc/hosts
|
||||
fc33:3:3::aadd bob
|
||||
fc03:9f:123::a3df charlie
|
||||
|
||||
then add to feeds.ini the following:
|
||||
|
||||
|
||||
[feed-bob]
|
||||
proxy-type=none
|
||||
|
||||
[bob]
|
||||
overchan.*=1
|
||||
ctl=1
|
||||
|
||||
[feed-charlie]
|
||||
proxy-type=none
|
||||
|
||||
[charlie]
|
||||
overchan.*=1
|
||||
ctl=1
|
||||
|
||||
then restart srndv2
|
||||
|
||||
**TODO:** firewalling
|
||||
Reference in New Issue
Block a user