Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > KOReader

Notices

Reply
 
Thread Tools Search this Thread
Old 05-15-2025, 11:15 AM   #1
mjsf12
Junior Member
mjsf12 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: May 2025
Device: Kindle (10th Generation) G090VB
Question Is there any plugin development documentation?

I am developing a Tailscale plugin to create an HTTP proxy. The purpose of this proxy is to connect KOReader to an ODPS server on my local network via VPN. This development is quite challenging (perhaps because I'm not a Lua developer) without comprehensive documentation. I have already looked at the /koreader/plugins and koreader/contrib plugins. I also have the code loaded into an AI, which provides responses based on it.

Is there any official plugin documentation available?

P.S. Example of the problem: I need to put a plugin button on the network tab, similar to the SSH and Wi-Fi buttons. I was stuck on this for a day until I found the AirPlane Mode plugin and saw it uses sorting_hint = "network".

(Please excuse me if my English isn't perfect, it's not my first language.)
mjsf12 is offline   Reply With Quote
Old 05-16-2025, 09:12 AM   #2
pazos
cosiñeiro
pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.
 
Posts: 1,402
Karma: 2451781
Join Date: Apr 2014
Device: BQ Cervantes 4
IIRC tailscale is a frontend for wireguard, which is a kernel module.

In order for your plugin to use that feature you will need kernel support, which makes your plugin unable to work on most devices (kindles, kobos, pocketbooks...)

It should work on the desktop if you interface with userspace tools (ie: wg-quick) but there're better ways to use a vpn there.
pazos is offline   Reply With Quote
Advert
Old 05-16-2025, 09:21 AM   #3
pazos
cosiñeiro
pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.
 
Posts: 1,402
Karma: 2451781
Join Date: Apr 2014
Device: BQ Cervantes 4
Quote:
Is there any plugin development documentation?
There's no specific plugin documentation as there is no API or any boundaries.
You can develop plugins like you would develop a core feature.

General "developer documentation" is rather sparse. It is autogenerated by `luadoc` based on comments. Only a subset of functions are docummented.

tl;dr: you'll need to read the source code of the widgets you're using.
pazos is offline   Reply With Quote
Old 05-17-2025, 11:47 AM   #4
mjsf12
Junior Member
mjsf12 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: May 2025
Device: Kindle (10th Generation) G090VB
Quote:
Originally Posted by pazos View Post
IIRC tailscale is a frontend for wireguard, which is a kernel module.

In order for your plugin to use that feature you will need kernel support, which makes your plugin unable to work on most devices (kindles, kobos, pocketbooks...)

It should work on the desktop if you interface with userspace tools (ie: wg-quick) but there're better ways to use a vpn there.
From the time I asked until today, I already have the plugin working here. For it to work 100%, I just need to do the login part (which I do via SSH with auth-keys).
If you're curious about how I did the Tailscale part, there's a way for me to generate an HTTP proxy that the plugin automatically adds to KOReader's proxy when active (I had insurmountable bugs, like the header it can't send via this proxy, for example).

P.S.: It works well, I tested it with Calibre Web and Komga; I haven't tested Kavita, but it should work. I still need to find out if KOReader Sync works; overall, it's working well.

Quote:
Originally Posted by pazos View Post
There's no specific plugin documentation as there is no API or any boundaries.
You can develop plugins like you would develop a core feature.

General "developer documentation" is rather sparse. It is autogenerated by `luadoc` based on comments. Only a subset of functions are docummented.

tl;dr: you'll need to read the source code of the widgets you're using.
Yeah, I found it and others out there on the internet, and along with the plugin codes I found on GitHub/GitLab. I took everything and put it into NotebookLM (it's not perfect, I don't even know if it's ethical, but it sped things up) and I'm managing like this.
mjsf12 is offline   Reply With Quote
Old Yesterday, 04:16 PM   #5
pazos
cosiñeiro
pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.
 
Posts: 1,402
Karma: 2451781
Join Date: Apr 2014
Device: BQ Cervantes 4
Ahh, socks5. That makes sense. Thanks for the follow up!
pazos is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kobo development documentation nutustru Kobo Developer's Corner 0 03-16-2022 12:09 PM
Plugin development documentation dowobeha Plugins 1 09-03-2021 02:12 PM
[Metadata Source Plugin] browser documentation Crisppr.cas9 Plugins 1 12-18-2020 11:34 PM
MOBI development documentation Gabius Kindle Developer's Corner 4 09-14-2014 04:25 AM
Development documentation question (basic) Coleccionista Development 5 03-01-2011 04:07 PM


All times are GMT -4. The time now is 05:08 AM.


MobileRead.com is a privately owned, operated and funded community.