panel icon indicating copy to clipboard operation
panel copied to clipboard

Official Support for Add-ons

Open schrej opened this issue 4 years ago • 10 comments

We should make it easier to create add-ons for the panel, and ideally also for wings. Currently most add-ons overwrite files in order to add additional functionality. Each update to the panel requires to reinstall any previously installed add-ons. In addition, add-ons are very tightly coupled to the installed version of the panel. Using outdated add-ons can even re-introduce fixed security issues in the worst case.

A better system should therefore

  • allow to add functionality to the panel backend without overwriting files (already possible with composer, could be easier though)
  • allow modifications to the new React frontend in a straight-forward way
  • continue to work with updates, at least for patch versions
  • ideally allow to be installed by extracting a zip to a "addons" folder or something in that direction

schrej avatar Aug 14 '20 09:08 schrej

Personally I don't think I'd be all to difficult to add it using composer. This would allow it to more easily hook into routes and so on. As far as I know, Laravel has some pretty good features for this where the panel could make use of. I think a good start would be to be able to load pages from a composer-loaded package (maybe even with a pterodactyl-addon-type of some sorts) and possibly add menu items to redirect users to these pages.

Later, further integrations could be made with parts of the panel and the ability to replace/expand features.

Wouter0100 avatar Nov 27 '20 17:11 Wouter0100

I'd definitely like to see that, although I can see that a lot of developers wouldn't like the composer way as sadly, developers like to charge for their addons and therefore composer wouldn't an option. Although, the concept in general of an addon system that would allow people to upload their addons into an addons folder or an addons page in the panel would really help a lot and avoid unrequired edits to the panel's source code. Best of both worlds really.

ThatProgrammerr avatar Mar 06 '21 17:03 ThatProgrammerr

I'd definitely like to see that, although I can see that a lot of developers wouldn't like the composer way as sadly, developers like to charge for their addons and therefore composer wouldn't an option.

That's actually possible just fine with composer :-). You can release packages behind a payment wall just fine. Or atleast, require authentication on which you can enforce a subscription of some sort.

Wouter0100 avatar Mar 06 '21 17:03 Wouter0100

Wouldn't that make sites like Pterodactyl Market useless though? As people would have to buy from composer payment walls instead of through sites dedicated to allow developers to sell their creations.

ThatProgrammerr avatar Mar 06 '21 17:03 ThatProgrammerr

Wouldn't that make sites like Pterodactyl Market useless though? As people would have to buy from composer payment walls instead of through sites dedicated to allow developers to sell their creations.

No, you can add your own repository from for example the Market you mentioned.

Wouter0100 avatar Mar 06 '21 17:03 Wouter0100

Oh, okay. Then maybe composer could work.

ThatProgrammerr avatar Mar 06 '21 17:03 ThatProgrammerr

Any update on this?

reesericci avatar Sep 27 '21 23:09 reesericci

No

DaneEveritt avatar Sep 28 '21 22:09 DaneEveritt

No

Jelcoo avatar Nov 16 '21 15:11 Jelcoo

any update on this ? maybe add it on the v2 upcoming panel version ?

VozDeOuro avatar May 30 '22 20:05 VozDeOuro

Doesn't Golang have a way to load plugins via .so files? Honestly the trickiest bits are going to be Wings and the React frontend, as the former would require a plugin implementation and the latter requires building

TekExplorer avatar Dec 03 '22 19:12 TekExplorer

Golang have a way to load plugins

While plugins are supported in go, They are not simple to implement and basically require being built on the same system as the main application.

There are ways around this like using gRPC that would just add complexity in other ways.

parkervcp avatar Dec 03 '22 20:12 parkervcp

i suppose the important question is, what do people actually need out of addon support?

creating api routes is simple enough with composer

  • can this be made easier somehow?
  • an example package might make all the difference in the world

for the UI... generally people create new pages and add new elements to existing pages, and, of course, themes - altering existing elements.

  • what is the complex part of this? what steps are usually taken that can be made easier?

and wings, what do people usually need to alter it for?

  • are there api endpoints we can create that would cover these needs?
  • is there a plugin implementation that can be made that only exposes the most important bits?
    • what do plugins actually need?
  • i'm not familiar with go plugins, (or go itself) but couldnt you just define a set of functions that the system attempts to call?
    • such as a function that loads api endpoints for the plugins, and letting them sort themselves out otherwise? (perhaps the logger too?)
    • they're running as the pterodactyl user and have access to the config file, so presumably you dont actually need anything else?
    • as far as i know, plugins can then just import whatever functions they need from wings or the wings github - correct me if i'm wrong.
  • anything that alters existing wings functionality might be out of scope.
    • it might be simple enough to create your own variant of the endpoint and alter the panel to interact with it instead
    • or straight up fork it at that point

people can get really creative with what they are given, so what can we give that would cover most use-cases?

TekExplorer avatar Dec 03 '22 23:12 TekExplorer

I've been poking around, and ChatGPT of all things seems to be suggesting the use of HOCs for the React app as addons If that is considered, it might be necessary to make much greater use of props and default props, kind of similar to the way that the current account and server routes are populated, actually.

I reiterate that i dont actually know a whole lot about this, but i thought i'd throw it out there and see if it catches any proverbial fish

TekExplorer avatar Dec 10 '22 04:12 TekExplorer