Compare commits

...

2 Commits

Author SHA1 Message Date
Vladimir Dubrovin
bdf9946fe5 Add dockers build
Some checks are pending
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
2026-05-30 17:05:43 +03:00
Vladimir Dubrovin
eab5758b51 Fix deb/rpm builds 2026-05-30 16:22:39 +03:00
14 changed files with 214 additions and 28 deletions

View File

@ -1,6 +1,9 @@
name: RPM/DEB build aarch64
on:
push:
paths:
- 'RELEASE'
workflow_dispatch:
jobs:

View File

@ -1,6 +1,9 @@
name: RPM/DEB build armhf
on:
push:
paths:
- 'RELEASE'
workflow_dispatch:
jobs:

View File

@ -1,6 +1,9 @@
name: RPM/DEB build x86-64
on:
push:
paths:
- 'RELEASE'
workflow_dispatch:
jobs:

View File

@ -1,6 +1,9 @@
name: Build Win32 3proxy-lite with Watcom
on:
push:
paths:
- 'RELEASE'
workflow_dispatch:
jobs:

View File

@ -1,6 +1,9 @@
name: Build Win32 3proxy with MSVC
on:
push:
paths:
- 'RELEASE'
workflow_dispatch:
jobs:

View File

@ -1,6 +1,9 @@
name: Build Win64 3proxy with MSVC
on:
push:
paths:
- 'RELEASE'
workflow_dispatch:
jobs:

View File

@ -1,6 +1,9 @@
name: Build Win-arm64 3proxy with MSVC
on:
push:
paths:
- 'RELEASE'
workflow_dispatch:
jobs:

81
.github/workflows/docker-ghcr.yml vendored Normal file
View File

@ -0,0 +1,81 @@
name: Build Docker images (GHCR)
on:
push:
branches: [master]
paths:
- 'RELEASE'
workflow_dispatch:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build:
name: Build and push Docker images
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Determine tags
id: tags
env:
REF: ${{ github.ref }}
IMAGE: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
run: |
if [[ "$REF" == refs/tags/* ]]; then
RELEASE=$(cat RELEASE)
echo "minimal=${IMAGE}:${RELEASE}.minimal,${IMAGE}:minimal" >> "$GITHUB_OUTPUT"
echo "busybox=${IMAGE}:${RELEASE}.busybox,${IMAGE}:busybox" >> "$GITHUB_OUTPUT"
echo "full=${IMAGE}:${RELEASE},${IMAGE}:latest" >> "$GITHUB_OUTPUT"
else
echo "minimal=${IMAGE}:devel.minimal" >> "$GITHUB_OUTPUT"
echo "busybox=${IMAGE}:devel.busybox" >> "$GITHUB_OUTPUT"
echo "full=${IMAGE}:devel" >> "$GITHUB_OUTPUT"
fi
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GHCR
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push minimal
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile.minimal
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.tags.outputs.minimal }}
- name: Build and push busybox
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile.busybox
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.tags.outputs.busybox }}
- name: Build and push full
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile.full
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.tags.outputs.full }}

78
.github/workflows/docker.yml vendored Normal file
View File

@ -0,0 +1,78 @@
name: Build Docker images (Docker Hub)
on:
push:
branches: [master]
paths:
- 'RELEASE'
workflow_dispatch:
env:
REGISTRY: docker.io
IMAGE_NAME: 3proxy/3proxy
jobs:
build:
name: Build and push Docker images
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Determine tags
id: tags
env:
REF: ${{ github.ref }}
run: |
if [[ "$REF" == refs/tags/* ]]; then
RELEASE=$(cat RELEASE)
echo "minimal=${REGISTRY}/${IMAGE_NAME}:${RELEASE}.minimal,${REGISTRY}/${IMAGE_NAME}:minimal" >> "$GITHUB_OUTPUT"
echo "busybox=${REGISTRY}/${IMAGE_NAME}:${RELEASE}.busybox,${REGISTRY}/${IMAGE_NAME}:busybox" >> "$GITHUB_OUTPUT"
echo "full=${REGISTRY}/${IMAGE_NAME}:${RELEASE},${REGISTRY}/${IMAGE_NAME}:latest" >> "$GITHUB_OUTPUT"
else
echo "minimal=${REGISTRY}/${IMAGE_NAME}:devel.minimal" >> "$GITHUB_OUTPUT"
echo "busybox=${REGISTRY}/${IMAGE_NAME}:devel.busybox" >> "$GITHUB_OUTPUT"
echo "full=${REGISTRY}/${IMAGE_NAME}:devel" >> "$GITHUB_OUTPUT"
fi
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push minimal
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile.minimal
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.tags.outputs.minimal }}
- name: Build and push busybox
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile.busybox
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.tags.outputs.busybox }}
- name: Build and push full
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile.full
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.tags.outputs.full }}

View File

@ -64,20 +64,20 @@ endif()
# For crypt: if prefix is empty, "my" is used instead ( mycrypt)
set(3PROXY_BINARY_PREFIX "3proxy_" CACHE STRING "Prefix for standalone module and crypt binary names")
# Standalone module build options (OFF by default)
option(3PROXY_BUILD_ALL "Build all standalone binaries" OFF)
option(3PROXY_BUILD_PROXY "Build standalone proxy binary" OFF)
option(3PROXY_BUILD_SOCKS "Build standalone socks binary" OFF)
option(3PROXY_BUILD_POP3P "Build standalone pop3p binary" OFF)
option(3PROXY_BUILD_SMTPP "Build standalone smtpp binary" OFF)
option(3PROXY_BUILD_FTPPR "Build standalone ftppr binary" OFF)
option(3PROXY_BUILD_TCPPM "Build standalone tcppm binary" OFF)
option(3PROXY_BUILD_UDPPM "Build standalone udppm binary" OFF)
option(3PROXY_BUILD_TLSPR "Build standalone tlspr binary" OFF)
# Standalone module build options (ON by default)
option(3PROXY_BUILD_NONE "Do not build standalone binaries" OFF)
option(3PROXY_BUILD_PROXY "Build standalone proxy binary" ON)
option(3PROXY_BUILD_SOCKS "Build standalone socks binary" ON)
option(3PROXY_BUILD_POP3P "Build standalone pop3p binary" ON)
option(3PROXY_BUILD_SMTPP "Build standalone smtpp binary" ON)
option(3PROXY_BUILD_FTPPR "Build standalone ftppr binary" ON)
option(3PROXY_BUILD_TCPPM "Build standalone tcppm binary" ON)
option(3PROXY_BUILD_UDPPM "Build standalone udppm binary" ON)
option(3PROXY_BUILD_TLSPR "Build standalone tlspr binary" ON)
if(3PROXY_BUILD_ALL)
if(3PROXY_BUILD_NONE)
foreach(_M PROXY SOCKS POP3P SMTPP FTPPR TCPPM UDPPM TLSPR)
set(3PROXY_BUILD_${_M} ON)
set(3PROXY_BUILD_${_M} OFF)
endforeach()
endif()

View File

@ -1,11 +0,0 @@
man/3proxy.8
man/3proxy.cfg.5
man/3proxy_ftppr.8
man/3proxy_pop3p.8
man/3proxy_tlspr.8
man/3proxy_proxy.8
man/3proxy_smtpp.8
man/3proxy_socks.8
man/3proxy_tcppm.8
man/3proxy_udppm.8
man/3proxy_crypt.8

4
debian/conffiles vendored
View File

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

21
debian/rules vendored
View File

@ -3,8 +3,21 @@
%:
dh $@
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
override_dh_auto_configure:
ln -sf Makefile.Linux Makefile
override_dh_auto_build:
$(MAKE)
override_dh_auto_install:
$(MAKE) DESTDIR=debian/3proxy install
override_dh_installman:
override_dh_usrlocal:
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

View File

@ -50,7 +50,7 @@ make clean
%config(noreplace) /usr/local/3proxy/conf/bandlimiters
%config(noreplace) /usr/local/3proxy/conf/counters
/usr/local/3proxy/libexec/*.ld.so
/usr/share/man/man5/3proxy.cfg.5
/usr/share/man/man5/3proxy.cfg.5*
/usr/share/man/man8/*
/var/log/3proxy