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

Add HTTP server and JSON API #659

Draft
wants to merge 155 commits into
base: development
from
Draft

Add HTTP server and JSON API #659

wants to merge 155 commits into from

Conversation

@DL6ER
Copy link
Member

DL6ER commented Nov 21, 2019

By submitting this pull request, I confirm the following (please check boxes, eg [X]) Failure to fill the template will close your PR:

Please submit all pull requests against the development branch. Failure to do so will delay or deny your request

  • I have read and understood the contributors guide.
  • I have checked that another pull request for this purpose does not exist.
  • I have considered, and confirmed that this submission will be valuable to others.
  • I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
  • I give this submission freely, and claim no ownership to its content.

How familiar are you with the codebase?:

10


This PR adds a fully-fledged HTTP server and JSON API to FTL.
It will replace lighttpd and serve both the API and the NG web interface.

More detail is to be added here once this feature advances further.

@DL6ER DL6ER force-pushed the new/http branch 2 times, most recently from 73072e4 to 38abfff Dec 2, 2019
@DL6ER DL6ER added this to the v6.0 milestone Dec 20, 2019
@DL6ER DL6ER force-pushed the new/http branch 2 times, most recently from 6fcce6d to 586fee1 Dec 25, 2019
@pralor-bot
Copy link

pralor-bot commented Jan 10, 2020

This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there:

https://discourse.pi-hole.net/t/make-some-advance-api/26786/2

@pralor-bot
Copy link

pralor-bot commented May 22, 2020

This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there:

https://discourse.pi-hole.net/t/black-whitelisting-does-not-work-on-v5-api/33119/1

DL6ER added 16 commits Oct 22, 2019
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
…lude additional whitespace for formatting.

Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
…as NO API at all.

Signed-off-by: DL6ER <dl6er@dl6er.de>
This allows the Pi-hole NG web interface with minimal functionality.

Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
DL6ER added 16 commits Dec 6, 2019
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
…nto a top-items function that can process both.

Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
…, and removing)

Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
@DL6ER
Copy link
Member Author

DL6ER commented May 26, 2020

We're still following this. I just rebased it onto the latest development branch.

@DL6ER DL6ER force-pushed the new/http branch from 6f396fd to 8afd063 May 26, 2020
@pralor-bot
Copy link

pralor-bot commented May 27, 2020

This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there:

https://discourse.pi-hole.net/t/php-webscripts/31016/28

@pralor-bot
Copy link

pralor-bot commented May 27, 2020

This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there:

https://discourse.pi-hole.net/t/php-webscripts/31016/32

DL6ER added 3 commits May 27, 2020
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
@DL6ER DL6ER force-pushed the new/http branch from 43d0ffc to 473a88f May 28, 2020
@DL6ER
Copy link
Member Author

DL6ER commented May 28, 2020

This branch can now host the web interface. Many things will not work as we removed the rusty telnet interface and added a React-based API in this version of FTL. This will have to be adapted for the current API. Eventually, we will be able to get rid of api.php and siblings and have all JS scripts directly talking to FTL.

However, pages not directly depending on the interactive API do already work.

For instance:

Screenshot at 2020-05-29 00-14-58
Screenshot at 2020-05-29 00-20-25

@pralor-bot
Copy link

pralor-bot commented May 28, 2020

This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there:

https://discourse.pi-hole.net/t/php-webscripts/31016/35

DL6ER added 2 commits May 28, 2020
Signed-off-by: DL6ER <dl6er@dl6er.de>
…e are actually able to add authentication.

Signed-off-by: DL6ER <dl6er@dl6er.de>
@DL6ER DL6ER mentioned this pull request Jun 13, 2020
3 of 3 tasks complete
@pralor-bot
Copy link

pralor-bot commented Jun 23, 2020

This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there:

https://discourse.pi-hole.net/t/how-to-update-dhcp-with-api/34773/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.