Compare commits

..

28 Commits

Author SHA1 Message Date
jendis
bf35be8e8c
Merge 983df6f7ae into 09f8eec6a1 2026-04-08 17:32:22 +01:00
Vladimir Dubrovin
09f8eec6a1 Update workflows and makefiles
- Update GitHub Actions workflows (checkout v5, build fixes)
- Fix MSVC and Watcom makefiles
- Update documentation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-08 19:21:34 +03:00
Vladimir Dubrovin
0879851870 Fix warnings 2026-04-08 19:21:34 +03:00
Vladimir Dubrovin
444bfaebca Fix warnings 2026-04-08 19:21:34 +03:00
Vladimir Dubrovin
ac2bcb9118 Update workflows and makefiles (1 commits squashed) 2026-04-08 19:21:34 +03:00
Vladimir Dubrovin
a7637c6680 Fix warnings 2026-04-08 19:21:34 +03:00
Vladimir Dubrovin
4abe83eeba Fix warnings 2026-04-08 19:21:34 +03:00
Vladimir Dubrovin
e600702de8 Use PRI/SCN modifiers where possible 2026-04-08 19:21:34 +03:00
Vladimir Dubrovin
604f9800dd Update workflows and makefiles (1 commits squashed) 2026-04-08 19:21:33 +03:00
Vladimir Dubrovin
66ef22ec35 Revert "Update structures.h"
This reverts commit b628aa859d.
2026-04-08 19:21:33 +03:00
Vladimir Dubrovin
49d88d0884 Update structures.h 2026-04-08 19:21:33 +03:00
Vladimir Dubrovin
ed4d5bc5f1 Use uint32_t/uint16_t instead of unsigned long / unsigned short where required 2026-04-08 19:21:33 +03:00
Vladimir Dubrovin
2dc7c92f0f Update workflows and makefiles (1 commits squashed) 2026-04-08 19:21:33 +03:00
Vladimir Dubrovin
f1b36dadc7 Update 3proxy.spec 2026-04-08 19:21:33 +03:00
Vladimir Dubrovin
e8968cf6df Update workflows and makefiles (1 commits squashed) 2026-04-08 19:21:33 +03:00
Vladimir Dubrovin
e90663da69 Update 3proxy.spec 2026-04-08 19:21:33 +03:00
Vladimir Dubrovin
87def2a707 Update workflows and makefiles (2 commits squashed) 2026-04-08 19:21:33 +03:00
Vladimir Dubrovin
503f593941 update 3proxy.spec 2026-04-08 19:21:33 +03:00
Vladimir Dubrovin
26679cbb60 Update workflows and makefiles (3 commits squashed) 2026-04-08 19:21:33 +03:00
Vladimir Dubrovin
d93791b815 pass PAMLIB to make 2026-04-08 19:21:33 +03:00
Vladimir Dubrovin
d53a592c8a Allow specify pam library 2026-04-08 19:21:33 +03:00
Vladimir Dubrovin
afd71eb6a0 Update workflows and makefiles (12 commits squashed) 2026-04-08 19:21:33 +03:00
Vladimir Dubrovin
8d2a788c58 Update 3proxy.spec 2026-04-08 19:21:32 +03:00
Vladimir Dubrovin
9431810309 Update workflows and makefiles (5 commits squashed) 2026-04-08 19:21:32 +03:00
Vladimir Dubrovin
c61ce2217d Update 3proxy.spec 2026-04-08 19:21:32 +03:00
Vladimir Dubrovin
16b7f90aab Update workflows and makefiles (1 commits squashed) 2026-04-08 19:21:32 +03:00
Vladimir Dubrovin
96c3068a6c Update 3proxy.spec 2026-04-08 19:21:32 +03:00
Vladimir Dubrovin
dfb70a4c60 Update workflows and makefiles (14 commits squashed) 2026-04-08 19:21:32 +03:00
8 changed files with 75 additions and 96 deletions

View File

@ -1,8 +1,8 @@
name: RPM/DEB build aarch64
name: RPM build arm64
on:
push:
branches: [ "master", "test-ci" ]
branches: [ "master" ]
paths: [ 'RELEASE', '.github/workflows/build-rpm-arm64.yml' ]
jobs:
@ -28,15 +28,14 @@ jobs:
- name: Linux libraries
run: |
sudo apt update
sudo apt install libssl-dev libpam-dev libpcre2-dev rpm build-essential debhelper
sudo apt install libssl-dev libpam-dev libpcre2-dev rpm
- name: make rpmbuild dir
run: mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
- name: configure rpm env
run: |
mkdir ~/debian
mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
tar -czf ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz --transform "s,^,3proxy-$RELEASE/," .
ln -s ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz ~/rpmbuild/SOURCES/$RELEASE.tar.gz
cp scripts/rh/3proxy.spec ~/rpmbuild/SPECS/3proxy-$RELEASE.spec
cp ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz ~/debian/3proxy_$RELEASE.orig.tar.gz
- name: rpmbuild
run: |
ret=`pwd`
@ -44,28 +43,9 @@ jobs:
rpmbuild -ba 3proxy-$RELEASE.spec
cd $ret
mv ~/rpmbuild/RPMS/aarch64/3proxy-$RELEASE-1.aarch64.rpm 3proxy-$RELEASE.arm64.rpm
- name: Get artifact arp
- name: Get artifact
uses: actions/upload-artifact@v4
with:
name: "3proxy-${{ env.RELEASE }}-arm64.rpm"
path: "*.rpm"
- name: debbuild
run: |
ret=`pwd`
cd ~/debian/
tar xzf 3proxy_$RELEASE.orig.tar.gz
cd 3proxy-$RELEASE
echo "3proxy ($RELEASE-$VERSION) buster; urgency=medium" >debian/changelog
echo " " >>debian/changelog
echo " *3proxy $RELEASE build" >>debian/changelog
echo " " >>debian/changelog
echo " -- z3APA3A <3apa3a@3proxy.org> "`date "+%a, %d %b %Y %H:%M:%S %z"` >>debian/changelog
echo "">>debian/changelog
dpkg-buildpackage
cd $ret
cp ~/debian/3proxy_$RELEASE-"$VERSION"_arm64.deb ./3proxy-$RELEASE.arm64.deb
- name: Get artifact deb
uses: actions/upload-artifact@v4
with:
name: "3proxy-${{ env.RELEASE }}-arm64.deb"
path: "*.deb"

View File

@ -1,8 +1,8 @@
name: RPM/DEB build armhf
name: RPM build arm
on:
push:
branches: [ "master", "test-ci" ]
branches: [ "master" ]
paths: [ 'RELEASE', '.github/workflows/build-rpm-armhf.yml' ]
jobs:
@ -49,25 +49,18 @@ jobs:
echo "Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg" >>~/ubuntu.sources
sudo cp ~/ubuntu.sources /etc/apt/sources.list.d/ubuntu.sources
sudo apt update
sudo apt install libssl3t64:armhf openssl:armhf libssl-dev:armhf libpam0g:armhf libpam0g-dev:armhf libpcre2-dev:armhf rpm crossbuild-essential-armhf build-essential debhelper
sudo apt install libssl-dev:armhf libpam0g:armhf libpam0g-dev:armhf libpcre2-dev:armhf rpm crossbuild-essential-armhf
- name: make rpmbuild dir
run: mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
- name: configure rpm env
run: |
mkdir ~/debian
mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
tar -czf ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz --transform "s,^,3proxy-$RELEASE/," .
ln -s ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz ~/rpmbuild/SOURCES/$RELEASE.tar.gz
cp scripts/rh/3proxy.spec ~/rpmbuild/SPECS/3proxy-$RELEASE.spec
cp ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz ~/debian/3proxy_$RELEASE.orig.tar.gz
- name: rpmbuild
run: |
ret=`pwd`
cd ~/rpmbuild/SPECS
PATH=/usr/arm-linux-gnueabihf/bin:$PATH
export PATH=$PATH
CC=arm-linux-gnueabihf-gcc
export CC=$CC
export RPATH=/usr/arm-linux-gnueabihf/lib:$RPATH
export LD_LIBRARY_PATH=/usr/arm-linux-gnueabihf/lib:$LD_LIBRARY_PATH
rpmbuild -ba --define "PAMLIB pam0g" --define "_arch arm" --define "cross yes" --target=arm-linux-gnueabi 3proxy-$RELEASE.spec
cd $ret
mv ~/rpmbuild/RPMS/arm/3proxy-$RELEASE-1.arm.rpm 3proxy-$RELEASE.arm.rpm
@ -76,29 +69,4 @@ jobs:
with:
name: "3proxy-${{ env.RELEASE }}-arm.rpm"
path: "*.rpm"
- name: debbuild
run: |
ret=`pwd`
cd ~/debian/
tar xzf 3proxy_$RELEASE.orig.tar.gz
cd 3proxy-$RELEASE
echo "3proxy ($RELEASE-$VERSION) buster; urgency=medium" >debian/changelog
echo " " >>debian/changelog
echo " *3proxy $RELEASE build" >>debian/changelog
echo " " >>debian/changelog
echo " -- z3APA3A <3apa3a@3proxy.org> "`date "+%a, %d %b %Y %H:%M:%S %z"` >>debian/changelog
echo "">>debian/changelog
PATH=/usr/arm-linux-gnueabihf/bin:$PATH
export PATH=$PATH
CC=arm-linux-gnueabihf-gcc
export CC=$CC
export RPATH=/usr/arm-linux-gnueabihf/lib:$RPATH
export LD_LIBRARY_PATH=/usr/arm-linux-gnueabihf/lib:$LD_LIBRARY_PATH
dpkg-buildpackage
cd $ret
cp ~/debian/3proxy_$RELEASE-"$VERSION"_armhf.deb ./3proxy-$RELEASE.arm.deb
- name: Get artifact deb
uses: actions/upload-artifact@v4
with:
name: "3proxy-${{ env.RELEASE }}-arm.deb"
path: "*.deb"

View File

@ -1,8 +1,8 @@
name: RPM/DEB build x86-64
name: RPM build x86-64
on:
push:
branches: [ "master", "test-ci" ]
branches: [ "master" ]
paths: [ 'RELEASE', '.github/workflows/build-rpm-x86-64.yml' ]
jobs:
@ -28,15 +28,14 @@ jobs:
- name: Linux libraries
run: |
sudo apt update
sudo apt install libssl-dev libpam-dev libpcre2-dev rpm build-essential debhelper
- name: configure rpm/deb env
sudo apt install libssl-dev libpam-dev libpcre2-dev rpm
- name: make rpmbuild dir
run: mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
- name: configure rpm env
run: |
mkdir ~/debian
mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
tar -czf ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz --transform "s,^,3proxy-$RELEASE/," .
ln -s ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz ~/rpmbuild/SOURCES/$RELEASE.tar.gz
cp scripts/rh/3proxy.spec ~/rpmbuild/SPECS/3proxy-$RELEASE.spec
cp ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz ~/debian/3proxy_$RELEASE.orig.tar.gz
- name: rpmbuild
run: |
ret=`pwd`
@ -44,29 +43,9 @@ jobs:
rpmbuild -ba 3proxy-$RELEASE.spec
cd $ret
mv ~/rpmbuild/RPMS/x86_64/3proxy-$RELEASE-1.x86_64.rpm 3proxy-$RELEASE.x86_64.rpm
- name: Get artifact rpm
- name: Get artifact
uses: actions/upload-artifact@v4
with:
name: "3proxy-${{ env.RELEASE }}-x86_64.rpm"
path: "*.rpm"
- name: debbuild
run: |
ret=`pwd`
cd ~/debian/
tar xzf 3proxy_$RELEASE.orig.tar.gz
cd 3proxy-$RELEASE
echo "3proxy ($RELEASE-$VERSION) buster; urgency=medium" >debian/changelog
echo " " >>debian/changelog
echo " *3proxy $RELEASE build" >>debian/changelog
echo " " >>debian/changelog
echo " -- z3APA3A <3apa3a@3proxy.org> "`date "+%a, %d %b %Y %H:%M:%S %z"` >>debian/changelog
echo "">>debian/changelog
dpkg-buildpackage
cd $ret
cp ~/debian/3proxy_$RELEASE-"$VERSION"_amd64.deb ./3proxy-$RELEASE.x86_64.deb
- name: Get artifact deb
uses: actions/upload-artifact@v4
with:
name: "3proxy-${{ env.RELEASE }}-x86_64.deb"
path: "*.deb"

View File

@ -485,15 +485,19 @@ install(TARGETS 3proxy mycrypt proxy socks pop3p smtpp ftppr tcppm udppm tlspr
)
# Install plugins
file(GLOB PLUGINFILES "${PLUGIN_OUTPUT_DIR}/*${PLUGIN_SUFFIX}")
if(WIN32)
install(FILES
${PLUGINFILES}
${PLUGIN_OUTPUT_DIR}/utf8tocp1251${PLUGIN_SUFFIX}
${PLUGIN_OUTPUT_DIR}/WindowsAuthentication${PLUGIN_SUFFIX}
${PLUGIN_OUTPUT_DIR}/TrafficPlugin${PLUGIN_SUFFIX}
${PLUGIN_OUTPUT_DIR}/StringsPlugin${PLUGIN_SUFFIX}
DESTINATION ${CMAKE_INSTALL_BINDIR}
)
else()
install(FILES
${PLUGINFILES}
${PLUGIN_OUTPUT_DIR}/StringsPlugin${PLUGIN_SUFFIX}
${PLUGIN_OUTPUT_DIR}/TrafficPlugin${PLUGIN_SUFFIX}
${PLUGIN_OUTPUT_DIR}/TransparentPlugin${PLUGIN_SUFFIX}
DESTINATION ${CMAKE_INSTALL_LIBDIR}/3proxy
)
endif()

View File

@ -4,6 +4,30 @@
# This file defines functions for building plugins
#
# Function to add a simple plugin (single source file, no dependencies)
function(add_3proxy_plugin_simple PLUGIN_NAME SOURCE_FILE)
if(WIN32)
set(PLUGIN_SUFFIX ".dll")
else()
set(PLUGIN_SUFFIX ".ld.so")
endif()
add_library(${PLUGIN_NAME} SHARED ${SOURCE_FILE})
set_target_properties(${PLUGIN_NAME} PROPERTIES
PREFIX ""
SUFFIX ${PLUGIN_SUFFIX}
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
)
target_link_libraries(${PLUGIN_NAME} PRIVATE Threads::Threads)
target_include_directories(${PLUGIN_NAME} PRIVATE
${CMAKE_SOURCE_DIR}/src
)
endfunction()
# Function to add a plugin with dependencies
function(add_3proxy_plugin PLUGIN_NAME)
set(options "")

4
debian/conffiles vendored
View File

@ -0,0 +1,4 @@
/usr/local/3proxy/conf/3proxy.cfg
/usr/local/3proxy/conf/add3proxyuser.sh
/usr/local/3proxy/conf/bandlimiters
/usr/local/3proxy/conf/counters

14
debian/postinst vendored
View File

@ -1,3 +1,10 @@
if [ ! -f /usr/local/3proxy/conf/passwd ]; then \
touch /usr/local/3proxy/conf/passwd;\
fi
chown -R proxy:proxy /usr/local/3proxy
chmod 550 /usr/local/3proxy/
chmod 550 /usr/local/3proxy/conf/
chmod 440 /usr/local/3proxy/conf/*
if /bin/systemctl >/dev/null 2>&1; then \
/usr/sbin/update-rc.d 3proxy disable || true; \
/usr/sbin/chkconfig 3proxy off || true; \
@ -27,3 +34,10 @@ elif [ -x /usr/sbin/service ]; then \
echo " "service 3proxy stop ;\
echo to stop proxy ;\
fi
echo " "/usr/local/3proxy/conf/add3proxyuser.sh
echo to add users
echo ""
echo Default config uses Google\'s DNS.
echo It\'s recommended to use provider supplied DNS or install local recursor, e.g. pdns-recursor.
echo Configure preferred DNS in /usr/local/3proxy/conf/3proxy.cfg.
echo run \'/usr/local/3proxy/conf/add3proxyuser.sh admin password\' to configure \'admin\' user

6
debian/rules vendored
View File

@ -3,8 +3,14 @@
%:
dh $@
override_dh_auto_build:
ln -s Makefile.Linux Makefile || true
dh_auto_build
override_dh_auto_clean:
find src/ -type f -name "*.o" -delete
find src/ -type f -name "Makefile.var" -delete
find bin/ -type f -executable -delete
rm -f Makefile
override_dh_usrlocal: