🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #90716

go-nntp-server alpha-test *online* 400k+ groups... growing

#90716
From: Billy G. (go-while)
Date: Mon, 04 Sep 2023 01:20
170 lines
4890 bytes
Hello World!

i'm writing a usenet server in go from scratch and v0.1-p1 is online =)

got it more or less stable running many weeks, testing and importing.
performance is brutally good and very low to no cpu usage.

Host: 213.227.135.51
Port: 7119
User: reader2023
Pass: nopassword

also available in yggdrasil: [201:feda:24c0:4544:c808:42c5:f053:9fac]

the server holds loads of spam in 1.1b messages, 400k groups
about 3.3TB data at the moment
uncompressed, non-binary (=yenc filter)
and is still importing while writing.

0.44T heads @ compressratio 3.2x
1.13T bodys @ compressratio 1.7x


Supported Commands:
  AUTHINFO
  LIST
  GROUP
  ARTICLE, HEAD, BODY, STAT
  IHAVE
  MODE
  XOVER
  QUIT

Features:
   basecode ~4k lines of chaos
   go's concurrency model
   dynamic creation of groups
   user authentication
   BW shaper
   easy config in .json
   peers via .json
   users via .json


Todo:
  + peering
  + expiration
  + other commands
  + history + dbz or *sql?


the message numbering is not really ordered by date due to importing 
from different sources.
groups may start with very old articles but may be mixed up later.
a re-ordering is planned later when fully backfilled.

you can walk around the server and read/suck/hack/crack/crash!

i'd like to see someone crashing the process!

but please don't use ddos botnets... can't fight physics... thank you!

i'm sure there are still many bugs in this early stage of development.

i appreciate your feedback and bugs if you encounter any!

the "active" file is static, numbers may be far behind "group" values.
because test server runs on a snapshot, but can read latest overview and 
storage if joining a group with "group" command.

speed is limited and reading articles via msgnum (in groups) is quite 
slow because it scans the overview to find the msgid&hash needed to 
fetch data from storage.

interested in how the configs look like?

{
   "Settings": {
     "Hostname": "s01.host.name.local",
     "Reload_CFG": 60,
     "Daemon_Host": "[::1]",
     "Daemon_TCP": "tcp",
     "PortsTCP": "1119,1433,8080",
     "PortsSSL": "1563,8433,8443",
     "Logs_File": "/path/filename.log",
     "SSL_CRT": "!/var/lib/news/fullchain.pem",
     "SSL_KEY": "!/var/lib/news/privkey.pem",
     "Json_AuthFile": "users.json",
     "MinPWLen": 8,
     "LIST_NeedsAuth": true,
     "ActiveDir": "active",
     "Overview": true,
     "OverviewDir": "ov",
     "StorageDir": "storage",
     "StorageXrefLinker": false
   },
   "Peers": [
     {
         "Enabled": true,
         "Hostname": "localhost1",
         "Addr4":    "127.0.0.17",
         "Addr6":    "::17",
         "Speedlimit": 1024
     },
     {
         "Enabled": true,
         "Hostname": "news.local",
         "Port":     1119,
         "Addr4":    "192.168.1.119",
         "L_Auth_User": "user1972",
         "L_Auth_Pass": "notapass",
         "R_SSL":    false,
         "ReadOnlyAccess": true
     },
     {
         "!Enabled": true,
         "Hostname": "news.test.net.local",
         "Port":     433,
         "Addr4":    "192.168.119.1",
         "Addr6":    "fd01:abcd:1234:ffff::abcd",
         "Cidr4":    "10.0.1.0/24",
         "Cidr6":    "fd01:abcd:1234:ffff::/64",
         "R_Auth_User": "user42",
         "R_Auth_Pass": "nopass",
         "R_SSL": true,
         "R_SSL_Insecure": true
     }
   ]
}

EOF config.json

users.json:
{
   "Users": [
	{
		"Username":	"testuser1",
		"Password":	"testpass1",
		"Expire":	1790539435,
		"MaxConns": 1,
		"Speedlimit": 8
	},
	{
		"Username":	"testuser2",
		"Password":	"testpass2",
		"Expire":	1790539435,
		"MaxConns": 2
	},
	{
		"Username":	"testuser3",
		"Password":	"testpass3",
		"Expire":	1690539435,
		"MaxConns": 3
	},
	{
		"Username":	"testuser42",
		"Password":	"testpass42",
		"Expire":	-1,
		"MaxConns": 42
	}
   ]
}

EOF users.json


will go opensource when code is more beautified =)

over and out!
Billy G.
Technical Details
Message-ID: <Xg9JM.1495670$9wY2.1233385@fx06.ams4>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail

Show Full Headers
Complete Article Headers
Message-ID: <Xg9JM.1495670$9wY2.1233385@fx06.ams4>
Subject: go-nntp-server alpha-test *online* 400k+ groups... growing
Date: Mon, 4 Sep 2023 03:20:39 +0200
From: "Billy G. (go-while)" <no-reply@no.spam>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
Mime-Version: 1.0
User-Agent: NoZilla/3.11 (Hackint; Unicorn; rv:0.8.15) go-while/19720229 NewsRW/4.2.0
Newsgroups: news.software.nntp
Content-Language: en-US
Organization: github.com/go-while
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 170
X-Complaints-To: abuse@blocknews.net
Nntp-Posting-Date: Mon, 04 Sep 2023 00:11:35 UTC