Open metaswirl opened 2 months ago
Hi @metaswirl,
I'm able to reproduce this problem. Also, I've found another problem when trying to connect to it.
So here's my reproduction script
compose.yaml
services:
ls22:
image: savonet/liquidsoap:v2.2.5
command: /tmp/test/main.liq
volumes:
- ./:/tmp/test/
ports:
- 8000:8000
main.liq
settings.log.level := 5
transport = http.transport.tls(
certificate = "/tmp/test/cert.pem",
key = "/tmp/test/key.pem",
)
live = input.harbor(
"live",
port=8000,
buffer=3.,
transport=transport,
)
output.dummy(live, fallible=true)
openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -sha256 -days 365 -subj '/CN=localhost' -nodes;
chmod 0644 key.pem;
docker compose up;
ffmpeg -re -f lavfi -i "sine=frequency=200:duration=2000" -b:a 320k -c:a mp3 -f mp3 -tls 1 icecast://source:hackme@localhost:8000/live
But that's not working properly, the stream doesn't even start. So I've configured reverse proxy and got the error.
If you need a quick fix, then set up a reverse proxy in front of liquidsoap and configure it to strip encryption in TCP mode. https://github.com/savonet/liquidsoap/discussions/3659#discussioncomment-8241421
Thanks for the report, I will have a pass at it.
Is it also happening in 2.3.0-rc1
or main
?
Also worth noting we do have SSL as well. A reverse proxy is never a bad idea if that suits your infrastructure.
Thank you Toots!
http.transport.ssl works without any issue! http.transport.tls is buggy.
Both http.transport.ssl
and http.transport.tls
have their own quirks.
Ref: #3574
Description
I can connect to input.harbor via TLS, when I disconnect the source, nothing shows in the log, and when I try and re-connect this appears:
2024/09/20 18:15:49 [harbor:4] Harbor.Make(T).Mount_taken
I have tried various clients including liquidsoap output.icecast tls, mixxx and butt, all have the same issues.
Steps to reproduce
transport = http.transport.tls( certificate = "/opt/liquidsoap/cert/fullchain.pem", key = "/opt/liquidsoap/cert/privkey.pem" )
stream_live_tls = input.harbor("live-tls", port=9016, auth=auth, transport=transport, id="live-tls", icy=false, icy_metadata_charset="UTF-8", metadata_charset="UTF-8", replay_metadata=true, on_connect=live_connect_tls, on_disconnect=live_disconnect_tls, buffer=5.0, max=10.0)
Expected behavior
input.harbor TLS does not recognize when source has disconnected making it impossible to re-connect.
Liquidsoap version
Liquidsoap build config
Installation method
From OPAM
Additional Info
No response