143 Commits

Author SHA1 Message Date
jeff
7727fc76f8 add message field 2015-10-02 15:46:52 -04:00
jeff
bb676336db fix 2015-10-02 15:45:22 -04:00
jeff
6194db1941 Merge branch 'master' into devel
Conflicts:
	contrib/static/site.css
2015-10-02 15:41:44 -04:00
jeff
229ef83e35 add initial newboard stuff 2015-10-02 15:38:59 -04:00
jeff
12e887316a remove dank maymz 2015-10-02 12:04:49 -04:00
jeff
441be15845 add pubkey.* admin functions 2015-10-02 11:00:26 -04:00
jeff
2366781282 Merge branch 'devel'
Conflicts:
	contrib/templates/default/post.mustache
2015-10-01 14:28:36 -04:00
jeff
69adbaca5a fix irc link 2015-10-01 14:27:46 -04:00
jeff
dd2f916aed wrong placement again 2015-10-01 14:02:45 -04:00
jeff
ef71260653 wrong placement of icons 2015-10-01 14:02:30 -04:00
jeff
ac3f0eab94 add css and images for origins 2015-10-01 13:55:17 -04:00
jeff
c5605a4412 add post origin awareness 2015-10-01 13:51:01 -04:00
jeff
3b1d09072c change id so that backlinks work 2015-09-30 17:39:56 -04:00
jeff
7f56d35762 remove memes 2015-09-23 20:08:42 -04:00
jeff
3360eaf924 add css rule 2015-09-23 18:54:26 -04:00
jeff
51041e2dc9 case matters for real 2015-09-23 09:07:53 -04:00
jeff
6e20cb270e case matters 2015-09-23 09:07:25 -04:00
jeff
6019d70382 ammend mod panel js more 2015-09-23 09:06:44 -04:00
jeff
cec6f7cef5 ammend mod panel js 2015-09-23 09:04:37 -04:00
jeff
40b7e0a88b fix js 2015-09-23 08:59:56 -04:00
jeff
b595024585 ammend mod panel 2015-09-23 08:59:02 -04:00
jeff
00fbc305be add more actions to mod panel 2015-09-23 08:54:49 -04:00
jeff
5e3f2eea03 try using 1 thread for regenerating thumbnails 2015-09-22 12:41:10 -04:00
jeff
7f721eefea fix mod panel a bit 2015-09-22 10:34:38 -04:00
jeff
866196e810 add more info in mod panel, add admin action to rethumb 2015-09-22 10:33:01 -04:00
jeff
8c18b4405d make captcha image background not dark 2015-09-22 07:28:26 -04:00
jeff
578d9f44b3 add regen all threads button 2015-09-20 19:33:31 -04:00
Jeff
ab38445555 Merge pull request #4 from 4cdn/master
user interface changes
2015-09-19 19:39:09 -04:00
4cdn
98cf765690 Update README.md 2015-09-19 19:32:15 -04:00
4cdn
d742af18b5 removing reliance on external file hosting 2015-09-19 19:31:03 -04:00
4cdn
74a1c044f0 removing reliance on external file hosting 2015-09-19 19:30:05 -04:00
4cdn
adb3e54212 new file: contrib/static/fieri.png 2015-09-19 23:28:02 +00:00
4cdn
1cc4d4e858 new file: contrib/static/about.mp3 2015-09-19 23:21:45 +00:00
4cdn
ec8db8121f Update README.md 2015-09-19 16:24:09 -04:00
4cdn
9cb8998302 faq page more entertaining
encourages users to read completely
2015-09-19 16:22:37 -04:00
4cdn
2f8fd2f2b5 improved visual aesthetics 2015-09-19 16:21:22 -04:00
jeff
790c61cfdb ammend templates to use stylesheets 2015-09-19 13:54:10 -04:00
jeff
7b3ec70a80 css tweak 2015-09-19 13:50:19 -04:00
jeff
fcbae8cea1 captcha background consistance 2015-09-19 13:45:49 -04:00
jeff
569727cc96 css tweak 2015-09-19 13:41:00 -04:00
jeff
f7fc61d493 css tweak 2015-09-19 13:39:41 -04:00
jeff
8cbf1f217d css tweak 2015-09-19 13:37:57 -04:00
jeff
458232d402 css tweak 2015-09-19 13:36:33 -04:00
jeff
fcfd010e5c css tweak 2015-09-19 13:34:46 -04:00
jeff
dca5ee7561 css tweak 2015-09-19 13:33:26 -04:00
jeff
108f05da32 css tweak 2015-09-19 13:33:00 -04:00
jeff
a515ba9d1f css tweak 2015-09-19 13:29:25 -04:00
jeff
8611e2e768 css tweak 2015-09-19 13:28:48 -04:00
jeff
20dd0c215e css tweaks 2015-09-19 13:28:20 -04:00
jeff
c91c8c08b1 change bg.jpg 2015-09-19 13:27:44 -04:00
jeff
9321a65f1c css tweak 2015-09-19 13:25:32 -04:00
jeff
b2a71e1877 change background 2015-09-19 13:22:10 -04:00
jeff
045e3140ad css tweak 2015-09-19 13:18:34 -04:00
jeff
d6f073943e css tweaks 2015-09-19 13:17:30 -04:00
jeff
47f884ce98 css tweaks 2015-09-19 13:16:51 -04:00
jeff
9d815479b2 add background image 2015-09-19 13:15:54 -04:00
jeff
2aa2405ba7 css tweaks 2015-09-19 13:03:41 -04:00
jeff
40d6cf77ad use correct parameter in admin command 2015-09-19 09:02:08 -04:00
jeff
e70c4ed84e syntax error 2015-09-19 08:58:33 -04:00
jeff
1c61de8880 add admin stuff to mod panel 2015-09-19 08:54:54 -04:00
jeff
8d146ed6cd change background gradient 2015-09-19 07:39:36 -04:00
jeff
9a807bbebf do not use red 2015-09-17 16:52:28 -04:00
jeff
61fc6d076f make dark 2015-09-17 16:50:32 -04:00
jeff
5a2500dffc make dark 2015-09-17 16:46:21 -04:00
jeff
021721d21e ammend build docs 2015-09-08 22:32:28 -04:00
jeff
2304d3d8fa css tweaks 2015-09-08 22:30:41 -04:00
jeff
c340d215e0 css tweaks 2015-09-08 22:29:26 -04:00
jeff
9e0029772c css tweaks 2015-09-08 22:27:29 -04:00
jeff
1663abcbec css tweaks 2015-09-08 22:26:07 -04:00
jeff
b58e582f0a css tweaks 2015-09-08 22:20:20 -04:00
jeff
1cfa104e4c ammend css 2015-09-08 22:04:39 -04:00
jeff
dc06baba37 fix templates 2015-09-05 15:36:36 -04:00
jeff
838bbc20cd add reply link to posts 2015-09-05 15:29:14 -04:00
jeff
487e392d76 fix thumbnailer 2015-09-05 11:05:32 -04:00
jeff
90276293e1 change thumbs.sh tool to use new thumbnailing 2015-09-05 11:03:04 -04:00
jeff
8411568530 make it so that we don't error when we have no postform, i.e. ukko 2015-09-04 17:20:02 -04:00
jeff
de51b912ff have ukko load nntpchan.js 2015-09-04 17:18:36 -04:00
jeff
8b206740f8 forgot a brace 2015-09-04 17:16:43 -04:00
jeff
be7e510519 try fixing backlinks 2015-09-04 17:14:05 -04:00
jeff
abefe50eb6 make post numbers insert backlink on click 2015-09-04 17:09:43 -04:00
jeff
fb06097557 resolve conflict 2015-09-04 16:51:19 -04:00
jeff
7ba0e728af truncate posts and threads 2015-09-04 16:47:52 -04:00
jeff
f9ea948071 psy tag 2015-08-31 16:58:30 -04:00
jeff
a2fd94a83e add spoiler css 2015-08-31 16:41:25 -04:00
jeff
fd1193f73a add redtext css rules 2015-08-31 16:14:32 -04:00
Jeff
64cd178b2a Merge pull request #1 from Erkan-Yilmaz/patch-1
change 1 word
2015-08-31 15:46:31 -04:00
jeff
fffd5beea5 update readme 2015-08-31 13:33:08 -04:00
Erkan Yilmaz
4b56272fdd change 1 word
to: cryptographically
2015-08-31 18:25:45 +02:00
jeff
1f346b9da7 ammend readme to have users check out stable tags 2015-08-31 11:09:26 -04:00
jeff
cb5f7f2453 add thumb.sh tool 2015-08-31 10:58:28 -04:00
jeff
6ab0e2b17a truncate threads and posts in overboard 2015-08-31 10:46:04 -04:00
jeff
5a8188e33d we don't need rabbitmq anymore 2015-08-31 09:21:09 -04:00
jeff
902650ac00 ammend docs and readme 2015-08-31 09:20:54 -04:00
jeff
6e4c38bc95 ammend docs, update board.mustache 2015-08-28 16:55:56 -04:00
jeff
c08fb8b2fd add rabbitmq configs 2015-08-28 09:12:06 -04:00
jeff
1f4977edc2 fix link 2015-08-27 09:02:12 -04:00
jeff
16c307ab3e Merge branch 'master' of ssh://github.com/majestrate/nntpchan 2015-08-27 09:01:22 -04:00
jeff
82b93e9194 ammend readme 2015-08-27 09:00:20 -04:00
jeff
d3ba0b2725 remove inane change 2015-08-26 18:02:37 -04:00
jeff
7fe3297264 add period to README.md 2015-08-26 18:00:34 -04:00
jeff
be813b4c04 fix up faq 2015-08-25 09:21:18 -04:00
jeff
5e1bb7e014 flesh out faq 2015-08-25 09:10:10 -04:00
jeff
29060e32f3 add irc link to front page 2015-08-24 06:05:01 -04:00
jeff
d7c70c99a5 add extra note 2015-08-22 20:17:48 -04:00
jeff
68a154c6ec add short peering info 2015-08-22 20:17:15 -04:00
jeff
1e5ff5bba9 reorganize docs 2015-08-22 19:52:31 -04:00
jeff
88e6b2b4d0 $$ -> $ 2015-08-22 19:49:56 -04:00
jeff
21e81602e3 fix documentation 2015-08-22 19:49:16 -04:00
jeff
97188d03b4 NFRU -> MIT 2015-08-22 19:46:32 -04:00
jeff
5a8b51a605 ammend readme 2015-08-22 19:45:03 -04:00
jeff
ac20b7e0f2 spelling is hard 2015-08-20 11:51:19 -04:00
jeff
be8e9cfbf6 add github links 2015-08-20 11:49:43 -04:00
jeff
4a7129c455 fix front page so it sucks less 2015-08-20 11:02:41 -04:00
jeff
ee686d5a86 css is only good when it works (never) 2015-08-19 22:46:50 -04:00
jeff
2f8c41d93c seriously css sucks 2015-08-19 22:45:56 -04:00
jeff
1d61c06750 css sucks 2015-08-19 22:45:07 -04:00
jeff
4e26ced487 i hate css 2015-08-19 22:43:37 -04:00
jeff
da82cd1c36 box shadow fix 2015-08-19 22:43:09 -04:00
jeff
ba4c44e148 fix box shadow again 2015-08-19 22:42:25 -04:00
jeff
e96786a285 fix box shadow so it sucks less 2015-08-19 22:41:54 -04:00
jeff
67f644fc68 ammend style 2015-08-19 22:40:44 -04:00
jeff
40a7f4b3d9 add style for code blocks 2015-08-19 22:35:35 -04:00
jeff
ad220c72df fix css on code blocks 2015-08-19 21:50:52 -04:00
jeff
55ce63f9bf use correct form field name 2015-08-08 14:21:40 -04:00
jeff
c2d6928f0e cookie based captchas 2015-08-08 13:19:31 -04:00
jeff
a3293a8527 ammend templates 2015-08-08 10:51:01 -04:00
jeff
4ec93c9399 add frontpage and overboard links in navbar 2015-08-08 10:44:40 -04:00
jeff
1610f6672c change tripcode part 2015-08-08 09:21:41 -04:00
jeff
d1d03b8b88 show tripcodes 2015-08-08 09:09:45 -04:00
jeff
b104e39c5b ammend faq 2015-08-07 23:49:03 -04:00
jeff
13717368f0 onclock -> onclick 2015-08-07 12:39:54 -04:00
jeff
6b4b455a12 add unban function 2015-08-07 12:36:59 -04:00
jeff
d2001461c9 change order of mod action buttons 2015-08-07 11:24:56 -04:00
jeff
cadcbf4c48 try to fix gitch again 2015-08-07 11:11:24 -04:00
jeff
74cdeb6072 fix mod.js glitch 2015-08-07 11:06:04 -04:00
jeff
b25f64cec0 revamp mod.js add ban function 2015-08-07 10:59:57 -04:00
jeff
75198f28f2 add link to ukko on front page 2015-08-06 18:14:21 -04:00
jeff
9e309143ad ammend front page 2015-08-06 15:07:11 -04:00
jeff
85ac33b53d add stub for faq 2015-08-06 14:35:44 -04:00
jeff
bb6af83607 fronte page 2015-08-06 14:32:20 -04:00
jeff
653fae1972 fix navbar to not suck 2015-08-06 11:13:41 -04:00
jeff
e70d44a175 css tweaks 2015-08-06 10:50:39 -04:00
jeff
b0b7d905dd change styles to not suck as much, including postform 2015-08-06 10:30:54 -04:00
28 changed files with 825 additions and 155 deletions

30
LICENSE
View File

@@ -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.

View File

@@ -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

Binary file not shown.

BIN
contrib/static/bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 550 B

BIN
contrib/static/clearnet.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 846 B

51
contrib/static/faq.html Normal file
View 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 858 KiB

BIN
contrib/static/i2p.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -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");
}
}

View 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();
}

View 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";
}
}

View File

@@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@@ -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/>

View 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>

View File

@@ -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>

View File

@@ -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 />

View 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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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
View 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

View File

@@ -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
View 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