pushtify
pushtify copied to clipboard
SSL: WRONG_VERSION_NUMBER
I've installed pushtify with this :
services:
pushtify:
image: ghcr.io/sebw/pushtify:latest
container_name: pushtify
environment:
- GOTIFY_TOKEN=Ai_XXXXXXXX_
- GOTIFY_HOST=192.168.2.221:8079
- PUSHOVER_USERKEY=uzXXXXXXXh4
restart: unless-stopped
The build goes well then in the container logs I got this message :
[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1129)
### closed ###
Do we need to use the ssl connection to Gotify ? Because I didn't enable it in Gotify.
Thanks
Secure websocket is hard coded in the python code.
Replace wss:// with ws:// and rebuild the container image and you should be fine!
For convenience, a working Dockerfile:
FROM python:3.10.7-alpine3.16
RUN pip install ntfy && \
pip install websocket-client && \
rm -rf /var/cache/*
ENV GOTIFY_TOKEN=xyz
ENV GOTIFY_HOST=ws://gotify.example.org
ENV PUSHOVER_USERKEY=abcdefghijklmnopqrstuvwxyz
COPY pushtify-listener.py /usr/local/bin
ENTRYPOINT ["python3","/usr/local/bin/pushtify-listener.py"]
Modified last block of pushtify-listener.py:
if __name__ == "__main__":
wsapp = websocket.WebSocketApp(str(gotify_host) + "/stream", header={"X-Gotify-Key": str(gotify_token)},
on_open=on_open,
on_message=on_message,
on_error=on_error,
on_close=on_close)
wsapp.run_forever()
Implemented in 546d56b4f036a79e15d40309be6e198a595f6653
@sebw Fix confirmed. 👍