cgsdev0 / bash-stack

modern web framework in bash
https://bashsta.cc
MIT License
408 stars 7 forks source link

Using nc instead of tcpserver #8

Closed the-man-with-a-golden-mind closed 2 months ago

the-man-with-a-golden-mind commented 2 months ago

Hi. First of all, amazing work! I am considering to use it as my main solution on OpenWrt, but I would like to remove one dependency (tcpserver). How hard it would be to port it to use nc instead of tcpserver? nc is more low level but still quite usable.

Best,

MM

cgsdev0 commented 2 months ago

hello!

i've added support for netcat in v0.5.3

you can add TCP_PROVIDER=nc to your config.sh to enable it.

this is just a first pass at an implementation - ideally, we would run multiple nc processes in parallel so it can handle concurrent connections

for now, expect the performance to be significantly worse when using nc instead of tcpserver

the-man-with-a-golden-mind commented 2 months ago

Amazing. It is working. Yeah the performance is not perfect but now I can use it on a OpenWrt devices which minimum requirements. Thank you!