Skip to content

Commit 3edf046

Browse files
committed
⬆️ chore(deps): Bump 3proxy to v0.9.7 (#98)
1 parent 8926c3f commit 3edf046

2 files changed

Lines changed: 6 additions & 20 deletions

File tree

Dockerfile

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -52,19 +52,14 @@ RUN --mount=type=cache,target=/var/cache/apk,sharing=locked \
5252
FROM docker.io/library/alpine:3.24.1 AS the3proxy
5353

5454
# renovate: source=github-tags name=3proxy/3proxy
55-
ARG THE3PROXY_VERSION=0.9.6
55+
ARG THE3PROXY_VERSION=0.9.7
5656

5757
# all plugins compiled statically into the binary (no dlopen / .so files at runtime); each plugin can be enabled
5858
# in 3proxy config with: `plugin <Name> <entry-symbol> [args]`
5959
# - StringsPlugin - may be used to make the interface more attractive or to translate proxy server messages to a
6060
# different language (usage: `plugin StringsPlugin start /etc/3proxy/strings.3ps`)
6161
# docs: https://3proxy.org/plugins/StringsPlugin/
62-
# - PCREPlugin - can be used to create matching and replacement rules with regular expressions for client requests,
63-
# client and server headers, and client and server data (usage: `plugin PCREPlugin pcre_plugin` + config commands)
64-
# docs: https://3proxy.org/plugins/PCREPlugin/
65-
# - SSLPlugin - can be used to transparently decrypt SSL/TLS data, provide TLS encryption for proxy traffic, and
66-
# authenticate using client certificates (usage: `plugin SSLPlugin ssl_plugin` + config commands)
67-
# docs: https://3proxy.org/plugins/SSLPlugin/
62+
# note: SSLPlugin and PCREPlugin were merged into the main binary in 0.9.7; ssl/pcre code is now always built in
6863
RUN --mount=type=cache,target=/var/cache/apk,sharing=locked \
6964
--mount=type=bind,source=/patches/3proxy,target=/mnt/patches \
7065
set -x \
@@ -78,7 +73,7 @@ RUN --mount=type=cache,target=/var/cache/apk,sharing=locked \
7873
&& ln -s Makefile.Linux Makefile \
7974
&& echo "" >> ./Makefile \
8075
&& echo "PLUGINS =" >> ./Makefile \
81-
&& echo "COMPATLIBS += static_plugins.o strings_plugin.o pcre_plugin.o ssl_plugin.o my_ssl.o" >> ./Makefile \
76+
&& echo "COMPATLIBS += static_plugins.o strings_plugin.o" >> ./Makefile \
8277
&& echo "LIBS = -l:libssl.a -l:libcrypto.a -l:libpcre2-8.a" >> ./Makefile \
8378
&& echo "LDFLAGS += -static" >> ./Makefile \
8479
&& sed -i 's~\(<\/head>\)~<style>:root{--a:#fff;--b:#131313;--c:#232323}@media (prefers-color-scheme: dark){:root{\
@@ -90,15 +85,10 @@ margin-inline:auto}pre{color:var(--c);font-size:.9rem;max-width:80ch;margin-inli
9085
pre-wrap;word-break:break-word}</style>\1~' ./src/proxy.c \
9186
&& cp /mnt/patches/static_plugins.c ./src/static_plugins.c \
9287
&& gcc -c -fPIC -D_GNU_SOURCE -o ./src/static_plugins.o ./src/static_plugins.c \
93-
&& for p in StringsPlugin PCREPlugin SSLPlugin; do cp ./Makefile ./src/plugins/$p/Makefile.var; done \
88+
&& cp ./Makefile ./src/plugins/StringsPlugin/Makefile.var \
9489
&& make -C ./src/plugins/StringsPlugin StringsPlugin.o DCFLAGS="-Dstart=strings_plugin_start" \
95-
&& make -C ./src/plugins/PCREPlugin pcre_plugin.o \
96-
&& make -C ./src/plugins/SSLPlugin ssl_plugin.o my_ssl.o \
9790
&& mv ./src/plugins/StringsPlugin/StringsPlugin.o ./src/strings_plugin.o \
98-
&& mv ./src/plugins/PCREPlugin/pcre_plugin.o ./src/ \
99-
&& mv ./src/plugins/SSLPlugin/ssl_plugin.o ./src/ \
100-
&& mv ./src/plugins/SSLPlugin/my_ssl.o ./src/ \
101-
&& make \
91+
&& make OPENSSL_CHECK=true PCRE_CHECK=true \
10292
&& strip ./bin/3proxy \
10393
&& if readelf -l ./bin/3proxy | grep -q 'INTERP'; then echo "ERR: dynamic loader detected"; exit 66; fi \
10494
&& if readelf -d ./bin/3proxy 2>/dev/null | grep -q 'NEEDED'; then echo "ERR: shared lib deps detected"; exit 67; fi \

patches/3proxy/static_plugins.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,9 @@ struct pluginlink;
99
typedef int (*pfn)(struct pluginlink *, int, char **);
1010

1111
int strings_plugin_start(struct pluginlink *, int, char **);
12-
int pcre_plugin(struct pluginlink *, int, char **);
13-
int ssl_plugin(struct pluginlink *, int, char **);
1412

1513
static const struct { const char *path; const char *sym; pfn fn; } _pl[] = {
16-
{ "StringsPlugin", "start", (pfn)strings_plugin_start },
17-
{ "PCREPlugin", "pcre_plugin", (pfn)pcre_plugin },
18-
{ "SSLPlugin", "ssl_plugin", (pfn)ssl_plugin },
14+
{ "StringsPlugin", "start", (pfn)strings_plugin_start },
1915
{ NULL, NULL, NULL }
2016
};
2117

0 commit comments

Comments
 (0)