🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #90649

Re: alternative nnrpd external auth to postgresql

#90649
From: Billy G. (go-while)
Date: Sun, 30 Jul 2023 08:35
57 lines
2862 bytes
On 29.07.23, rek2 hispagatos wrote:

 > Looking good, I will test it

can you provide a readme to your tool?
with your inn config for readers and how to implement the binary?

still had no time to test mine, not even tried to lookup the config :D
i don't know if this code does anything good
at least it dit not crash over night in infinite loop
hammered with millions of requests and mem <20KB?! with 3 users added

 > ...
> , everything seems so much simpler with Go
> ;)
 >
> I will love to engage to write a small two way gateway between a
> usergroup and a lemmy group( a reddit alike decentralized service part
> of the fediverse ).
> 
> Happy Hacking
> ReK2

go textproto + nntp... easy
only be careful when sending strings over the network

for example the tp.Cmd() eats a formated string

lets say you have read a msgid fine
from another peer or server or file

but msgid contains a % (percent sign)
like:
msgid := "<abcd1234..%...@test.com>"

we construct cmdline to send request to another peer
cmdline := "IHAVE "+msgid
this is fine, prints correctly

but if you pass cmdline to 'tp.Cmd(cmdline)'
go adds formats to string: result in total garbage after % data is lost.
as soon as it leaves your networkcard
you can see it going out with weird things added to the 'cmdline' string

use 'tp.Cmd("%s", cmdline)'
you send it fine and receiver reads correctly

i'm writing websrv in go talking to nntp, could be useful for a lemmygw
maybe first release is ready in few weeks

GET:
  http(s)://.../groups/(?json)
  http(s)://.../group/msgnum/[head|body|head+body](/?json)
  http(s)://.../msgid/[head|body|head+body](/?json)


happy sunday!
Technical Details
Message-ID: <CEoxM.253486$yXa4.99057@fx14.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
References: <u9jlnh$getb$1@matrix.hispagatos.org> <u9uh09$a5ql$1@matrix.hispagatos.org> <YJAwM.249652$Y1R7.117864@fx04.ams4> <u9vdi7$akhf$2@matrix.hispagatos.org> <36IwM.106011$euB5.66059@fx05.ams4> <ua0mlt$bb7j$1@matrix.hispagatos.org> <KWUwM.143252$MB_8.99644@fx01.ams4> <ua32rk$cjct$1@matrix.hispagatos.org>

Show Full Headers
Complete Article Headers
Message-ID: <CEoxM.253486$yXa4.99057@fx14.ams4>
Subject: Re: alternative nnrpd external auth to postgresql
Date: Sun, 30 Jul 2023 10:35:58 +0200
From: "Billy G. (go-while)" <no-reply@no.spam>
References: <u9jlnh$getb$1@matrix.hispagatos.org> <u9uh09$a5ql$1@matrix.hispagatos.org> <YJAwM.249652$Y1R7.117864@fx04.ams4> <u9vdi7$akhf$2@matrix.hispagatos.org> <36IwM.106011$euB5.66059@fx05.ams4> <ua0mlt$bb7j$1@matrix.hispagatos.org> <KWUwM.143252$MB_8.99644@fx01.ams4> <ua32rk$cjct$1@matrix.hispagatos.org>
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
Content-Language: en-US
Newsgroups: news.software.nntp
Organization: github.com/go-while
In-Reply-To: <ua32rk$cjct$1@matrix.hispagatos.org>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 57
X-Complaints-To: abuse@blocknews.net
Nntp-Posting-Date: Sun, 30 Jul 2023 07:52:02 UTC