diff --git a/.github/workflows/build-rpm-arm64.yml b/.github/workflows/build-rpm-arm64.yml
new file mode 100644
index 0000000..caf34c5
--- /dev/null
+++ b/.github/workflows/build-rpm-arm64.yml
@@ -0,0 +1,71 @@
+name: RPM/DEB build aarch64
+
+on:
+ push:
+ branches: [ "master", "test-ci" ]
+ paths: [ 'RELEASE', '.github/workflows/build-rpm-arm64.yml' ]
+
+jobs:
+ ci:
+ name: "${{ matrix.target }}"
+ strategy:
+ matrix:
+ target:
+ - ubuntu-24.04-arm
+ runs-on: ${{ matrix.target }}
+ steps:
+ - uses: actions/checkout@v5
+ - name: env
+ run: |
+ pwd
+ echo "RELEASE=$(cat RELEASE)" >> $GITHUB_ENV
+ echo "VERSION=$(date +%y%m%d%H%M%S)" >> $GITHUB_ENV
+ echo "MAJOR=$(cat RELEASE | cut -d "-" -f 1)" >> $GITHUB_ENV
+ echo "SUBMAJOR=$(cat RELEASE | cut -d "-" -f 2)" >> $GITHUB_ENV
+ echo "MINOR=$(cat RELEASE | cut -d "-" -f 3)" >> $GITHUB_ENV
+ - name: echo env
+ run: echo "release $RELEASE version $VERSION major $MAJOR submajor $SUBMAJOR minor $MINOR"
+ - name: Linux libraries
+ run: |
+ sudo apt update
+ sudo apt install libssl-dev libpam-dev libpcre2-dev rpm build-essential debhelper
+ - 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
+ rpmbuild -ba 3proxy-$RELEASE.spec
+ cd $ret
+ mv ~/rpmbuild/RPMS/aarch64/3proxy-$RELEASE-1.aarch64.rpm 3proxy-$RELEASE.arm64.rpm
+ - name: Get artifact arp
+ uses: actions/upload-artifact@v6
+ 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@v6
+ with:
+ name: "3proxy-${{ env.RELEASE }}-arm64.deb"
+ path: "*.deb"
diff --git a/.github/workflows/build-rpm-armhf.yml b/.github/workflows/build-rpm-armhf.yml
new file mode 100644
index 0000000..7c94445
--- /dev/null
+++ b/.github/workflows/build-rpm-armhf.yml
@@ -0,0 +1,104 @@
+name: RPM/DEB build armhf
+
+on:
+ push:
+ branches: [ "master", "test-ci" ]
+ paths: [ 'RELEASE', '.github/workflows/build-rpm-armhf.yml' ]
+
+jobs:
+ ci:
+ name: "${{ matrix.target }}"
+ strategy:
+ matrix:
+ target:
+ - ubuntu-latest
+ runs-on: ${{ matrix.target }}
+ steps:
+ - uses: actions/checkout@v5
+ - name: env
+ run: |
+ pwd
+ echo "RELEASE=$(cat RELEASE)" >> $GITHUB_ENV
+ echo "VERSION=$(date +%y%m%d%H%M%S)" >> $GITHUB_ENV
+ echo "MAJOR=$(cat RELEASE | cut -d "-" -f 1)" >> $GITHUB_ENV
+ echo "SUBMAJOR=$(cat RELEASE | cut -d "-" -f 2)" >> $GITHUB_ENV
+ echo "MINOR=$(cat RELEASE | cut -d "-" -f 3)" >> $GITHUB_ENV
+ - name: Linux libraries
+ run: |
+ sudo apt update
+ sudo dpkg --add-architecture armhf
+ echo "Types: deb" > ~/ubuntu.sources
+ echo "URIs: http://archive.ubuntu.com/ubuntu/" >> ~/ubuntu.sources
+ echo "Suites: noble noble-updates noble-backports" >> ~/ubuntu.sources
+ echo "Components: main restricted universe multiverse" >> ~/ubuntu.sources
+ echo "Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg" >> ~/ubuntu.sources
+ echo "Architectures: amd64" >> ~/ubuntu.sources
+ echo "" >> ~/ubuntu.sources
+ echo "Types: deb" >> ~/ubuntu.sources
+ echo "URIs: http://security.ubuntu.com/ubuntu/" >> ~/ubuntu.sources
+ echo "Suites: noble-security" >> ~/ubuntu.sources
+ echo "Components: main restricted universe multiverse" >> ~/ubuntu.sources
+ echo "Architectures: amd64" >> ~/ubuntu.sources
+ echo "Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg" >> ~/ubuntu.sources
+ echo "" >> ~/ubuntu.sources
+ echo "Types: deb" >>~/ubuntu.sources
+ echo "URIs: http://ports.ubuntu.com/ubuntu-ports/" >>~/ubuntu.sources
+ echo "Suites: noble noble-updates" >>~/ubuntu.sources
+ echo "Components: main restricted universe multiverse" >>~/ubuntu.sources
+ echo "Architectures: armhf" >>~/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 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
+ - 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
+ - name: Get artifact
+ uses: actions/upload-artifact@v6
+ 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@v6
+ with:
+ name: "3proxy-${{ env.RELEASE }}-arm.deb"
+ path: "*.deb"
diff --git a/.github/workflows/build-rpm-x86-64.yml b/.github/workflows/build-rpm-x86-64.yml
new file mode 100644
index 0000000..315a172
--- /dev/null
+++ b/.github/workflows/build-rpm-x86-64.yml
@@ -0,0 +1,72 @@
+name: RPM/DEB build x86-64
+
+on:
+ push:
+ branches: [ "master", "test-ci" ]
+ paths: [ 'RELEASE', '.github/workflows/build-rpm-x86-64.yml' ]
+
+jobs:
+ ci:
+ name: "${{ matrix.target }}"
+ strategy:
+ matrix:
+ target:
+ - ubuntu-latest
+ runs-on: ${{ matrix.target }}
+ steps:
+ - uses: actions/checkout@v5
+ - name: env
+ run: |
+ pwd
+ echo "RELEASE=$(cat RELEASE)" >> $GITHUB_ENV
+ echo "VERSION=$(date +%y%m%d%H%M%S)" >> $GITHUB_ENV
+ echo "MAJOR=$(cat RELEASE | cut -d "-" -f 1)" >> $GITHUB_ENV
+ echo "SUBMAJOR=$(cat RELEASE | cut -d "-" -f 2)" >> $GITHUB_ENV
+ echo "MINOR=$(cat RELEASE | cut -d "-" -f 3)" >> $GITHUB_ENV
+ - name: echo env
+ run: echo "release $RELEASE version $VERSION major $MAJOR submajor $SUBMAJOR minor $MINOR"
+ - 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
+ 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
+ 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
+ uses: actions/upload-artifact@v6
+ 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@v6
+ with:
+ name: "3proxy-${{ env.RELEASE }}-x86_64.deb"
+ path: "*.deb"
+
diff --git a/.github/workflows/build-watcom.yml b/.github/workflows/build-watcom.yml
new file mode 100644
index 0000000..0f23251
--- /dev/null
+++ b/.github/workflows/build-watcom.yml
@@ -0,0 +1,70 @@
+name: Build Win32 3proxy-lite with Watcom
+
+on:
+ push:
+ branches: [ "master" ]
+ paths: [ 'RELEASE', '.github/workflows/build-watcom.yml' ]
+
+jobs:
+ ci:
+ name: "${{ matrix.target }}"
+ strategy:
+ matrix:
+ target:
+ - windows-2022
+ runs-on: ${{ matrix.target }}
+ steps:
+ - uses: actions/checkout@v5
+# - name: configure
+# run: ./configure
+ - name: Setup Open Watcom
+ uses: open-watcom/setup-watcom@v0
+ - name: set date
+ run: |
+ $NOW = Get-Date -Format "yyMMddHHmmss"
+ echo "now: $NOW"
+ $RELEASE = Get-Content -Path "RELEASE" -Raw
+ echo "release: $RELEASE"
+ echo "RELEASE=$RELEASE" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
+ echo "VERSION=/D `"VERSION=\`"3proxy-$RELEASE\`"`"" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
+ echo "BUILDDATE=/D `"BUILDDATE=\`"$NOW\`"`"" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
+ - name: make Watcom
+ shell: cmd
+ run: |
+ echo "volatile char VerSion[]=^"3APA3A-3proxy-Internal-Build: 3proxy-%RELEASE%-%NOW%\r\nCode certificate: https://3proxy.org/3proxy.cer\r\n^";" >>src/3proxy.c
+ nmake /F Makefile.watcom
+ - name: make dist dir
+ shell: cmd
+ run: |
+ mkdir dist
+ mkdir dist\3proxy
+ mkdir dist\3proxy\bin
+ mkdir dist\3proxy\cfg
+ mkdir dist\3proxy\cfg\sql
+ mkdir dist\3proxy\doc
+ mkdir dist\3proxy\doc\ru
+ mkdir dist\3proxy\doc\html
+ mkdir dist\3proxy\doc\html\plugins
+ mkdir dist\3proxy\doc\html\man5
+ mkdir dist\3proxy\doc\html\man8
+ mkdir dist\3proxy\doc\devel
+ copy bin\3proxy.exe dist\3proxy\bin\
+ copy bin\*.dll dist\3proxy\bin\
+ copy bin\mycrypt.exe dist\3proxy\bin\
+ copy cfg\*.* dist\3proxy\cfg\
+ copy cfg\sql\*.* dist\3proxy\cfg\sql\
+ copy doc\ru\*.* dist\3proxy\doc\ru\
+ copy doc\html\*.* dist\3proxy\doc\html\
+ copy doc\html\plugins\*.* dist\3proxy\doc\html\plugins\
+ copy doc\html\man8\*.* dist\3proxy\doc\html\man8\
+ copy doc\html\man5\*.* dist\3proxy\doc\html\man5\
+ copy doc\devel\*.rtf dist\3proxy\doc\devel\
+ copy copying dist\3proxy\
+ copy authors dist\3proxy\
+ copy README dist\3proxy\
+ copy rus.3ps dist\3proxy\
+ - name: Get artifact
+ uses: actions/upload-artifact@v6
+ with:
+ name: "3proxy-${{ env.RELEASE }}-lite"
+ path: dist/
diff --git a/.github/workflows/build-win32.yml b/.github/workflows/build-win32.yml
new file mode 100644
index 0000000..6f35716
--- /dev/null
+++ b/.github/workflows/build-win32.yml
@@ -0,0 +1,76 @@
+name: Build Win32 3proxy with MSVC
+
+on:
+ push:
+ branches: [ "master" ]
+ paths: [ 'RELEASE', '.github/workflows/build-win32.yml' ]
+
+jobs:
+ ci:
+ name: "${{ matrix.target }}"
+ strategy:
+ matrix:
+ target:
+ - windows-2022
+ runs-on: ${{ matrix.target }}
+ steps:
+ - uses: actions/checkout@v5
+# - name: configure
+# run: ./configure
+ - name: set date
+ run: |
+ $NOW = Get-Date -Format "yyMMddHHmmss"
+ $RELEASE = Get-Content -Path "RELEASE" -Raw
+ echo "RELEASE=$RELEASE" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
+ echo "VERSION=/D `"VERSION=\`"3proxy-$RELEASE\`"`"" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
+ echo "BUILDDATE=/D `"BUILDDATE=\`"$NOW\`"`"" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
+ - name: install packages
+ run: vcpkg install pcre2:x86-windows-static openssl:x86-windows-static
+ - name: Add msbuild to PATH
+ uses: microsoft/setup-msbuild@v3
+ - name: make Windows MSVC
+ if: ${{ startsWith(matrix.target, 'windows') }}
+ shell: cmd
+ run: |
+ call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars32.bat"
+ D:
+ cd "D:/a/3proxy/3proxy"
+ set "LIB=%LIB%;c:/vcpkg/installed/x86-windows-static/lib"
+ set "INCLUDE=%INCLUDE%;c:/vcpkg/installed/x86-windows-static/include"
+ echo "volatile char VerSion[]=^"3APA3A-3proxy-Internal-Build: 3proxy-%RELEASE%-%NOW%\r\nCode certificate: https://3proxy.org/3proxy.cer\r\n^";" >>src/3proxy.c
+ nmake /F Makefile.msvc
+ - name: make dist dir
+ shell: cmd
+ run: |
+ mkdir dist
+ mkdir dist\3proxy
+ mkdir dist\3proxy\bin
+ mkdir dist\3proxy\cfg
+ mkdir dist\3proxy\cfg\sql
+ mkdir dist\3proxy\doc
+ mkdir dist\3proxy\doc\ru
+ mkdir dist\3proxy\doc\html
+ mkdir dist\3proxy\doc\html\plugins
+ mkdir dist\3proxy\doc\html\man5
+ mkdir dist\3proxy\doc\html\man8
+ mkdir dist\3proxy\doc\devel
+ copy bin\3proxy.exe dist\3proxy\bin\
+ copy bin\*.dll dist\3proxy\bin\
+ copy bin\mycrypt.exe dist\3proxy\bin\
+ copy cfg\*.* dist\3proxy\cfg\
+ copy cfg\sql\*.* dist\3proxy\cfg\sql\
+ copy doc\ru\*.* dist\3proxy\doc\ru\
+ copy doc\html\*.* dist\3proxy\doc\html\
+ copy doc\html\plugins\*.* dist\3proxy\doc\html\plugins\
+ copy doc\html\man8\*.* dist\3proxy\doc\html\man8\
+ copy doc\html\man5\*.* dist\3proxy\doc\html\man5\
+ copy doc\devel\*.rtf dist\3proxy\doc\devel\
+ copy copying dist\3proxy\
+ copy authors dist\3proxy\
+ copy README dist\3proxy\
+ copy rus.3ps dist\3proxy\
+ - name: Get artifact
+ uses: actions/upload-artifact@v6
+ with:
+ name: "3proxy-${{ env.RELEASE }}"
+ path: dist/
diff --git a/.github/workflows/build-win64.yml b/.github/workflows/build-win64.yml
new file mode 100644
index 0000000..84933b4
--- /dev/null
+++ b/.github/workflows/build-win64.yml
@@ -0,0 +1,78 @@
+name: Build Win64 3proxy with MSVC
+
+on:
+ push:
+ branches: [ "master" ]
+ paths: [ 'RELEASE', '.github/workflows/build-win64.yml' ]
+
+jobs:
+ ci:
+ name: "${{ matrix.target }}"
+ strategy:
+ matrix:
+ target:
+ - windows-2022
+ runs-on: ${{ matrix.target }}
+ steps:
+ - uses: actions/checkout@v5
+# - name: configure
+# run: ./configure
+ - name: set date
+ run: |
+ $NOW = Get-Date -Format "yyMMddHHmmss"
+ $RELEASE = Get-Content -Path "RELEASE" -Raw
+ echo "NOW=$NOW" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
+ echo "RELEASE=$RELEASE" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
+ echo "VERSION=/D `"VERSION=\`"3proxy-$RELEASE\`"`"" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
+ echo "BUILDDATE=/D `"BUILDDATE=\`"$NOW\`"`"" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
+ - name: install packages
+ run: vcpkg install pcre2:x64-windows-static openssl:x64-windows-static
+ - name: Add msbuild to PATH
+ uses: microsoft/setup-msbuild@v3
+ - name: make Windows MSVC
+ if: ${{ startsWith(matrix.target, 'windows') }}
+ shell: cmd
+ run: |
+ call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
+ D:
+ cd "D:/a/3proxy/3proxy"
+ set "LIB=%LIB%;c:/vcpkg/installed/x64-windows-static/lib"
+ set "INCLUDE=%INCLUDE%;c:/vcpkg/installed/x64-windows-static/include"
+ echo "volatile char VerSion[]=^"3APA3A-3proxy-Internal-Build: 3proxy-%RELEASE%-%NOW%\r\nCode certificate: https://3proxy.org/3proxy.cer\r\n^";" >>src/3proxy.c
+ echo %NOW% / %RELEASE% / %BUILDDATE% / %VERSION%
+ nmake /F Makefile.msvc
+ - name: make dist dir
+ shell: cmd
+ run: |
+ mkdir dist
+ mkdir dist\3proxy
+ mkdir dist\3proxy\bin64
+ mkdir dist\3proxy\cfg
+ mkdir dist\3proxy\cfg\sql
+ mkdir dist\3proxy\doc
+ mkdir dist\3proxy\doc\ru
+ mkdir dist\3proxy\doc\html
+ mkdir dist\3proxy\doc\html\plugins
+ mkdir dist\3proxy\doc\html\man5
+ mkdir dist\3proxy\doc\html\man8
+ mkdir dist\3proxy\doc\devel
+ copy bin\3proxy.exe dist\3proxy\bin64\
+ copy bin\*.dll dist\3proxy\bin64\
+ copy bin\mycrypt.exe dist\3proxy\bin64\
+ copy cfg\*.* dist\3proxy\cfg\
+ copy cfg\sql\*.* dist\3proxy\cfg\sql\
+ copy doc\ru\*.* dist\3proxy\doc\ru\
+ copy doc\html\*.* dist\3proxy\doc\html\
+ copy doc\html\plugins\*.* dist\3proxy\doc\html\plugins\
+ copy doc\html\man8\*.* dist\3proxy\doc\html\man8\
+ copy doc\html\man5\*.* dist\3proxy\doc\html\man5\
+ copy doc\devel\*.rtf dist\3proxy\doc\devel\
+ copy copying dist\3proxy\
+ copy authors dist\3proxy\
+ copy README dist\3proxy\
+ copy rus.3ps dist\3proxy\
+ - name: Get artifact
+ uses: actions/upload-artifact@v6
+ with:
+ name: "3proxy-${{ env.RELEASE }}-x64"
+ path: dist/
diff --git a/.github/workflows/build-winarm64.yml b/.github/workflows/build-winarm64.yml
new file mode 100644
index 0000000..6a90abd
--- /dev/null
+++ b/.github/workflows/build-winarm64.yml
@@ -0,0 +1,76 @@
+name: Build Win-arm64 3proxy with MSVC
+
+on:
+ push:
+ branches: [ "master" ]
+ paths: [ 'RELEASE', '.github/workflows/build-winarm64.yml' ]
+
+jobs:
+ ci:
+ name: "${{ matrix.target }}"
+ strategy:
+ matrix:
+ target:
+ - windows-2022
+ runs-on: ${{ matrix.target }}
+ steps:
+ - uses: actions/checkout@v5
+# - name: configure
+# run: ./configure
+ - name: set date
+ run: |
+ $NOW = Get-Date -Format "yyMMddHHmmss"
+ $RELEASE = Get-Content -Path "RELEASE" -Raw
+ echo "RELEASE=$RELEASE" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
+ echo "VERSION=/D `"VERSION=\`"3proxy-$RELEASE\`"`"" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
+ echo "BUILDDATE=/D `"BUILDDATE=\`"$NOW\`"`"" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
+ - name: install packages
+ run: vcpkg install pcre2:arm64-windows-static openssl:arm64-windows-static
+ - name: Add msbuild to PATH
+ uses: microsoft/setup-msbuild@v3
+ - name: make Windows MSVC
+ if: ${{ startsWith(matrix.target, 'windows') }}
+ shell: cmd
+ run: |
+ call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsx86_arm64.bat"
+ D:
+ cd "D:/a/3proxy/3proxy"
+ set "LIB=%LIB%;c:/vcpkg/installed/arm64-windows-static/lib"
+ set "INCLUDE=%INCLUDE%;c:/vcpkg/installed/arm64-windows-static/include"
+ echo "volatile char VerSion[]=^"3APA3A-3proxy-Internal-Build: 3proxy-%RELEASE%-%NOW%\r\nCode certificate: https://3proxy.org/3proxy.cer\r\n^";" >>src/3proxy.c
+ nmake /F Makefile.msvc
+ - name: make dist dir
+ shell: cmd
+ run: |
+ mkdir dist
+ mkdir dist\3proxy
+ mkdir dist\3proxy\bin64
+ mkdir dist\3proxy\cfg
+ mkdir dist\3proxy\cfg\sql
+ mkdir dist\3proxy\doc
+ mkdir dist\3proxy\doc\ru
+ mkdir dist\3proxy\doc\html
+ mkdir dist\3proxy\doc\html\plugins
+ mkdir dist\3proxy\doc\html\man5
+ mkdir dist\3proxy\doc\html\man8
+ mkdir dist\3proxy\doc\devel
+ copy bin\3proxy.exe dist\3proxy\bin64\
+ copy bin\*.dll dist\3proxy\bin64\
+ copy bin\mycrypt.exe dist\3proxy\bin64\
+ copy cfg\*.* dist\3proxy\cfg\
+ copy cfg\sql\*.* dist\3proxy\cfg\sql\
+ copy doc\ru\*.* dist\3proxy\doc\ru\
+ copy doc\html\*.* dist\3proxy\doc\html\
+ copy doc\html\plugins\*.* dist\3proxy\doc\html\plugins\
+ copy doc\html\man8\*.* dist\3proxy\doc\html\man8\
+ copy doc\html\man5\*.* dist\3proxy\doc\html\man5\
+ copy doc\devel\*.rtf dist\3proxy\doc\devel\
+ copy copying dist\3proxy\
+ copy authors dist\3proxy\
+ copy README dist\3proxy\
+ copy rus.3ps dist\3proxy\
+ - name: Get artifact
+ uses: actions/upload-artifact@v6
+ with:
+ name: "3proxy-${{ env.RELEASE }}-arm64"
+ path: dist/
diff --git a/.github/workflows/c-cpp-Linux.yml b/.github/workflows/c-cpp-Linux.yml
new file mode 100644
index 0000000..4d5c1f0
--- /dev/null
+++ b/.github/workflows/c-cpp-Linux.yml
@@ -0,0 +1,34 @@
+name: C/C++ CI Linux
+
+on:
+ push:
+ branches: [ "master" ]
+ paths: [ '**.c', '**.h', 'Makefile.Linux', '.github/configs', '.github/workflows/c-cpp-Linux.yml' ]
+ pull_request:
+ branches: [ "master" ]
+ paths: [ '**.c', '**.h', 'Makefile.Linux', '.github/configs', '.github/workflows/c-cpp-Linux.yml' ]
+
+jobs:
+ ci:
+ name: "${{ matrix.target }}"
+ strategy:
+ matrix:
+ target:
+ - ubuntu-latest
+ - ubuntu-24.04-arm
+ runs-on: ${{ matrix.target }}
+ steps:
+ - uses: actions/checkout@v5
+# - name: configure
+# run: ./configure
+ - name: Linux libraries
+ if: ${{ startsWith(matrix.target, 'ubuntu') }}
+ run: sudo apt install libssl-dev libpam-dev libpcre2-dev
+ - name: make
+ run: make -f Makefile.Linux
+ - name: mkdir
+ run: mkdir ~/3proxy
+ - name: make install
+ run: make -f Makefile.Linux DESTDIR=~/3proxy install
+ - name: make clean Linux
+ run: make -f Makefile.Linux clean
diff --git a/.github/workflows/c-cpp-MacOS.yml b/.github/workflows/c-cpp-MacOS.yml
new file mode 100644
index 0000000..06ee52a
--- /dev/null
+++ b/.github/workflows/c-cpp-MacOS.yml
@@ -0,0 +1,31 @@
+name: C/C++ CI MacOS
+
+on:
+ push:
+ branches: [ "master" ]
+ paths: [ '**.c', '**.h', 'Makefile.FreeBSD', '.github/configs', '.github/workflows/c-cpp-MacOS.yml' ]
+ pull_request:
+ branches: [ "master" ]
+ paths: [ '**.c', '**.h', 'Makefile.FreeBSD', '.github/configs', '.github/workflows/c-cpp-MacOS.yml' ]
+
+jobs:
+ ci:
+ name: "${{ matrix.target }}"
+ strategy:
+ matrix:
+ target:
+ - macos-15
+ runs-on: ${{ matrix.target }}
+ steps:
+ - uses: actions/checkout@v5
+# - name: configure
+# run: ./configure
+ - name: Mac libraries
+ run: brew install pcre2
+ - name: make MacOS
+ run: make -f Makefile.FreeBSD
+ env:
+ LDFLAGS: "-L/usr/local/lib -L/opt/homebrew/lib -L/opt/homebrew/opt/openssl/lib"
+ CFLAGS: "-I/usr/local/include -I/opt/homebrew/include -I/usr/local/opt/openssl/include -I/opt/homebrew/opt/openssl/include"
+ - name: make clean MacOS
+ run: make -f Makefile.FreeBSD clean
diff --git a/.github/workflows/c-cpp-Windows.yml b/.github/workflows/c-cpp-Windows.yml
new file mode 100644
index 0000000..242b7c4
--- /dev/null
+++ b/.github/workflows/c-cpp-Windows.yml
@@ -0,0 +1,41 @@
+name: C/C++ CI Windows
+
+on:
+ push:
+ branches: [ "master" ]
+ paths: [ '**.c', '**.h', 'Makefile.msvc', '.github/configs', '.github/workflows/c-cpp-Windows.yml' ]
+ pull_request:
+ branches: [ "master" ]
+ paths: [ '**.c', '**.h', 'Makefile.msvc', '.github/configs', '.github/workflows/c-cpp-Windows.yml' ]
+
+jobs:
+ ci:
+ name: "${{ matrix.target }}"
+ strategy:
+ matrix:
+ target:
+ - windows-2022
+ runs-on: ${{ matrix.target }}
+ steps:
+ - uses: actions/checkout@v5
+ - name: install Windows libraries
+ run: vcpkg install pcre2:x64-windows && c:\msys64\usr\bin\pacman.exe -S --noconfirm mingw-w64-x86_64-pcre2 mingw-w64-x86_64-openssl
+ - name: make Windows
+ run: make -f Makefile.win
+ env:
+ LDFLAGS: '-L "c:/msys64/mingw64/lib"'
+ CFLAGS: '-I "c:/msys64/mingw64/include"'
+ - name: make clean Windows
+ run: make -f Makefile.win clean
+ - name: Add msbuild to PATH
+ uses: microsoft/setup-msbuild@v3
+ - name: make Windows MSVC
+ shell: cmd
+ run: |
+ call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
+ D:
+ cd "D:/a/3proxy/3proxy"
+ set "LIB=%LIB%;c:/program files/openssl/lib/VC/x64/MT;c:/vcpkg/installed/x64-windows/lib"
+ set "INCLUDE=%INCLUDE%;c:/program files/openssl/include;c:/vcpkg/installed/x64-windows/include"
+ nmake /F Makefile.msvc
+ nmake /F Makefile.msvc clean
diff --git a/.github/workflows/c-cpp-cmake.yml b/.github/workflows/c-cpp-cmake.yml
new file mode 100644
index 0000000..4f4030a
--- /dev/null
+++ b/.github/workflows/c-cpp-cmake.yml
@@ -0,0 +1,57 @@
+name: C/C++ CI cmake
+
+on:
+ push:
+ branches: [ "master", "unix_socket" ]
+ paths: [ '**.c', '**.h', '**.cmake', 'CMakeLists.txt', '.github/configs', '.github/workflows/c-cpp-cmake.yml' ]
+ pull_request:
+ branches: [ "master" ]
+ paths: [ '**.c', '**.h', '**.cmake', 'CMakeLists.txt', '.github/configs', '.github/workflows/c-cpp-cmake.yml' ]
+
+jobs:
+ ci:
+ name: "${{ matrix.target }}"
+ strategy:
+ matrix:
+ target:
+ - ubuntu-latest
+ - ubuntu-24.04-arm
+ - macos-15
+ - windows-2022
+ runs-on: ${{ matrix.target }}
+ steps:
+ - uses: actions/checkout@v5
+# - name: configure
+# run: ./configure
+ - name: Linux libraries
+ if: ${{ startsWith(matrix.target, 'ubuntu') }}
+ run: sudo apt install libssl-dev libpam-dev libpcre2-dev
+ - name: Mac libraries
+ if: ${{ startsWith(matrix.target, 'macos') }}
+ run: brew install pcre2
+ - name: install Windows libraries
+ if: ${{ startsWith(matrix.target, 'windows') }}
+ run: vcpkg install pcre2:x64-windows
+ - name: make with CMake POSIX
+ if: ${{ ! startsWith(matrix.target, 'windows') }}
+ run: |
+ mkdir build
+ cd build
+ cmake ..
+ cmake --build .
+ mkdir ~/3proxy
+ DESTDIR=~/3proxy cmake --install .
+ cd .. && rm -rf build/
+ - name: make with CMake Win
+ if: ${{ startsWith(matrix.target, 'windows') }}
+ shell: cmd
+ run: |
+ mkdir build
+ cd build
+ set "LIB=%LIB%;c:/program files/openssl/lib/VC/x64/MT;c:/vcpkg/installed/x64-windows/lib"
+ set "INCLUDE=%INCLUDE%;c:/program files/openssl/include;c:/vcpkg/installed/x64-windows/include"
+ cmake ..
+ dir
+ cmake --build .
+ cd ..
+ rmdir /s /q build
diff --git a/.gitignore b/.gitignore
index b562c58..5f4b1c0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -21,6 +21,7 @@ bin/pop3p
bin/smtpp
bin/ftppr
bin/mycrypt
+bin/tlspr
bin64/
dll/
tmp/
@@ -51,11 +52,9 @@ src/mycrypt
src/dighosts
*.ld.so
*.dSYM
-doc/html/man3/
-doc/html/man8/
*.var
verfile.sh
-Makefile
+/Makefile
copytgz.sh
*~.nib
local.properties
@@ -258,3 +257,14 @@ pip-log.txt
#Mr Developer
.mr.developer.cfg
+CLAUDE.md
+bin/3proxy_crypt
+bin/3proxy_ftppr
+bin/3proxy_pop3p
+bin/3proxy_proxy
+bin/3proxy_smtpp
+bin/3proxy_socks
+bin/3proxy_tcppm
+bin/3proxy_tlspr
+bin/3proxy_udppm
+build*/*
\ No newline at end of file
diff --git a/CHANGELOG b/CHANGELOG
new file mode 100644
index 0000000..747638d
--- /dev/null
+++ b/CHANGELOG
@@ -0,0 +1,11 @@
+3proxy-0.9.6 Released April, 11 2026
+
++ ssl_client and multiple configuration options added to SSLPlugin, SSLPlugin code significantly improved and bugfixed. See https://github.com/3proxy/3proxy/wiki/SSLPlugin. 3proxy can now be used as stunnel replacement for many scenarios.
++ HAProxy proxy protocol v1 support as client and server, add -H option for service to expect HA proxy v1 protocol header, use ha parent type: parent 1000 ha 0.0.0.0 0 to send v1 header.
++ tlspr is supported in auto
++ tlspr supports -s option, it breaks HELLO packet to prevent some DPIs from detecting SNI
++ maxseg configuration option and TCP_MAXSEG socket flag support added. It sets maximum size of TCP segment to fix PathMTU discovery problems
++ -Ne / -Ni options added to specify external / internal NAT address for SOCKSv5
++ cmake environment added
+! External pcre2 (pcre2-8) library is used for PCRE, pcre code is removed from 3proxy
+! Multiple minor bugfixes
\ No newline at end of file
diff --git a/CHANGELOG.rus b/CHANGELOG.rus
new file mode 100644
index 0000000..a0da305
--- /dev/null
+++ b/CHANGELOG.rus
@@ -0,0 +1,11 @@
+3proxy-0.9.6 Вышел 11 Апреля 2026
+
++ В SSLPlugin добавлены ssl_client и множество опций конфигурации, код SSLPlugin значительно улучшен и исправлен. См. https://github.com/3proxy/3proxy/wiki/SSLPlugin. 3proxy теперь может использоваться как замена stunnel во многих сценариях.
++ Поддержка прокси-протокола HAProxy v1 на стороне клиента и сервера. Добавлена опция -H для сервиса, чтобы ожидать заголовок прокси-протокола HA v1. Используйте тип родителя ha: parent 1000 ha 0.0.0.0 0 для отправки заголовка v1.
++ tlspr поддерживается в режиме auto
++ tlspr поддерживает опцию -s, которая разбивает HELLO-пакет для предотвращения обнаружения SNI некоторыми DPI
++ Добавлена опция конфигурации maxseg и поддержка флага сокета TCP_MAXSEG. Устанавливает максимальный размер TCP-сегмента для решения проблем с обнаружением PathMTU
++ Добавлены опции -Ne / -Ni для указания внешнего/внутреннего NAT-адреса для SOCKSv5
++ Добавлено окружение cmake
+! Внешняя библиотека pcre2 (pcre2-8) используется для PCRE, код pcre удалён из 3proxy
+! Множество мелких исправлений ошибок
\ No newline at end of file
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..193f147
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,864 @@
+#
+# 3proxy CMake build system
+#
+
+cmake_minimum_required(VERSION 3.16)
+
+# Read version from RELEASE file
+file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/RELEASE" PROJECT_VERSION LIMIT_COUNT 1)
+
+project(3proxy
+ VERSION ${PROJECT_VERSION}
+ LANGUAGES C
+ DESCRIPTION "3proxy - tiny free proxy server"
+)
+
+# Include GNUInstallDirs for standard installation directories
+include(GNUInstallDirs)
+
+# Add cmake module path
+list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
+
+# Detect compiler
+if(CMAKE_C_COMPILER_ID STREQUAL "Clang" OR CMAKE_C_COMPILER_ID STREQUAL "AppleClang")
+ set(COMPILER_IS_CLANG TRUE)
+ if(WIN32 AND CMAKE_C_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC")
+ set(COMPILER_IS_CLANG_CL TRUE)
+ else()
+ set(COMPILER_IS_CLANG_CL FALSE)
+ endif()
+else()
+ set(COMPILER_IS_CLANG FALSE)
+ set(COMPILER_IS_CLANG_CL FALSE)
+endif()
+
+if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
+ set(COMPILER_IS_GCC TRUE)
+else()
+ set(COMPILER_IS_GCC FALSE)
+endif()
+
+if(MSVC AND NOT COMPILER_IS_CLANG_CL)
+ set(COMPILER_IS_MSVC TRUE)
+else()
+ set(COMPILER_IS_MSVC FALSE)
+endif()
+
+# Options
+option(3PROXY_BUILD_SHARED "Build shared libraries for plugins" ON)
+option(3PROXY_USE_OPENSSL "Enable TLS/SSL support (requires OpenSSL)" ON)
+option(3PROXY_USE_PCRE2 "Enable PCRE2 regex filtering" ON)
+option(3PROXY_USE_PAM "Enable PAM/PamAuth" ON)
+option(3PROXY_USE_ODBC "Enable ODBC support (Unix only, always ON on Windows)" OFF)
+option(3PROXY_USE_SPLICE "Use Linux splice() for zero-copy (Linux only)" ON)
+option(3PROXY_USE_POLL "Use poll() instead of select() (Unix only)" ON)
+option(3PROXY_USE_WSAPOLL "Use WSAPoll instead of select() (Windows only)" ON)
+option(3PROXY_USE_NETFILTER "Enable Linux netfilter support (Linux only)" ON)
+option(3PROXY_USE_UNIX_SOCKETS "Enable Unix domain socket support (Unix only)" ON)
+
+if(NOT WIN32 AND NOT APPLE)
+ option(3PROXY_STATIC_LINK "Statically link libraries using -Wl,-Bstatic (Linux/Unix only)" OFF)
+endif()
+
+# Binary name prefix for standalone modules and crypt (default: 3proxy_)
+# 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)
+
+if(3PROXY_BUILD_ALL)
+ foreach(_M PROXY SOCKS POP3P SMTPP FTPPR TCPPM UDPPM TLSPR)
+ set(3PROXY_BUILD_${_M} ON)
+ endforeach()
+endif()
+
+# Output directory
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
+
+# Find threads library (cross-platform pthread equivalent)
+find_package(Threads REQUIRED)
+
+# Set default build type if not specified
+if(NOT CMAKE_BUILD_TYPE)
+ set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type" FORCE)
+endif()
+
+# Platform-independent position independent code for shared libraries
+set(CMAKE_POSITION_INDEPENDENT_CODE ON)
+
+# Platform detection and configuration
+if(WIN32)
+ # Windows-specific configuration
+ add_compile_definitions(
+ WIN32
+ _WIN32
+ _MBCS
+ _CONSOLE
+ )
+
+ if(COMPILER_IS_MSVC)
+ # MSVC-specific settings
+ add_compile_definitions(
+ MSVC
+ )
+ # Use static runtime library
+ set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$ Precaution 1: 3proxy was not initially developed for high load and is positioned as a SOHO product, the main reason is "one connection - one thread" model 3proxy uses. 3proxy is known to work with above 200,000 connections under proper configuration, but use it in production environment under high loads at your own risk and do not expect too much.
- Precaution 2: This documentation is incomplete and is not sufficient. High loads may require very specific system tuning including, but not limited to specific or cusomized kernels, builds, settings, sysctls, options, etc. All this is not covered by this documentation.
+ Precaution 1: 3proxy was not initially developed for high load and is positioned as a SOHO product. The main reason is the "one connection - one thread" model 3proxy uses. 3proxy is known to work with over 200,000 connections under proper configuration, but use it in a production environment under high loads at your own risk and do not expect too much.
+ Precaution 2: This documentation is incomplete and insufficient. High loads may require very specific system tuning including, but not limited to, specific or customized kernels, builds, settings, sysctls, options, etc. All of this is not covered by this documentation.
Avoid setting 'maxconn' to arbitrary high value, it should be carefully
-choosen to protect system and proxy from resources exhaution. Setting maxconn
-above resources available can lead to denial of service conditions.
- Avoid setting 'maxconn' to an arbitrarily high value; it should be carefully
+chosen to protect the system and proxy from resource exhaustion. Setting maxconn
+above available resources can lead to denial of service conditions.
+
-To help with socket-based system-dependant settings, since 0.9-devel 3proxy supports different
-socket options which can be set via -ol option for listening socket, -oc for proxy-to-client
-socket and -os for proxy-to-server socket. Example:
+To help with socket-based system-dependent settings, since 0.9-devel, 3proxy supports different
+socket options which can be set via the -ol option for the listening socket, -oc for the proxy-to-client
+socket, and -os for the proxy-to-server socket. Example:
For 32-bit systems address space can be a bottlneck you should consider. If
-you're short of address space you can try to use negative stack size.
+implementations and built-in DNS resolvers, especially in the case of IPv6 and a large
+number of interfaces. Under most 64-bit systems, extending stacksize will lead
+to additional memory space usage but does not require actual committed memory,
+so you can increase stacksize to a relatively large value (e.g., 1024000) without
+the need to add additional physical memory,
+but it's system/libc dependent and requires additional testing under your
+installation. Don't forget about memory-related ulimits.
+ For 32-bit systems, address space can be a bottleneck you should consider. If
+you're short on address space, you can try using a negative stack size.
- Do not use TCP_NODELAY on slow connections with high delays and then
+ Do not use TCP_NODELAY on slow connections with high delays when
connection bandwidth is a bottleneck.
- Use splice only on high-speed connections (e.g. 10GBE), if processor, memory speed or
+ Use splice only on high-speed connections (e.g., 10GbE) when the processor, memory speed, or
system bus are bottlenecks.
- TCP_NODELAY and splice are not contrary to each over and should be combined on
+ TCP_NODELAY and splice are not contrary to each other and should be combined on
high-speed connections.
+
+
-Extract source code files from 3proxy.tgz (with WinZip or another utility).
-Use nmake /f Makefile.msvc command
+Extract source code files from 3proxy.tgz (with WinZip or another utility) or use git.
+
+See HowTo:
\ No newline at end of file
+See HowTo:
\ No newline at end of file
diff --git a/doc/html/faqr.html b/doc/html/faqr.html
index e9546af..023d097 100644
--- a/doc/html/faqr.html
+++ b/doc/html/faqr.html
@@ -1,2 +1,2 @@
-См. HowTo
\ No newline at end of file
+См. HowTo
\ No newline at end of file
diff --git a/doc/html/highload.html b/doc/html/highload.html
index a3693cf..a91f829 100644
--- a/doc/html/highload.html
+++ b/doc/html/highload.html
@@ -1,12 +1,12 @@
-Optimizing 3proxy for high load
-Optimizing 3proxy for High Load
+Configuring 'maxconn'
-A number of simulatineous connections per service is limited by 'maxconn' option.
-Default maxconn value since 3proxy 0.8 is 500. You may want to set 'maxconn'
-to higher value. Under this configuration:
+The number of simultaneous connections per service is limited by the 'maxconn' option.
+The default maxconn value since 3proxy 0.8 is 500. You may want to set 'maxconn'
+to a higher value. Under this configuration:
maxconn 1000
proxy -p3129
@@ -14,53 +14,53 @@ proxy -p3128
socks
maxconn for every service is 1000, and there are 3 services running
-(2 proxy and 1 socks), so, for all services there can be up to 3000
-simulatineous connections to 3proxy.
-Understanding resources requirements
-Each running service require:
+(2 proxy and 1 socks), so for all services there can be up to 3000
+simultaneous connections to 3proxy.
+Understanding Resource Requirements
+Each running service requires:
-
-Each connected client require:
+Each connected client requires:
-
Also, additional resources like system buffers are required for network activity.
Under linux since 0.9 splice() is used. It's much more effective, but requires
-
2*socket (file descriptor) + 2*pipe (file descriptors) = 4 file descriptors.
-
For FTP 4 sockets and 2 pipes are required with splice().
-
Up to 128K (up to 256K in the case of splice()) of kernel buffers memory. This is theoretical maximum, actual numbers depend on connection quality and traffic amount.
+
Under Linux since 0.9, splice() is used. It's much more efficient but requires
+
2 sockets (file descriptors) + 2 pipes (file descriptors) = 4 file descriptors.
+
For FTP with splice(), 4 sockets and 2 pipes are required.
+
Up to 128K (up to 256K in the case of splice()) of kernel buffer memory. This is the theoretical maximum; actual numbers depend on connection quality and traffic amount.
1 additional socket (file descriptor) during name resolution for non-cached names
1 additional socket during authentication or logging for RADIUS authentication or logging.
-Setting ulimits
Hard and soft ulimits must be set above calculated requirements. Under Linux, you can
-check limits of running process with
+check the limits of a running process with
cat /proc/PID/limits
-where PID is a pid of the process.
-Validate ulimits match your expectation, especially if you run 3proxy under dedicated account
-by adding e.g.
+where PID is the process ID.
+Validate that ulimits match your expectations, especially if you run 3proxy under a dedicated account
+by adding, e.g.:
system "ulimit -Ha >>/tmp/3proxy.ulim.hard"
system "ulimit -Sa >>/tmp/3proxy.ulim.soft"
-in the beginning (before first service started) and the end of config file.
-Make both hard restart (that is kill and start 3proxy process) and soft restart
-by sending SIGUSR1 to 3proxy process, check ulimits recorded to files match your
-expecation. In systemd based distros (e.g. latest Debian / Ubuntu) changing limits.conf
-is not enough, limits must be ajusted in systemd configuration, e.g. by setting
+at the beginning (before the first service is started) and at the end of the config file.
+Perform both a hard restart (i.e., kill and start the 3proxy process) and a soft restart
+by sending SIGUSR1 to the 3proxy process; check that the ulimits recorded to files match your
+expectations. In systemd-based distros (e.g., latest Debian/Ubuntu), changing limits.conf
+is not enough; limits must be adjusted in the systemd configuration, e.g., by setting:
DefaultLimitDATA=infinity
DefaultLimitSTACK=infinity
@@ -73,51 +73,51 @@ DefaultLimitMEMLOCK=infinity
in user.conf / system.conf
-Extending system limitation
+Extending System Limitations
-Check manuals / documentation for your system limitations e.g. system-wide limit for number of open files
+Check the manuals/documentation for your system's limitations, e.g., the system-wide limit for the number of open files
(fs.file-max in Linux). You may need to change sysctls or even rebuild the kernel from source.
proxy -olSO_REUSEADDR,SO_REUSEPORT -ocTCP_TIMESTAMPS,TCP_NODELAY -osTCP_NODELAY
-available options are system dependant.
+Available options are system-dependent.
-Using 3proxy in virtual environment
+Using 3proxy in a Virtual Environment
-If 3proxy is used in VPS environment, there can be additional limitations.
-For example, kernel resources / system CPU usage / IOCTLs can be limited in a different way, and this can become a bottleneck.
-Since 0.9 devel, 3proxy uses splice() by default on Linux, splice() prevents network traffic from being copied from
-kernel space to 3proxy process and generally increases throughput, epecially in the case of high volume traffic. It especially
-true for virtual environment (it can improve thoughput up to 10 times) unless there are additional kernel limitations.
-Since some work is moved to kernel, it requires up to 2 times more kernel resources in terms of CPU, memory and IOCTLs.
-If your hosting additionally limits kernel resources (you can see it as nearly 100% CPU usage without any real CPU activity for
-any application which performs IOCTLS), use -s0 option to disable splice() usage for given service e.g.
-
+If 3proxy is used in a VPS environment, there can be additional limitations.
+For example, kernel resources, system CPU usage, and IOCTLs can be limited differently, and this can become a bottleneck.
+Since 0.9-devel, 3proxy uses splice() by default on Linux. splice() prevents network traffic from being copied from
+kernel space to the 3proxy process and generally increases throughput, especially in the case of high-volume traffic. This is especially
+true for virtual environments (it can improve throughput up to 10 times) unless there are additional kernel limitations.
+Since some work is moved to the kernel, it requires up to 2 times more kernel resources in terms of CPU, memory, and IOCTLs.
+If your hosting additionally limits kernel resources (you can see this as nearly 100% CPU usage without any real CPU activity for
+any application performing IOCTLs), use the -s0 option to disable splice() usage for a given service, e.g.:
+
socks -s0
-Extending ephemeral port range
+Extending the Ephemeral Port Range
-Check ephemeral port range for your system and extend it to the number of the
+Check the ephemeral port range for your system and extend it to the number of
ports required.
-Ephimeral range is always limited to maximum number of ports (64K). To extend the
-number of outgoing connections above this limit, extending ephemeral port range
-is not enough, you need additional actions:
+The ephemeral range is always limited to the maximum number of ports (64K). To extend the
+number of outgoing connections above this limit, extending the ephemeral port range
+is not enough; you need additional actions:
-
radius secret 1.2.3.4
auth radius
proxy
or by using multiple services with different external
-interfaces, example:
+interfaces, for example:
allow user1,user11,user111
proxy -p1111 -e1.1.1.1
@@ -133,7 +133,7 @@ proxy -p4444 -e4.4.4.4
flush
or via "parent extip" rotation,
-e.g.
+e.g.:
allow user1,user11,user111
parent 1000 extip 1.1.1.1 0
@@ -156,8 +156,8 @@ socks
-Under latest Linux version you can also start multiple services with different
-external addresses on the single port with SO_REUSEPORT on listening socket to
+Under the latest Linux versions, you can also start multiple services with different
+external addresses on a single port with SO_REUSEPORT on the listening socket to
evenly distribute incoming connections between outgoing interfaces:
socks -olSO_REUSEPORT -p3128 -e 1.1.1.1
@@ -165,123 +165,136 @@ socks -olSO_REUSEPORT -p3128 -e 2.2.2.2
socks -olSO_REUSEPORT -p3128 -e 3.3.3.3
socks -olSO_REUSEPORT -p3128 -e 4.4.4.4
-for Web browsing last two examples are not recommended, because same client can get
-different external address for different requests, you should choose external
+For web browsing, the last two examples are not recommended because the same client can get
+a different external address for different requests; you should choose the external
interface with user-based rules instead.
-
proxy -p3128 -e1.2.3.4 -osSO_REUSEADDR
-Behavior for SO_REUSEADDR and SO_REUSEPORT is different between different system,
-even between different kernel versions and can lead to unexpected results.
-Specifics is described here.
-Use this options only if actually required and if you fully understand possible
-consiquences. E.g. SO_REUSEPORT can help to establish more connections than the
-number of the client port available, but it can also lead to situation connections
-are randomely fail due to ip+port pairs collision if remote or local system
+The behavior for SO_REUSEADDR and SO_REUSEPORT is different between different systems,
+even between different kernel versions, and can lead to unexpected results.
+The specifics are described here.
+Use these options only if actually required and if you fully understand the possible
+consequences. For example, SO_REUSEPORT can help establish more connections than the
+number of client ports available, but it can also lead to situations where connections
+randomly fail due to IP+port pair collisions if the remote or local system
doesn't support this trick.
Setting stacksize
+Setting Stack Size
'stacksize' is a size added to all stack allocations and can be both positive and
-negative. Stack is required in functions call. 3proxy itself doesn't require large
+negative. Stack is required for function calls. 3proxy itself doesn't require a large
stack, but it can be required if some
-purely-written libc, 3rd party libraries or system functions called. There is known\
+poorly written libc, 3rd party libraries, or system functions are called. There is known
dirty code in Unix ODBC
-implementations, build-in DNS resolvers, especially in the case of IPv6 and large
-number of interfaces. Under most 64-bit system extending stacksize will lead
-to additional memory space usage, but do not require actual commited memory,
-so you can inrease stacksize to relatively large value (e.g. 1024000) without
-the need to add additional phisical memory,
-but it's system/libc dependant and requires additional testing under your
-installation. Don't forget about memory related ulimts.
-Known system issues
+Known System Issues
-There are known race condition issues in Linux / glibc resolver. The probability
-of race condition arises under configuration with IPv6, large number of interfaces
-or IP addresses or resolvers configured. In this case, install local recursor and
-use 3proxy built-in resolver (nserver / nscache / nscache6).
-Do not use public resolvers
-Public resolvers like ones from Google have ratelimits. For large number of
-requests install local caching recursor (ISC bind named, PowerDNS recursor, etc).
+There are known race condition issues in the Linux/glibc resolver. The probability
+of a race condition arises under configuration with IPv6, a large number of interfaces
+or IP addresses, or with resolvers configured. In this case, install a local recursor and
+use 3proxy's built-in resolver (nserver / nscache / nscache6).
+Do Not Use Public Resolvers
+Public resolvers like those from Google have rate limits. For a large number of
+requests, install a local caching recursor (ISC bind named, PowerDNS recursor, etc).
-Avoid large lists
+Avoid Large Lists
Currently, 3proxy is not optimized to use large ACLs, user lists, etc. All lists
-are processed lineary. In devel version you can use RADIUS authentication to avoid
-user lists and ACLs in 3proxy itself. Also, RADIUS allows to easily set outgoing IP
-on per-user basis or more sophisicated logics.
-RADIUS is a new beta feature, test it before using in production.
+are processed linearly. In the devel version, you can use RADIUS authentication to avoid
+user lists and ACLs in 3proxy itself. Also, RADIUS allows you to easily set an outgoing IP
+on a per-user basis or implement more sophisticated logic.
+RADIUS is a new beta feature; test it before using it in production.
-Avoid changing configuration too often
+Avoid Changing Configuration Too Often
-Every configuration reload requires additional resources. Do not do frequent
-changes, like users addition/deletaion via connfiguration, use alternative
+Every configuration reload requires additional resources. Do not make frequent
+changes, such as user addition/deletion via configuration; use alternative
authentication methods instead, like RADIUS.
-Consider using 'noforce'
+Consider Using 'noforce'
-'force' behaviour (default) re-authenticates all connections after
-configuration reload, it may be resource consuming on large number of
-connections. Consider adding 'noforce' command before services started
-to prevent connections reauthentication.
+The 'force' behavior (default) re-authenticates all connections after
+configuration reload; it may be resource-consuming with a large number of
+connections. Consider adding the 'noforce' command before services are started
+to prevent connection re-authentication.
-Do not monitor configuration files directly
+Do Not Monitor Configuration Files Directly
-Using configuration file directly in 'monitor' can lead to race condition where
-configuration is reloaded while file is being written.
+Using a configuration file directly in 'monitor' can lead to a race condition where
+the configuration is reloaded while the file is being written.
To avoid race conditions:
-
system "rm /some/path/3proxy/3proxy.lck"
-at the end of config file to remove it after configuration is successfully loaded
-
monitor "/some/path/3proxy/3proxy.ver"
-Use TCP_NODELAY to speed-up connections with small amount of data
+Use TCP_NODELAY to Speed Up Connections with Small Amounts of Data
-If most requests require exchange with a small amount of data in a both ways
-without the need for bandwidth, e.g. messengers or small web request,
-you can eliminate Nagle's algorithm delay with TCP_NODELAY flag. Usage example:
+If most requests require an exchange with a small amount of data in both directions
+without the need for bandwidth, e.g., messengers or small web requests,
+you can eliminate Nagle's algorithm delay with the TCP_NODELAY flag. Usage example:
proxy -osTCP_NODELAY -ocTCP_NODELAY
sets TCP_NODELAY for client (oc) and server (os) connections.
-Use splice to speedup large data amount transfers
+Use Splice to Speed Up Large Data Amount Transfers
-splice() allows to copy data between connections without copying to process
-addres space. It can speedup proxy on high bandwidth connections, if most
+splice() allows copying data between connections without copying to the process
+address space. It can speed up the proxy on high-bandwidth connections if most
connections require large data transfers. Splice is enabled by default on Linux
-since 0.9, "-s0" disables splice usage. Example:
+since 0.9; "-s0" disables splice usage. Example:
proxy -s0
-Splice is only available on Linux. Splice requires more system buffers and file descriptors,
+Splice is only available on Linux. Splice requires more system buffers and file descriptors
and produces more IOCTLs but reduces process memory and overall CPU usage.
-Disable splice if there is a lot of short-living connections with no bandwidth
+Disable splice if there are a lot of short-lived connections with no bandwidth
requirements.
-Add Grace Delay to Reduce System Calls
+
+proxy -g8000,3,10
+The first parameter is the average read size we want to keep, the second parameter is
+the minimal number of packets in the same direction to apply the algorithm,
+and the last value is the delay added after polling and prior to reading data.
+The example above adds a 10-millisecond delay before reading data if the average
+polling size is below 8000 bytes and 3 read operations have been made in the same
+direction. It's especially useful with splice. logdump 1 1
is useful
+to see how grace delays work; choose a delay value to avoid filling the read
+pipe/buffer (typically 64K) but keep the request sizes close to the chosen average
+on large file uploads/downloads.
diff --git a/doc/html/howtoe.html b/doc/html/howtoe.html
index 0fffb14..dc7f585 100644
--- a/doc/html/howtoe.html
+++ b/doc/html/howtoe.html
@@ -1,43 +1,47 @@
-
Under construction, very incomplete
@@ -64,36 +70,53 @@
+nmake /f Makefile.msvc
+
+Binaries will be placed in the bin/ directory.
-See How to compile 3proxy with Visual C++ -Use Makefile.intl instead of Makefile.msvc -
-
-Extract source files from 3proxy.tgz (for example with tar -xzf 3proxy.tgz command if you have tar installed)
-Use make -f Makefile.win command.
-If you want to use POSIX emulation Cygwin library (normally you shouldn't) - use make -f Makefile.unix instead.
-Windows specific things (like installing as service) will not be available if compiled with Cygwin emulation.
+CMake provides a cross-platform build system. It works on Windows (MSVC, MinGW), Linux, macOS, and BSD.
+
Basic build steps:
+
+mkdir build +cd build +cmake .. +cmake --build . ++On Windows with Visual Studio, you can also generate a solution file: +
+cmake -G "Visual Studio 17 2022" -A x64 .. +cmake --build . --config Release ++Optional features can be controlled with cmake options: +
+cmake -D3PROXY_USE_OPENSSL=ON -D3PROXY_USE_PCRE2=ON .. ++Available options: 3PROXY_USE_OPENSSL, 3PROXY_USE_PCRE2, 3PROXY_USE_PAM, 3PROXY_USE_ODBC. +
build/bin/ directory.
-Use +For Linux, use:
-make -f Makefile.Linux +ln -sf Makefile.Linux Makefile +make-for Linux or Cygwin, Makefile.Solaris* (depending on compiler version) for Solaris -and Makefile.unix for different Unix-like OS. On BSD derivered systems make -sure to use GNU make, sometimes it's called gmake instead of make. -
+ln -sf Makefile.FreeBSD Makefile +make ++For other Unix-like systems, use Makefile.unix. On BSD-derived systems, make +sure to use GNU make; sometimes it's called gmake instead of make. +
bin/ directory.
Unpack 3proxy.zip to any directory, for example -c:\Program Files\3proxy. If needed, create directory for storing log files, -ODBC sources, etc. Create 3proxy.cfg in the 3proxy installation directory (See Server configuration). -If you use 3proxy before 0.6 Add -
-service --string into 3proxy.cfg. Now, start command prompt (cmd.exe). -Change directory to 3proxy installation and run 3proxy.exe --install: +c:\Program Files\3proxy. If needed, create a directory for storing log files, +ODBC sources, etc. Create 3proxy.cfg in the 3proxy installation directory (see Server configuration). +Now, start a command prompt (cmd.exe). +Change to the 3proxy installation directory and run 3proxy.exe --install:
D:\>C: C:\>cd C:\Program Files\3proxy C:\Program Files\3proxy>3proxy.exe --install-Now, you should have 3proxy service installed and running. If service is not -started, remove "service" string from 3proxy.cfg, run 3proxy.exe manually -and correct all errors. +Now, you should have the 3proxy service installed and running. If the service is not +started, run 3proxy.exe manually and correct all errors.
-To remove 3proxy run 3proxy --remove: +To remove 3proxy, run 3proxy --remove:
D:\>C: C:\>cd C:\Program Files\3proxy C:\Program Files\3proxy>net stop 3proxy C:\Program Files\3proxy>3proxy.exe --remove-Now you can simply remove 3proxy installation directory. - -
-Unpack 3proxy.zip to any directory, for example -c:\Program Files\3proxy. If needed, create directory for storing log files, -ODBC sources, etc. Create 3proxy.cfg in the 3proxy installation directory (See Server configuration). -Remove string -
-service --from 3proxy.cfg and add -
-daemon --if you want 3proxy to run in background. -Create shortcut for 3proxy.exe and place it in autostart or add -to registry with regedit.exe: -
-Complie 3proxy (see Compilation). Copy
-executables to any appropriate location (for example /usr/local/3proxy/sbin
-for servers and /usr/local/3proxy/bin for utilities).
-Create /usr/local/etc/3proxy.cfg.
-(see Server configuration).
-You can change default configuration file location by specifing configuration file
-in 3proxy command line.
-Add 3proxy to system startup scripts.
+Using Makefile:
+
Compile 3proxy (see Compilation) then run:
+
+sudo make install ++This installs binaries to
/usr/local/3proxy/sbin/, configuration to /etc/3proxy/,
+and sets up chroot directories. Default configuration file is /etc/3proxy/3proxy.cfg.
+
++Using CMake: +
+mkdir build && cd build +cmake .. +cmake --build . +sudo cmake --install . ++ +
+Using pre-built packages from GitHub:
+
Download .deb or .rpm packages from GitHub Releases.
+
For Debian/Ubuntu:
+
+sudo dpkg -i 3proxy_*.deb ++For RHEL/CentOS/Fedora: +
+sudo rpm -i 3proxy-*.rpm ++ +
+Add 3proxy to the system startup scripts or use systemd: +
+sudo systemctl enable 3proxy +sudo systemctl start 3proxy ++ +
+Using CMake (recommended): +
+mkdir build && cd build +cmake .. +cmake --build . +sudo cmake --install . ++This installs: +
/usr/local/bin//etc/3proxy//usr/local/lib/3proxy//Library/LaunchDaemons/org.3proxy.3proxy.plist+Using Makefile: +
+ln -sf Makefile.FreeBSD Makefile +make +sudo make install ++This installs binaries to
/usr/local/3proxy/bin/ and configuration to /usr/local/etc/3proxy/.
+
+
+Service management with launchd:
+
After installation via cmake, the service can be managed with launchctl:
+
+# Load and start the service +sudo launchctl load /Library/LaunchDaemons/org.3proxy.3proxy.plist + +# Stop the service +sudo launchctl stop org.3proxy.3proxy + +# Start the service +sudo launchctl start org.3proxy.3proxy + +# Unload and disable the service +sudo launchctl unload /Library/LaunchDaemons/org.3proxy.3proxy.plist ++The service runs as user
proxy (created during installation).
+Configuration file: /etc/3proxy/3proxy.cfg
+
+ +Using pre-built images from GitHub Container Registry: +
+docker pull ghcr.io/3proxy/3proxy:latest ++ +
+Building Docker images:
+
Two Dockerfiles are provided:
+
Dockerfile.minimal - minimal static build, no plugins, configuration from stdin:
++docker build -f Dockerfile.minimal -t 3proxy.minimal . +docker run -i -p 3129:3129 --name 3proxy 3proxy.minimal ++Then enter configuration followed by "end" command. +
Dockerfile.full - full build with plugins (SSL, PCRE, Transparent):
++docker build -f Dockerfile.full -t 3proxy.full . +docker run -p 3129:3129 -v /path/to/config:/usr/local/3proxy/conf 3proxy.full ++The configuration file must be placed at
/path/to/config/3proxy.cfg.
+
+By default, 3proxy runs in chroot environment with uid/gid 65535. Use nserver in config for DNS resolution in chroot.
+For non-chroot execution, mount config to /etc/3proxy.
Valid configuration file is required. +
A valid configuration file is required. -
Most probable reasons for non-working limitations: 'auth none' or no auth is used. For any ACL based feature one of 'iponly', 'nbname' or 'strong' auths required. Sequence of commands may be invalid. Commands are executed one-by-one and 'proxy', 'tcppm', 'socks' or another service commands must follow valid configuration. Invalid sequence of ACLs. First matching ACL is used (except of internal redirections, see below). If ACL contains at least one records last record is assumed to be 'deny *'. +
The most probable reasons for non-working limitations: 'auth none' or no auth is used. For any ACL-based feature, one of 'iponly', 'nbname', or 'strong' auth is required. The sequence of commands may be invalid. Commands are executed one-by-one, and 'proxy', 'tcppm', 'socks', or another service commands must follow a valid configuration. An invalid sequence of ACLs. The first matching ACL is used (except for internal redirections, see below). If an ACL contains at least one record, the last record is assumed to be 'deny *'. -
Possible reasons for 3proxy starts manually but fails to start as a service: +
Possible reasons for 3proxy starting manually but failing to start as a service:
3proxy --install full_path_to_configuration_file-
How to understant internal and external +
How to understand internal and external
Both internal and external IPs are IPs of the host running 3proxy itself. -This configuration option is usefull in situation 3proxy is running on the -border host with 2 (or more) connections: e.g. LAN and WAN with different IPs +This configuration option is useful in situations where 3proxy is running on a +border host with 2 (or more) connections: e.g., LAN and WAN with different IPs
LAN connection +-------------+ Internet connection
LAN <-------------->| 3proxy host |<-------------------> INTERNET
@@ -206,60 +304,60 @@ LAN <-------------->| 3proxy host |<-------------------> INTERNET
| |
Internal IP External IP
-If 3proxy is used on the host with single connection, both internal and
-external are usually same IP.
--Check you use system DSN. -Check SQL request is valid. -The best way to check is to make file or stdout logging, get SQL request from log file or console and execute this request manually. -Under Unix, you may also want to adjust 'stacksize' parameter. +Check that you are using a system DSN. +Check that the SQL request is valid. +The best way to check is to use file or stdout logging, get the SQL request from the log file or console, and execute this request manually. +Under Unix, you may also want to adjust the 'stacksize' parameter.
Proxy can not access destination directly over IPv6 if client requests IPv4 address. -To access IPv6 destination, either IPv6 address or hostname must be used in request. -Best solution is to enable option to resolve hostnames via proxy on client side. +
The proxy cannot access a destination directly over IPv6 if the client requests an IPv4 address. +To access an IPv6 destination, either an IPv6 address or a hostname must be used in the request. +The best solution is to enable the option to resolve hostnames via the proxy on the client side.
default stacksize may be insufficient, if some non-default plugins - are used (e.g. PAM and ODBC on Linux) or if compiled on some platforms with - invalid system defined values (few versionds of FreeBSD on amd64). - Problem can be resolved with 'stacksize' command or '-S' option starting 3proxy 0.8.4. +
The default stacksize may be insufficient if some non-default plugins + are used (e.g., PAM and ODBC on Linux) or if compiled on some platforms with + invalid system-defined values (a few versions of FreeBSD on amd64). + The problem can be resolved with the 'stacksize' command or '-S' option starting with 3proxy 0.8.4. -
-Server configuration example 3proxy.cfg.sample is in any 3proxy distribution. +A server configuration example, 3proxy.cfg.sample, is included in every 3proxy distribution.
-3proxy can log to stdout, file, ODBC datasource and -syslog (Unix/Linux/Cygwin only). For using ODBC under Unix/Linux you must -compile 3proxy with Unix ODBC libraries, see Compilation. -You can control logging from 3proxy.cfg for all services or you can control -logging of individual service, for example -/usr/local/sbin/socks -l/var/log/socks.log starts SOCKS proxy with logging to file. -For universal proxy (3proxy) log file rotation and archiving is supported. -Log type is defined with "log" configuration file command or with --l switch on individual service invokation. log or -l is stdout logging. +3proxy can log to stdout, a file, an ODBC datasource, or +syslog (Unix/Linux/Cygwin only). To use ODBC under Unix/Linux, you must +compile 3proxy with Unix ODBC libraries; see Compilation. +You can control logging from 3proxy.cfg for all services, or you can control +logging for an individual service. For example, +/usr/local/sbin/socks -l/var/log/socks.log starts a SOCKS proxy with logging to a file. +For the universal proxy (3proxy), log file rotation and archiving are supported. +The log type is defined with the "log" configuration file command or with the +-l switch on individual service invocation. log or -l with no argument is stdout logging.
log filename@@ -267,7 +365,7 @@ and
-lfilename-specify filename for logging +specify a filename for logging.
log @ident@@ -275,28 +373,28 @@ and
-l@ident-specify ident for syslog logging. If filename within "log" command contains -'%' characters, it's processes as format specificator (see "logformat"). E.g. -log c:\3proxy\logs\%y%m%d.log D creates file like c:\3proxy\logs\060729.log, -date is generated based on local time. +specify an ident for syslog logging. If the filename within the "log" command contains +'%' characters, it is processed as a format specifier (see "logformat"). E.g., +log c:\3proxy\logs\%y%m%d.log D creates a file like c:\3proxy\logs\060729.log; +the date is generated based on local time.
log &connstring-specifies ODBC connection string, connstring is in format -datasource,username,password (2 last are optional of -datasource does not require or already has authentication information). -Also, you must specify logformat to build SQL query, to insert recod into -log, see How to setup logging format +specifies an ODBC connection string; connstring is in the format +datasource,username,password (the last two are optional if the +datasource does not require or already has authentication information). +Also, you must specify logformat to build the SQL query to insert a record into +the log; see How to set up logging format
-Rotation and archiving may be set up with log, rotate archiver commands +Rotation and archiving may be set up with log, rotate, and archiver commands.
log filename LOGTYPE-sets rotation type. LOGTYPE may be: +sets the rotation type. LOGTYPE may be:
rotate NUMBER- specifies number of files in rotation (that is how many files to keep). + specifies the number of files in rotation (i.e., how many files to keep).
archiver EXT COMMAND PARAMETERS- Sets external archiver. EXT is extention of archived files - (for example zip, gz, Z, rar etc) COMMAND and PARAMETERS are command - to execute and command line PARAMETERS. Originale file is not deleted by - 3proxy, this work is left for archiver. - You can pass original filename to archiver with %F macro and archive filename with %A. + Sets an external archiver. EXT is the extension of archived files + (for example, zip, gz, Z, rar, etc.). COMMAND and PARAMETERS are the command + to execute and its command-line parameters. The original file is not deleted by + 3proxy; this work is left for the archiver. + You can pass the original filename to the archiver with the %F macro and the archive filename with %A. Examples are located in 3proxy.cfg.sample -
- Since 0.3 version log format may be set with "logformat" command. - First symbol of log format specifies format of date and time and - should be L (LOCAL) or G (GMT - Grinwitch Meridian Time). Format - string may contains some macro substitutions: + Since version 0.3, the log format may be set with the "logformat" command. + The first symbol of the log format specifies the format of the date and time and + should be L (LOCAL) or G (GMT - Greenwich Meridian Time). The format + string may contain some macro substitutions:
@@ -366,23 +464,23 @@ logformat "L%t.%. %N.%p %E %U %C:%c %R:%r %O %I %h %T"
(no line breaks)- If ODBC used, logformat should specify SQL command, - to insert record into log, for example + If ODBC is used, logformat should specify the SQL command + to insert a record into the log, for example:
logformat "-\'+_GINSERT INTO proxystat VALUES (%t, '%c', '%U', %I)"
(no line breaks)
-\'+_ instructs to replace characters \ and ' with _ -
-Just make format of 3proxy logs compatible with format supported by your
-favourite log analizer. Examples of compatible logformats are:
+Just make the format of 3proxy logs compatible with a format supported by your
+favorite log analyzer. Examples of compatible logformats are:
For Squid access.log:
"- +_G%t.%. %D %C TCP_MISS/200 %I %1-1T %2-2T %U DIRECT/%R application/unknown"
-or, more compatible format without %D +or, a more compatible format without %D:"- +_G%t.%. 1 %C TCP_MISS/200 %I %1-1T %2-2T %U DIRECT/%R application/unknown" @@ -403,7 +501,7 @@ ISA 2004 proxy WEB.w3c (fields are TAB-delimited):ISA 2000/2004 firewall FWSEXTD.log (fields are TAB-delimited):
-"- + L%C %U unnknown:0:0.0 N %Y-%m-%d +"- + L%C %U unknown:0:0.0 N %Y-%m-%d %H:%M:%S fwsrv 3PROXY - %n %R %r %D %O %I %r TCP Connect - - - %E - - - - -" @@ -412,30 +510,30 @@ HTTPD standard log (Apache and others):"-""+_L%C - %U [%d/%o/%Y:%H:%M:%S %z] ""%T"" %E %I"
-or more compatible without error code +or a more compatible format without the error code:"-""+_L%C - %U [%d/%o/%Y:%H:%M:%S %z] ""%T"" 200 %I"
-
3proxy is distributed in 2 variants: as a set of standalone modules (proxy,
-socks, pop3p, tcppm, udppm) and as universal proxy server. These services are
-absolutely independant, and if you use 3proxy you needn't any of standalone
+socks, pop3p, tcppm, udppm) and as a universal proxy server. These services are
+absolutely independent, and if you use 3proxy, you don't need any of the standalone
modules.
-
Standalone modules are only configurable via command line interface while
-3proxy uses configuration file. Many functions, such as ODBC logging, log
-rotation, access control, etc are only available in 3proxy, not in standalone
+
Standalone modules are only configurable via the command line interface, while
+3proxy uses a configuration file. Many functions, such as ODBC logging, log
+rotation, access control, etc., are only available in 3proxy, not in standalone
proxies.
-Standalone module may be started from command line, for example:
+A standalone module may be started from the command line, for example:
$/sbin/socks -l/var/log/socks.log -i127.0.0.1-Starts SOCKS server binded to localhost ip, port 1080 with logging to +Starts a SOCKS server bound to localhost IP, port 1080, with logging to /var/log/socks.log. -You can get help for any standalone service with -? command line option. +You can get help for any standalone service with the -? command line option.
-If 3proxy is used you should start all services in 3proxy.cfg file. 3proxy.cfg -is executed by 3proxy as a batch file. Example of 3proxy.cfg and command syntaxys +If 3proxy is used, you should start all services in the 3proxy.cfg file. 3proxy.cfg +is executed by 3proxy as a batch file. An example of 3proxy.cfg and command syntax can be found in 3proxy.cfg.sample.
@@ -445,19 +543,19 @@ internal 127.0.0.1 external 192.168.1.1 proxy socks -p3129 -pop3p +pop3p-Starts 3 services: HTTP PROXY, SOCKS and POP3 PROXY. Each listens localhost -interface with default port (3128 for HTTP, 1080 for SOCKS and 110 for POP3P) -except socks started with port 3129. -All logs are in file /var/log/3proxy.log (with daily date modification and -rotation). 30 last files are stored. +Starts 3 services: HTTP PROXY, SOCKS, and POP3 PROXY. Each listens on the localhost +interface with the default port (3128 for HTTP, 1080 for SOCKS, and 110 for POP3P) +except socks, which is started with port 3129. +All logs are in the file /var/log/3proxy.log (with daily date modification and +rotation). The 30 most recent files are stored. -
--i options specifies internal interface, -p - listening port. No space are -allowed. To bind 'proxy' service to port 8080 on interfaces 192.168.1.1 -and 192.168.2.1 use +The -i option specifies the internal interface; -p specifies the listening port. No spaces are +allowed. To bind the 'proxy' service to port 8080 on interfaces 192.168.1.1 +and 192.168.2.1, use:
proxy -p8080 -i192.168.1.1 proxy -p8080 -i192.168.2.1 @@ -465,52 +563,382 @@ proxy -p8080 -i192.168.2.1
- A: Use one of proxy, connect+, socks4+ or socks5+ as a parent type. 3proxy - itself still performs a name resolution, it's required e.g. to ACLs matching. - So, if no name resolution must be performed by 3proxy itself add a command + A: Use one of proxy, connect+, socks4+, or socks5+ as the parent type. 3proxy + itself still performs name resolution; it's required, e.g., for ACL matching. + So, if no name resolution must be performed by 3proxy itself, add the command
fakeresolve- this command resolves any name to 127.0.0.2 address. + This command resolves any name to the 127.0.0.2 address. -
- There is FTP over HTTP (what is called FTP proxy in browsers) and FTP over FTP ப - (what is called FTP proxy in file managers and FTP clients). For browsers, there is no need to start additional - proxy service, 'proxy' supports FTP over HTTP, configure 'proxy' port as an FTP proxy. For ftp clients and file - managers use ftppr. FTP proxy supports both active and passive mode with client, but always use passive mode with FTP servers. + There is FTP over HTTP (what is called FTP proxy in browsers) and FTP over FTP + (what is called FTP proxy in file managers and FTP clients). For browsers, there is no need to start an additional + proxy service; 'proxy' supports FTP over HTTP. Configure the 'proxy' port as an FTP proxy. For FTP clients and file + managers, use ftppr. The FTP proxy supports both active and passive mode with the client but always uses passive mode with FTP servers.
++ An SNI proxy can be used to transparently redirect any TLS traffic with an external router or via local redirection rules. It can also be used + to extract hostnames from TLS to use in ACLs in combination with SOCKS or HTTP(s) proxy and/or the Transparent plugin. It can also be used to require TLS or mTLS between services. The TLS handshake contains no + port information; if tlspr is used as a standalone service, the destination port may be either detected with the Transparent plugin or configured with the -P option (default 443). +
+ Options: +
+-P <port> - destination port (default: 443) +-c <level> - TLS check level: + 0 (default) - allow non-TLS traffic + 1 - require TLS, only check client HELLO packet + 2 - require TLS, check both client and server HELLO + 3 - require TLS, check that the server sends a certificate (not compatible with TLS 1.3) + 4 - require mutual TLS, check that the server sends a certificate request and the client sends a certificate (not compatible with TLS 1.3) ++
+SNI Break (DPI Bypass):
+
tlspr can be used as a parent with the "tls" type to implement SNI splitting for DPI bypass (similar to NoDPI/GoodByeDPI).
+The client sends the first part of the TLS ClientHello, tlspr splits it at the SNI extension and sends it in two TCP packets,
+which can bypass some DPI systems that look for blocked hostnames in TLS handshakes.
+
To enable SNI break, use parent ... tls 0.0.0.0 0 and the -s option on the listening service with TCP_NODELAY:
+
+auth iponly +allow * +parent 1000 tls 0.0.0.0 0 +allow * +proxy -s -i127.0.0.1 -ocTCP_NODELAY -osTCP_NODELAY -p1443 ++
+TCP_NODELAY is required to prevent the kernel from merging the split packets. +
++Configuration examples: +
++1. Standalone SNI proxy on port 1443 redirecting to destination port 443: +
+tlspr -p1443 -P443 -c1 ++
+2. Using tlspr as parent in SOCKS to detect destination hostname from TLS (even when client connects by IP): +
+allow * * * 80 +parent 1000 http 0.0.0.0 0 +allow * * * * CONNECT +parent 1000 tls 0.0.0.0 0 +deny * * some.not.allowed.host +allow * +socks ++
+3. Using tlspr with HTTP proxy for TLS hostname-based ACL: +
+allow * * * 80 +parent 1000 http 0.0.0.0 0 +allow * * * 443 +parent 1000 tls 0.0.0.0 0 +deny * * blocked.example.com +allow * +proxy ++ +
+Since version 0.9.7, SSL/TLS support is built into 3proxy when compiled with OpenSSL +(WITH_SSL). Previously available as SSLPlugin, the functionality is now integrated +into the main binary. The plugin line is no longer required. +SSL/TLS support can be used to: +
+Creating an https:// proxy:
+
To create an https:// proxy, you need a server certificate and key. The certificate must not be self-signed
+and should contain Subject Alternative Names (SAN) for the proxy hostname/IP.
+
+ssl_server_cert /etc/3proxy/certs/server.crt +ssl_server_key /etc/3proxy/certs/server.key +ssl_serv +proxy -p3129 +ssl_noserv +proxy -p3128 ++
+This creates an https:// proxy on port 3129 and an http:// proxy on port 3128. +Configure clients to use https://proxy-host:3129/ as the proxy URL. +
+
+Client certificate authentication (mTLS):
+
To require clients to authenticate with a certificate, use ssl_server_verify and provide the CA certificate:
+
+ssl_server_cert /etc/3proxy/certs/server.crt +ssl_server_key /etc/3proxy/certs/server.key +ssl_server_ca_file /etc/3proxy/certs/ca.crt +ssl_server_verify +ssl_serv +proxy -p3129 ++
+Only clients with a valid certificate signed by the CA can connect. +
+
+MITM for TLS traffic inspection:
+
To intercept and decrypt TLS traffic, you need a CA certificate to generate spoofed server certificates:
+
+ssl_server_ca_file /etc/3proxy/certs/ca.crt +ssl_server_ca_key /etc/3proxy/certs/ca.key +ssl_client_verify +ssl_client_ca_file /etc/ssl/certs/ca-certificates.crt +ssl_mitm +proxy -p3128 +ssl_nomitm +proxy -p3129 ++
+The CA certificate must be trusted by clients. ssl_client_verify ensures the real server certificates are validated. +Without ssl_client_verify, the proxy is vulnerable to MITM attacks. +
+
+TLS client (connect to upstream via TLS):
+
To connect to upstream servers via TLS with client certificate authentication:
+
+ssl_client_cert /etc/3proxy/certs/client.crt +ssl_client_key /etc/3proxy/certs/client.key +ssl_client_verify +ssl_client_ca_file /etc/ssl/certs/ca-certificates.crt +ssl_cli +proxy -p3128 ++
+Conditional TLS for parent proxy (ssl_client_mode 3):
+
With ssl_client_mode 3, TLS handshake to parent proxy is performed only if the parent type ends with 's' (secure types). This allows mixing secure and non-secure parent proxies in the same configuration:
+
+ssl_server_cert /etc/3proxy/certs/server.crt +ssl_server_key /etc/3proxy/certs/server.key +ssl_client_mode 3 + +auth strong +allow user1 +parent 1000 https parent1.example.com 443 +allow user2 +parent 1000 socks5 parent2.example.com 1080 +ssl_serv +ssl_cli +proxy -p3128 +ssl_noserv +ssl_nocli ++
+This creates an HTTPS proxy (ssl_serv) that accepts TLS connections from clients. For parent proxy connections, user1's traffic goes through an https parent with TLS encryption (secure type), while user2's traffic goes through a regular socks5 parent without TLS. Secure parent types include: tcps, https, connects, connect+s, socks4s, socks5s, socks4+s, socks5+s, pop3s, smtps, ftps. +
+
+Creating a Certificate Authority (CA):
+
For MITM or mTLS, you need a CA. Generate a CA private key and certificate:
+
+# Generate CA private key +openssl genrsa -out ca.key 4096 + +# Generate CA certificate (valid for 10 years) +openssl req -x509 -new -nodes -key ca.key -sha256 -days 3650 \ + -subj "/C=US/ST=State/L=City/O=MyOrg/CN=My CA" \ + -out ca.crt ++
+For MITM, import ca.crt into client browsers/OS as a trusted root CA. +
+
+Creating a server certificate for https:// proxy:
+
The server certificate must have proper Subject Alternative Names (SAN):
+
+# Generate server private key +openssl genrsa -out server.key 2048 + +# Create a certificate signing request (CSR) +openssl req -new -key server.key \ + -subj "/C=US/ST=State/L=City/O=MyOrg/CN=proxy.example.com" \ + -out server.csr + +# Create extensions file for SAN +cat > server.ext << 'EOF' +authorityKeyIdentifier=keyid,issuer +basicConstraints=CA:FALSE +keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment +extendedKeyUsage = serverAuth +subjectAltName = @alt_names + +[alt_names] +DNS.1 = proxy.example.com +DNS.2 = proxy +IP.1 = 192.168.1.100 +EOF + +# Sign the certificate with CA +openssl x509 -req -in server.csr -CA ca.crt -CAkey ca.key \ + -CAcreateserial -out server.crt -days 365 -sha256 \ + -extfile server.ext ++
+For a public https:// proxy, use a CA like Let's Encrypt instead of self-signed. +
++Creating a client certificate for mTLS: +
+# Generate client private key +openssl genrsa -out client1.key 2048 + +# Create CSR +openssl req -new -key client1.key \ + -subj "/C=US/ST=State/L=City/O=MyOrg/CN=client1" \ + -out client1.csr + +# Create extensions file +cat > client.ext << 'EOF' +basicConstraints=CA:FALSE +keyUsage = digitalSignature, nonRepudiation, keyEncipherment +extendedKeyUsage = clientAuth +EOF + +# Sign with CA +openssl x509 -req -in client1.csr -CA ca.crt -CAkey ca.key \ + -CAcreateserial -out client1.crt -days 365 -sha256 \ + -extfile client.ext + +# Create PKCS#12 bundle for browser import +openssl pkcs12 -export -out client1.p12 \ + -inkey client1.key -in client1.crt -certfile ca.crt ++
+Import client1.p12 into the client browser or OS certificate store. +
++Quick setup script for development/testing: +
+#!/bin/sh +# Creates CA, server, and client certificates for SSLPlugin testing + +# CA +openssl genrsa -out ca.key 4096 +openssl req -x509 -new -nodes -key ca.key -sha256 -days 3650 \ + -subj "/CN=3proxy CA" -out ca.crt + +# Server +openssl genrsa -out server.key 2048 +openssl req -new -key server.key -subj "/CN=localhost" -out server.csr +cat > server.ext << 'EOF' +basicConstraints=CA:FALSE +keyUsage = keyEncipherment +extendedKeyUsage = serverAuth +subjectAltName = DNS:localhost,DNS:proxy,IP:127.0.0.1 +EOF +openssl x509 -req -in server.csr -CA ca.crt -CAkey ca.key \ + -CAcreateserial -out server.crt -days 365 -sha256 -extfile server.ext + +# Client +openssl genrsa -out client.key 2048 +openssl req -new -key client.key -subj "/CN=client" -out client.csr +cat > client.ext << 'EOF' +basicConstraints=CA:FALSE +extendedKeyUsage = clientAuth +EOF +openssl x509 -req -in client.csr -CA ca.crt -CAkey ca.key \ + -CAcreateserial -out client.crt -days 365 -sha256 -extfile client.ext +openssl pkcs12 -export -out client.p12 -passout pass: \ + -inkey client.key -in client.crt -certfile ca.crt ++
+Since version 0.9.7, PCRE (Perl Compatible Regular Expressions) filtering is built into +3proxy when compiled with PCRE2 support (WITH_PCRE). Previously available as PCREPlugin, +the functionality is now integrated into the main binary. The plugin line is no longer required. +
++PCRE filtering can be used to create matching and replacement rules with regular expressions +for client requests, client and server headers, and client and server data. +
++Commands: +
+pcre TYPE FILTER_ACTION REGEXP [ACE] +pcre_rewrite TYPE FILTER_ACTION REGEXP REWRITE_EXPRESSION [ACE] +pcre_extend FILTER_ACTION [ACE] +pcre_options OPTION1 [...] ++
+
+Examples: +
+# Block requests containing specific keywords for certain users +pcre request deny "porn|sex" user1,user2,user3 192.168.0.0/16 + +# Block responses with specific content type +pcre srvheader deny "Content-type: application" + +# Replace content in both directions (censorship) +pcre_rewrite clidata,srvdata dunno "porn|sex|pussy" "***" baduser +pcre_extend deny * 192.168.0.1/16 ++
+Note: Regular expressions don't require authentication and cannot replace +authentication and/or allow/deny ACLs. +
-First, always specify internal interface to accept incoming connection with +First, always specify the internal interface to accept incoming connections with the 'internal' configuration command or '-i' service command. (See -How to start any of proxy services (HTTP, SOCKS etc)). If -no internal interface is specified your proxy will act as open one. -
It's also important to specify external interface to prevent access to +How to start any of the proxy services (HTTP, SOCKS, etc.)). If +no internal interface is specified, your proxy will act as an open proxy. +
It's also important to specify the external interface to prevent access to the internal network with 'external' or -e. -
3proxy with configuration files allows to use authentication and -authorization for user's access. Authentication is possible by -username/password or user's NetBIOS name. Authentication type is specified by -'auth' command. +
3proxy with configuration files allows you to use authentication and +authorization for user access. Authentication is possible by +username/password or the user's NetBIOS name. The authentication type is specified by the +'auth' command.
auth none-Disables both authentication and authorization. You can not use ACLs. +Disables both authentication and authorization. You cannot use ACLs.
auth iponly-Specifies no authentication, ACLs authorization is used. +Specifies no authentication; ACL-based authorization is used.
auth nbname-Authentication by NetBIOS name + ACLs. NetBIOS name of 'messenger' service -is obrained before ACL validation. If no name is obtained it's assumed to be -empty. Messenger is started by default in Windows NT/2000/XP. For Win9x -WinPopUP need to be launched. This type of authentication may be spoofed -by privileged local user. +Authentication by NetBIOS name + ACLs. The NetBIOS name of the 'messenger' service +is obtained before ACL validation. If no name is obtained, it's assumed to be +empty. Messenger is started by default in Windows NT/2000/XP. For Win9x, +WinPopUP needs to be launched. This type of authentication may be spoofed +by a privileged local user.
auth strong-Authentication by username/password. If user is not registered his +Authentication by username/password. If the user is not registered, their access is denied regardless of ACLs.
Different services can have different authentication levels. @@ -524,30 +952,30 @@ socks It's possible to authorize access by client IP address, IP address or requested resource, -target port, time, etc after authentication. +target port, time, etc., after authentication. (See How to limit resource access). -
Since 0.6 version double authentication is possible, e.g. +
Since version 0.6, double authentication is possible, e.g.:
auth iponly strong allow * * 192.168.0.0/16 allow user1,user2 proxy-strong authentication will only be used if ACL requires username to deside if -access must be granted. That is, in example, strong username authentication -is not required to access 192.168.0.0/16 -
0.6 version introduces authentication (username) caching to increase -productivity. It's recommended to use authentication caching with resource -or time consuming authentication types, such as nbname or external plugins +Strong authentication will only be used if the ACL requires a username to decide if +access must be granted. That is, in the example, strong username authentication +is not required to access 192.168.0.0/16. +
Version 0.6 introduces authentication (username) caching to increase +performance. It's recommended to use authentication caching with resource- +or time-consuming authentication types, such as nbname or external plugins (WindowsAuthentication). -Caching can be set with 'authcache' command with 2 parameters: caching type -and caching time (in seconds). Caching type defines the type of cached access: -'ip' - after successful authentication all connections during caching time -from same IP are assigned to the same user, username is not requested. -"ip,user" - username is requested and all connections from the same IP are +Caching can be set with the 'authcache' command with 2 parameters: caching type +and caching time (in seconds). The caching type defines the type of cached access: +'ip' - after successful authentication, all connections during the caching time +from the same IP are assigned to the same user; the username is not requested. +"ip,user" - the username is requested, and all connections from the same IP are assigned to the same user without actual authentication. "user" - same as above, but IP is not checked. "user,password" - username and password are checked -against cached ones. For authentication special authentication type 'cache' +against cached ones. For authentication, the special authentication type 'cache' must be used. Example:
@@ -556,42 +984,42 @@ auth cache strong windows proxy -n-Please note, that caching affects security. Never use caching for access to +Please note that caching affects security. Never use caching for access to critical resources, such as web administration. -
authcache can be used to bind user's sessions to ip with 'limit' option, with +
authcache can be used to bind a user's sessions to an IP with the 'limit' option. With
- autchcache ip,user,pass,limit 120 + authcache ip,user,pass,limit 120 auth cache strong- user will not be able to use more than a single IP during cache time (120 sec). + the user will not be able to use more than a single IP during the cache time (120 sec). -
-Userslist is created with 'users' command. +The user list is created with the 'users' command.
users USERDESC ...-With a single command it's possible to define few users, or you -can use few 'users' commands. USERDESC is user description. Description -consists of three semicolon delimited parts - login, password type and +With a single command, it's possible to define a few users, or you +can use multiple 'users' commands. USERDESC is a user description. The description +consists of three semicolon-delimited parts - login, password type, and
users admin:CL:bigsecret test:CL:password test1:CL:password1 users "test2:CR:$1$lFDGlder$pLRb4cU2D7GAT58YQvY49." users test3:NT:BD7DFBF29A93F93C63CB84790DA00E63-Please note the usage of quotation sign: it's required to comment out $ sign -overwise used as a file inclusion macro. -Next password types are available: +Please note the usage of quotation marks: they're required to escape the $ sign, +which is otherwise used as a file inclusion macro. +The following password types are available:
users $/etc/.3proxypasswd@@ -599,48 +1027,48 @@ or
users $"c:\Program Files\3proxy\passwords"-It's possible to create NT and crypt passwords with mycrypt utility included -in distribution. -
-Commands allow, deny and flush are used to manage ACLs: +The commands allow, deny, and flush are used to manage ACLs:
allow <userlist> <sourcelist> <targetlist> <targetportlist> <commandlist> <weekdaylist> <timeperiodlist>
-
deny <userlist> <sourcelist> <targetlist> <weekdaylist> <timeperiodlist>
+
deny <userlist> <sourcelist> <targetlist> <weekdaylist> <timeperiodlist>
flush
-
-Redirections are usefull to e.g. forward requests from specific clients
-to different servers or proxy server. Additionally, redirections are usefull
-to convert proxy interface from ont format to another, e.g. requests from
-SOCKS proxy can be redirected to parent HTTP proxy, or SOCKSv5 client can be
-redirected to SOCKSv4 proxy.
-
Because 3proxy understand "transparent" web request, it can be used as an
-intermediate software between HTTP proxy and NAT server for transparent HTTP
-forwarding, because it can convert "Web server" request issued by client to
-"proxy request" required by proxy server. A simplest redirection is:
+Redirections are useful to, e.g., forward requests from specific clients
+to different servers or proxy servers. Additionally, redirections are useful
+to convert the proxy interface from one format to another, e.g., requests from
+a SOCKS proxy can be redirected to a parent HTTP proxy, or a SOCKSv5 client can be
+redirected to a SOCKSv4 proxy.
+
Because 3proxy understands "transparent" web requests, it can be used as an
+intermediate software between an HTTP proxy and a NAT server for transparent HTTP
+forwarding, because it can convert a "Web server" request issued by a client to a
+"proxy request" required by a proxy server. A simple redirection is:
auth iponly allow * parent 1000 http 192.168.1.1 3128 proxy-All trafiic of HTTP proxy is redirected to parent proxy 192.168.1.1 port 3128. -
auth iponly @@ -698,25 +1126,25 @@ allow * * * 110 parent 1000 pop3 0.0.0.0 0 socks-In this case all SOCKS traffic with destination port 80 is forwarded to local -'proxy' service, destination port 21 to 'ftppr' and 110 to 'pop3pr'. There is -no need to run these services expicitly. Local redirections are usefull if -you want to see and control via ACLs protocol specific parameters, e.g. -filenames requests thorugh FTP while clients are using SOCKS. +In this case, all SOCKS traffic with destination port 80 is forwarded to the local +'proxy' service, destination port 21 to 'ftppr', and 110 to 'pop3pr'. There is +no need to run these services explicitly. Local redirections are useful if +you want to see and control via ACLs protocol-specific parameters, e.g., +filenames requested through FTP while clients are using SOCKS. -
Q: What is it for?
-A: To have control based on request and to have URLs and another protocol specific parameters to be logged. +A: To have control based on the request and to have URLs and other protocol-specific parameters logged. -Q: What are restrictions?
-A: It's hard to redirect services for non-default ports; Internet Explorer supports only SOCKSv4 with no password authentication (Internet Explorer sends username, but not password), for SOCKSv5 only cleartext password authentication is supported. +Q: What are the restrictions?
+A: It's hard to redirect services for non-default ports; Internet Explorer supports only SOCKSv4 with no password authentication (Internet Explorer sends the username, but not the password); for SOCKSv5, only cleartext password authentication is supported. -Q: What are advantages?
-A: You need only to setup SOCKS proxy in browser settings. You can use socksifier, i.e. FreeCAP or SocksCAP with application which is not proxy aware. +Q: What are the advantages?
+A: You only need to set up a SOCKS proxy in browser settings. You can use a socksifier, e.g., FreeCAP or SocksCAP, with an application that is not proxy-aware. -Q: How to setup?
-A: You should specify parent proxy with IP of 0.0.0.0 and port 0. Examples: +Q: How to set it up?
+A: You should specify a parent proxy with an IP of 0.0.0.0 and port 0. Examples:auth iponly allow * * * 80,8080-8088 @@ -729,19 +1157,19 @@ allow * * * 80,8080-8088 allow * * * 21,2121 parent 1000 ftp 0.0.0.0 0 allow * * * 21,2121 -#redirect ports 21 and 2121 to local +#redirect ports 21 and 2121 to local #ftp proxy allow * -#allow rest of connections directly +#allow the rest of connections directly socks -#now let socks server to start +#now let the socks server start-
Q: How it affects different ACL rules
-A: After local redirections rules are applied again to protocol-level request. Redirection rule itself is skipped. It makes it possible to redirect request again on the external proxy depending on request itself. +Q: How does it affect different ACL rules?
+A: After local redirections, rules are applied again to the protocol-level request. The redirection rule itself is skipped. This makes it possible to redirect the request again to an external proxy depending on the request itself.allow * * * 80,8080-8088 parent 1000 http 0.0.0.0 0 @@ -751,33 +1179,32 @@ allow * * $c:\3proxy\local.nets 80,8080-8088 #allow direct access to local.nets networks allow * * * 80,8080-8088 parent 1000 http proxy.3proxy.org 3128 -#use parent caching proxy for rest of the networks +#use parent caching proxy for the rest of the networks allow * -#allow direct connections for rest of socks +#allow direct connections for the rest of socks #requests-
-Proxy itself doesn't manage network level routing. The only way to control -outgoing channel is to select external interface. It's possible to make -external interface (what is usually selected with 'external' command or -'-e' option) random by using local redirection with external port 0. +The proxy itself doesn't manage network-level routing. The only way to control +the outgoing channel is to select the external interface. It's possible to make +the external interface (what is usually selected with the 'external' command or +'-e' option) random by using local redirection with an external port of 0.
auth iponly allow * parent 500 http 10.1.1.101 0 parent 500 http 10.2.1.102 0-Now external interface is randomly selected with 0.5 probability between +Now the external interface is randomly selected with 0.5 probability between 10.1.1.101 and 10.2.1.102. To work as expected, different default routes -must between 2 interfaces. -used +must be used between the 2 interfaces.
-If both interface addresses are in same network, e.g. 10.1.1.101 and 10.1.1.102 -and you want to select random gateway between 10.1.1.1 and 10.1.1.2, you must -control it by using routing table, in case there is no default gateway route +If both interface addresses are in the same network, e.g., 10.1.1.101 and 10.1.1.102, +and you want to select a random gateway between 10.1.1.1 and 10.1.1.2, you must +control it by using the routing table, in case there is no default gateway route for Windows:
route add -p 10.1.1.1 10.1.1.101 @@ -785,33 +1212,33 @@ for Windows: route add -p 0.0.0.0 mask 0.0.0.0 192.168.1.1 route add -p 0.0.0.0 mask 0.0.0.0 192.168.1.2-If you have no second address yet, just add it. Under Linux/Unix it's better +If you don't have a second address yet, just add it. Under Linux/Unix, it's better to use source routing.
-parent command may also be used to build a proxy chains. In this case -few 'parent' commands are used for single 'allow' rule with different -weights (first argument of parent command). Chain may contain any number -of proxy servers, but it should be noted that every hope significantly -reduces productivity. It's possible to mix different types of proxy within -single chain: HTTPS (HTTP connect), SOCKS4, SOCKS5. Weight different from -1000 is used to build random chains. if weight W is below 1000, this proxy -will be used as a next chain hop with probability of W/1000. That is, if -the weight is 250 probability this proxy will be used for the next hope is -25%. 'parent' records with common weight of 1000 establish a group, one of -these record will be used for the hop with probability according to weight. -Warning: each group must have a weight even of 1000. As follows, common -weight of all 'parent' records must also be even of 1000. If common weight -of 'parent' records in te chain is 3000, chain has 3 hops and must be formed +The parent command may also be used to build proxy chains. In this case, +multiple 'parent' commands are used for a single 'allow' rule with different +weights (the first argument of the parent command). A chain may contain any number +of proxy servers, but it should be noted that every hop significantly +reduces performance. It's possible to mix different types of proxies within a +single chain: HTTPS (HTTP connect), SOCKS4, SOCKS5. A weight different from +1000 is used to build random chains. If weight W is below 1000, this proxy +will be used as the next chain hop with a probability of W/1000. That is, if +the weight is 250, the probability that this proxy will be used for the next hop is +25%. 'parent' records with a combined weight of 1000 establish a group; one of +these records will be used for the hop with a probability according to the weight. +Warning: each group must have a weight that is a multiple of 1000. As follows, the combined +weight of all 'parent' records must also be a multiple of 1000. If the combined weight +of 'parent' records in the chain is 3000, the chain has 3 hops and must be formed of 3 groups. Example:
allow * parent 500 socks5 192.168.1.1 1080 parent 500 connect 192.168.10.1 3128-In this case we have 1 parent proxy (1 hop) which is randomely choosen between -2 hosts: 192.168.1.1 and 192.168.10.1. 2 records form a single group. +In this case, we have 1 parent proxy (1 hop) which is randomly chosen between +2 hosts: 192.168.1.1 and 192.168.10.1. The 2 records form a single group.
allow * * * 80 parent 1000 socks5 192.168.10.1 1080 @@ -819,33 +1246,33 @@ parent 1000 connect 192.168.20.1 3128 parent 300 socks4 192.168.30.1 1080 parent 700 socks5 192.168.40.1 1080-In this case we have 3 groups (3 hops in the chain). First hop is 192.168.10.1, -second hop is 192.168.20.1 and 3rd one is either 192.168.30.1 with probability -of 30% or 192.168.40.1 with probability of 70%. +In this case, we have 3 groups (3 hops in the chain). The first hop is 192.168.10.1, +the second hop is 192.168.20.1, and the 3rd one is either 192.168.30.1 with a probability +of 30% or 192.168.40.1 with a probability of 70%.
-3proxy supports bandwidth filters. To manage filters bandlimin/bandlimout and -nobandlimin/nobandlimout. 'in' means incoming and 'out' - outgoing traffic. +3proxy supports bandwidth filters. Use the bandlimin/bandlimout and +nobandlimin/nobandlimout commands to manage filters. 'in' means incoming and 'out' means outgoing traffic.
bandlimin <bitrate> <userlist> <sourcelist> <targetlist> <targetportlist> <commandlist>
nobandlimin <userlist> <sourcelist> <targetlist> <targetportlist> <commandlist>
bandlimin 57600 * 192.168.10.16 bandlimin 57600 * 192.168.10.17 bandlimin 57600 * 192.168.10.18 bandlimin 57600 * 192.168.10.19-Create 4 separete pipes for 4 client with emulation of modem connection. +Create 4 separate pipes for 4 clients with emulation of a modem connection.
bandlimin 57600 * 192.168.10.16/30-Create single pipe for all 4 clients. That is 4 clients share modem connection. +Create a single pipe for all 4 clients. That is, 4 clients share a modem connection. In this example:
nobandlimin * * * 110 @@ -857,7 +1284,7 @@ limitation.
-counter <filename> <type> <reportpath>
+counter <filename> <type> <reportpath>
countin <number> <type> <amount> <userlist> <sourcelist> <targetlist> <targetportlist> <commandlist>
nocountin <userlist> <sourcelist> <targetlist> <targetportlist> <commandlist>
countout <number> <type> <amount> <userlist> <sourcelist> <targetlist> <targetportlist> <commandlist>
@@ -865,20 +1292,20 @@ counter <filename> <type> <reportpath>
-You can set traffic limit per day (D), week (W), month (M), year (Y) or -absolute ('N'), as specified by 'type' argument of counterin command. -Traffic information is stored in binary file specified by 'filename' argument. -countersutil utility can be used to manage this file. -reportpath specifies location of text reports, type parameter of 'counter' -command controls how often text reports are created. amount is amount of -allowed traffic in Megabytes (MB). nocountin allows you to set exclusions. +You can set a traffic limit per day (D), week (W), month (M), year (Y), or +absolute ('N'), as specified by the 'type' argument of the counterin command. +Traffic information is stored in a binary file specified by the 'filename' argument. +The countersutil utility can be used to manage this file. +The reportpath specifies the location of text reports; the type parameter of the 'counter' +command controls how often text reports are created. The amount is the amount of +allowed traffic in megabytes (MB). nocountin allows you to set exclusions.
3proxy accounts protocol level traffic. Provider counts channel or IP-level traffic with network and transport headers. In additions, 3proxy doesn't counts DNS resolutions, pings, floods, scans, etc. It makes approx. 10% of difference. That's why you should have 15% reserve if you use 3proxy to limit your traffic. If difference with your provider is significantly above 10% you should look for traffic avoiding proxy server, for example connections through NAT, traffic originated from the host with proxy installed, traffic from server applications, etc. +
3proxy accounts for protocol-level traffic. Providers count channel- or IP-level traffic with network and transport headers. In addition, 3proxy does not count DNS resolutions, pings, floods, scans, etc. This accounts for approximately a 10% difference. That is why you should have a 15% reserve if you use 3proxy to limit your traffic. If the difference with your provider is significantly above 10%, you should look for traffic bypassing the proxy server, for example connections through NAT, traffic originating from the host with the proxy installed, traffic from server applications, etc.
- For name resolution and caching use commands nserver, nscache / nscache6 and nsrecord. + For name resolution and caching, use the commands nserver, nscache / nscache6, and nsrecord.
nserver 192.168.1.2 nserver 192.168.1.3:5353/tcp@@ -888,79 +1315,126 @@ allowed traffic in Megabytes (MB). nocountin allows you to set exclusions.
nscache 65535 nscache6 65535- sets name cache size for IPv4 and IPv6. Name cache must be large enouth, if presents. - name cache is only used if nserver is configured. + sets name cache size for IPv4 and IPv6. The name cache must be large enough, if present. + The name cache is only used if nserver is configured.
nsrecord server.mycompany.example.com 192.168.1.1 nsrecord www.porno.com 127.0.0.2 ... deny * * 127.0.0.2- adds static nsrecords. Also, static nsrecords are used for dnspr, unless -s option is specified. - Since 0.8 version, parent proxy may be configured for dnspr. + adds static nsrecords. Also, static nsrecords are used for dnspr, unless the -s option is specified. + Since version 0.8, a parent proxy may be configured for dnspr.
- IPv6 is supported since 0.8. Please note, some proxy protolos, e.g. SOCKSv4,
- do not support IPv6. SOCKSv5 supports IPv6 with special request type (must be
- implemented by client).
+ IPv6 is supported since version 0.8. Please note that some proxy protocols, e.g., SOCKSv4,
+ do not support IPv6. SOCKSv5 supports IPv6 with a special request type (which must be
+ implemented by the client).
3proxy supports proxying from IPv4 and IPv6 networks to IPv4,
- IPv6 and mixed networks. IPv6 address may be used in
- internal, external, parent commands, ACLs, -i and -e options,etc.
- external command and -e options may be given twice for each service - once with IPv4
- and once with IPv6 address. internal can be given only once, to bind to all IPv4 and
- IPv6 addresses use [0:0:0:0:0:0:0:0] or [::].
+ IPv6, and mixed networks. An IPv6 address may be used in
+ internal, external, and parent commands, ACLs, -i and -e options, etc.
+ The external command and -e options may be given twice for each service—once with an IPv4
+ and once with an IPv6 address. internal can be given only once; to bind to all IPv4 and
+ IPv6 addresses, use [0:0:0:0:0:0:0:0] or [::].
- Any service may be configured with -4, -46, -64, -6 options to specify decied
- priority for name to IPv4/IPv6 address resolution (IPv4 only, IPv4 priority,
+ Any service may be configured with -4, -46, -64, or -6 options to specify the desired
+ priority for name-to-IPv4/IPv6 address resolution (IPv4 only, IPv4 priority,
IPv6 priority, IPv6 only).
- In example, users needs access from external network to proxy server located - on the host 192.168.1.2. This host can not be accessed from external network, - but it has access to external network with with external address 1.1.1.1. - Also, user has access to the host 2.2.2.2 (IP address may be dynamic) with - hostname host.dyndns.example.org via external network. User needs 2 instances - of 3proxy, first one on the host 192.168.1.2 with config + For example, a user needs access from an external network to a proxy server located + on the host 192.168.1.2. This host cannot be accessed from the external network, + but it has access to the external network with an external address 1.1.1.1. + Also, the user has access to the host 2.2.2.2 (IP address may be dynamic) with + hostname host.dyndns.example.org via the external network. The user needs 2 instances + of 3proxy, the first one on the host 192.168.1.2 with the config
users user:CL:password auth strong allow user proxy -rhost.dyndns.example.org:1234- second one on the host.dyndns.example.org (2.2.2.2) with config + and the second one on host.dyndns.example.org (2.2.2.2) with the config
auth iponly allow * * 1.1.1.1 tcppm -R0.0.0.0:1234 3128 1.1.1.1 3128- For browser settings proxy is host.dyndns.example.org:3128. - + For browser settings, the proxy is host.dyndns.example.org:3128. + +
+ 3proxy supports HAProxy PROXY protocol v1 for both receiving and sending client + IP information. This is useful when 3proxy is behind a load balancer or when + passing client information to a parent proxy. +
+
+ Receiving PROXY protocol header:
+
Use the -H option to make 3proxy expect a PROXY protocol v1 header
+ on incoming connections. This allows 3proxy to receive the real client IP address
+ from HAProxy or another load balancer:
+
+proxy -H -p3128 +socks -H -p1080 ++
+ The PROXY protocol header must be sent before any protocol-specific data. +
+
+ Sending PROXY protocol header to parent proxy:
+
Use the ha parent type to send a PROXY protocol v1 header to
+ the parent proxy. This must be the last parent in the chain:
+
+allow * +parent 1000 ha +parent 1000 socks5 parent.example.com 1080 +socks ++
+ This configuration sends the client IP information to the SOCKS5 parent proxy + via the PROXY protocol. +
+
+ Use the maxseg command to set the TCP maximum segment size (MSS)
+ for outgoing connections. This can be useful to work around path MTU discovery
+ issues or to optimize traffic for specific network conditions:
+
+maxseg 1400 +proxy -p3128 -OcTCP_NODELAY,TCP_MAXSEG -OsTCP_NODELAY,TCP_MAXSEG ++
+ The value is specified in bytes. This setting uses the TCP_MAXSEG socket option + and may not be supported on all platforms. A typical use case is to reduce MSS + to avoid fragmentation in VPN tunnels or to work around MTU issues with certain + network paths. +
-Latest version of 3proxy may be obtained -here. -New version may have changes and incompatibilities with previous one in files -format or commands. Please, read CHANGELOG file and another documentation -before installing new version. +The latest version of 3proxy may be obtained +here. +A new version may have changes and incompatibilities with the previous one in file +formats or commands. Please read the CHANGELOG file and other documentation +before installing a new version.
-If installed as system service, 3proxy understands Windows service commands -for START, STOP, PAUSE and RESUME. If service is PAUSEd, no new connections -are accepted while older connections are processed. Currently there is no -support for dynamic configuration change, so, you have to restart service +If installed as a system service, 3proxy understands Windows service commands +for START, STOP, PAUSE, and RESUME. If the service is PAUSEd, no new connections +are accepted while older connections are processed. Currently, there is no +support for dynamic configuration changes, so you have to restart the service completely if you have changed any configuration. -You can control 3proxy service via "Services" administration ot via "net" command: +You can control the 3proxy service via "Services" administration or via the "net" command:
net start 3proxy net stop 3proxy @@ -971,8 +1445,8 @@ You can control 3proxy service via "Services" administration ot via "net" comman
Ask it in Github. - Don't try to ask something before reading this document. + Please read this document before asking a question.
- Извлеките файлы из архива 3proxy.tgz (например, с помощью WinZip). - Используйте команду nmake /f Makefile.msvc. + Извлеките файлы из архива 3proxy.tgz (например, с помощью WinZip) или используйте git. +
+ nmake /f Makefile.msvc ++ Исполняемые файлы будут помещены в каталог
bin/.
- - См. Как скомпилировать 3proxy Visual C++. - Используйте Makefile.intl вместо Makefile.msvc -
-
- Извлеките файлы из архива 3proxy.tgz (например, с помощью WinZip или, при наличии
- Cygwin, tar -xzf 3proxy.tgz).
- Используйте команду make -f Makefile.win. Если по каким-то причинам вы хотите использовать
- библиотеку POSIX-эмуляции CygWin - используйте make -f Makefile.unix.
- При использовании CygWin, функции, специфичные для Windows (такие, как запуск в
- качестве службы) будут недоступны.
+ CMake предоставляет кроссплатформенную систему сборки. Работает на Windows (MSVC, MinGW), Linux, macOS и BSD.
+
Базовые шаги сборки:
+
+ mkdir build + cd build + cmake .. + cmake --build .+ На Windows с Visual Studio можно также сгенерировать файл решения: +
+ cmake -G "Visual Studio 17 2022" -A x64 .. + cmake --build . --config Release+ Опциональные функции можно включить через параметры cmake: +
+ cmake -D3PROXY_USE_OPENSSL=ON -D3PROXY_USE_PCRE2=ON ..+ Доступные опции: 3PROXY_USE_OPENSSL, 3PROXY_USE_PCRE2, 3PROXY_USE_PAM, 3PROXY_USE_ODBC. +
build/bin/.
- Используйте make -f Makefile.unix. Должен использоваться GNU make, на - некоторых системах необходимо использовать gmake вместо make. Под Linux - необходимо использовать Makefile.Linux, под Solaris - Makefile.Solaris-* (в - зависимости от используемого компилятора). Компиляция проверена в FreeBSD/i386, - OpenBSD/i386, NetBSD/i386, RH Linux/Alpha, Debian/i386, Gentoo/i386, Gentoo/PPC, - Solaris 10, но должно собираться в любых версиях *BSD/Linux/Solaris. - В других системах может потребоваться модификация make-файла и/или исходных текстов. - Для компиляции с поддержкой ODBC необходимо убрать -DNOODBC из флагов - компиляции и добавить -lodbc (или другую ODBC-библиотеку) к флагам линковщика. -
-- Используйте make -f Makefile.ccc. Компиляция проверена в RH Linux 7.1/Alpha. - В других системах может потребоваться модификация файла и/или исходных текстов. + Для Linux используйте: +
+ ln -sf Makefile.Linux Makefile + make+ Для FreeBSD используйте: +
+ ln -sf Makefile.FreeBSD Makefile + make+ Для других Unix-подобных систем используйте Makefile.unix. На BSD-производных системах + убедитесь, что используете GNU make; иногда он называется gmake вместо make. +
bin/.
- Извлеките файлы из архива 3proxy.zip в любой каталог + Извлеките файлы из архива 3proxy.zip в любой каталог (например, c:\Program Files\3proxy). Если необходимо, создайте каталог для хранения файлов журналов. Создайте файл конфигурации 3proxy.cfg в каталоге 3proxy (см. раздел Конфигурация сервера). - Если используется версия более ранняя, чем 0.6, добавьте строку -
- service- в файл 3proxy.cfg. Откройте командную строку (cmd.exe). + Откройте командную строку (cmd.exe). Перейдите в каталог с 3proxy и дайте команду 3proxy.exe --install:
D:\>C: C:\>cd C:\Program Files\3proxy C:\Program Files\3proxy>3proxy.exe --installСервис должен быть установлен и запущен. Если сервис не запускается, - проверьте содержимое файла журнала, - попробуйте удалить строку service из 3proxy.cfg, запустить 3proxy.exe вручную - и проанализировать сообщения об ошибках. + попробуйте запустить 3proxy.exe вручную и проанализировать сообщения об ошибках.
Для удаления 3proxy необходимо остановить сервис и дать команду 3proxy.exe --remove: @@ -138,43 +146,110 @@ C:\Program Files\3proxy>net stop 3proxy C:\Program Files\3proxy>3proxy.exe --remove после чего каталог 3proxy можно удалить. -
- Установка в качестве системной службы под Windows 9x поддерживается с версии 0.5 -
-- Извлеките файлы из архива 3proxy.zip в любой каталог - (например, c:\Program Files\3proxy). Если необходимо, создайте каталог для - хранения файлов журналов. Создайте файл конфигурации 3proxy.cfg в - каталоге 3proxy (См. раздел Конфигурация сервера). - В файле конфигурации удалите строку -
- service- и добавьте строку -
- daemon- Создайте ярлык для 3proxy.exe и поместите его в автозагрузку либо с помощью - редактора реестра regedit.exe добавьте в разделе -
- Скомпилируйте 3proxy (см. раздел Компиляция). Скопируйте
- исполняемые файлы в подходящий каталог (например, /usr/local/3proxy/sbin для
- серверных приложений или /usr/local/3proxy/bin для клиентских утилит).
- Создайте файл /usr/local/etc/3proxy.cfg.
- (См. раздел Конфигурация сервера).
- Изменить расположение файла конфигурации можно, задав параметр при вызове
- 3proxy или изменив путь в файле 3proxy.c до компиляции.
- Добавьте вызов 3proxy в скрипты начальной инициализации.
+ С помощью Makefile:
+
Скомпилируйте 3proxy (см. раздел Компиляция), затем выполните:
+
+ sudo make install+ Это установит исполняемые файлы в
/usr/local/3proxy/sbin/,
+ конфигурацию в /etc/3proxy/ и настроит chroot-каталоги.
+ Файл конфигурации по умолчанию: /etc/3proxy/3proxy.cfg.
+
+ + С помощью CMake: +
+ mkdir build && cd build + cmake .. + cmake --build . + sudo cmake --install .+ +
+ С помощью готовых пакетов из GitHub:
+
Скачайте .deb или .rpm пакеты со страницы GitHub Releases.
+
Для Debian/Ubuntu:
+
+ sudo dpkg -i 3proxy_*.deb+ Для RHEL/CentOS/Fedora: +
+ sudo rpm -i 3proxy-*.rpm+ +
+ Добавьте 3proxy в скрипты автозапуска или используйте systemd: +
+ sudo systemctl enable 3proxy + sudo systemctl start 3proxy+ +
+ С помощью CMake (рекомендуется): +
+ mkdir build && cd build + cmake .. + cmake --build . + sudo cmake --install .+ Это установит: +
/usr/local/bin//etc/3proxy//usr/local/lib/3proxy//Library/LaunchDaemons/org.3proxy.3proxy.plist+ С помощью Makefile: +
+ ln -sf Makefile.FreeBSD Makefile + make + sudo make install+ Это установит исполняемые файлы в
/usr/local/3proxy/bin/ и конфигурацию в /usr/local/etc/3proxy/.
+
+
+ Управление службой через launchd:
+
После установки через cmake службой можно управлять с помощью launchctl:
+
+ # Загрузить и запустить службу + sudo launchctl load /Library/LaunchDaemons/org.3proxy.3proxy.plist + + # Остановить службу + sudo launchctl stop org.3proxy.3proxy + + # Запустить службу + sudo launchctl start org.3proxy.3proxy + + # Выгрузить и отключить службу + sudo launchctl unload /Library/LaunchDaemons/org.3proxy.3proxy.plist+ Служба запускается от имени пользователя
proxy (создаётся при установке).
+ Файл конфигурации: /etc/3proxy/3proxy.cfg
+
+ + Использование готовых образов из GitHub Container Registry: +
+ docker pull ghcr.io/3proxy/3proxy:latest+ +
+ Сборка Docker-образов:
+
Предоставляются два Dockerfile:
+
Dockerfile.minimal - минимальная статическая сборка без плагинов, конфигурация из stdin:
+ + docker build -f Dockerfile.minimal -t 3proxy.minimal . + docker run -i -p 3129:3129 --name 3proxy 3proxy.minimal+ Затем введите конфигурацию, завершив командой "end". +
Dockerfile.full - полная сборка с плагинами (SSL, PCRE, Transparent):
+ + docker build -f Dockerfile.full -t 3proxy.full . + docker run -p 3129:3129 -v /path/to/config:/usr/local/3proxy/conf 3proxy.full+ Файл конфигурации должен находиться по пути
/path/to/config/3proxy.cfg.
+
+ По умолчанию 3proxy работает в chroot-окружении с uid/gid 65535. Используйте nserver в конфигурации для DNS-разрешения в chroot.
+ Для запуска без chroot монтируйте конфигурацию в /etc/3proxy.
Убедитесь, что выправильно понимаете что такое internal и external адреса. Оба адреса - это адреса, принадлежищие хосту, на котором установлен 3proxy. @@ -439,7 +514,7 @@ - Internal External 0x0 Allowed" Формат ISA 2000/2004 firewall FWSEXTD.log (поля разделены табуляцией):
- "- + L%C %U unnknown:0:0.0 N %Y-%m-%d + "- + L%C %U unknown:0:0.0 N %Y-%m-%d %H:%M:%S fwsrv 3PROXY - %n %R %r %D %O %I %r TCP Connect - - - %E - - - - -"@@ -508,6 +583,341 @@ через http прокси, дополнительного прокси поднимать не надо. Для FTP-клиентов необходимо поднять ftppr. FTP прокси всегда работает с FTP сервером в пассивном режиме. +
+ SNI proxy может быть использован для транспарентного перенаправления любого TLS трафика (например HTTPS) на внешнем маршрутизаторе + или локальными правилами. Так же можно использовать его для извлечения имени хоста из TLS хендшейка с целью логгирования или использования в ACL. + Еще одна задача которую может решать модуль - требование наличия TLS или mTLS (mutual TLS). + Если tlspr используется как отдельный сервис без использования плагина Transparent, то необходимо задать порт назначения через опцию -P (по умолчанию 443), + т.к. TLS хендшейк не содержит информации о порте назначения. +
+ Опции: +
+-P <порт> - порт назначения (по умолчанию: 443) +-c <уровень> - уровень проверки TLS: + 0 (по умолчанию) - пропустить трафик без TLS + 1 - требовать TLS, проверять наличие client HELLO + 2 - требовать TLS, проверять наличие client и server HELLO + 3 - требовать TLS, проверять наличие серверного сертификата (не совместим с TLS 1.3+) + 4 - требовать взаимный (mutual) TLS, проверять что сервер запрашивает сертификат и клиент его отправляет (не совместим с TLS 1.3+) ++
+SNI Break (обход DPI):
+
tlspr может использоваться как родительский прокси типа "tls" для реализации SNI-фрагментации (аналог NoDPI/GoodByeDPI).
+Клиент отправляет первую часть TLS ClientHello, tlspr разбивает его на расширении SNI и отправляет двумя TCP-пакетами,
+что позволяет обойти некоторые DPI-системы, ищущие заблокированные имена хостов в TLS-рукопожатиях.
+
Для включения SNI break используйте parent ... tls 0.0.0.0 0 и опцию -s на слушающем сервисе с TCP_NODELAY:
+
+auth iponly +allow * +parent 1000 tls 0.0.0.0 0 +allow * +proxy -s -i127.0.0.1 -ocTCP_NODELAY -osTCP_NODELAY -p1443 ++
+TCP_NODELAY необходим, чтобы ядро не объединяло разделенные пакеты. +
++Примеры конфигурации: +
++1. Отдельный SNI proxy на порту 1443 с перенаправлением на порт назначения 443: +
+tlspr -p1443 -P443 -c1 ++
+2. Использование tlspr как родительского прокси в SOCKS для обнаружения hostname из TLS (даже если клиент подключается по IP): +
+allow * * * 80 +parent 1000 http 0.0.0.0 0 +allow * * * * CONNECT +parent 1000 tls 0.0.0.0 0 +deny * * some.not.allowed.host +allow * +socks ++
+3. Использование tlspr с HTTP proxy для ACL по имени хоста TLS: +
+allow * * * 80 +parent 1000 http 0.0.0.0 0 +allow * * * 443 +parent 1000 tls 0.0.0.0 0 +deny * * blocked.example.com +allow * +proxy ++ + +
+Начиная с версии 0.9.7 поддержка TLS/SSL встроена в 3proxy при компиляции с OpenSSL +(WITH_SSL). Ранее доступная как SSLPlugin, функциональность теперь интегрирована +в основной бинарный файл. Строка plugin больше не нужна. +TLS/SSL может использоваться для: +
+Создание https:// прокси:
+
Для создания https:// прокси требуется сертификат и ключ сервера. Сертификат не должен быть самоподписанным
+и должен содержать альтернативные имена (SAN) для имени хоста/IP прокси.
+
+ssl_server_cert /etc/3proxy/certs/server.crt +ssl_server_key /etc/3proxy/certs/server.key +ssl_serv +proxy -p3129 +ssl_noserv +proxy -p3128 ++
+Создаётся https:// прокси на порту 3129 и http:// прокси на порту 3128. +Настройте клиенты на использование https://proxy-host:3129/ в качестве URL прокси. +
+
+Аутентификация по клиентскому сертификату (mTLS):
+
Чтобы требовать от клиентов аутентификацию по сертификату, используйте ssl_server_verify и укажите CA-сертификат:
+
+ssl_server_cert /etc/3proxy/certs/server.crt +ssl_server_key /etc/3proxy/certs/server.key +ssl_server_ca_file /etc/3proxy/certs/ca.crt +ssl_server_verify +ssl_serv +proxy -p3129 ++
+Только клиенты с действительным сертификатом, подписанным CA, смогут подключиться. +
+
+MITM для инспекции TLS-трафика:
+
Для перехвата и расшифровки TLS-трафика требуется CA-сертификат для генерации подделанных серверных сертификатов:
+
+ssl_server_ca_file /etc/3proxy/certs/ca.crt +ssl_server_ca_key /etc/3proxy/certs/ca.key +ssl_client_verify +ssl_client_ca_file /etc/ssl/certs/ca-certificates.crt +ssl_mitm +proxy -p3128 +ssl_nomitm +proxy -p3129 ++
+CA-сертификат должен быть доверенным для клиентов. ssl_client_verify обеспечивает проверку реальных серверных сертификатов. +Без ssl_client_verify прокси уязвим для MITM-атак. +
+
+TLS-клиент (соединение с вышестоящим сервером через TLS):
+
Для соединения с вышестоящими серверами через TLS с аутентификацией по клиентскому сертификату:
+
+ssl_client_cert /etc/3proxy/certs/client.crt +ssl_client_key /etc/3proxy/certs/client.key +ssl_client_verify +ssl_client_ca_file /etc/ssl/certs/ca-certificates.crt +ssl_cli +proxy -p3128 ++
+Условное TLS для parent прокси (ssl_client_mode 3):
+
При ssl_client_mode 3 TLS-рукопожатие с родительским прокси выполняется только если тип parent прокси заканчивается на 's' (защищённые типы). Это позволяет смешивать защищённые и незащищённые родительские прокси в одной конфигурации:
+
+ssl_server_cert /etc/3proxy/certs/server.crt +ssl_server_key /etc/3proxy/certs/server.key +ssl_client_mode 3 + +auth strong +allow user1 +parent 1000 https parent1.example.com 443 +allow user2 +parent 1000 socks5 parent2.example.com 1080 +ssl_serv +ssl_cli +proxy -p3128 +ssl_noserv +ssl_nocli ++
+Создаётся HTTPS-прокси (ssl_serv), принимающий TLS-соединения от клиентов. Для соединений с родительским прокси трафик user1 идёт через https родитель с TLS-шифрованием (защищённый тип), а трафик user2 — через обычный socks5 родитель без TLS. Защищённые типы parent прокси: tcps, https, connects, connect+s, socks4s, socks5s, socks4+s, socks5+s, pop3s, smtps, ftps. +
+
+Создание удостоверяющего центра (CA):
+
Для MITM или mTLS требуется CA. Сгенерируйте закрытый ключ CA и сертификат:
+
+# Генерация закрытого ключа CA +openssl genrsa -out ca.key 4096 + +# Генерация сертификата CA (действителен 10 лет) +openssl req -x509 -new -nodes -key ca.key -sha256 -days 3650 \ + -subj "/C=RU/ST=Region/L=City/O=MyOrg/CN=My CA" \ + -out ca.crt ++
+Для MITM импортируйте ca.crt в браузеры/ОС клиентов как доверенный корневой CA. +
+
+Создание серверного сертификата для https:// прокси:
+
Серверный сертификат должен иметь правильные альтернативные имена (SAN):
+
+# Генерация закрытого ключа сервера +openssl genrsa -out server.key 2048 + +# Создание запроса на подпись сертификата (CSR) +openssl req -new -key server.key \ + -subj "/C=RU/ST=Region/L=City/O=MyOrg/CN=proxy.example.com" \ + -out server.csr + +# Создание файла расширений для SAN +cat > server.ext << 'EOF' +authorityKeyIdentifier=keyid,issuer +basicConstraints=CA:FALSE +keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment +extendedKeyUsage = serverAuth +subjectAltName = @alt_names + +[alt_names] +DNS.1 = proxy.example.com +DNS.2 = proxy +IP.1 = 192.168.1.100 +EOF + +# Подписание сертификата CA +openssl x509 -req -in server.csr -CA ca.crt -CAkey ca.key \ + -CAcreateserial -out server.crt -days 365 -sha256 \ + -extfile server.ext ++
+Для публичного https:// прокси используйте CA вроде Let's Encrypt вместо самоподписанного. +
++Создание клиентского сертификата для mTLS: +
+# Генерация закрытого ключа клиента +openssl genrsa -out client1.key 2048 + +# Создание CSR +openssl req -new -key client1.key \ + -subj "/C=RU/ST=Region/L=City/O=MyOrg/CN=client1" \ + -out client1.csr + +# Создание файла расширений +cat > client.ext << 'EOF' +basicConstraints=CA:FALSE +keyUsage = digitalSignature, nonRepudiation, keyEncipherment +extendedKeyUsage = clientAuth +EOF + +# Подписание CA +openssl x509 -req -in client1.csr -CA ca.crt -CAkey ca.key \ + -CAcreateserial -out client1.crt -days 365 -sha256 \ + -extfile client.ext + +# Создание PKCS#12 для импорта в браузер +openssl pkcs12 -export -out client1.p12 \ + -inkey client1.key -in client1.crt -certfile ca.crt ++
+Импортируйте client1.p12 в хранилище сертификатов браузера или ОС клиента. +
++Скрипт быстрой настройки для разработки/тестирования: +
+#!/bin/sh +# Создаёт CA, серверный и клиентский сертификаты для тестирования SSLPlugin + +# CA +openssl genrsa -out ca.key 4096 +openssl req -x509 -new -nodes -key ca.key -sha256 -days 3650 \ + -subj "/CN=3proxy CA" -out ca.crt + +# Сервер +openssl genrsa -out server.key 2048 +openssl req -new -key server.key -subj "/CN=localhost" -out server.csr +cat > server.ext << 'EOF' +basicConstraints=CA:FALSE +keyUsage = keyEncipherment +extendedKeyUsage = serverAuth +subjectAltName = DNS:localhost,DNS:proxy,IP:127.0.0.1 +EOF +openssl x509 -req -in server.csr -CA ca.crt -CAkey ca.key \ + -CAcreateserial -out server.crt -days 365 -sha256 -extfile server.ext + +# Клиент +openssl genrsa -out client.key 2048 +openssl req -new -key client.key -subj "/CN=client" -out client.csr +cat > client.ext << 'EOF' +basicConstraints=CA:FALSE +extendedKeyUsage = clientAuth +EOF +openssl x509 -req -in client.csr -CA ca.crt -CAkey ca.key \ + -CAcreateserial -out client.crt -days 365 -sha256 -extfile client.ext +openssl pkcs12 -export -out client.p12 -passout pass: \ + -inkey client.key -in client.crt -certfile ca.crt ++ +
+Начиная с версии 0.9.7 фильтрация PCRE встроена в 3proxy при компиляции с поддержкой +PCRE2 (WITH_PCRE). Ранее доступная как PCREPlugin, функциональность теперь интегрирована +в основной бинарный файл. Строка plugin больше не нужна. +
++PCRE-фильтрация может использоваться для создания правил поиска и замены с регулярными +выражениями для запросов клиентов, заголовков клиента и сервера, а также данных. +
++Команды: +
+pcre TYPE FILTER_ACTION REGEXP [ACE] +pcre_rewrite TYPE FILTER_ACTION REGEXP REWRITE_EXPRESSION [ACE] +pcre_extend FILTER_ACTION [ACE] +pcre_options OPTION1 [...] ++
+
+Примеры: +
+# Блокировать запросы с определёнными ключевыми словами для некоторых пользователей +pcre request deny "porn|sex" user1,user2,user3 192.168.0.0/16 + +# Блокировать ответы с определённым content-type +pcre srvheader deny "Content-type: application" + +# Замена содержимого в обоих направлениях (цензура) +pcre_rewrite clidata,srvdata dunno "porn|sex|pussy" "***" baduser +pcre_extend deny * 192.168.0.1/16 ++
+Примечание: Регулярные выражения не требуют авторизации и не могут заменить +авторизацию и/или ACL allow/deny. +
+Во-первых, для ограничения доступа необходимо указать внутренний интерфейс, @@ -632,7 +1042,7 @@ или
users $"c:\Program Files\3proxy\passwords"- Шифрованные NT и crypt пароли можно создавать с помощью утилиты mycrypt. + Шифрованные NT и crypt пароли можно создавать с помощью утилиты 3proxy_crypt.
+ 3proxy поддерживает протокол HAProxy PROXY v1 как для приёма, так и для + отправки информации об IP-адресе клиента. Это полезно, когда 3proxy находится + за балансировщиком нагрузки или при передаче информации о клиенте родительскому прокси. +
+
+ Приём заголовка PROXY протокола:
+
Используйте опцию -H, чтобы 3proxy ожидал заголовок PROXY протокола v1
+ на входящих соединениях. Это позволяет 3proxy получать реальный IP-адрес клиента
+ от HAProxy или другого балансировщика нагрузки:
+
+proxy -H -p3128 +socks -H -p1080 ++
+ Заголовок PROXY протокола должен быть отправлен до любых протокольных данных. +
+
+ Отправка заголовка PROXY протокола родительскому прокси:
+
Используйте тип родительского прокси ha для отправки заголовка
+ PROXY протокола v1 родительскому прокси. Это должен быть последний родитель в цепочке:
+
+allow * +parent 1000 ha +parent 1000 socks5 parent.example.com 1080 +socks ++
+ Эта конфигурация отправляет информацию об IP-адресе клиента SOCKS5 родительскому + прокси через PROXY протокол. +
+
+ Используйте команду maxseg для установки максимального размера
+ сегмента TCP (MSS) для исходящих соединений. Это может быть полезно для обхода
+ проблем с Path MTU Discovery или для оптимизации трафика в специфических
+ сетевых условиях:
+
+maxseg 1400 +proxy -p3128 -OcTCP_NODELAY,TCP_MAXSEG -OsTCP_NODELAY,TCP_MAXSEG ++
+ Значение указывается в байтах. Эта настройка использует опцию сокета TCP_MAXSEG + и может не поддерживаться на всех платформах. Типичный случай использования - + уменьшение MSS для избежания фрагментации в VPN туннелях или для обхода проблем + с MTU на определённых сетевых путях. +
Настройка FTP клиента для работы через SOCKS прокси не отличается от настройки @@ -1124,20 +1582,14 @@
- Можно использовать любую программу-редиректор, например, - SocksCAP или - FreeCAP. 3proxy поддерживает исходящие + Можно использовать любую программу-редиректор. 3proxy поддерживает исходящие и обратные TCP и UDP соединения, но редиректоры могут иметь свои ограничения, кроме того, некоторые плохо написаные приложения не поддаются "соксификации". Если программе требуется обращаться к небольшому набору серверов (например, игровых), то проблему можно решить с помощью портмаппинга.
- Оптимальный варинт - использовать соксификатор (Как использовать - 3proxy с программой, не поддерживающей работу с прокси-сервером). - FreeCap 3.13 проверен с играми на движке - Unreal (включая Unreal Tournament), Half-Life (включая Counter-Strike) и - другими. Если по каким-то причинам соксификатор не работает или недоступен, + Если по каким-то причинам соксификатор не работает или недоступен, то необходимо использовать отображения портов (обычно игры, кроме mood-подобных, работают по протоколу UDP, надо использовать udppm). Нужно иметь ввиду, что для udppm требуется отдельный маппинг для каждого @@ -1162,7 +1614,7 @@
Свежую версию всегда можно взять - здесь. Обратите внимание, + здесь. Обратите внимание, что в новой версии может измениться порядок лицензирования или команды конфигурации, поэтому прежде чем устанавливать новую версии программы обязательно ознакомьтесь с документацией. diff --git a/doc/html/index.html b/doc/html/index.html index e370c9f..7802dc5 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -1,16 +1,18 @@ -
3proxy.cfg +3proxy configuration file
+ +Common
+structure:
+Configuration file is a text file 3proxy reads configuration
+from. Each line of the file is a command executed
+immediately, as if it were given from the console. The
+sequence of commands is important. The configuration file is
+actually a script for the 3proxy executable. Each line of
+the file is treated as a blank (space or tab) separated
+command line. Additional space characters are ignored. Think
+about 3proxy as "application level router" with
+console interface.
Comments:
+Any line beginning with a space character or ´#´
+character is a comment. It´s ignored. <LF>s are
+ignored. <CR> is the end of a command.
Quotation:
+The quotation character is " (double quote). Quotation
+must be used to quote spaces or other special characters. To
+use a quotation character inside a quoted string, the
+character must be doubled (BASIC convention). For example,
+to use HELLO "WORLD" as an argument, you should
+write it as "HELLO ""WORLD""".
+Good practice is to quote any argument you use.
File inclusion:
+
+You can include file by using $FILENAME macro (replace
+FILENAME with a path to file, for example
+$/usr/local/etc/3proxy/conf.incl or
+$"c:\\Program Files\3proxy\include.cfg" Quotation
+is required in last example because path contains space
+character. For included file <CR> (end of line
+characters) is treated as space character (arguments
+delimiter instead of end of command delimiter). Thus,
+include files are only useful to store long single-line
+commands (like userlist, network lists, etc). To use dollar
+sign somewhere in argument it must be quoted. Recursion is
+not allowed.
Next commands +start gateway services:
+ +proxy
+[options]
+socks [options]
+pop3p [options]
+smtpp [options]
+ftppr [options]
+admin [options]
+dnspr [options]
+tcppm [options] <SRCPORT> <DSTADDR>
+<DSTPORT>
+udppm [options] <SRCPORT> <DSTADDR>
+<DSTPORT>
+Descriptions:
+proxy HTTP/HTTPS proxy (default port 3128)
+socks SOCKS 4/4.5/5 proxy (default port 1080)
+tlspr SNI proxy (destination address is taken from TLS
+handshake), may be used to redirect any TLS-based traffic
+
+auto Proxy with protocol autoselection between proxy /
+socks / tlspr
+pop3p POP3 proxy (default port 110)
+smtpp SMTP proxy (default port 25)
+ftppr FTP proxy (default port 21)
+admin Web interface (default port 80)
+dnspr caching DNS proxy (default port 53)
+tcppm TCP portmapper. Destination address (DSTADDR) can
+be a Unix domain socket using the syntax
+unix:/path/to/socket (e.g., tcppm 8080
+unix:/var/run/app.sock 0). On Linux, abstract sockets use
+unix:@socketname syntax. When using Unix socket
+destination, the port number is ignored but must be
+specified for syntax compatibility.
+udppm UDP portmapper
Options:
+-pNUMBER change default server port to NUMBER
+
+-6 Only resolve IPv6 addresses. IPv4 addresses are
+packed in IPv6 in IPV6_V6ONLY compatible way.
+-4 Only resolve IPv4 addresses
+-46 Prefer IPv4. Resolve IPv6 addresses if IPv4 address
+is not resolvable
+-64 Prefer IPv6. Resolve IPv4 addresses if IPv6 address
+is not resolvable
+-e External address. IP address of the interface the
+proxy should initiate connections from. External IP must be
+specified if you need incoming connections. By default the
+system will decide which address to use in accordance with
+the routing table.
+-i Internal address. IP address the proxy accepts
+connections to. By default, connections to any interface are
+accepted. Unix domain sockets can be specified with
+-iunix:/path/to/socket syntax. On Linux, abstract
+sockets use -iunix:@socketname syntax.
+-DiINTERFACE, -DeINTERFACE bind
+internal (-Di) / external (-De) interface to
+given INTERFACE (e.g. eth0) if SO_BINDTODEVICE is
+supported by the system. You may need to run as root or have
+CAP_NET_RAW capability in order to bind to an
+interface, depending on the system, so this option may
+require root privileges and can be incompatible with some
+configuration commands like chroot and setuid
+(and daemon if setcap is used).
+-niPATH, -nePATH (Linux only)
+Switch to the network namespace identified by the filesystem
+path PATH (e.g. /var/run/netns/myns or
+/proc/PID/ns/net) for the listening socket
+(-ni) or for outgoing connections (-ne). With
+-ni the current namespace is saved before opening the
+listening socket and restored immediately after binding, so
+that the rest of the process (outgoing connections, child
+threads) runs in the original namespace unless -ne is
+also given. With -ne the process switches to the
+specified namespace after the listening socket is bound (and
+after restoring from -ni if applicable). Requires
+CAP_SYS_ADMIN (or CAP_NET_ADMIN on recent
+kernels) and is incompatible with
+chroot/setuid/daemon if privileges are
+dropped before the switch takes effect.
+-Ne (for socks) External NAT address (between 3proxy and
+destination server) to report to client for CONNECT and
+BIND. By default external address is reported. It’s
+only useful in the case of IP-IP NAT (will not work for
+PAT).
+-Ni (for socks) Internal NAT address (between client and
+3proxy) to report to client for UDPASSOC. By default
+internal address is reported. It’s only useful in the
+case of IP-IP NAT (will not work for PAT).
+-RHOST:port listen on given local
+HOST:port for incoming connections instead of making remote
+outgoing connection. Can be used with another 3proxy service
+running -r option for connect back functionality. Most
+commonly used with tcppm. HOST can be given as IP or
+hostname, useful in case of dynamic DNS.
+-rHOST:port connect to given remote
+HOST:port instead of listening local connection on -p or
+default port. Can be used with another 3proxy service
+running -R option for connect back functionality. Most
+commonly used with proxy or socks. HOST can be given as IP
+or hostname, useful in case of dynamic DNS.
+-ocOPTIONS, -osOPTIONS,
+-olOPTIONS, -orOPTIONS,
+-oROPTIONS options for proxy-to-client
+(-oc), proxy-to-server (-os), proxy listening
+(-ol), connect back client (-or), connect back
+listening (-oR) sockets. Options like TCP_CORK,
+TCP_NODELAY, TCP_DEFER_ACCEPT, TCP_QUICKACK, TCP_TIMESTAMPS,
+USE_TCP_FASTOPEN, SO_REUSEADDR, SO_REUSEPORT,
+SO_PORT_SCALABILITY, SO_REUSE_UNICASTPORT, SO_KEEPALIVE,
+SO_DONTROUTE may be supported depending on OS.
+-H (for all services) Expect HAProxy PROXY protocol v1
+header on incoming connection. This allows the proxy to
+receive real client IP address from HAProxy or other load
+balancer that supports the PROXY protocol. The header must
+be sent before any protocol-specific data.
+
+-g(GRACE_TRAFF,GRACE_NUM,GRACE_DELAY)
+delay GRACE_DELAY milliseconds before polling if average
+polling size is below GRACE_TRAFF bytes and GRACE_NUM read
+operations in a single direction are detected within 1
+second. Useful to minimize polling -s
+(for admin) secure, allow only secure operations, currently
+only traffic counters view without ability to reset.
+(for dnspr) simple, do not use resolver and 3proxy cache,
+always use external DNS server.
+(for udppm) singlepacket, expect only one packet from both
+client and server
+-u Never ask for username/password
+-u2 (for socks) require username/password in
+authentication methods
+-a (for proxy) anonymous proxy (no information about
+client reported)
+-a1 (for proxy) anonymous proxy (random client
+information reported)
+-a2 (for proxy) generate Via: and X-Forwarded-For:
+instead of Forwarded:
+Also, all options mentioned for proxy(8)
+socks(8) pop3p(8) tcppm(8)
+udppm(8) ftppr(8)
+are also supported.
+Portmapping services listen at SRCPORT and connect to
+DSTADDR:DSTPORT HTTP and SOCKS proxies are standard.
+POP3 proxy must be configured as POP3 server and requires
+username in the form of: pop3username@pop3server. If POP3
+proxy access must be authenticated, you can specify username
+as proxy_username:proxy_password:POP3_username@pop3server
+
+DNS proxy resolves any types of records but only hostnames
+are cached. It requires nserver/nscache to be
+configured. If nserver is configured as TCP,
+redirections are applied on connection, so parent proxy may
+be used to resolve names to IP.
+FTP proxy can be used as FTP server in any FTP client or
+configured as FTP proxy on a client with FTP proxy support.
+Username format is one of
+FTPuser@FTPServer
+FTPuser:FTPpassword@FTPserver
+proxyuser:proxypassword:FTPuser:FTPpassword@FTPserver
+Please note, if you use FTP client interface for FTP proxy
+do not add FTPpassword and FTPServer to username, because
+FTP client does it for you. That is, if you use 3proxy with
+authentication use proxyuser:proxypassword:FTPuser as FTP
+username, otherwise do not change original FTP user name
include
+<path>
+Include config file
config
+<path>
+Path to configuration file to use on 3proxy restart or to
+save configuration.
writable
+
+ReOpens configuration file for write access via Web
+interface, and rereads it. Usually should be first command
+on config file but in combination with config it can be used
+anywhere to open alternate config file. Think twice before
+using it.
end
+End of configuration
log
+[[@|&]logfile] [<LOGTYPE>]
+sets logfile for all gateways
+@ (for Unix) use syslog, filename is used as ident name
+& use ODBC, filename consists of comma-delimited
+datasource,username,password (username and password are
+optional)
+radius - use RADIUS for logging
+LOGTYPE is one of:
+c Minutely
+H Hourly
+D Daily
+W Weekly (starting from Sunday)
+M Monthly
+Y Annually
+if logfile is not specified logging goes to stdout. You can
+specify individual logging options for gateway by using -l
+option in gateway configuration.
+log command supports same format specifications for filename
+template as "logformat" (if filename contains
+´%´ sign it´s believed to be template). As
+with "logformat" filename must begin with
+´L´ or ´G´ to specify Local or
+Grinwitch time zone for all time-based format
+specificators.
rotate
+<n>
+how many archived log files to keep
logformat
+<format>
+Format for log record. First symbol in format must be L
+(local time) or G (absolute Grinwitch time). It can be
+preceeded with -XXX+Y where XXX is list of characters to be
+filtered in user input (any non-printable characters are
+filtered too in this case) and Y is replacement character.
+For example, "-,%+ L" in the beginning of
+logformat means comma and percent are replaced with space
+and all time based elemnts are in local time zone.
+You can use:
%y Year in 2
+digit format
+%Y Year in 4 digit format
+%m Month number
+%o Month abbreviation
+%d Day
+%H Hour
+%M Minute
+%S Second
+%t Timestamp (in seconds since 01-Jan-1970)
+%. milliseconds
+%z time zone (from Greenwich)
+%D request duration (in milliseconds)
+%b average send rate per request (in bytes per second); this
+speed is typically below the connection speed shown by the
+download manager.
+%B average receive rate per request (in bytes per second);
+this speed is typically below the connection speed shown by
+the download manager.
+%U Username
+%N service Name
+%p service Port
+%E Error code
+%C Client IP
+%c Client port
+%R Remote IP
+%r Remote port
+%i Internal IP used to accept client connection
+%e External IP used to establish connection
+%Q Requested IP
+%q Requested port
+%n requested hostname
+%I bytes In
+%O bytes Out
+%h Hops (redirections) count
+%T service specific Text
+%N1-N2T (N1 and N2 are positive numbers) log only fields
+from N1 through N2 of service-specific text
+In the case of ODBC logging, logformat specifies an SQL
+statement, for example:
+logformat "-´+_Linsert into log (l_date, l_user,
+l_service, l_in, l_out, l_descr) values (´%d-%m-%Y
+%H:%M:%S´, ´%U´, ´%N´, %I, %O,
+´%T´)"
logdump
+<in_traffic_limit> <out_traffic_limit>
+
+Immediately creates additional log records if given amount
+of incoming/outgoing traffic is achieved for connection,
+without waiting for connection to finish. It may be useful
+to prevent information about long-lasting downloads on
+server shutdown.
delimchar
+<char>
+Sets the delimiter character used to separate username from
+hostname in proxy authentication strings (e.g. for FTP, POP3
+proxies). Default is ´@´. For example, to use
+´#´ instead: delimchar #. This allows usernames
+to contain the ´@´ character.
archiver
+<ext> <commandline>
+Archiver to use for log files. <ext> is file extension
+produced by archiver. Filename will be last argument to
+archiver, optionally you can use %A as produced archive name
+and %F as filename.
timeouts
+<BYTE_SHORT> <BYTE_LONG> <STRING_SHORT>
+<STRING_LONG> <CONNECTION_SHORT>
+<CONNECTION_LONG> <DNS> <CHAIN>
+<CONNECT> <CONNECTBACK>
+Sets timeout values, defaults 1, 5, 30, 60, 180, 1800, 15,
+60, 15, 5.
+BYTE_SHORT short timeout for single byte, is usually
+used for receiving single byte from stream.
+BYTE_LONG long timeout for single byte, is usually used
+for receiving first byte in frame (for example first byte in
+socks request).
+STRING_SHORT short timeout, for character string within
+stream (for example to wait between 2 HTTP headers)
+STRING_LONG long timeout, for first string in stream
+(for example to wait for HTTP request).
+CONNECTION_SHORT inactivity timeout for short
+connections (HTTP, POP3, etc).
+CONNECTION_LONG inactivity timeout for long connection
+(SOCKS, portmappers, etc).
+DNS timeout for DNS request before requesting next
+server
+CHAIN timeout for reading data from chained connection
+
+default timeouts 1 5 30 60 180 1800 15 60 15 5
maxseg
+<value>
+Sets TCP maximum segment size (MSS) for outgoing
+connections. This can be used to work around path MTU
+discovery issues or to optimize traffic for specific network
+conditions.
radius
+<NAS_SECRET>
+<radius_server_1[:port][/local_address_1]
+<radius_server_2[:port][/local_address_2]
+
+Configures RADIUS servers to be used for logging and
+authentication (log and auth types must be set to radius).
+port and local address to use with given server may be
+specified.
+Attributes within request: User-Name, Password: (username
+and password if presented by client), Service Type:
+Authenticate-Only, NAS-Port-Type: NAS-Port-Virtual,
+NAS-Port-ID: (proxy service port, e.g. 1080),
+NAS-IPv6-Address / NAS-IP-Address: (proxy interface accessed
+by client), NAS-Identifier: (text identifing proxy, e.g.
+PROXY or SOCKSv5), Framed-IPv6-Address / Framed-IP-Address:
+(IP address of the client), Called-Station-ID: (requested
+Hostname, if presents), Login-Service: (type of request,
+e.g. 1001 - SOCKS CONNECT, 1010 - HTTP GET, 1013 - HTTP
+CONNECT), Login-TCP-Port: (requested port), Login-IPv6-Host
+/ Login-IP-Host: (requested IP).
+Supported reply attributes for authentication:
+Framed-IP-Address / Framed-IPv6-Address (IP to assign to
+user), Reply-Message. Use authcache to speedup
+authentication. RADIUS feature is currently
+experimental.
nserver
+<ipaddr>[:port][/tcp]
+Nameserver to use for name resolutions. If none specified
+system routines for name resolution is used. Optional port
+number may be specified. If optional /tcp is added to IP
+address, name resolution is performed over TCP.
authnserver
+<ipaddr>[:port][/tcp]
+Nameserver to use for DNS-based authentication (e.g. dnsname
+auth type). If not specified, nserver is used. The syntax is
+the same as for nserver.
nscache
+<cachesize> nscache6
+<cachesize>
+Cache <cachesize> records for name resolution
+(nscache for IPv4, nscache6 for IPv6). The
+cache size should usually be large enough (for example,
+65536).
nsrecord
+<hostname> <hostaddr>
+Adds static record to nscache. nscache must be
+enabled. If 0.0.0.0 is used as a hostaddr host will never
+resolve, it can be used to blacklist something or together
+with dialer command to set up UDL for dialing.
fakeresolve
+
+All names are resolved to the 127.0.0.2 address. Useful if
+all requests are redirected to a parent proxy with
+http, socks4+, connect+ or
+socks5+.
dialer
+<progname>
+Execute progname if external name can´t be resolved.
+Hint: if you use nscache, dialer may not work, because names
+will be resolved through cache. In this case you can use
+something like http://dial.right.now/ from browser to set up
+connection.
internal
+<ipaddr>
+sets ip address of internal interface. This IP address will
+be used to bind gateways. Alternatively you can use -i
+option for individual gateways. Since 0.8 version, IPv6
+address may be used.
+Unix domain sockets are supported with the syntax
+unix:/path/to/socket (e.g., internal
+unix:/var/run/3proxy.sock). On Linux, abstract (fileless)
+Unix sockets are supported with the syntax
+unix:@socketname (e.g., internal unix:@3proxy). When
+using Unix sockets, the socket file is automatically created
+and removed on service start/stop.
external
+<ipaddr>
+sets ip address of external interface. This IP address will
+be source address for all connections made by proxy.
+Alternatively you can use -e option to specify individual
+address for gateway. Since 0.8 version External or -e
+can be given twice: once with IPv4 and once with IPv6
+address.
maxconn
+<number>
+sets the maximum number of simultaneous connections to each
+service started after this command at the network level.
+Default is 100.
+To limit clients, use connlim instead. maxconn
+will silently ignore new connections, while connlim
+will report back to the client that the connection limit has
+been reached.
backlog
+
+sets the listening socket backlog of new connections.
+Default is 1 + maxconn/8. Maximum value is capped by
+kernel tunable somaxconn.
service
+
+(deprecated). Indicates that 3proxy should behave as a
+Windows 95/98/NT/2000/XP service; has no effect under Unix.
+Not required for 3proxy 0.6 and above. If you upgraded from
+a previous version of 3proxy, use --remove and --install to
+reinstall the service.
daemon
+
+Should be specified to close the console. Do not use
+´daemon´ with ´service´. At least
+under FreeBSD, daemon should precede any proxy
+service and log commands to avoid socket problems. Always
+place it in the beginning of the configuration file.
auth
+<authtype> [...]
+Type of user authorization. Currently supported:
+none - no authentication or authorization required.
+Note: if auth is none, any IP-based limitation, redirection,
+etc. will not work. This is the default authentication type
+
+iponly - authentication by access control list with
+username ignored.
+Appropriate for most cases
+useronly - authentication by username without checking
+for any password with authorization by ACLs. Useful for e.g.
+SOCKSv4 proxy and icqpr (icqpr set UIN / AOL screen name as
+a username)
+dnsname - authentication by DNS hostname with
+authorization by ACLs. The DNS hostname is resolved via a
+PTR (reverse) record and validated (the resolved name must
+resolve to the same IP address). It´s recommended to
+use authcache by IP for this authentication. NB: there is no
+password check; the name may be spoofed.
+strong - username/password authentication required. It
+will work with SOCKSv5, FTP, POP3 and HTTP proxy.
+cache - cached authentication, may be used with
+´authcache´.
+radius - authentication with RADIUS.
+Plugins may add additional authentication types.
It´s
+possible to use multiple authentication types in the same
+command. E.g.
+auth iponly strong
+In this case, ´strong´ authentication will be
+used only if resource access cannot be performed with
+´iponly´ authentication, that is, a username is
+required in the ACL. It´s useful to protect access to
+some resources with a password while allowing passwordless
+access to other resources, or to use IP-based authentication
+for dedicated laptops and request a username/password for
+shared ones.
authcache
+<cachtype> <cachtime> <cachesize>
+
+Cache authentication information for a given amount of time
+(cachetime) in seconds. cachesize limits number of cache
+entries. Cachetype is one of:
+ip - after successful authentication all connections
+during caching time from same IP are assigned to the same
+user, username is not requested.
+ip,user username is requested and all connections from
+the same IP are assigned to the same user without actual
+authentication.
+user - same as above, but IP is not checked.
+user,password - both username and password are checked
+against cached ones.
+limit - limit user to use only one ip, ´ip´
+and ´user´ are required
+ack - only use cached auth if user access service with
+same ACL
+ext - cache external IP
+Use auth type cache for cached authentication
allow
+<userlist> <sourcelist> <targetlist>
+<targetportlist> <operationlist>
+<weekdayslist> <timeperiodslist>
+deny <userlist> <sourcelist>
+<targetlist> <targetportlist>
+<operationlist> <weekdayslist>
+<timeperiodslist>
+redirect <ip> <port> <userlist>
+<sourcelist> <targetlist> <targetportlist>
+<operationlist> <weekdayslist>
+<timeperiodslist>
+Access control entries. All lists are comma-separated, no
+spaces are allowed. Usernames are case sensitive (if used
+with authtype nbname username must be in uppercase). Source
+and target lists may contain IP addresses (W.X.Y.Z), ranges
+A.B.C.D - W.X.Y.Z (since 0.8) or CIDRs (W.X.Y.Z/L). Since
+0.6, the targetlist may also contain host names, instead of
+addresses. It´s possible to use a wildmask in the
+beginning and at the end of the hostname, e.g. *badsite.com
+or *badcontent*. The hostname is only checked if a hostname
+is present in the request. Targetportlist may contain ports
+(X) or port ranges lists (X-Y). For any field * sign means
+ANY. If access list is empty it´s assumed to be
+allow *
+If access list is not empty last item in access list is
+assumed to be
+deny *
+You may want explicitly add deny * to the end of access list
+to prevent HTTP proxy from requesting user´s password.
+Access lists are checked after user have requested any
+resource. If you want 3proxy to reject connections from
+specific addresses immediately without any conditions you
+should either bind proxy to appropriate interface only or to
+use ip filters.
Operation is one
+of:
+CONNECT establish outgoing TCP connection
+BIND bind TCP port for listening
+UDPASSOC make UDP association
+ICMPASSOC make ICMP association (for future use)
+HTTP_GET HTTP GET request
+HTTP_PUT HTTP PUT request
+HTTP_POST HTTP POST request
+HTTP_HEAD HTTP HEAD request
+HTTP_CONNECT HTTP CONNECT request
+HTTP_OTHER over HTTP request
+HTTP matches any HTTP request except HTTP_CONNECT
+
+HTTPS same as HTTP_CONNECT
+FTP_GET FTP get request
+FTP_PUT FTP put request
+FTP_LIST FTP list request
+FTP_DATA FTP data connection. Note: FTP_DATA requires
+access to dynamic non-privileged (1024-65535) ports on the
+remote side.
+FTP matches any FTP/FTP Data request
+ADMIN access to administration interface
Weekdays are
+week day numbers or periods, 0 or 7 means Sunday, 1 is
+Monday, 1-5 means Monday through Friday.
+Timeperiodlists is a list of time periods in
+HH:MM:SS-HH:MM:SS format. For example,
+00:00:00-08:00:00,17:00:00-24:00:00 lists non-working
+hours.
parent
+<weight> <type> <ip> <port>
+<username> <password>
+this command must follow "allow" rule. It extends
+last allow rule to build proxy chain. Proxies may be
+grouped. Proxy inside the group is selected randomly. If few
+groups are specified one proxy is randomly picked from each
+group and chain of proxies is created (that is second proxy
+connected through first one and so on). Weight is used to
+group proxies. Weight is a number between 1 and 1000.
+Weights are summed and proxies are grouped together until
+the weight of the group is 1000. That is:
+allow *
+parent 500 socks5 192.168.10.1 1080
+parent 500 connect 192.168.10.1 3128
+makes 3proxy to randomly choose between 2 proxies for all
+outgoing connections. These 2 proxies form 1 group
+(summarized weight is 1000).
+allow * * * 80
+parent 1000 socks5 192.168.10.1 1080
+parent 1000 connect 192.168.20.1 3128
+parent 300 socks4 192.168.30.1 1080
+parent 700 socks5 192.168.40.1 1080
+creates chain of 3 proxies: 192.168.10.1, 192.168.20.1 and
+third is (192.168.30.1 with probability of 0.3 or
+192.168.40.1 with probability of 0.7) for outgoing web
+connections. Chains are only applied to new connections,
+pipelined (keep-alive) requests in the same connection use
+the same chain.
type is one of:
+
+extip does not actually redirect the request; it sets
+the external address for this request to <ip>.
+It can be chained with another parent type. It’s
+useful to set the external IP based on ACL or make it
+random.
+tcp simply redirect connection. TCP is always last in
+chain. This type of proxy is a simple TCP redirection, it
+does not support parent authentication.
+http redirect to HTTP proxy. HTTP is always the last
+chain. It should only be used with http (proxy) service, if
+used with different service, it works as tcp redirection.
+
+pop3 redirect to POP3 proxy (only local redirection is
+supported, can only be used as a first hop in chaining)
+
+ftp redirect to FTP proxy (only local redirection is
+supported, can only be used as a first hop in chaining)
+
+connect parent is HTTP CONNECT method proxy
+connect+ parent is HTTP CONNECT proxy with name
+resolution (hostname is used instead of IP if available)
+
+socks4 parent is SOCKSv4 proxy
+socks4+ parent is SOCKSv4 proxy with name resolution
+(SOCKSv4a)
+socks5 parent is SOCKSv5 proxy
+socks5+ parent is SOCKSv5 proxy with name resolution
+
+socks4b parent is SOCKS4b (broken SOCKSv4 implementation
+with shortened server reply; I never saw this kind of
+server, but they say there are some). Normally you should
+not use this option. Do not confuse this option with
+SOCKSv4a (socks4+).
+socks5b parent is SOCKS5b (broken SOCKSv5 implementation
+with shortened server reply. I think you will never find it
+useful). Never use this option unless you know exactly you
+need it.
+admin redirect request to local ´admin´
+service (with -s parameter).
+ha send HAProxy PROXY protocol v1 header to parent
+proxy. Must be the last in the proxy chain. Useful for
+passing client IP information to the parent proxy. Example:
+parent 1000 ha
+Use "+" proxy only with fakeresolve
+option
IP and port are
+ip addres and port of parent proxy server. If IP is zero, ip
+is taken from original request, only port is changed. If
+port is zero, it´s taken from original request, only
+IP is changed. If both IP and port are zero - it´s a
+special case of local redirection, it works only with
+socks proxy. In case of local redirection request is
+redirected to different service, ftp locally
+redirects to ftppr pop3 locally redirects to pop3p
+http locally redirects to proxy admin locally
+redirects to the admin -s service.
+Unix domain sockets can be used instead of IP address with
+the syntax unix:/path/to/socket (e.g., parent 1000
+socks5 unix:/var/run/parent.sock 1080). On Linux, abstract
+(fileless) Unix sockets are supported with
+unix:@socketname syntax (e.g., parent 1000 http
+unix:@parent.proxy 3128). When using Unix sockets, the port
+number is ignored but must be specified for syntax
+compatibility.
Main purpose of
+local redirections is to have the requested resource (URL or
+POP3 username) logged and protocol-specific filters applied.
+In case of local redirection, ACLs are reviewed twice:
+first, by the SOCKS proxy up to the ´parent´
+command and then by the gateway service the connection is
+redirected to (HTTP, FTP or POP3) after the
+´parent´ command. It means an additional
+´allow´ command is required for redirected
+requests, for example:
+allow * * * 80
+parent 1000 http 0.0.0.0 0
+allow * * * 80 HTTP_GET,HTTP_POST
+socks
+redirects all SOCKS requests with target port 80 to local
+HTTP proxy, local HTTP proxy parses requests and allows only
+GET and POST requests.
+parent 1000 http 1.2.3.4 0
+Changes the external address for a given connection to
+1.2.3.4 (equivalent to -e1.2.3.4)
+Optional username and password are used to authenticate on
+parent proxy. Username of ´*´ means username
+must be supplied by user.
parentretries
+<number>
+Number of retries to connect to parent proxy. Default is
+1.
nolog
+<n>
+extends last allow or deny command to prevent logging, e.g.
+
+allow * * 192.168.1.1
+nolog
weight
+<n>
+extends last allow or deny command to set weight for this
+request
+allow * * 192.168.1.1
+weight 100
+Weight may be used for different purposes.
force
+noforce
+If force is specified for service, configuration reload will
+require all current sessions of this service to be
+re-authenticated. If ACL is changed or user account is
+removed, old connections which do not match current are
+closed. noforce allows to keep previously authenticated
+connections.
bandlimin
+<rate> <userlist> <sourcelist>
+<targetlist> <targetportlist>
+<operationlist> <weekdayslist>
+<timeperiodslist>
+nobandlimin <userlist> <sourcelist>
+<targetlist> <targetportlist>
+<operationlist> <weekdayslist>
+<timeperiodslist>
+bandlimout <rate> <userlist>
+<sourcelist> <targetlist> <targetportlist>
+<operationlist> <weekdayslist>
+<timeperiodslist>
+nobandlimout <userlist> <sourcelist>
+<targetlist> <targetportlist>
+<operationlist> <weekdayslist>
+<timeperiodslist>
+bandlim sets a bandwidth limitation filter to
+<rate> bps (bits per second). If you want to
+specify bytes per second, multiply your value by 8. bandlim
+rules act in the same manner as allow/deny rules, except for
+one thing: bandwidth limiting is applied to all services,
+not to some specific service. bandlimin and
+nobandlimin apply to incoming traffic
+bandlimout and nobandlimout apply to outgoing
+traffic
+If you want to ratelimit your clients with IPs
+192.168.10.16/30 (4 addresses) to 57600 bps, you have to
+specify 4 rules like
+bandlimin 57600 * 192.168.10.16
+bandlimin 57600 * 192.168.10.17
+bandlimin 57600 * 192.168.10.18
+bandlimin 57600 * 192.168.10.19
+and each of your clients will have a 56K channel. If you
+specify
+bandlimin 57600 * 192.168.10.16/30
+you will have a 56K channel shared between all clients. If
+you want, for example, to limit all speed except access to
+POP3, you can use
+nobandlimin * * * 110
+before the rest of bandlim rules.
connlim
+<rate> <period> <userlist>
+<sourcelist> <targetlist> <targetportlist>
+<operationlist> <weekdayslist>
+<timeperiodslist>
+noconnlim <userlist> <sourcelist>
+<targetlist> <targetportlist>
+<operationlist> <weekdayslist>
+<timeperiodslist>
+connlim sets connections rate limit per time period for
+traffic pattern controlled by ACL. Period is in seconds. If
+period is 0, connlim limits a number of parallel
+connections.
+connlim 100 60 * 127.0.0.1
+allows 100 connections per minute for 127.0.0.1.
+connlim 20 0 * 127.0.0.1
+allows 20 simultaneous connections for 127.0.0.1.
+Like with bandlimin, if an individual limit is
+required per client, a separate rule must be added for every
+client. Like with nobandlimin, noconnlim adds an
+exception.
counter
+<filename> <reporttype>
+<reportname>
+countin <number> <type> <limit>
+<userlist> <sourcelist> <targetlist>
+<targetportlist> <operationlist>
+<weekdayslist> <timeperiodslist>
+nocountin <userlist> <sourcelist>
+<targetlist> <targetportlist>
+<operationlist> <weekdayslist>
+<timeperiodslist>
+countout <number> <type> <limit>
+<userlist> <sourcelist> <targetlist>
+<targetportlist> <operationlist>
+<weekdayslist> <timeperiodslist>
+nocountout <userlist> <sourcelist>
+<targetlist> <targetportlist>
+<operationlist> <weekdayslist>
+<timeperiodslist>
+countall <number> <type> <limit>
+<userlist> <sourcelist> <targetlist>
+<targetportlist> <operationlist>
+<weekdayslist> <timeperiodslist>
+nocountall <userlist> <sourcelist>
+<targetlist> <targetportlist>
+<operationlist> <weekdayslist>
+<timeperiodslist>
counter,
+countin, nocountin, countout, nocountout, countall,
+nocountall commands are used to set a traffic limit in MB
+for a period of time (day, week or month). Filename is a
+path to a special file where traffic information is
+permanently stored. The number is the sequential number of
+the record in this file. If the number is 0, this counter is
+not preserved in the counter file (that is, if the proxy is
+restarted, all counters with 0 are flushed); otherwise, it
+should be a unique sequential number which points to the
+position of the counter within the file. Type specifies a
+type of counter. Type is one of:
+H - counter is reset hourly
+D - counter is reset daily
+W - counter is reset weekly
+M - counter is reset monthly
+reporttype/reportname may be used to generate traffic
+reports. Reporttype is one of D, W, M, H (hourly) and
+reportname specifies the filename template for reports. The
+report is a text file with counter values in the format:
+
+<COUNTERNUMBER> <TRAF>
+The rest of parameters is identical to
+bandlim/nobandlim.
users
+username[:pwtype:password] ...
+pwtype is one of:
+none (empty) - use system authentication
+CL - password is cleartext
+CR - password is crypt-style password
+NT - password is NT password (in hex)
+example:
+users test1:CL:password1
+"test2:CR:$1$lFDGlder$pLRb4cU2D7GAT58YQvY49."
+users test3:NT:BD7DFBF29A93F93C63CB84790DA00E63
+Note: double quotes are required because the password
+contains a $ sign.
flush
+
+empty the active access list. The access list must be
+flushed every time you create a new access list for a new
+service. For example:
+allow *
+pop3p
+flush
+allow * 192.168.1.0/24
+socks
+sets different ACLs for pop3p and socks
system
+<command>
+execute system command
pidfile
+<filename>
+write pid of current process to file. It can be used to
+manipulate 3proxy with signals under Unix. Currently next
+signals are available:
monitor
+<filename>
+If file monitored changes in modification time or size,
+3proxy reloads configuration within one minute. Any number
+of files may be monitored.
setuid
+<uid>
+calls setuid(uid), uid can be numeric or since 0.9 username.
+Unix only. Warning: under some Linux kernels setuid() works
+for current thread only. It makes it impossible to suid for
+all threads.
setgid
+<gid>
+calls setgid(gid), gid can be numeric or since 0.9
+groupname. Unix only.
chroot
+<path> [<uid>]
+[<gid>]
+calls chroot(path) and sets gid/uid. Unix only. uid/gid
+supported since 0.9, can be numeric or
+username/groupname
stacksize
+<value_to_add_to_default_stack_size>
+Change the default size for thread stacks. May be required
+in some situations, e.g. with non-default plugins, or on
+some platforms (some FreeBSD versions may require adjusting
+the stack size due to an incorrectly defined value in system
+header files; this value is also often required to be
+changed for ODBC and PAM support on Linux). If you
+experience 3proxy crash on request processing, try to set
+some positive value. You may start with stacksize 65536 and
+then find the minimal value for the service to work. If you
+experience memory shortage, you can try to experiment with
+negative values.
plugin
+<path_to_shared_library>
+<function_to_call> [<arg1> ...]
+Loads specified library and calls given export function with
+given arguments, as
+int functions_to_call(struct pluginlink * pl, int argc, char
+* argv[]);
+function_to_call must return 0 in case of success, value
+> 0 to indicate error.
filtermaxsize
+<max_size_of_data_to_filter>
+If Content-length (or another data length) is greater than
+the given value, no data filtering will be performed through
+filtering plugins to avoid data corruption and/or
+Content-Length changing. Default is 1MB (1048576).
SSL/TLS support +is built into 3proxy (since 0.9.7) when compiled with +OpenSSL (WITH_SSL). Previously available as SSLPlugin, the +functionality is now integrated into the main binary. The +plugin line is no longer required.
+ +SSL/TLS can be +used for: - transparent MITM (Man-in-the-Middle) for TLS +traffic inspection - https:// proxy (TLS-encrypted +connection between client and proxy) - TLS client +connections to upstream servers with certificate +authentication - mTLS (mutual TLS) requiring client +certificates
+ +ssl_mitm
+- spoof certificates for services started below. Usage
+without ssl_client_verify is insecure.
+ssl_nomitm - do not spoof certificates for services
+started below
ssl_serv
+(or ssl_server) - require TLS connection from clients for
+services below
+ssl_noserv (or ssl_noserver) - do not require TLS
+connection from clients for services below
ssl_cli
+(or ssl_client) - establish TLS connection to upstream
+server for services below
+ssl_nocli (or ssl_noclient) - do not establish TLS
+connection to upstream server for services below
ssl_server_cert
+/path/to/cert - Server certificate (should not be
+self-signed, must contain SAN) for ssl_serv
+ssl_server_key /path/to/key - Server certificate
+key for ssl_server_cert or generated MITM certificate
+
+ssl_client_cert /path/to/cert - Client
+certificate for authentication on upstream server (used with
+ssl_cli)
+ssl_client_key /path/to/key - Client certificate
+key for ssl_client_cert
+ssl_client_ciphersuites ciphersuites_list - TLS
+client ciphers for TLS 1.3
+ssl_server_ciphersuites ciphersuites_list - TLS
+server ciphers for TLS 1.3
+ssl_client_cipher_list ciphers_list - TLS client
+ciphers for TLS 1.2 and below
+ssl_server_cipher_list ciphers_list - TLS server
+ciphers for TLS 1.2 and below
+ssl_client_min_proto_version tls_version - TLS
+client minimum TLS version (e.g., TLSv1.2)
+ssl_server_min_proto_version tls_version - TLS
+server minimum TLS version
+ssl_client_max_proto_version tls_version - TLS
+client maximum TLS version
+ssl_server_max_proto_version tls_version - TLS
+server maximum TLS version
+ssl_client_verify - verify the certificate for the
+upstream server (used with ssl_mitm or ssl_cli)
+ssl_client_no_verify - do not verify the certificate for
+the upstream server (default)
+ssl_server_verify - require client certificate
+authentication (mTLS) for ssl_serv
+ssl_server_no_verify - do not require client certificate
+(default)
+ssl_server_ca_file /path/to/cafile - CA
+certificate file for MITM
+ssl_server_ca_key /path/to/cakey - key for
+ssl_server_ca_file MITM CA
+ssl_server_ca_dir /path/to/cadir - CA directory
+for ssl_server_verify
+ssl_server_ca_store /path/to/castore - CA store
+for ssl_server_verify (OpenSSL 3.0+)
+ssl_client_ca_file /path/to/cafile - CA file for
+ssl_client_verify
+ssl_client_ca_dir /path/to/cadir - CA directory
+for ssl_client_verify
+ssl_client_ca_store /path/to/castore - CA store
+for ssl_client_verify (OpenSSL 3.0+)
+ssl_client_sni hostname - SNI hostname to send to
+upstream server
+ssl_client_alpn protocol1 protocol2 ... - ALPN
+protocols to negotiate with upstream server
+ssl_client_mode mode - when to establish TLS
+connection: 0 - on connect (default), 1 - after
+authentication, 2 - before data, 3 - only for secure parent
+types (ending with ’s’)
+ssl_certcache /path/to/cache/ - location for the
+generated MITM certificates cache
PCRE (Perl +Compatible Regular Expressions) filtering is built into +3proxy (since 0.9.7) when compiled with PCRE2 support +(WITH_PCRE). Previously available as PCREPlugin, the +functionality is now integrated into the main binary. The +plugin line is no longer required.
+ +PCRE filtering +allows creating matching and replacement rules with regular +expressions for client requests, headers, and data.
+ +pcre
+TYPE FILTER_ACTION REGEXP [ACE]
+Apply a rule for matching regular expression.
+pcre_rewrite TYPE FILTER_ACTION REGEXP
+REWRITE_EXPRESSION [ACE]
+Match and replace with rewrite expression.
+pcre_extend FILTER_ACTION [ACE]
+Extend the ACL of the last pcre or pcre_rewrite command by
+adding an additional ACE.
+pcre_options OPTION1 [OPTION2 ...]
+Set matching options. Both PCRE2 native options and PCRE
+compatibility options are supported. PCRE options are mapped
+to their PCRE2 equivalents for backward compatibility.
+PCRE2 options: PCRE2_CASELESS, PCRE2_MULTILINE,
+PCRE2_DOTALL, PCRE2_EXTENDED, PCRE2_DOLLAR_ENDONLY,
+PCRE2_UNGREEDY, PCRE2_UTF, PCRE2_UCP, PCRE2_NO_AUTO_CAPTURE,
+PCRE2_FIRSTLINE, PCRE2_DUPNAMES, PCRE2_MATCH_UNSET_BACKREF,
+PCRE2_ALT_BSUX, PCRE2_ALT_CIRCUMFLEX, PCRE2_ALT_VERBNAMES,
+PCRE2_USE_OFFSET_LIMIT, PCRE2_EXTENDED_MORE, PCRE2_LITERAL,
+PCRE2_MATCH_INVALID_UTF.
+PCRE compatibility options: PCRE_CASELESS, PCRE_MULTILINE,
+PCRE_DOTALL, PCRE_EXTENDED, PCRE_ANCHORED,
+PCRE_DOLLAR_ENDONLY, PCRE_EXTRA, PCRE_NOTBOL, PCRE_NOTEOL,
+PCRE_UNGREEDY, PCRE_NOTEMPTY, PCRE_UTF8,
+PCRE_NO_AUTO_CAPTURE, PCRE_NO_UTF8_CHECK, PCRE_AUTO_CALLOUT,
+PCRE_PARTIAL, PCRE_DFA_SHORTEST, PCRE_DFA_RESTART,
+PCRE_FIRSTLINE, PCRE_DUPNAMES, PCRE_NEWLINE_CR,
+PCRE_NEWLINE_LF, PCRE_NEWLINE_CRLF, PCRE_NEWLINE_ANY,
+PCRE_NEWLINE_ANYCRLF, PCRE_BSR_ANYCRLF,
+PCRE_BSR_UNICODE.
TYPE - type of
+filtered data (comma-delimited list):
+request - content of the client’s request (e.g., HTTP
+GET request string)
+cliheader - content of the client request headers
+srvheader - content of the server’s reply headers
+clidata - data received from the client (e.g., HTTP POST
+data)
+srvdata - data received from the server (e.g., HTML
+page)
FILTER_ACTION -
+action on match:
+allow - allow this request without checking the rest of the
+rules
+deny - deny this request without checking the rest of the
+rules
+dunno - continue with the rest of the rules (useful with
+pcre_rewrite)
REGEXP - PCRE +(Perl) regular expression. Use * if no regexp matching is +required.
+ + +REWRITE_EXPRESSION +- substitution string. May contain Perl-style substrings $1, +$2, etc. $0 means the whole matched string. \r and \n may be +used to insert new lines; the string may be empty +("").
+ +ACE - access +control entry (user names, source IPs, destination IPs, +ports, etc.), identical to allow/deny/bandlimin commands. +The regular expression is only matched if the ACL matches +the connection data. Warning: Regular expressions +don’t require authentication and cannot replace +authentication and/or allow/deny ACLs.
+ +Report all bugs +to 3proxy@3proxy.org
+ +3proxy(8),
+proxy(8), ftppr(8), socks(8), pop3p(8), tcppm(8), udppm(8),
+syslogd(8),
+https://3proxy.org/
3APA3A is +pronounced as ``zaraza´´.
+ +3proxy is +designed by Vladimir 3APA3A Dubrovin +(3proxy@3proxy.org)
+3proxy - +3[APA3A] tiny proxy server, or trivial proxy server, or free +proxy server
+ +3proxy
+[config_file]
+3proxy [--install]
+3proxy [--remove]
3proxy is +a universal proxy server. It can be used to provide internal +users with fully controllable access to external resources +or to provide external users with access to internal +resources. 3proxy is not developed to replace +squid(8), but it can extend the functionality of an +existing caching proxy. It can be used to route requests +between different types of clients and proxy servers. Think +about it as application level gateway with configuration +like hardware router has for network layer. It can establish +multiple gateways with HTTP and HTTPS proxy with FTP over +HTTP support, SOCKS v4, v4.5 and v5, POP3 proxy, UDP and TCP +portmappers. Each gateway is started from the configuration +file like an independent service proxy(8) +socks(8) pop3p(8) tcppm(8) +udppm(8) ftppr(8) dnspr but +3proxy is not a kind of wrapper or superserver for +these daemons. It just has the same code compiled in, but +provides much more functionality. SOCKSv5 implementation +allows you to use 3proxy with any UDP or TCP based client +applications designed without proxy support (with +SocksCAP, FreeCAP or another client-side +redirector under Windows or with a socksification library +under Unix). So you can play your favourite games, listen to +music, exchange files and messages and even accept incoming +connections behind a proxy server.
+ +dnspr +does not exist as an independent service. It’s a DNS +caching proxy (it requires nscache and nserver +to be set in the configuration. Only A-records are cached. +Please note that this caching is mostly a ’hack’ +and has nothing to do with a real DNS server, but it works +perfectly for SOHO networks.
+ +3proxy supports +access control lists (ACL) like network router. Source and +destination networks and destination port can be specified. +In addition, usernames and gateway action (for example GET +or POST) can be used in ACLs. In order to filter request on +username basis user must be authenticated somehow. There are +few authentication types including password authentication +and authentication by NetBIOS name for Windows clients +(it´s very like ident authentication). Depending on +ACL action request can be allowed, denied or redirected to +another host or to another proxy server or even to a chain +of proxy servers.
+ +It supports +different types of logging: to logfiles, syslog(3) +(only under Unix) or to an ODBC database. Logging format is +tunable to provide compatibility with existing log file +parsers. It makes it possible to use 3proxy with IIS, ISA, +Apache or Squid log parsers.
+ +config_file
+ +Name of config file. See
+3proxy.cfg(3) for configuration file format. Under
+Windows, if config_file is not specified, 3proxy
+looks for a file named 3proxy.cfg in the default
+location (in the same directory as the executable file and
+in the current directory). Under Unix, if no config file is
+specified, 3proxy reads configuration from stdin. It makes
+it possible to use the 3proxy.cfg file as an executable
+script just by setting +x mode and adding
+#!/usr/local/3proxy/3proxy
+as a first line in 3proxy.cfg
--install
+ +(Windows NT family only) +install 3proxy as a system service
+ +--remove
+ +(Windows NT family only) remove +3proxy from system services
+ +Under Unix there
+are a few signals 3proxy catches. See kill(1).
+
+SIGTERM
clean up connections and +exit
+ +SIGPAUSE
+ +stop accepting new connections, +on second signal - start and re-read configuration
+ +SIGCONT
+ +start to accept new +connections
+ +SIGUSR1
+ +reload configuration
+ +Under Windows,
+if 3proxy is installed as a service you can use
+standard service management to start, stop, pause and
+continue the 3proxy service, for example:
+net start 3proxy
+net stop 3proxy
+net pause 3proxy
+net continue 3proxy
Web admin +service can also be used to reload configuration. Use wget +to automate this task.
+ +/usr/local/3proxy/3proxy.cfg +(3proxy.cfg)
+ +3proxy configuration +file
+ +Report all bugs +to 3proxy@3proxy.org
+ +3proxy.cfg(5),
+proxy(8), ftppr(8), socks(8), pop3p(8), tcppm(8), udppm(8),
+kill(1), syslogd(8),
+https://3proxy.org/
3APA3A is +pronounced as ``zaraza´´.
+ +3proxy is +designed by Vladimir 3APA3A Dubrovin +(3proxy@3proxy.org)
+3proxy_crypt +- utility to generate encrypted passwords for 3proxy
+ +3proxy_crypt
+password
+3proxy_crypt salt password
3proxy_crypt +is a utility to generate encrypted password hashes for use +with 3proxy configuration. Encrypted passwords allow the +system to avoid storing passwords in cleartext in +configuration files.
+ +When invoked +with a single argument, it produces an NT password hash +(MD4-based, suitable for NTLM authentication). The output is +prefixed with NT:.
+ +When invoked +with two arguments (salt and password), it produces a +BLAKE2b password hash. The salt length is limited to 64 +characters. The output is prefixed with CR:.
+ +The resulting +hash can be used in the 3proxy configuration file with the +users directive instead of a cleartext password.
+ +password
+ +Cleartext password to +encrypt.
+ +| + |
+
+
+ salt |
++ |
+
+
+ Salt string for BLAKE2b hashing (max 64 characters). |
++ |
Generate NT +password hash:
+ +3proxy_crypt +MySecretPassword
+ +Result:
+ + +NT:3F7E6D8D96E8E7A9B0C1D2E3F4A5B6C7
+ +Generate BLAKE2b password hash +with salt:
+ +3proxy_crypt MySalt +MySecretPassword
+ +Result:
+ +CR:$3$MySalt$...
+ +Using in 3proxy.cfg:
+ +users +user1:CR:$3$MySalt$...
+ +The NT hash uses +the RSA MD4 Message-Digest Algorithm. The BLAKE2b hash uses +the BLAKE2 cryptographic hash function.
+ +When a password +hash is prefixed with NT: or CR:, 3proxy uses +the corresponding algorithm to verify passwords instead of +comparing cleartext strings.
+ +Report all bugs +to 3proxy@3proxy.org
+ +3proxy(8),
+3proxy.cfg(5),
+https://3proxy.org/
3proxy is +designed by Vladimir 3APA3A Dubrovin +(3proxy@3proxy.org)
+ftppr - +FTP proxy gateway service
+ +ftppr +[-d] [-l[[@]logfile]] +[-pport] [-iinternal_ip] +[-eexternal_ip] +[-hdefault_ip[:port]]
+ +ftppr is +FTP gateway service to allow internal users to access +external FTP servers.
+ +| + |
+
+
+ -I |
++ |
+
+
+ Inetd mode. Standalone service +only. |
| + |
+
+
+ -d |
++ |
+
+
+ Daemonize. Detach service from +console and run in the background. |
| + |
+
+
+ -t |
++ |
+
+
+ Be silenT. Do not log +start/stop/accept error records. |
| + |
+
+
+ -u |
++ |
+
+
+ Never look for username +authentication. |
| + |
+
+
+ -e |
++ |
+
+
+ External address. IP address of +the interface the proxy should initiate connections from. By +default, the system will decide which address to use in +accordance with the routing table. |
-niPATH
+ +(Linux only) Switch to the +network namespace identified by PATH before opening +the listening socket. The current namespace is saved and +restored immediately after binding, so outgoing connections +run in the original namespace unless -ne is also +given.
+ +-nePATH
+ +(Linux only) Switch to the +network namespace identified by PATH after the +listening socket has been bound (and after restoring from +-ni if applicable). Both options accept any namespace +file path (e.g. /var/run/netns/myns or +/proc/PID/ns/net) and require +CAP_SYS_ADMIN.
+ +| + |
+
+
+ -i |
++ |
+
+
+ Internal address. IP address the proxy accepts +connections to. By default, connections to any interface are +accepted. It´s usually unsafe. Unix domain sockets can +be specified with -iunix:/path/to/socket syntax +(e.g., -iunix:/var/run/ftppr.sock). On Linux, abstract +sockets use -iunix:@socketname syntax. |
| + |
+
+
+ -h |
++ |
+
+
+ Default destination. It’s +used if the target address is not specified by the user. |
| + |
+
+
+ -p |
++ |
+
+
+ Port. Port proxy listens for +incoming connections. Default is 21. |
| + |
+
+
+ -l |
++ |
+
+
+ Log. By default logging is to +stdout. If logfile is specified logging is to file. +Under Unix, if ´@´ precedes +logfile, syslog is used for logging. |
| + |
+
+
+ -S |
++ |
+
+
+ Increase or decrease stack size. +You may want to try something like -S8192 if you experience +3proxy crashes. |
You can use any +FTP client, regardless of FTP proxy support. For a client +with FTP proxy support, configure internal_ip and +port in the FTP proxy parameters. For clients without +FTP proxy support, use internal_ip and port as +the FTP server. The address of the real FTP server must be +configured as a part of the FTP username. The format for the +username is username@server, where +server is the address of the FTP server and +username is the user´s login on this FTP +server. The login itself may contain an ´@´ +sign. Only cleartext authentication is currently +supported.
+ +Report all bugs +to 3proxy@3proxy.org
+ +3proxy(8),
+proxy(8), pop3p(8), socks(8), tcppm(8), udppm(8),
+syslogd(8),
+https://3proxy.org/
3proxy is +designed by Vladimir 3APA3A Dubrovin +(3proxy@3proxy.org)
+pop3p - +POP3 proxy gateway service
+ +pop3p +[-d] [-l[[@]logfile]] +[-pport] [-iinternal_ip] +[-eexternal_ip] +[-hdefault_ip[:port]]
+ +pop3p is +POP3 gateway service to allow internal users to access +external POP3 servers.
+ +| + |
+
+
+ -I |
++ |
+
+
+ Inetd mode. Standalone service +only. |
| + |
+
+
+ -d |
++ |
+
+
+ Daemonize. Detach service from +console and run in the background. |
| + |
+
+
+ -t |
++ |
+
+
+ Be silenT. Do not log +start/stop/accept error records. |
| + |
+
+
+ -u |
++ |
+
+
+ Never look for username +authentication. |
| + |
+
+
+ -e |
++ |
+
+
+ External address. IP address of +the interface the proxy should initiate connections from. By +default, the system will decide which address to use in +accordance with the routing table. |
-niPATH
+ +(Linux only) Switch to the +network namespace identified by PATH before opening +the listening socket. The current namespace is saved and +restored immediately after binding, so outgoing connections +run in the original namespace unless -ne is also +given.
+ +-nePATH
+ +(Linux only) Switch to the +network namespace identified by PATH after the +listening socket has been bound (and after restoring from +-ni if applicable). Both options accept any namespace +file path (e.g. /var/run/netns/myns or +/proc/PID/ns/net) and require +CAP_SYS_ADMIN.
+ +| + |
+
+
+ -i |
++ |
+
+
+ Internal address. IP address the proxy accepts +connections to. By default, connections to any interface are +accepted. It´s usually unsafe. Unix domain sockets can +be specified with -iunix:/path/to/socket syntax +(e.g., -iunix:/var/run/pop3p.sock). On Linux, abstract +sockets use -iunix:@socketname syntax. |
| + |
+
+
+ -p |
++ |
+
+
+ Port. Port proxy listens for +incoming connections. Default is 110. |
| + |
+
+
+ -h |
++ |
+
+
+ Default destination. It’s +used if the target address is not specified by the user. |
| + |
+
+
+ -l |
++ |
+
+
+ Log. By default logging is to +stdout. If logfile is specified logging is to file. +Under Unix, if ´@´ precedes +logfile, syslog is used for logging. |
| + |
+
+
+ -S |
++ |
+
+
+ Increase or decrease stack size. +You may want to try something like -S8192 if you experience +3proxy crashes. |
You can use any +MUA (Mail User Agent) with POP3 support. Set the client to +use internal_ip and port as a POP3 server. The +address of the real POP3 server must be configured as a part +of the POP3 username. The format for the username is +username@server, where server is the +address of the POP3 server and username is the +user´s login on this POP3 server. The login itself may +contain an ´@´ sign. Only cleartext +authentication is supported, because challenge-response +authentication (APOP, CRAM-MD5, etc.) requires a challenge +from the server before we know which server to connect +to.
+ +Report all bugs +to 3proxy@3proxy.org
+ +3proxy(8),
+ftppr(8), proxy(8), socks(8), tcppm(8), udppm(8),
+syslogd(8),
+https://3proxy.org/
3proxy is +designed by Vladimir 3APA3A Dubrovin +(3proxy@3proxy.org)
+proxy - +HTTP proxy gateway service
+ +proxy +[-d][-a] [-l[[@]logfile]] +[-pport] [-iinternal_ip] +[-eexternal_ip]
+ +proxy is +HTTP gateway service with HTTPS and FTP over HTTPS +support.
+ +| + |
+
+
+ -I |
++ |
+
+
+ Inetd mode. Standalone service +only. |
| + |
+
+
+ -d |
++ |
+
+
+ Daemonize. Detach service from +console and run in the background. |
| + |
+
+
+ -t |
++ |
+
+
+ Be silenT. Do not log +start/stop/accept error records. |
| + |
+
+
+ -u |
++ |
+
+
+ Never ask for username +authentication |
| + |
+
+
+ -e |
++ |
+
+
+ External address. IP address of +the interface the proxy should initiate connections from. By +default, the system will decide which address to use in +accordance with the routing table. |
-niPATH
+ +(Linux only) Switch to the +network namespace identified by PATH before opening +the listening socket. The current namespace is saved and +restored immediately after binding, so outgoing connections +run in the original namespace unless -ne is also +given.
+ +-nePATH
+ +(Linux only) Switch to the +network namespace identified by PATH after the +listening socket has been bound (and after restoring from +-ni if applicable). Both options accept any namespace +file path (e.g. /var/run/netns/myns or +/proc/PID/ns/net) and require +CAP_SYS_ADMIN.
+ +| + |
+
+
+ -i |
++ |
+
+
+ Internal address. IP address the proxy accepts +connections to. By default, connections to any interface are +accepted. It´s usually unsafe. Unix domain sockets can +be specified with -iunix:/path/to/socket syntax +(e.g., -iunix:/var/run/proxy.sock). On Linux, abstract +sockets use -iunix:@socketname syntax. |
| + |
+
+
+ -a |
++ |
+
+
+ Anonymous. Hide information +about client. |
| + |
+
+
+ -a1 |
++ |
+
+
+ Anonymous. Show fake information +about client. |
| + |
+
+
+ -p |
++ |
+
+
+ Port. Port proxy listens for +incoming connections. Default is 3128. |
| + |
+
+
+ -l |
++ |
+
+
+ Log. By default logging is to +stdout. If logfile is specified logging is to file. +Under Unix, if ´@´ preceeds +logfile, syslog is used for logging. |
| + |
+
+
+ -S |
++ |
+
+
+ Increase or decrease stack size. +You may want to try something like -S8192 if you experience +3proxy crashes. |
You should use a +client with HTTP proxy support or configure a router to +redirect HTTP traffic to the proxy (transparent proxy). +Configure the client to connect to internal_ip and +port. HTTPS support allows you to use almost any +TCP-based protocol. If you need to limit clients, use +3proxy(8) instead.
+ +Report all bugs +to 3proxy@3proxy.org
+ +3proxy(8),
+ftppr(8), socks(8), pop3p(8), tcppm(8), udppm(8),
+syslogd(8),
+https://3proxy.org/
3proxy is +designed by Vladimir 3APA3A Dubrovin +(3proxy@3proxy.org)
+smtpp - +SMTP proxy gateway service
+ +smtpp +[-d] [-l[[@]logfile]] +[-pport] [-iinternal_ip] +[-eexternal_ip] +[-hdefault_ip[:port]]
+ +smtpp is +SMTP gateway service to allow internal users to access +external SMTP servers.
+ +| + |
+
+
+ -I |
++ |
+
+
+ Inetd mode. Standalone service +only. |
| + |
+
+
+ -d |
++ |
+
+
+ Daemonize. Detach service from +console and run in the background. |
| + |
+
+
+ -t |
++ |
+
+
+ Be silenT. Do not log +start/stop/accept error records. |
| + |
+
+
+ -u |
++ |
+
+
+ Never look for username +authentication. |
| + |
+
+
+ -e |
++ |
+
+
+ External address. IP address of +the interface the proxy should initiate connections from. By +default, the system will decide which address to use in +accordance with the routing table. |
-niPATH
+ +(Linux only) Switch to the +network namespace identified by PATH before opening +the listening socket. The current namespace is saved and +restored immediately after binding, so outgoing connections +run in the original namespace unless -ne is also +given.
+ +-nePATH
+ +(Linux only) Switch to the +network namespace identified by PATH after the +listening socket has been bound (and after restoring from +-ni if applicable). Both options accept any namespace +file path (e.g. /var/run/netns/myns or +/proc/PID/ns/net) and require +CAP_SYS_ADMIN.
+ +| + |
+
+
+ -i |
++ |
+
+
+ Internal address. IP address the proxy accepts +connections to. By default, connections to any interface are +accepted. It´s usually unsafe. Unix domain sockets can +be specified with -iunix:/path/to/socket syntax +(e.g., -iunix:/var/run/smtpp.sock). On Linux, abstract +sockets use -iunix:@socketname syntax. |
| + |
+
+
+ -p |
++ |
+
+
+ Port. Port proxy listens for +incoming connections. Default is 25. |
| + |
+
+
+ -h |
++ |
+
+
+ Default destination. It’s +used if the target address is not specified by the user. |
| + |
+
+
+ -l |
++ |
+
+
+ Log. By default logging is to +stdout. If logfile is specified logging is to file. +Under Unix, if ´@´ precedes +logfile, syslog is used for logging. |
| + |
+
+
+ -S |
++ |
+
+
+ Increase or decrease stack size. +You may want to try something like -S8192 if you experience +3proxy crashes. |
You can use any +MUA (Mail User Agent) with SMTP authentication support. Set +the client to use internal_ip and port as an +SMTP server. The address of the real SMTP server must be +configured as a part of the SMTP username. The format for +the username is username@server, where +server is the address of the SMTP server and +username is the user´s login on this SMTP +server. The login itself may contain an ´@´ +sign. Only cleartext authentication is supported, because +challenge-response authentication (CRAM-MD5, SPA, etc.) +requires a challenge from the server before we know which +server to connect to.
+ +Report all bugs +to 3proxy@3proxy.org
+ +3proxy(8),
+ftppr(8), proxy(8), socks(8), tcppm(8), udppm(8),
+syslogd(8),
+https://3proxy.org/
3proxy is +designed by Vladimir 3APA3A Dubrovin +(3proxy@3proxy.org)
+socks - +SOCKS 4/4.5/5 gateway service
+ +socks +[-d] [-l[[@]logfile]] +[-pport] [-iinternal_ip] +[-eexternal_ip]
+ +socks is +SOCKS server. It supports SOCKSv4, SOCKSv4.5 (extension to +v4 for server side name resolution) and SOCKSv5. SOCKSv5 +specification allows both outgoing and reverse TCP +connections and UDP portmapping.
+ +| + |
+
+
+ -I |
++ |
+
+
+ Inetd mode. Standalone service +only. |
| + |
+
+
+ -d |
++ |
+
+
+ Daemonize. Detach service from +console and run in the background. |
| + |
+
+
+ -t |
++ |
+
+
+ Be silenT. Do not log +start/stop/accept error records. |
| + |
+
+
+ -u |
++ |
+
+
+ Never ask for username +authentication |
| + |
+
+
+ -e |
++ |
+
+
+ External address. IP address of +the interface the proxy should initiate connections from. +External IP must be specified if you need incoming +connections. By default, the system will decide which +address to use in accordance with the routing table. |
-niPATH
+ +(Linux only) Switch to the +network namespace identified by PATH before opening +the listening socket. The current namespace is saved and +restored immediately after binding, so outgoing connections +run in the original namespace unless -ne is also +given.
+ +-nePATH
+ +(Linux only) Switch to the +network namespace identified by PATH after the +listening socket has been bound (and after restoring from +-ni if applicable). Both options accept any namespace +file path (e.g. /var/run/netns/myns or +/proc/PID/ns/net) and require +CAP_SYS_ADMIN.
+ +| + |
+
+
+ -Ne |
++ |
+
+
+ External NAT address 3proxy reports to client for +CONNECT/BIND. This is external address of NAT between 3proxy +and destination server. By default, the external address is +reported. It’s only useful in the case of IP-IP NAT +and does not work with port translation. |
| + |
+
+
+ -Ni |
++ |
+
+
+ Internal NAT address 3proxy +reports to client for UDPASSOC. This is external address of +the NAT between 3proxy and the client, client uses to +connect to 3proxy. By default, the internal address is +reported. It’s only useful in the case of IP-IP NAT +and does not work with port translation. |
| + |
+
+
+ -i |
++ |
+
+
+ Internal address. IP address the +proxy accepts connections to. By default, connections to any +interface are accepted. It´s usually unsafe. Unix +domain sockets can be specified with +-iunix:/path/to/socket syntax (e.g., +-iunix:/var/run/socks.sock). On Linux, abstract sockets use +-iunix:@socketname syntax. |
| + |
+
+
+ -p |
++ |
+
+
+ Port. Port proxy listens for +incoming connections. Default is 1080. |
| + |
+
+
+ -l |
++ |
+
+
+ Log. By default logging is to +stdout. If logfile is specified logging is to file. +Under Unix, if ´@´ preceeds +logfile, syslog is used for logging. |
| + |
+
+
+ -S |
++ |
+
+
+ Increase or decrease stack size. +You may want to try something like -S8192 if you experience +3proxy crashes. |
You should use a +client with SOCKS support or use some socksification support +(for example SocksCAP or FreeCAP). Configure +client to use internal_ip and port. SOCKS +allows you to use almost any application protocol without +limitation. This implementation also allows you to open +privileged ports on the server (if socks has sufficient +privileges). If you need to control access, use +3proxy(8) instead.
+ +Report all bugs +to 3proxy@3proxy.org
+ +3proxy(8),
+proxy(8), ftppr(8), pop3p(8), tcppm(8), udppm(8),
+syslogd(8),
+https://3proxy.org/
3proxy is +designed by Vladimir 3APA3A Dubrovin +(3proxy@3proxy.org)
+tcppm - +TCP port mapper
+ +tcppm +[-d] [-l[[@]logfile]] +[-iinternal_ip] [-eexternal_ip] +local_port remote_host remote_port
+ +tcppm +forwards connections from local to remote TCP port
+ +| + |
+
+
+ -I |
++ |
+
+
+ Inetd mode. Standalone service +only. |
| + |
+
+
+ -d |
++ |
+
+
+ Daemonize. Detach service from +console and run in the background. |
| + |
+
+
+ -t |
++ |
+
+
+ Be silenT. Do not log +start/stop/accept error records. |
| + |
+
+
+ -e |
++ |
+
+
+ External address. IP address of +the interface the proxy should initiate connections from. By +default, the system will decide which address to use in +accordance with the routing table. |
-niPATH
+ +(Linux only) Switch to the +network namespace identified by PATH before opening +the listening socket. The current namespace is saved and +restored immediately after binding, so outgoing connections +run in the original namespace unless -ne is also +given.
+ +-nePATH
+ +(Linux only) Switch to the +network namespace identified by PATH after the +listening socket has been bound (and after restoring from +-ni if applicable). Both options accept any namespace +file path (e.g. /var/run/netns/myns or +/proc/PID/ns/net) and require +CAP_SYS_ADMIN.
+ +| + |
+
+
+ -i |
++ |
+
+
+ Internal address. IP address the proxy accepts +connections to. By default, connections to any interface are +accepted. It´s usually unsafe. Unix domain sockets can +be specified with -iunix:/path/to/socket syntax +(e.g., -iunix:/var/run/tcppm.sock). On Linux, abstract +sockets use -iunix:@socketname syntax. |
| + |
+
+
+ -l |
++ |
+
+
+ Log. By default logging is to +stdout. If logfile is specified logging is to file. +Under Unix, if ´@´ precedes +logfile, syslog is used for logging. |
| + |
+
+
+ -S |
++ |
+
+
+ Increase or decrease stack size. +You may want to try something like -S8192 if you experience +3proxy crashes. |
local_port
+ +- port tcppm accepts +connections on
+ +remote_host
+ +- IP address of the host the +connection is forwarded to. Unix domain sockets can be +specified with the syntax unix:/path/to/socket (e.g., +unix:/var/run/app.sock). On Linux, abstract (fileless) Unix +sockets use the syntax unix:@socketname (e.g., +unix:@app.socket).
+ +remote_port
+ +- remote port the connection is +forwarded to. Ignored when using Unix socket destination, +but must be specified (use any positive value) for syntax +compatibility.
+ +Any TCP-based +application can be used as a client. Use internal_ip +and local_port as the destination in the client +application. The connection is forwarded to +remote_host:remote_port
+ +Report all bugs +to 3proxy@3proxy.org
+ +3proxy(8),
+proxy(8), ftppr(8), socks(8), pop3p(8), udppm(8),
+syslogd(8),
+https://3proxy.org/
3proxy is +designed by Vladimir 3APA3A Dubrovin +(3proxy@3proxy.org)
+tlspr - +SNI proxy gateway service
+ +tlspr +[-d][-a] [-l[[@]logfile]] +[-plistening_port] +[-Pdestination_port] +[-ctls_check_level] +[-iinternal_ip] +[-eexternal_ip]
+ +tlspr is +an SNI gateway service (destination host is taken from TLS +handshake). The destination port must be specified via the +-P option (or it may be detected with the Transparent +plugin).
+ +| + |
+
+
+ -I |
++ |
+
+
+ Inetd mode. Standalone service +only. |
| + |
+
+
+ -d |
++ |
+
+
+ Daemonize. Detach service from +console and run in the background. |
| + |
+
+
+ -t |
++ |
+
+
+ Be silenT. Do not log +start/stop/accept error records. |
| + |
+
+
+ -u |
++ |
+
+
+ Never ask for username +authentication |
| + |
+
+
+ -e |
++ |
+
+
+ External address. IP address of +the interface the proxy should initiate connections from. By +default, the system will decide which address to use in +accordance with the routing table. |
-niPATH
+ +(Linux only) Switch to the +network namespace identified by PATH before opening +the listening socket. The current namespace is saved and +restored immediately after binding, so outgoing connections +run in the original namespace unless -ne is also +given.
+ +-nePATH
+ +(Linux only) Switch to the +network namespace identified by PATH after the +listening socket has been bound (and after restoring from +-ni if applicable). Both options accept any namespace +file path (e.g. /var/run/netns/myns or +/proc/PID/ns/net) and require +CAP_SYS_ADMIN.
+ +| + |
+
+
+ -i |
++ |
+
+
+ Internal address. IP address the proxy accepts +connections to. By default, connections to any interface are +accepted. It´s usually unsafe. Unix domain sockets can +be specified with -iunix:/path/to/socket syntax +(e.g., -iunix:/var/run/tlspr.sock). On Linux, abstract +sockets use -iunix:@socketname syntax. |
| + |
+
+
+ -a |
++ |
+
+
+ Anonymous. Hide information +about client. |
| + |
+
+
+ -a1 |
++ |
+
+
+ Anonymous. Show fake information +about client. |
| + |
+
+
+ -p |
++ |
+
+
+ listening_port. Port proxy +listens for incoming connections. Default is 1443. |
| + |
+
+
+ -P |
++ |
+
+
+ destination_port. Port to +establish outgoing connections. Required unless the +Transparent plugin is used, because the TLS handshake does +not contain port information. Default is 443. |
| + |
+
+
+ -c |
++ |
+
+
+ TLS_CHECK_LEVEL. 0 (default) - +allow non-TLS traffic to pass, 1 - require TLS, only check +client HELLO packet, 2 - require TLS, check both client and +server HELLO, 3 - require TLS, check that the server sends a +certificate (not compatible with TLS 1.3), 4 - require +mutual TLS, check that the server sends a certificate +request and the client sends a certificate (not compatible +with TLS 1.3) |
| + |
+
+
+ -l |
++ |
+
+
+ Log. By default logging is to +stdout. If logfile is specified logging is to file. +Under Unix, if ´@´ precedes +logfile, syslog is used for logging. |
| + |
+
+
+ -S |
++ |
+
+
+ Increase or decrease stack size. +You may want to try something like -S8192 if you experience +3proxy crashes. |
You should use a +client with TLS support or configure a router to redirect +TLS traffic to the proxy (transparent proxy). Configure the +client to connect to internal_ip and port. If +you need to limit clients, use 3proxy(8) instead.
+ +Report all bugs +to 3proxy@3proxy.org
+ +3proxy(8),
+ftppr(8), proxy(8), socks(8), pop3p(8), smtpp(8), tcppm(8),
+udppm(8), syslogd(8),
+https://3proxy.org/
3proxy is +designed by Vladimir 3APA3A Dubrovin +(3proxy@3proxy.org)
+udppm - +UDP port mapper
+ +udppm +[-ds] [-l[[@]logfile]] +[-iinternal_ip] [-eexternal_ip] +local_port remote_host remote_port
+ +udppm +forwards datagrams from local to remote UDP port
+ +| + |
+
+
+ -I |
++ |
+
+
+ Inetd mode. Standalone service +only. |
| + |
+
+
+ -d |
++ |
+
+
+ Daemonize. Detach service from +console and run in the background. |
| + |
+
+
+ -t |
++ |
+
+
+ Be silenT. Do not log +start/stop/accept error records. |
| + |
+
+
+ -e |
++ |
+
+
+ External address. IP address of +the interface the proxy should initiate datagrams from. By +default, the system will decide which address to use in +accordance with the routing table. |
-niPATH
+ +(Linux only) Switch to the +network namespace identified by PATH before opening +the listening socket. The current namespace is saved and +restored immediately after binding, so outgoing connections +run in the original namespace unless -ne is also +given.
+ +-nePATH
+ +(Linux only) Switch to the +network namespace identified by PATH after the +listening socket has been bound (and after restoring from +-ni if applicable). Both options accept any namespace +file path (e.g. /var/run/netns/myns or +/proc/PID/ns/net) and require +CAP_SYS_ADMIN.
+ +| + |
+
+
+ -i |
++ |
+
+
+ Internal address. IP address the proxy accepts datagrams +to. By default, connections to any interface are accepted. +It´s usually unsafe. |
| + |
+
+
+ -l |
++ |
+
+
+ Log. By default logging is to +stdout. If logfile is specified logging is to file. +Under Unix, if ´@´ precedes +logfile, syslog is used for logging. |
| + |
+
+
+ -s |
++ |
+
+
+ Single packet. By default, only +one client can use the udppm service, but if -s is +specified, only one packet will be forwarded between client +and server. This allows the service to be shared between +multiple clients for single-packet services (for example, +name lookups). |
| + |
+
+
+ -S |
++ |
+
+
+ Increase or decrease stack size. +You may want to try something like -S8192 if you experience +3proxy crashes. |
local_port
+ +- port udppm accepts datagrams +on
+ +remote_host
+ +- IP address of the host +datagrams are forwarded to
+ +remote_port
+ +- remote port datagrams are +forwarded to
+ +Any UDP-based +application can be used as a client. Use internal_ip +and local_port as the destination in the client +application. All datagrams are forwarded to +remote_host:remote_port
+ +Report all bugs +to 3proxy@3proxy.org
+ +3proxy(8),
+proxy(8), ftppr(8), socks(8), pop3p(8), udppm(8),
+syslogd(8),
+https://3proxy.org/
3proxy is +designed by Vladimir 3APA3A Dubrovin +(3proxy@3proxy.org)
+Note: Since version 0.9.7, PCRE filtering is built into 3proxy and does not require +a separate plugin. All pcre_* commands are available directly when 3proxy is compiled with +PCRE2 support (WITH_PCRE). The plugin line is no longer needed.
-This filtering plugin can be used to create matching and replace -rules with regular expressions for client's request, client and -servers header and client and server data. It adds 3 additional -configuration commands: +This filtering functionality can be used to create matching and replacement +rules with regular expressions for client requests, client and +server headers, and client and server data. It adds 3 additional +configuration commands:
pcre TYPE FILTER_ACTION REGEXP [ACE] @@ -12,11 +15,11 @@ pcre_rewrite TYPE FILTER_ACTION REGEXP REWRITE_EXPRESSION [ACE] pcre_extend FILTER_ACTION [ACE] pcre_options OPTION1 [...]-pcre - allows to apply some rule for matching -
-plugin PCREPlugin.dll pcre_plugin pcre request deny "porn|sex" user1,user2,user3 192.168.0.0/16 pcre srvheader deny "Content-type: application" pcre_rewrite clidata,srvdata dunno "porn|sex|pussy" "***" baduser pcre_extend deny * 192.168.0.1/16-
Примечание: Начиная с версии 0.9.7 фильтрация PCRE встроена в 3proxy и не требует +отдельного плагина. Все команды pcre_* доступны напрямую при компиляции 3proxy с поддержкой +PCRE2 (WITH_PCRE). Строка plugin больше не нужна.
+ +Фильтрующий плагин используется для создания правил поиска и замены регулярных выражений в запросе, заголовков запроса и ответа и данных. -Добавляет поддержку 3х новых команд в файле конфигурации: +Добавляет поддержку 3х новых команд в файле конфигурации:
pcre TYPE FILTER_ACTION REGEXP [ACE] @@ -30,7 +34,7 @@ PCRE_UTF8, PCRE_NO_AUTO_CAPTURE, PCRE_NO_UTF8_CHECK, PCRE_AUTO_CALLOUT, -PCRE_PARTIAL, +PCRE_PARTIAL, PCRE_DFA_SHORTEST, PCRE_DFA_RESTART, PCRE_FIRSTLINE, @@ -56,9 +60,9 @@ PCRE_BSR_UNICODE
-plugin PCREPlugin.dll pcre_plugin pcre request deny "porn|sex" user1,user2,user3 192.168.0.0/16 pcre srvheader deny "Content-type: application" pcre_rewrite clidata,srvdata dunno "porn|sex|pussy" "***" baduser pcre_extend deny * 192.168.0.1/16-
Note: Since version 0.9.7, SSL/TLS support is built into 3proxy and does not require +a separate plugin. All ssl_* commands are available directly when 3proxy is compiled with +OpenSSL support (WITH_SSL). The plugin line is no longer needed.
--ssl_certcache PATH_TO_CACHE -ssl_mitm -ssl_nomitm --ssl_certcache - path to certificates cache. For transparent spoofing cache must contain 3 files: 3proxy.pem - public -self-signed certificates, 3proxy.key - key for public certificates, server.key - this key will be used to generates -spoofed certificates. -Generated certificates will be placed to the same path. -
SSL/TLS support can be used to transparently decrypt SSL/TLS data, provide TLS encryption +for proxy traffic, and authenticate using client certificates.
+ +-plugin /path/to/SslPlugin.dll ssl_plugin -ssl_certcache /path/to/cache/ +ssl_server_ca_file /path/to/cafile +ssl_server_ca_key /path/to/cakey ssl_mitm proxy -p3128 ssl_nomitm proxy -p3129+MITM's traffic with a spoofed certificate for the port 3128 proxy. -
+ssl_server_cert path_to_cert +ssl_server_key path_to_key +ssl_serv +proxy -p33128 +ssl_noserv +proxy -p3128 ++Creates an https:// proxy on port 33128 and an http:// proxy on port 3128 + +
+ssl_client_cert /path/to/client.crt +ssl_client_key /path/to/client.key +ssl_client_verify +ssl_client_ca_file /path/to/ca.crt +ssl_cli +proxy -p3128 ++Creates an HTTP proxy that connects to upstream servers via TLS with client certificate authentication. + +
+ssl_server_cert /path/to/server.crt +ssl_server_key /path/to/key +ssl_client_mode 3 + +auth strong +allow user1 +parent 1000 https parent1.example.com 443 +allow user2 +parent 1000 socks5 parent2.example.com 1080 +ssl_serv +ssl_cli +proxy -p3128 +ssl_noserv +ssl_nocli ++Creates an HTTP proxy on port 3128 that uses TLS for client connections (ssl_serv). With ssl_client_mode 3, TLS handshake to parent proxy is performed only if the parent type ends with 's' (secure types). In this example, user1's traffic goes through an https parent proxy with TLS encryption, while user2's traffic goes through a regular socks5 parent without TLS. Secure parent types include: tcps, https, connects, connect+s, socks4s, socks5s, socks4+s, socks5+s, pop3s, smtps, ftps. + +
+ssl_server_cert /path/to/server.crt +ssl_server_key /path/to/server.key +ssl_server_ca_file /path/to/ca.crt +ssl_server_verify +ssl_serv +proxy -p3128 ++Creates an https:// proxy that requires client certificate authentication. © Vladimir Dubrovin, License: BSD style diff --git a/doc/html/plugins/SSLPlugin.ru.html b/doc/html/plugins/SSLPlugin.ru.html index 51b9399..dc9238b 100644 --- a/doc/html/plugins/SSLPlugin.ru.html +++ b/doc/html/plugins/SSLPlugin.ru.html @@ -1,32 +1,120 @@ -
Примечание: Начиная с версии 0.9.7 поддержка SSL/TLS встроена в 3proxy и не требует +отдельного плагина. Все команды ssl_* доступны напрямую при компиляции 3proxy с поддержкой +OpenSSL (WITH_SSL). Строка plugin больше не нужна.
+Плагин можно использовать для перехвата и дешифровки SSL/TLS трафика, для шифрования трафика прокси-сервера и аутентификации с помощью клиентских сертификатов.
+-ssl_certcache PATH_TO_CACHE -ssl_mitm -ssl_nomitm --ssl_certcache - путь к кэшу сертификатов. Для транспорентной подмены сертификатов в кэше должно находиться 3 файла: 3proxy.pem - публичный -самоподписанный сертификат, 3proxy.key - ключ от этого сертификата, server.key - ключ с которым будут генерироваться подменные сертификаты. -Сгенерированные сертификаты будут помещаться в этот же каталог. -
-plugin /path/to/SslPlugin.dll ssl_plugin -ssl_certcache /path/to/cache/ +ssl_server_ca_file /path/to/cafile +ssl_server_ca_key /path/to/cakey ssl_mitm proxy -p3128 ssl_nomitm proxy -p3129+Перехватывается трафик в прокси на порту 3128. -
+ssl_server_cert path_to_cert +ssl_server_key path_to_key +ssl_serv +proxy -p33128 +ssl_noserv +proxy -p3128 ++На порту 33128 создается https:// прокси, на порту 3128 - http:// прокси. + +
+ssl_client_cert /path/to/client.crt +ssl_client_key /path/to/client.key +ssl_client_verify +ssl_client_ca_file /path/to/ca.crt +ssl_cli +proxy -p3128 ++Создается HTTP-прокси, который соединяется с вышестоящими серверами через TLS с аутентификацией по клиентскому сертификату. + +
+ssl_server_cert /path/to/server.crt +ssl_server_key /path/to/key +ssl_client_mode 3 + +auth strong +allow user1 +parent 1000 https parent1.example.com 443 +allow user2 +parent 1000 socks5 parent2.example.com 1080 +ssl_serv +ssl_cli +proxy -p3128 +ssl_noserv +ssl_nocli ++Создается HTTP-прокси на порту 3128, использующий TLS для клиентских соединений (ssl_serv). При ssl_client_mode 3 TLS-рукопожатие с родительским прокси выполняется только если тип parent прокси заканчивается на 's' (защищённые типы). В данном примере трафик user1 идёт через https родительский прокси с TLS-шифрованием, а трафик user2 — через обычный socks5 родитель без TLS. Защищённые типы parent прокси: tcps, https, connects, connect+s, socks4s, socks5s, socks4+s, socks5+s, pop3s, smtps, ftps. + +
+ssl_server_cert /path/to/server.crt +ssl_server_key /path/to/server.key +ssl_server_ca_file /path/to/ca.crt +ssl_server_verify +ssl_serv +proxy -p3128 ++Создается https:// прокси, требующий аутентификацию по клиентскому сертификату. + +© Vladimir Dubrovin, License: BSD style diff --git a/doc/html/plugins/StringsPlugin.html b/doc/html/plugins/StringsPlugin.html index f0f76cc..815ae17 100644 --- a/doc/html/plugins/StringsPlugin.html +++ b/doc/html/plugins/StringsPlugin.html @@ -1,16 +1,16 @@ -
plugin "StringsPlugin.dll" start c:\3proxy\bin\rus.3ps
-This plugin attempts to correct 3proxy computations to approximate network or -link level traffic by using either fixed coefficients by port number or -attempting to predict number and sizes of network packets. +This plugin attempts to correct 3proxy's computations to approximate network or +link-level traffic by using either fixed coefficients by port number or +by attempting to predict the number and sizes of network packets.
plugin TrafficPlugin.dll start
trafcorrect m <service> <target port> <coefficient>-where <service> - one of proxy, socks4, socks45, socks5, tcppm, udppm, pop3p, * matches "any". -
trafcorrect p <service> <tcp/udp> <target port> [empty packet size]-tcp ot udp - transport level protocol to apply rule +tcp or udp - transport-level protocol to apply the rule to
plugin "TrafficPlugin.dll" start trafcorrect m socks5 6112 4.5 trafcorrect m socks5 * 1.1-wrong usage: +Wrong usage:
trafcorrect m socks5 * 1.1 trafcorrect m socks5 6112 4.5-second rule will never be applied. +The second rule will never be applied.
@@ -66,4 +66,4 @@ trafcorrect m socks5 6112 4.5Загрузить:
plugin /path/to/TransparentPlugin.ld.so transparent_plugin @@ -19,13 +19,13 @@ notransparent proxyNow, any TCP traffic transparently redirected to port 12345 will be routed via -parent SOCKSv5 proxy and logged, all URLs for web requests are visible in logs. -Paremeters '127.0.0.1 11111' in this case are not used and are overwritten by -destination IP:port for each transparent connection. +the parent SOCKSv5 proxy and logged; all URLs for web requests are visible in logs. +The parameters '127.0.0.1 11111' in this case are not used and are overwritten by +the destination IP:port for each transparent connection.
plugin "WindowsAuthentication.dll" WindowsAuthentication "3ProxyAllowedGroup"
-authcache user,pass 900 auth cache windows-
diff --git a/doc/ru/example1.txt b/doc/ru/example1.txt
index 7c426a8..5b34c4e 100644
--- a/doc/ru/example1.txt
+++ b/doc/ru/example1.txt
@@ -3,26 +3,26 @@ KOI8-R
Kirill Lopuchov, lopuchov at mail ru
<3proxy>
- Internet- ( , Internet-). , Internet- proxy-, NAT ( ) IP .
+Довольно часто перед системным администратором встает задача предоставить доступ к Internet-ресурсам группе пользователей (небольшой офис, Internet-кафе). Данную задачу можно решить, настроив на Internet-шлюзе proxy-сервер, службу NAT (трансляция сетевых адресов) или раздать каждому пользователю реальный IP адрес.
- - proxy-. proxy Squid, :), squid SOCKS4/5-, TCP/UP -. PROXY-, "3proxy" (http://3proxy.ru/), . . . , Win9x/2000/XP Linux FreeBSD.
+Давайте рассмотрим самый простой способ подключения - установку proxy-сервера. Традиционно для этих целей применяется популярный proxy Squid, но не всегда бывает необходимость в столь тяжеловатой программе :), да и в squid отсутствуют такие иногда необходимые вещи как SOCKS4/5-сервер, TCP/UP порт-маппинг. Поэтому вторым номером хочется представить вашему вниманию PROXY-сервер, под названием "3proxy" (http://3proxy.ru/), разработанный нашим программистом из г. Нижний Новгород. Одним из главных его достоинств является компактность и высокая переносимость. Код сервера написан так, что легко компилируется как для Win9x/2000/XP так и для Linux и FreeBSD.
- :
+Сервер поддерживает следующие возможности:
HTTP(S) proxy;
FTP over HTTP proxy;
SOCKS4/5 proxy;
POP3 proxy;
-TCP & UDP ;
- ;
- ( , :) );
- , ;
- proxy- ip ;
- ODBC (-, proxy) syslog . .
+TCP & UDP маппинг портов;
+листы доступа к различным службам и адресам;
+ограничение пропускной способности канала каждого пользователя (чтобы пользователь не съел весь канал, качая кучу файлов в несколько потоков :) );
+ограничение трафика пользователя на день, неделю и месяц;
+авторизацию пользователей ко всем proxy-службам по имени и паролю или по ip адресам;
+ведение журналов через ODBC (по-моему, такого нет ни в одном proxy) и syslog и т. д.
- :-|. Inernet- ( ) - 25% . , , 2- wwwoffle , 3proxy :)
+К недостаткам можно отнести отсутствие кэширования информации :-|. Но в последнее время Inernet-контент становится все более динамичным (то есть не поддающийся кэшированию) и может быть для кого-то экономия в 25% трафика за счет его кэширования не будет столь критична. Для тех пользователей, кому она может оказаться критичной, автор предлагает использовать цепочку из 2-х серверов и в качестве кэша такие сервера как wwwoffle или им подобные, либо ждать появления поддержки кеша в 3proxy :)
-
+Установка
# wget http://3proxy.ru/current/3proxy.tgz
# tar -xvzf 3proxy.tgz
@@ -35,64 +35,64 @@ TCP & UDP
# touch /usr/local/3proxy/3proxy.cfg
# chown -R nobody:nogroup /usr/local/3proxy
- 3proxy.cfg
-,
- 3proxy.cfg.sample
+Далее приведу небольшой пример конфигурационного файла 3proxy.cfg с
+комментариями, более подробную информацию по конфигурированию можно
+найти файле 3proxy.cfg.sample или в
HowTo http://3proxy.ru/howtor.asp
- FAQ http://3proxy.ru/faqr.asp
+и FAQ http://3proxy.ru/faqr.asp
-------------3proxy.cfg-------------
-# !!
-# !!
+# ВНИМАНИЕ !! не должны быть пробелов
+# перед любыми опциями конфигурации !!
-# ip- DNS-
+# ip-адрес DNS-сервера провайдера или локального
nserver 127.0.0.1
timeouts 1 5 30 60 180 1800 15 60
-# vasia, petia vova
-# 24555, 14656 45455
+# Создаем двух пользователей vasia, petia и vova
+# и назначаем им пароли 24555, 14656 и 45455 соответственно
users vasia:CL:24555
users petia:CL:14656
users vova:CL:45455
-# -
-#
+# Лог-файл со списком запросов пользователей
+# будет создаваться каждый день новый
log /usr/local/3proxy/logs/3proxy.log D
logformat "%d-%m-%Y %H:%M:%S %U %C:%c %R:%r %O %I %T"
-# ,
-#
+# Внешний интерфейс,
+# через который будут уходить запросы от сервера
external 10.1.1.1
-# ip- ,
-#
+# ip-адрес интерфейса, на котором будут приниматься
+# запросы от клиентов
internal 192.168.1.1
-#
+# Устанавливаем тип авторизации по имени и паролю
auth strong
-# 80,8080-8088
+# Разрешаем доступ к портам 80,8080-8088
allow * * * 80,8080-8088
-# parent,
-# ip, ,
+# Расскоментировать секцию parent, если у вас есть прокси верхнего
+# уровня и заменить ip, порт, имя пользователя и пароль на свои значения
# parent 1000 http 192.168.0.1 8080 username passwd
# allow *
-# HTTP-proxy (3128)
-# (-n) c NTLM-)
+# Запускаем службу HTTP-proxy на порту (3128) и
+# (-n) c отключенной NTLM-авторизацией)
proxy -p3128 -n
-#
-# vasia petia 20000 bps,
-# vova 10000 bps
+# Ограничиваем толшину канала для пользователей
+# vasia и petia в 20000 bps,
+# а для vova 10000 bps
bandlimin 20000 vasia,petia
bandlimin 10000 vova
-# nobody
-# ( uid gid nobody
-# . id nobody)
+# Запускаем сервер от пользователя nobody
+# (возможно в вашей ОС uid и gid пользователя nobody
+# будут другими. Для их определения воспользуйтесь коммандой id nobody)
setgid 65534
setuid 65534
------------------------------------
- , 3proxy :
+После того как мы создали конфигурационный файл сервера, запускаем 3proxy командой:
/usr/local/3proxy/3proxy /usr/local/3proxy/3proxy.cfg
diff --git a/doc/ru/iodbc.txt b/doc/ru/iodbc.txt
index 627bb3e..4b39521 100644
--- a/doc/ru/iodbc.txt
+++ b/doc/ru/iodbc.txt
@@ -2,9 +2,9 @@ KOI8-R
Kirill Lopuchov, lopuchov at mail ru
- SQL- . 3proxy ODBC- , ODBC-. - Windows, , , Unix. FreeBSD SQLite. , ( mysql postgresql odbc-)
+Ведение логов сервера в SQL-базе имеет свои приемущества перед обычными текстовыми файлами. 3proxy поддерживает ведение логов через ODBC-менеджер в любой базе данных, имеющих ODBC-драйвер. Этот менеджер стал стандартом де-факто в среде Windows, чего, к сожалению, не скажешь про Unix. Поэтому далее рассмотрим на примере FreeBSD настройку ведения логов в базе SQLite. Эта база данных выбрана в качестве примера потому, что она проста в установке и настроке (в принципе настройка ведения логов в любой другой базе mysql или postgresql отличается только настройкой его odbc-драйвера)
- SQLite
+ Устанавливаем SQLite
wget http://www.sqlite.org/sqlite-2.8.14.tar.gz
tar -xvzf sqlite-2.8.14.tar.gz
cd sqlite
@@ -12,7 +12,7 @@ cd sqlite
gmake
gmake install
- iODBC
+ Устанавливаем iODBC менеджер
wget http://www.iodbc.org/libiodbc-3.51.2.tar.gz
tar -xvzf libiodbc-3.51.2.tar.gz
cd libiodbc-3.51.2
@@ -20,24 +20,24 @@ cd libiodbc-3.51.2
make
make install
- odbc SQLite
+ Устанавливаем odbc драйвер SQLite
wget http://www.ch-werner.de/sqliteodbc/sqliteodbc-0.62.tar.gz
tar -xvzf sqliteodbc-0.62.tar.gz
cd sqliteodbc-0.62
./configure
- configure :
+ Если у вас скрипт configure выдал ошибку :
(configure: error: SQLite library too old)
- , (SQLITE_COMPILE=1
- . 5092 if endif) configure
+ то ее можно попробовать обойти, вставив (SQLITE_COMPILE=1
+ в стр. 5092 после условия if endif) в файле configure
make
make install
- iODBC
- /etc/odbcinst.ini /etc/odbc.ini
+ Далее настраиваем записи для iODBC менеджера в
+файлах /etc/odbcinst.ini и /etc/odbc.ini
- odbc
+Настраиваем odbc драйвер
--------------/etc/odbcinst.ini-------------
[ODBC Drivers]
SQLite=Installed
@@ -46,8 +46,8 @@ SQLite=Installed
Driver=/usr/local/lib/libsqliteodbc.so
---------------------------------------
- DSN c "sqlite",
- : /usr/local/3proxy/logs.db
+Создаем DSN для базы c именем "sqlite", которая будет
+располагаться в каталоге: /usr/local/3proxy/logs.db
--------------/etc/odbc.ini----------------
[ODBC Data Sources]
@@ -61,8 +61,8 @@ Database=/usr/local/3proxy/logs.db
Timeout=2000
---------------------------------------
- (logformat
-. 3proxy.cfg.sample )
+Создаем базу для логов и таблицу в формате (logformat
+см. описание в 3proxy.cfg.sample )
sqlite /usr/local/3proxy/logs.db
@@ -79,7 +79,7 @@ sqlite>create table log (
...>);
- 3proxy.cfg
+Добавляем следующие записи в конфигурационный файл 3proxy.cfg
---------------3proxy.cfg-----------------
log &sqlite
@@ -88,12 +88,12 @@ l_descr)
values ('%d-%m-%Y', '%H:%M:%S', '%U', '%N', %I, %O, '%T')"
------------------------------------------
-C 3proxy c iODBC, Makefile.unix
+Cобрать 3proxy c поддрежкой iODBC, для этого в Makefile.unix поменять
CFLAGS = -Wall -O2 -c -pthread -D_THREAD_SAFE -D_REENTRANT -DWITH_STD_MALLOC -I/usr/local/include
LIBS = -L /usr/local/lib -lodbc
-
+и дать команды
make clean
make -f Makefile.unix
diff --git a/doc/ru/odbc.txt b/doc/ru/odbc.txt
index d0ca46a..31027d4 100644
--- a/doc/ru/odbc.txt
+++ b/doc/ru/odbc.txt
@@ -1,6 +1,6 @@
Eugene: Re: 3proxy 0.6 + iODBC + PostgreSQL 22.11.2007 19:04:23
- - .
-1. unixODBC.
+ Наконец-то я разобрался и запустил.
+1. Я использовал пакет unixODBC.
2. /etc/unixODBC/odbc.ini
[proxy]
Description = PostgreSQL ODBC driver
@@ -12,7 +12,7 @@ ServerName = localhost
Description = PostgreSQL ODBC driver
Driver = /usr/local/lib/psqlodbcw.so
Setup = /usr/lib/libodbcpsqlS.so
-4. psqlodbc-08.02.0500, postgresql.org ( psqlodbcw.so).
+4. Собирал вручную psqlodbc-08.02.0500, слитый с postgresql.org (получился psqlodbcw.so).
5. 3proxy.conf
log &proxy,logger,123
logformat "LINSERT INTO logger (ldatetime,username,userip,trafin,trafout,service,host,port,
@@ -20,9 +20,9 @@ url) VALUES ('%Y-%m-%d %H:%M:%S','%U','%C',
'%I','%O','%N',
'%n','%r','%T');"
- odbc.ini - ODBC.
- libiodbc - libiodbc.so.
+То есть пароли и логины в odbc.ini прописывать не надо - система падает на драйвере ODBC.
+Использовать libiodbc тоже не надо - система падает на libiodbc.so.
- unixODBC + psqlodbc postgresql.org, -DSAFESQL, .
- myodbc + unixODBC .
-, ;)
\ No newline at end of file
+Все вышесказанное справедливо для unixODBC + psqlodbc производства postgresql.org, как с -DSAFESQL, так и без оного.
+С myodbc + unixODBC проблем не наблюдалось никаких.
+Шаманство, в общем ;)
\ No newline at end of file
diff --git a/man/3proxy.8 b/man/3proxy.8
index 0a26479..09987a2 100644
--- a/man/3proxy.8
+++ b/man/3proxy.8
@@ -1,4 +1,4 @@
-.TH 3proxy "8" "January 2019" "3proxy 0.9" "Universal proxy server"
+.TH 3proxy "8" "May 2026" "3proxy 0.9" "Universal proxy server"
.SH NAME
.B 3proxy
\- 3[APA3A] tiny proxy server, or trivial proxy server, or free proxy
@@ -14,18 +14,18 @@ server
.RI [ \-\-remove ]
.SH DESCRIPTION
.B 3proxy
-is universal proxy server. It can be used to provide internal users wuth
+is a universal proxy server. It can be used to provide internal users with
fully controllable access to external resources or to provide external
users with access to internal resources. 3proxy is not developed to replace
.BR squid (8),
-but it can extend functionality of existing cashing proxy.
+but it can extend the functionality of an existing caching proxy.
It can be used to route requests between different types of clients and proxy
servers. Think about it as application level
gateway with configuration like hardware router has for network layer.
It can establish multiple
gateways with HTTP and HTTPS proxy with FTP over HTTP support, SOCKS v4,
v4.5 and v5, POP3 proxy, UDP and TCP portmappers. Each gateway is started
-from configuration file like independant service
+from the configuration file like an independent service
.BR proxy (8)
.BR socks (8)
.BR pop3p (8)
@@ -35,24 +35,24 @@ from configuration file like independant service
.BR dnspr
but
.BR 3proxy
-is not a kind of wrapper or superserver for this daemons. It just has same
+is not a kind of wrapper or superserver for these daemons. It just has the same
code compiled in, but provides much more functionality. SOCKSv5
-implementatation allows to use 3proxy with any UDP or TCP based client
+implementation allows you to use 3proxy with any UDP or TCP based client
applications designed without
proxy support (with
.IR SocksCAP ,
.I FreeCAP
-or another client-side redirector under Windows of with socksification library
-under Unix). So you can play your favourite games, listen music, exchange
-files and messages and even accept incoming connections behind proxy server.
+or another client-side redirector under Windows or with a socksification library
+under Unix). So you can play your favourite games, listen to music, exchange
+files and messages and even accept incoming connections behind a proxy server.
.PP
.I dnspr
-does not exist as independant service. It\' DNS caching proxy (it requires
+does not exist as an independent service. It's a DNS caching proxy (it requires
.I nscache
and
.I nserver
-to be set in configuration. Only A-records are cached. Please note, the
-this caching is mostly a 'hack' and has nothing to do with real
+to be set in the configuration. Only A-records are cached. Please note that
+this caching is mostly a 'hack' and has nothing to do with a real
DNS server, but it works perfectly for SOHO networks.
.PP
@@ -65,9 +65,9 @@ NetBIOS name for Windows clients (it\'s very like ident authentication).
Depending on ACL action request can be allowed, denied or redirected to another
host or to another proxy server or even to a chain of proxy servers.
.PP
-It supports different types of logging: to logfiles,
+It supports different types of logging: to logfiles,
.BR syslog (3)
-(only under Unix) or to ODBC database. Logging format is turnable to provide
+(only under Unix) or to an ODBC database. Logging format is tunable to provide
compatibility with existing log file parsers. It makes it possible to use
3proxy with IIS, ISA, Apache or Squid log parsers.
.SH OPTIONS
@@ -77,12 +77,12 @@ Name of config file. See
.BR 3proxy.cfg (3)
for configuration file format. Under Windows, if config_file is not specified,
.BR 3proxy
-looks for file named
+looks for a file named
.I 3proxy.cfg
-in the default location (in same directory with executable file and in current
+in the default location (in the same directory as the executable file and in the current
directory). Under Unix, if no config file is specified, 3proxy reads
-configuration from stdin. It makes it possible to use 3proxy.cfg file as
-executable script just by setting +x mode and adding
+configuration from stdin. It makes it possible to use the 3proxy.cfg file as
+an executable script just by setting +x mode and adding
.br
#!/usr/local/3proxy/3proxy
.br
@@ -98,28 +98,28 @@ as a system service
.BR 3proxy
from system services
.SH SIGNALS
-Under Unix there are few signals
+Under Unix there are a few signals
.BR 3proxy
catches. See
.BR kill (1).
.TP
.B SIGTERM
-cleanup connections and exit
+clean up connections and exit
.TP
.B SIGPAUSE
-stop to accept new connections, on second signal - start and re-read
+stop accepting new connections, on second signal - start and re-read
configuration
.TP
.B SIGCONT
-start to accept new conenctions
+start to accept new connections
.TP
.B SIGUSR1
reload configuration
.PP
Under Windows, if
.BR 3proxy
-is installed as service you can standard service management to start, stop,
-pause and continue 3proxy service, for example:
+is installed as a service you can use standard service management to start, stop,
+pause and continue the 3proxy service, for example:
.br
.BR "net start 3proxy"
.br
@@ -138,14 +138,11 @@ wget to automate this task.
configuration file
.SH BUGS
Report all bugs to
-.BR 3proxy@3proxy.ru
+.BR 3proxy@3proxy.org
.SH SEE ALSO
-3proxy.cfg(3), proxy(8), ftppr(8), socks(8), pop3p(8), tcppm(8), udppm(8),
+3proxy.cfg(5), proxy(8), ftppr(8), socks(8), pop3p(8), tcppm(8), udppm(8),
kill(1), syslogd(8),
.br
https://3proxy.org/
-.SH TRIVIA
-3APA3A is pronounced as \`\`zaraza\'\'.
.SH AUTHORS
-3proxy is designed by Vladimir 3APA3A Dubrovin
-.RI ( 3proxy@3proxy.ru )
+3proxy is designed by Vladimir Dubrovin