On 3/15/2021 9:44 AM, Prime wrote:
After fiddling with a number of reverse-proxy options, I ended up
using sniproxy.
github.com/dlundquist/sniproxy
It has a really simple configuration format, handles port redirection
(i.e. connection to host.com:80 redirected to otherhost.com:90909),
and seems to handle websockets as well, but I haven't tested that in
depth. In my use-case, I have it running on Ubuntu in yet another VM
on my network, and it seems to be extremely light-weight.
Glad that's working for you, as I mentioned, I'm using Caddy...
My own caddyfile is below.
---------------------
www.roughneckbbs.com {
file_server
}
ecweb.roughneckbbs.com {
reverse_proxy *
http://INTERNAL_IP:51080
}
rmweb.roughneckbbs.com {
reverse_proxy *
http://INTERNAL_IP:52080
}
roughneckbbs.com {
redir *
https://www.roughneckbbs.com
}
...
:80 {
redir *
https://www.roughneckbbs.com
}
---------------------
http(s)://host.roughneckbbs.com is the synchronet service(s), I did
comment out the INTERNAL_IP for the service directly as well as some
redirects of old/alternate domains I've used for the BBS, the firewall
is configured so that the internal ports are only accessible from the
shared private network.
www. is just running static content for now, and will likely continue,
with some routes relaying to sbbs directly in the future.
ecweb/rmweb redirecting to the host internal ip on different ports. with
other fallbacks redirecting to
https://www. Including a fallback
redirect for anything else on port 80 that doesn't match a named entry.
For simple reverse-proxy + https termination, it's super easy... But can
still handle more complex application configurations, and the overhead
is really lightweight...
free >>
total used free shared buff/cache available
Mem: 1004896 235364 167028 1052 602504 615992
docker status --no-stream >>
CONTAINER NAME CPU % MEM USAGE / LIMIT MEM %
proxy 0.00% 20.96MiB / 981.3MiB 2.14%
It's supposed to support ws(s) proxy, but haven't really tested it,
it doesn't seem to like to work with the ws(s) terminal service in SynchronNet, but will probably try it with node's web-sockets before long.
--
Michael J. Ryan -
tracker1@roughneckbbs.com
---
þ Synchronet þ Roughneck BBS - roughneckbbs.com