Skip to content

Commit 6fc8a03

Browse files
committed
feat: enable libcurl for znc-push
Before enabling libcurl in znc-push, some notifications were not delivered, especially messages that were sent in burst. Working example: ``` <*push> Building notification to api.telegram.org/botXXX/sendMessage... <*push> Request sending <*push> Status: 200 <*push> Message: OK ... ``` Broken example: ``` <*push> Building notification to api.telegram.org/botXXX/sendMessage... <*push> Request sending ... <Notification not delivered> ``` Ref: https://github.com/amyreese/znc-push/blob/master/README.md#advanced ``` Note: You are strongly encouraged to use libcurl transport. The reason for that is, that the default CSocket transport doesn't verify server's SSL certificate which leaves you vulnerable to MITM attacks. However, use of libcurl will block the main ZNC thread at every push notification; for installations with many users, libcurl is not yet ideal, even with the above security concerns in mind. ``` I subsequently enabled libcurl in push.cpp compilation. I could not modify the Makefile because it is overwritten for every module downloaded, but I could override the cpp file before building the module. After using libcurl, I could receive all the notifications sent by znc-push.
1 parent 9e70e2c commit 6fc8a03

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ RUN \
1717
boost-dev\
1818
build-base \
1919
c-ares-dev \
20+
curl-dev \
2021
cyrus-sasl-dev \
2122
gettext-dev \
2223
git \
@@ -55,6 +56,7 @@ RUN \
5556
tar xf \
5657
/tmp/znc-push.tar.gz -C \
5758
/tmp/znc/modules --strip-components=1 && \
59+
sed -i '1i #define USE_CURL' /tmp/znc/modules/push.cpp && \
5860
curl -o \
5961
/tmp/znc-clientbuffer.tar.gz -L \
6062
https://github.com/CyberShadow/znc-clientbuffer/archive/master.tar.gz && \

Dockerfile.aarch64

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ RUN \
1616
boost-dev\
1717
build-base \
1818
c-ares-dev \
19+
curl-dev \
1920
cyrus-sasl-dev \
2021
gettext-dev \
2122
git \
@@ -54,6 +55,7 @@ RUN \
5455
tar xf \
5556
/tmp/znc-push.tar.gz -C \
5657
/tmp/znc/modules --strip-components=1 && \
58+
sed -i '1i #define USE_CURL' /tmp/znc/modules/push.cpp && \
5759
curl -o \
5860
/tmp/znc-clientbuffer.tar.gz -L \
5961
https://github.com/CyberShadow/znc-clientbuffer/archive/master.tar.gz && \

0 commit comments

Comments
 (0)