Rocksolid Light

Welcome to Rocksolid Light

register   nodelist   faq  


rocksolid / rocksolid.nodes / Re: hey, what do know ? vichan supports nntp

SubjectAuthor
* hey, what do know ? vichan supports nntpanon
+* Re: hey, what do know ? vichan supports nntpanon
|`* Re: hey, what do know ? vichan supports nntpRetro Guy
| `* Re: hey, what do know ? vichan supports nntpanon
|  `* Re: hey, what do know ? vichan supports nntpRetro Guy
|   `* Re: hey, what do know ? vichan supports nntpanon
|    `* Re: hey, what do know ? vichan supports nntpanon
|     `* Re: hey, what do know ? vichan supports nntpRetro Guy
|      `* Re: hey, what do know ? vichan supports nntpanon
|       `* Re: hey, what do know ? vichan supports nntpanon
|        +* Re: hey, what do know ? vichan supports nntpanon
|        |`* Re: hey, what do know ? vichan supports nntpanonymous
|        | +* Re: hey, what do know ? vichan supports nntpRetro Guy
|        | |`* Re: hey, what do know ? vichan supports nntpanon
|        | | `* Re: hey, what do know ? vichan supports nntpRetro Guy
|        | |  `* Re: hey, what do know ? vichan supports nntpanonymous
|        | |   `* Re: hey, what do know ? vichan supports nntpRetro Guy
|        | |    `* Re: hey, what do know ? vichan supports nntpanonymous
|        | |     `* Re: hey, what do know ? vichan supports nntpanon
|        | |      +* Re: hey, what do you know: vichan supports nntpanon
|        | |      |+- Re: hey, what do you know: vichan supports nntpRetro Guy
|        | |      |`* Re: hey, what do you know: vichan supports nntpanon
|        | |      | `- Re: hey, what do you know: vichan supports nntpRetro Guy
|        | |      `- Re: hey, what do know ? vichan supports nntpRetro Guy
|        | `* Re: hey, what do know ? vichan supports nntpRetro Guy
|        |  `* Re: hey, what do know ? vichan supports nntpanonymous
|        |   `* Re: hey, what do know ? vichan supports nntpanonymous
|        |    `* Re: hey, what do know ? vichan supports nntpanonymous
|        |     +* Re: hey, what do know ? vichan supports nntpanonymous
|        |     |`* Re: hey, what do know ? vichan supports nntpanonymous
|        |     | `* Re: hey, what do know ? vichan supports nntpanonymous
|        |     |  `* Re: hey, what do know ? vichan supports nntpanonymous
|        |     |   `* Re: hey, what do know ? vichan supports nntpRetro Guy
|        |     |    `* Re: hey, what do know ? vichan supports nntpanonymous
|        |     |     `* Re: hey, what do know ? vichan supports nntpanonymous
|        |     |      `* Re: hey, what do know ? vichan supports nntpanonymous
|        |     |       `* Re: hey, what do know ? vichan supports nntpanonymous
|        |     |        `* Re: hey, what do know ? vichan supports nntpRetro Guy
|        |     |         `* Re: hey, what do know ? vichan supports nntpanonymous
|        |     |          `* Re: hey, what do know ? vichan supports nntpanonymous
|        |     |           `* Re: hey, what do know ? vichan supports nntpRetro Guy
|        |     |            `* Re: hey, what do know ? vichan supports nntpanonymous
|        |     |             `* Re: hey, what do know ? vichan supports nntpanonymous
|        |     |              `* Re: hey, what do know ? vichan supports nntpRetro Guy
|        |     |               `* Re: hey, what do know ? vichan supports nntpanon
|        |     |                `* Re: hey, what do know ? vichan supports nntpRetro Guy
|        |     |                 `* Re: hey, what do know ? vichan supports nntpanonymous
|        |     |                  `* Re: hey, what do know ? vichan supports nntpanonymous
|        |     |                   `* Re: hey, what do know ? vichan supports nntpanonymous
|        |     |                    `* Re: hey, what do know ? vichan supports nntpanonymous
|        |     |                     `* Re: hey, what do know ? vichan supports nntpRetro Guy
|        |     |                      `* Re: hey, what do know ? vichan supports nntpanonymous
|        |     |                       +* Re: hey, what do know ? vichan supports nntpanonymous
|        |     |                       |+- Re: hey, what do know ? vichan supports nntpanonymous
|        |     |                       |`- Re: hey, what do know ? vichan supports nntpRetro Guy
|        |     |                       `* Re: hey, what do know ? vichan supports nntpRetro Guy
|        |     |                        `- Re: hey, what do know ? vichan supports nntpanonymous
|        |     `- Re: hey, what do know ? vichan supports nntpRetro Guy
|        `- Re: hey, what do know ? vichan supports nntpRetro Guy
+- Re: hey, what do know ? vichan supports nntpanon
+* Re: hey, what do know ? vichan supports nntpanon
|`* Re: hey, what do know ? vichan supports nntpanonymous
| +- Re: hey, what do you know....anon
| `* Re: hey, what do know ? vichan supports nntpanonymous
|  `* Re: hey, what do know ? vichan supports nntpRetro Guy
|   `- Re: hey, what do know ? vichan supports nntpanon
+* basics are workingAnonymous
|`- Re: basics are workingRetro Guy
+* guess i will open for business soonAnonymous
|+* Re: guess i will open for business soonMei
||`- Re: guess i will open for business soonRetro Guy
|`- Re: guess i will open for business soonRetro Guy
+- opsec check is goodAnonymous
+- > goo to go.Anonymous
+* yes that should workAnonymous
|`- Re: yes that should workRetro Guy
+* cron or not ?Anonymous
|`- Re: cron or not ?Retro Guy
+- themes on def2.i2pAnonymous
`* ok, ok, i switched the default themeAnonymous
 `* Re: ok, ok, i switched the default themeMei
  `- Re: ok, ok, i switched the default themeanon

Subject: Re: hey, what do know ? vichan supports nntp
From: Retro Guy@rslight.i2p (Retro Guy)
Newsgroups: rocksolid.nodes
Organization: Rocksolid Light
Date: Mon, 18 May 2020 10:28 UTC
anonymous wrote:

i guess the best would be to insert the function to post to vichan in spoolnews.php, function get_articles line 233 and following. all the data from the current message is nicely parsed at this point and can just be forwarded to vichan.

These are the variables that contain the data for these requests in spoolnews.php (function get_articles) near where you specified:

$_GET['Newsgroups'] = $group
$_GET['Message-Id'] = $mid[1]
$_GET['References'] = $references (all of them)
$_GET['Date'] = $finddate[1] is a date string from the message
$article_date is a unix timestamp of same date
$_GET['Content-Type'] = not currently extracted in spoolnews, but can be
$_GET['Subject'] = $subject[1]
$_GET['From'] = $from[1]
$_GET['X_Sage'] = I'm guessing this header won't be in messages sent to vichan
unless from another vichan instance

Do you want to switch to a POST request? Since GET has length restrictions, it might be best, but requres changes in vichan (post.php)

Retro Guy
--
Posted on: Rocksolid Light
news.novabbs.com



Subject: Re: hey, what do know ? vichan supports nntp
From: anonymous@anon.com (anonymous)
Newsgroups: rocksolid.nodes
Organization: def2
Date: Mon, 18 May 2020 12:26 UTC
thanks for digging that out.
x-sage is vichan specific and can be omitted.

i decided to try the GET method first, just to test quickly if this would work. after that i guess it must be post (unless i figure how to put the message and attachments in the GET request body).
--
Posted on def2
z5bqfv5v75kxy7pj.onion


Subject: Re: hey, what do know ? vichan supports nntp
From: anonymous@anon.com (anonymous)
Newsgroups: rocksolid.nodes
Organization: def2
Date: Wed, 20 May 2020 23:16 UTC
ok, will skip the testing bullshit and get right to POST method. i could cut post.php to some 730 lines that are needed for this, out of which i need to modify some 13 lines to read POST instead of GET. Then will use something like this here:
https://www.codexworld.com/post-receive-json-data-using-php-curl/
to send over the data. so this means b64 encoding for the attachments.

i checked some sources now, and while it is technically feasible to put large texts and files into GET request bodies, it goes against all standards and almost everybody advised against it. never mind that a GET request per definition should have not have any impact on the servers state. so i really wonder why it was designed like that. maybe there is some sneaky scheme here that i just don't get :-).

i also dug out the old sources of nntp chan (which was a little tricky), and checked the way they do it. but to my surprise all i could find was the nntp way of exchanging messages (so between two nntp instances), but not the way that is implemented in vichan, using http.

well never mind, i will hack that into shape, i think. :-)
--
Posted on def2
z5bqfv5v75kxy7pj.onion


Subject: Re: hey, what do know ? vichan supports nntp
From: Retro Guy@rslight.i2p (Retro Guy)
Newsgroups: rocksolid.nodes
Organization: Rocksolid Light
Date: Thu, 21 May 2020 08:50 UTC
anonymous wrote:

i also dug out the old sources of nntp chan (which was a little tricky), and checked the way they do it. but to my surprise all i could find was the nntp way of exchanging messages (so between two nntp instances), but not the way that is implemented in vichan, using http.

If you plan to run vichan as dependent on the rslight nntp server, you would have a news server local that you could talk to. rslight would be the "other" nntp instance. Is that of any value?

This is how rslight works. Newsportal could only send/receive from a nntp server, so now it sends/receives from it's own built in nntp server, but the code for the interface is really just talking to any nntp server, I just happen to have placed one on the same machine. That's why you can run it without the built in server, and it doesn't know the difference (it's just way slower).

well never mind, i will hack that into shape, i think. :-)

Good luck! We're all counting on you! (movie quote, lol)

Retro Guy
--
Posted on: Rocksolid Light
news.novabbs.com



Subject: Re: hey, what do know ? vichan supports nntp
From: anonymous@anon.com (anonymous)
Newsgroups: rocksolid.nodes
Organization: def2
Date: Thu, 21 May 2020 19:04 UTC
ok, i did a proof of concept for posting, this works. in the end i skipped the webserver and stuff with curl, and just handed over the message as a file which the modified post.php parses (json encoded). so far so good. as long as both nntp server and vichan run on the same machine, this is a viable solution.

now for the files (so far it is text only).

cheers

trw
--
Posted on def2
z5bqfv5v75kxy7pj.onion


Subject: Re: hey, what do know ? vichan supports nntp
From: anonymous@anon.com (anonymous)
Newsgroups: rocksolid.nodes
Organization: def2
Date: Thu, 21 May 2020 19:20 UTC
If you plan to run vichan as dependent on the rslight nntp server,

Yes, that is the plan. And I would also keep rslight running on the tor side.


you would have a news server local that you could talk to. rslight would be the "other" nntp instance. Is that of any value?

Yes, absolutely. Right now the syncing from vichan to the news server works by just dropping the message in the outspool. Works well, and will most like stay that way.
The original way (for which I only have half the code from the vichan sources) worked based on ip addresses, which is not good in my case anyway.
The other way round (so from rslight to vichan) will work like I described in the message before, there is just no need for any complicated constructs if both applications are running on the same machine.

The nntp to nntp connection to update vichan is something I would not use if I have easier ways, and it seems I do (I leave it to rslight, and just read and write files).
So eventually this mod for vichan would be a plugin to an rslight installation.

And about forking: I guess that is little heavy for me, but I will upload my mods somewhere eventually (once this it is done well enough to see the light of day, so a little down the road).

cheers

trw
--
Posted on def2
z5bqfv5v75kxy7pj.onion


Subject: Re: hey, what do know ? vichan supports nntp
From: Retro Guy@rslight.i2p (Retro Guy)
Newsgroups: rocksolid.nodes
Organization: Rocksolid Light
Date: Fri, 22 May 2020 08:40 UTC
anonymous wrote:

The nntp to nntp connection to update vichan is something I would not use if I have easier ways, and it seems I do (I leave it to rslight, and just read and write files).
So eventually this mod for vichan would be a plugin to an rslight installation.

So if I understand correctly, vichan will read a message from a file and apply it to it's database. If that is correct, how will vichan know the file exists, will it poll a directory? --
Posted on: Rocksolid Light
news.novabbs.com



Subject: Re: hey, what do know ? vichan supports nntp
From: anon@anon.com (anon)
Newsgroups: rocksolid.nodes
Organization: def5
Date: Fri, 22 May 2020 10:11 UTC

So if I understand correctly, vichan will read a message from a file and apply it to it's database. If that is correct, how will vichan know the file exists, will it poll a directory?

that's correct. i was planning to call the vichan script  from rslight in case of updates (guess from spoolnews).

Posted on def4


Subject: Re: hey, what do know ? vichan supports nntp
From: Retro Guy@rslight.i2p (Retro Guy)
Newsgroups: rocksolid.nodes
Organization: Rocksolid Light
Date: Fri, 22 May 2020 09:24 UTC
anon wrote:


So if I understand correctly, vichan will read a message from a file and apply it to it's database. If that is correct, how will vichan know the file exists, will it poll a directory?

that's correct. i was planning to call the vichan script  from rslight in case of updates (guess from spoolnews).

Posted on def4

If you are reading each message as a file, would it work for rslight to just send vichan basically the equivalent of what you saw in /var/spool/rslight/rocksolid/local_groups.txt:
rocksolid.nodes:158
rocksolid.nodes.help:53
etc...

This could tell vichan where rslight has set message pointers and vichan can keep it's own list, then it can go pull the articles it doesn't have and update it's pointer list. If the pointers all match, there are no articles to import.

Is this idea of any use?

Retro Guy


--
Posted on: Rocksolid Light
news.novabbs.com



Subject: Re: hey, what do know ? vichan supports nntp
From: anonymous@anon.com (anonymous)
Newsgroups: rocksolid.nodes
Organization: def2
Date: Fri, 22 May 2020 10:46 UTC
Yes, that approach could work as well. The downside would be that you would have to parse the messages again, while spoolnews is doing that already. Think I'd rather hand something very simple to vichan from the spoolnews script, like this:
{       "Newsgroups": "rocksolid.shared.test",
    "Message-ID": "<83434435e73f113dcce2d23d237b6237$1@z5bqfv5v75kxy7pj.onion>",
    "References": "",
    "Date": "Thu, 14 May 2020 16:16 UTC",
    "Subject": "nother post",
    "From": "anonymous@anon.com (anonymous)",
    "Content-Type": "text/plain; charset=utf-8; format=flowed",
    "Content": "This is a test text"
}
It is way easier to just do json_decode and have all the values, than to parse the files from the spool (this somewhat messy part is already taken care of, so I would not like to do it again).
Of course it is just a question of taste where the code should reside, at rslight or at vichan.

trw
--
Posted on def2
z5bqfv5v75kxy7pj.onion


Pages:123456789
rocksolid light 0.6.5e
clearnet i2p tor