trebleshot / android

An open-source app that allows you to transfer files one to one securely or using a browser, all without the internet
GNU General Public License v2.0
144 stars 42 forks source link

web: Drop nanohttpd and switch to another library #176

Closed velitasali closed 3 years ago

velitasali commented 3 years ago

NanoHTTPD is no longer maintained, is hard to work with, and has lots of bugs (related issues can be found here).

I have found some libraries that specifically target the Android platform and look like good candidates for a switch.

mubashir-rehman commented 3 years ago

Google says https://github.com/eclipse/jetty.project and https://github.com/apache/tomcat are alternatives to NanoHTTPD.

mubashir-rehman commented 3 years ago

better to just link https://java.libhunt.com/nanohttpd-alternatives

mubashir-rehman commented 3 years ago

and more links as we dive deeper in Google. lmao https://github.com/wildfly/wildfly seems a nice candidate https://github.com/undertow-io/undertow says it is default server for Wildfly

mubashir-rehman commented 3 years ago

just in case https://github.com/apache/httpcomponents-core

velitasali commented 3 years ago

Tbh, I have already done rewriting it but haven't pushed the commits here yet. Thanks for the suggestions though. There are actually lots of http servers available, but they are too powerful and don't support Android due its limitations (max Java 8 etc.) However, I should say I didn't know about the i-jetty project.

I went with AndServer btw and it was nice to work with (apart from the missing English documentation).

mubashir-rehman commented 3 years ago

For future reference: Found this gem https://github.com/http4k/http4k (says in its readme that it supports almost all above servers).