Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added simple plugin support #927

Merged
merged 3 commits into from Apr 19, 2019

Conversation

Projects
None yet
4 participants
@pm47
Copy link
Member

commented Apr 1, 2019

Using org.clapper:classutil library and a very simple Plugin interface.

pm47 added some commits Mar 29, 2019

added simple plugin support
using org.clapper:classutil library and a very simple `Plugin`
interface.

def onSetup(setup: Setup): Unit

def onKit(kit: Kit): Unit

This comment has been minimized.

Copy link
@araspitzu

araspitzu Apr 2, 2019

Member

Not sure i would expose the entire Kit, in this way plugins enlarge the attack surface of eclair. An insecure plugin can be exploited to access channel data.

This comment has been minimized.

Copy link
@pm47

pm47 Apr 2, 2019

Author Member

It allows to do powerful stuff on top of eclair, and you are always taking risks by running someone else's code.

@n1bor

This comment has been minimized.

Copy link
Contributor

commented Apr 9, 2019

+1 for this. Is there any way we could interface from the REST API to the plugin? Even if could just forward a string from API -> Plugin and get a string back? Say:
plugin --plugin="pluginname" --data="String of stuff to send"

And there would be another method in the trait:
def onReqeust(string: param): Future[String]

@pm47 pm47 requested a review from sstone Apr 15, 2019

@pm47

This comment has been minimized.

Copy link
Member Author

commented Apr 15, 2019

@n1bor that seems over the top, and a plugin can open its own web interface if needed.

@sstone

sstone approved these changes Apr 19, 2019

@pm47 pm47 merged commit c530b23 into master Apr 19, 2019

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@pm47 pm47 deleted the plugins branch Apr 19, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.