Bashbro – Make Any Comp a Web-Based File Server
11–20 of 52 posts
Re: Bashbro – Make Any Comp a Web-Based File Server
#12What is wrong with "python -m http.server"?
Re: Bashbro – Make Any Comp a Web-Based File Server
#13What is wrong with "python -m http.server"?
It requires Python. Bashbro, on the other hand, seems to require socat. I wonder if there's any bash-istic method of listening to a port...
Re: Bashbro – Make Any Comp a Web-Based File Server
#14What is wrong with "python -m http.server"?
It requires Python. Bashbro, on the other hand, seems to require socat. I wonder if there's any bash-istic method of listening to a port...
Re: Bashbro – Make Any Comp a Web-Based File Server
#15This is cool, but there's currently an overload of ports assigned on my system. Is there a way to manage all these port numbers? And why can't we use strings, even if just locally? And what do people use to allocate port numbers in a way that you'll never get clashes?
You could set up Nginx and some local subdomains to reverse proxy to the intended applications, regardless of whether they're hosted on Unix sockets or plain ports, if that makes accessing them easier. It definitely makes them easier to make accessible outside of the local machine.
Re: Bashbro – Make Any Comp a Web-Based File Server
#16This is cool, but there's currently an overload of ports assigned on my system. Is there a way to manage all these port numbers? And why can't we use strings, even if just locally? And what do people use to allocate port numbers in a way that you'll never get clashes?
You can consider the use of Unix sockets (sockets as named files). There are lots of limitations but the most pervasive and frustrating of those is the general lack of support for them across apps. You could set up Nginx and some local subdomains to reverse proxy to the intended applications, regardless of whether they're hosted on Unix sockets or plain ports, if that makes accessing them easier. It definitely makes…
Re: Bashbro – Make Any Comp a Web-Based File Server
#17Earlier quoted context omitted.
It requires Python. Bashbro, on the other hand, seems to require socat. I wonder if there's any bash-istic method of listening to a port...
For Bash with `--enable-net-redirections` set at configure time (not a default, not enabled on popular distros to my knowledge), `/dev/{udp,tcp}/$host/$port` is available for this purpose.
Re: Bashbro – Make Any Comp a Web-Based File Server
#18Earlier quoted context omitted.
You can consider the use of Unix sockets (sockets as named files). There are lots of limitations but the most pervasive and frustrating of those is the general lack of support for them across apps. You could set up Nginx and some local subdomains to reverse proxy to the intended applications, regardless of whether they're hosted on Unix sockets or plain ports, if that makes accessing them easier. It definitely makes…
Thanks! But how would I start bashbro in this case, and assign it to the label "myfiles"? I suspect I need additional scripting to make this easy.
As for using Nginx, you should be able to install Nginx and enable its service and in that way immediately get a local HTTP server. You can then edit the config such that requests for the Host `myfiles.localhost` are `proxy_pass ...` to your bashbro server. Then `http://myfiles.localhost` in your browser should just work.
Re: Bashbro – Make Any Comp a Web-Based File Server
#19This is cool, but there's currently an overload of ports assigned on my system. Is there a way to manage all these port numbers? And why can't we use strings, even if just locally? And what do people use to allocate port numbers in a way that you'll never get clashes?
Re: Bashbro – Make Any Comp a Web-Based File Server
#20Earlier quoted context omitted.
Thanks! But how would I start bashbro in this case, and assign it to the label "myfiles"? I suspect I need additional scripting to make this easy.
https://github.com/victrixsoft/bashbro/blob/c543d5d42ba2425f... needs amending to listen to a Unix socket instead of a port if that's something you'd like to contribute. As for using Nginx, you should be able to install Nginx and enable its service and in that way immediately get a local HTTP server. You can then edit the config such that requests for the Host `myfiles.localhost` are `proxy_pass ...` to your bashbro…
run-http-service myfiles bashbro -s -p PORT
And then it would just allocate a new port (clash-free), invoke bashbro with the given flags and substitute PORT by the newly allocated port number, and such that it uses myfiles.localhost as the domain. And when bashbro exits, the port number is garbage collected. Somehow, it feels like this should already exist ...