mirror of
https://github.com/3proxy/3proxy.git
synced 2026-04-12 16:00:11 +08:00
Compare commits
6 Commits
d27827adf6
...
2e10559cf3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2e10559cf3 | ||
|
|
9acb538721 | ||
|
|
8cb8be1be8 | ||
|
|
0381461495 | ||
|
|
483542b914 | ||
|
|
855c04d8f6 |
34
.github/workflows/build-rpm-arm64.yml
vendored
34
.github/workflows/build-rpm-arm64.yml
vendored
@ -1,8 +1,8 @@
|
|||||||
name: RPM build arm64
|
name: RPM/DEB build aarch64
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "master" ]
|
branches: [ "master", "test-ci" ]
|
||||||
paths: [ 'RELEASE', '.github/workflows/build-rpm-arm64.yml' ]
|
paths: [ 'RELEASE', '.github/workflows/build-rpm-arm64.yml' ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@ -28,14 +28,15 @@ jobs:
|
|||||||
- name: Linux libraries
|
- name: Linux libraries
|
||||||
run: |
|
run: |
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install libssl-dev libpam-dev libpcre2-dev rpm
|
sudo apt install libssl-dev libpam-dev libpcre2-dev rpm build-essential debhelper
|
||||||
- name: make rpmbuild dir
|
|
||||||
run: mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
|
|
||||||
- name: configure rpm env
|
- name: configure rpm env
|
||||||
run: |
|
run: |
|
||||||
|
mkdir ~/debian
|
||||||
|
mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
|
||||||
tar -czf ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz --transform "s,^,3proxy-$RELEASE/," .
|
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
|
ln -s ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz ~/rpmbuild/SOURCES/$RELEASE.tar.gz
|
||||||
cp scripts/rh/3proxy.spec ~/rpmbuild/SPECS/3proxy-$RELEASE.spec
|
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
|
- name: rpmbuild
|
||||||
run: |
|
run: |
|
||||||
ret=`pwd`
|
ret=`pwd`
|
||||||
@ -43,9 +44,28 @@ jobs:
|
|||||||
rpmbuild -ba 3proxy-$RELEASE.spec
|
rpmbuild -ba 3proxy-$RELEASE.spec
|
||||||
cd $ret
|
cd $ret
|
||||||
mv ~/rpmbuild/RPMS/aarch64/3proxy-$RELEASE-1.aarch64.rpm 3proxy-$RELEASE.arm64.rpm
|
mv ~/rpmbuild/RPMS/aarch64/3proxy-$RELEASE-1.aarch64.rpm 3proxy-$RELEASE.arm64.rpm
|
||||||
- name: Get artifact
|
- name: Get artifact arp
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: "3proxy-${{ env.RELEASE }}-arm64.rpm"
|
name: "3proxy-${{ env.RELEASE }}-arm64.rpm"
|
||||||
path: "*.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"
|
||||||
|
|||||||
44
.github/workflows/build-rpm-armhf.yml
vendored
44
.github/workflows/build-rpm-armhf.yml
vendored
@ -1,8 +1,8 @@
|
|||||||
name: RPM build arm
|
name: RPM/DEB build armhf
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "master" ]
|
branches: [ "master", "test-ci" ]
|
||||||
paths: [ 'RELEASE', '.github/workflows/build-rpm-armhf.yml' ]
|
paths: [ 'RELEASE', '.github/workflows/build-rpm-armhf.yml' ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@ -49,18 +49,25 @@ jobs:
|
|||||||
echo "Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg" >>~/ubuntu.sources
|
echo "Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg" >>~/ubuntu.sources
|
||||||
sudo cp ~/ubuntu.sources /etc/apt/sources.list.d/ubuntu.sources
|
sudo cp ~/ubuntu.sources /etc/apt/sources.list.d/ubuntu.sources
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install libssl-dev:armhf libpam0g:armhf libpam0g-dev:armhf libpcre2-dev:armhf rpm crossbuild-essential-armhf
|
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
|
||||||
- name: make rpmbuild dir
|
|
||||||
run: mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
|
|
||||||
- name: configure rpm env
|
- name: configure rpm env
|
||||||
run: |
|
run: |
|
||||||
|
mkdir ~/debian
|
||||||
|
mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
|
||||||
tar -czf ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz --transform "s,^,3proxy-$RELEASE/," .
|
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
|
ln -s ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz ~/rpmbuild/SOURCES/$RELEASE.tar.gz
|
||||||
cp scripts/rh/3proxy.spec ~/rpmbuild/SPECS/3proxy-$RELEASE.spec
|
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
|
- name: rpmbuild
|
||||||
run: |
|
run: |
|
||||||
ret=`pwd`
|
ret=`pwd`
|
||||||
cd ~/rpmbuild/SPECS
|
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
|
rpmbuild -ba --define "PAMLIB pam0g" --define "_arch arm" --define "cross yes" --target=arm-linux-gnueabi 3proxy-$RELEASE.spec
|
||||||
cd $ret
|
cd $ret
|
||||||
mv ~/rpmbuild/RPMS/arm/3proxy-$RELEASE-1.arm.rpm 3proxy-$RELEASE.arm.rpm
|
mv ~/rpmbuild/RPMS/arm/3proxy-$RELEASE-1.arm.rpm 3proxy-$RELEASE.arm.rpm
|
||||||
@ -69,4 +76,29 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: "3proxy-${{ env.RELEASE }}-arm.rpm"
|
name: "3proxy-${{ env.RELEASE }}-arm.rpm"
|
||||||
path: "*.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"
|
||||||
|
|||||||
35
.github/workflows/build-rpm-x86-64.yml
vendored
35
.github/workflows/build-rpm-x86-64.yml
vendored
@ -1,8 +1,8 @@
|
|||||||
name: RPM build x86-64
|
name: RPM/DEB build x86-64
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "master" ]
|
branches: [ "master", "test-ci" ]
|
||||||
paths: [ 'RELEASE', '.github/workflows/build-rpm-x86-64.yml' ]
|
paths: [ 'RELEASE', '.github/workflows/build-rpm-x86-64.yml' ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@ -28,14 +28,15 @@ jobs:
|
|||||||
- name: Linux libraries
|
- name: Linux libraries
|
||||||
run: |
|
run: |
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install libssl-dev libpam-dev libpcre2-dev rpm
|
sudo apt install libssl-dev libpam-dev libpcre2-dev rpm build-essential debhelper
|
||||||
- name: make rpmbuild dir
|
- name: configure rpm/deb env
|
||||||
run: mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
|
|
||||||
- name: configure rpm env
|
|
||||||
run: |
|
run: |
|
||||||
|
mkdir ~/debian
|
||||||
|
mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
|
||||||
tar -czf ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz --transform "s,^,3proxy-$RELEASE/," .
|
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
|
ln -s ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz ~/rpmbuild/SOURCES/$RELEASE.tar.gz
|
||||||
cp scripts/rh/3proxy.spec ~/rpmbuild/SPECS/3proxy-$RELEASE.spec
|
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
|
- name: rpmbuild
|
||||||
run: |
|
run: |
|
||||||
ret=`pwd`
|
ret=`pwd`
|
||||||
@ -43,9 +44,29 @@ jobs:
|
|||||||
rpmbuild -ba 3proxy-$RELEASE.spec
|
rpmbuild -ba 3proxy-$RELEASE.spec
|
||||||
cd $ret
|
cd $ret
|
||||||
mv ~/rpmbuild/RPMS/x86_64/3proxy-$RELEASE-1.x86_64.rpm 3proxy-$RELEASE.x86_64.rpm
|
mv ~/rpmbuild/RPMS/x86_64/3proxy-$RELEASE-1.x86_64.rpm 3proxy-$RELEASE.x86_64.rpm
|
||||||
- name: Get artifact
|
- name: Get artifact rpm
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: "3proxy-${{ env.RELEASE }}-x86_64.rpm"
|
name: "3proxy-${{ env.RELEASE }}-x86_64.rpm"
|
||||||
path: "*.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"
|
||||||
|
|
||||||
|
|||||||
@ -485,19 +485,15 @@ install(TARGETS 3proxy mycrypt proxy socks pop3p smtpp ftppr tcppm udppm tlspr
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Install plugins
|
# Install plugins
|
||||||
|
file(GLOB PLUGINFILES "${PLUGIN_OUTPUT_DIR}/*${PLUGIN_SUFFIX}")
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
install(FILES
|
install(FILES
|
||||||
${PLUGIN_OUTPUT_DIR}/utf8tocp1251${PLUGIN_SUFFIX}
|
${PLUGINFILES}
|
||||||
${PLUGIN_OUTPUT_DIR}/WindowsAuthentication${PLUGIN_SUFFIX}
|
|
||||||
${PLUGIN_OUTPUT_DIR}/TrafficPlugin${PLUGIN_SUFFIX}
|
|
||||||
${PLUGIN_OUTPUT_DIR}/StringsPlugin${PLUGIN_SUFFIX}
|
|
||||||
DESTINATION ${CMAKE_INSTALL_BINDIR}
|
DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||||
)
|
)
|
||||||
else()
|
else()
|
||||||
install(FILES
|
install(FILES
|
||||||
${PLUGIN_OUTPUT_DIR}/StringsPlugin${PLUGIN_SUFFIX}
|
${PLUGINFILES}
|
||||||
${PLUGIN_OUTPUT_DIR}/TrafficPlugin${PLUGIN_SUFFIX}
|
|
||||||
${PLUGIN_OUTPUT_DIR}/TransparentPlugin${PLUGIN_SUFFIX}
|
|
||||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/3proxy
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}/3proxy
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@ -4,30 +4,6 @@
|
|||||||
# This file defines functions for building plugins
|
# 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 to add a plugin with dependencies
|
||||||
function(add_3proxy_plugin PLUGIN_NAME)
|
function(add_3proxy_plugin PLUGIN_NAME)
|
||||||
set(options "")
|
set(options "")
|
||||||
|
|||||||
4
debian/conffiles
vendored
4
debian/conffiles
vendored
@ -1,4 +0,0 @@
|
|||||||
/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
14
debian/postinst
vendored
@ -1,10 +1,3 @@
|
|||||||
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 \
|
if /bin/systemctl >/dev/null 2>&1; then \
|
||||||
/usr/sbin/update-rc.d 3proxy disable || true; \
|
/usr/sbin/update-rc.d 3proxy disable || true; \
|
||||||
/usr/sbin/chkconfig 3proxy off || true; \
|
/usr/sbin/chkconfig 3proxy off || true; \
|
||||||
@ -34,10 +27,3 @@ elif [ -x /usr/sbin/service ]; then \
|
|||||||
echo " "service 3proxy stop ;\
|
echo " "service 3proxy stop ;\
|
||||||
echo to stop proxy ;\
|
echo to stop proxy ;\
|
||||||
fi
|
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
6
debian/rules
vendored
@ -3,14 +3,8 @@
|
|||||||
%:
|
%:
|
||||||
dh $@
|
dh $@
|
||||||
|
|
||||||
override_dh_auto_build:
|
|
||||||
ln -s Makefile.Linux Makefile || true
|
|
||||||
dh_auto_build
|
|
||||||
|
|
||||||
override_dh_auto_clean:
|
override_dh_auto_clean:
|
||||||
find src/ -type f -name "*.o" -delete
|
find src/ -type f -name "*.o" -delete
|
||||||
find src/ -type f -name "Makefile.var" -delete
|
find src/ -type f -name "Makefile.var" -delete
|
||||||
find bin/ -type f -executable -delete
|
find bin/ -type f -executable -delete
|
||||||
rm -f Makefile
|
|
||||||
|
|
||||||
override_dh_usrlocal:
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user