mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-26 23:59:41 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f6963ea302 | ||
|
|
cf7749b320 | ||
|
|
f599c3239c | ||
|
|
984366ce3e | ||
|
|
22c7dfe0e1 | ||
|
|
4b48311d82 | ||
|
|
3dcd83e6d6 | ||
|
|
7a80a6ceb8 | ||
|
|
33b2a31180 | ||
|
|
fb2d1c0442 | ||
|
|
7e1ddf2e84 | ||
|
|
5908695b0f | ||
|
|
7807faa71b | ||
|
|
d2fa99fbd4 | ||
|
|
1e019bad0e | ||
|
|
86ad7263a6 | ||
|
|
55761128b3 | ||
|
|
b68887b6f9 | ||
|
|
e9b8f37053 | ||
|
|
21346cb2ce | ||
|
|
fa43cafd58 | ||
|
|
8f62e42e7d | ||
|
|
f4ad34c35a | ||
|
|
ff3398c6a9 | ||
|
|
4fb5c95704 | ||
|
|
13a57812e5 | ||
|
|
a43c95023d | ||
|
|
75021a2003 | ||
|
|
bebc3894e2 | ||
|
|
ddb74a111c | ||
|
|
1e47e74c49 | ||
|
|
eca362af81 | ||
|
|
c31fe8367f | ||
|
|
f480c9dfe8 | ||
|
|
8de2be3b3b | ||
|
|
aea9ff8c94 | ||
|
|
e7bc76da73 | ||
|
|
207ddb7f02 | ||
|
|
f5ff81d0bc | ||
|
|
8c2ad56665 | ||
|
|
a986ed7a07 | ||
|
|
eceb5a22df | ||
|
|
7eba73fc8f |
No files matched your search
@@ -6,10 +6,14 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ci:
|
ci:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
id-token: write
|
||||||
|
attestations: write
|
||||||
name: "${{ matrix.target }}"
|
name: "${{ matrix.target }}"
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
@@ -22,12 +26,13 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
pwd
|
pwd
|
||||||
echo "RELEASE=$(cat RELEASE)" >> $GITHUB_ENV
|
echo "RELEASE=$(cat RELEASE)" >> $GITHUB_ENV
|
||||||
echo "VERSION=$(date +%y%m%d%H%M%S)" >> $GITHUB_ENV
|
BUILDDATE=$(sed -n 's/^#define BUILDDATE "\(.*\)"$/\1/p' src/version.h)
|
||||||
echo "MAJOR=$(cat RELEASE | cut -d "-" -f 1)" >> $GITHUB_ENV
|
[ -n "$BUILDDATE" ] || BUILDDATE=$(date -u +%y%m%d%H%M%S)
|
||||||
echo "SUBMAJOR=$(cat RELEASE | cut -d "-" -f 2)" >> $GITHUB_ENV
|
echo "VERSION=$BUILDDATE" >> $GITHUB_ENV
|
||||||
echo "MINOR=$(cat RELEASE | cut -d "-" -f 3)" >> $GITHUB_ENV
|
SOURCE_DATE_EPOCH=$(date -u -d "20${BUILDDATE:0:2}-${BUILDDATE:2:2}-${BUILDDATE:4:2} ${BUILDDATE:6:2}:${BUILDDATE:8:2}:${BUILDDATE:10:2}" +%s)
|
||||||
|
echo "SOURCE_DATE_EPOCH=$SOURCE_DATE_EPOCH" >> $GITHUB_ENV
|
||||||
- name: echo env
|
- name: echo env
|
||||||
run: echo "release $RELEASE version $VERSION major $MAJOR submajor $SUBMAJOR minor $MINOR"
|
run: echo "release $RELEASE version $VERSION"
|
||||||
- name: Linux libraries
|
- name: Linux libraries
|
||||||
run: |
|
run: |
|
||||||
sudo apt update
|
sudo apt update
|
||||||
@@ -42,45 +47,142 @@ jobs:
|
|||||||
cp ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz ~/debian/3proxy_$RELEASE.orig.tar.gz
|
cp ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz ~/debian/3proxy_$RELEASE.orig.tar.gz
|
||||||
- name: rpmbuild
|
- name: rpmbuild
|
||||||
run: |
|
run: |
|
||||||
ret=`pwd`
|
mkdir -p rpmout
|
||||||
cd ~/rpmbuild/SPECS
|
for EL in 8 9 10; do
|
||||||
rpmbuild -ba 3proxy-$RELEASE.spec
|
docker run --rm \
|
||||||
cd $ret
|
-v "$HOME/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz:/src.tar.gz:ro" \
|
||||||
mv ~/rpmbuild/RPMS/aarch64/3proxy-$RELEASE-1.aarch64.rpm 3proxy-$RELEASE.arm64.rpm
|
-v "$PWD/scripts/rh/3proxy.spec:/3proxy.spec:ro" \
|
||||||
|
-v "$PWD/rpmout:/out" \
|
||||||
|
-e RELEASE="$RELEASE" -e HOSTUID="$(id -u)" -e HOSTGID="$(id -g)" \
|
||||||
|
-e SOURCE_DATE_EPOCH="$SOURCE_DATE_EPOCH" \
|
||||||
|
"almalinux:$EL" bash -c '
|
||||||
|
set -e
|
||||||
|
dnf -y install rpm-build gcc make openssl-devel pcre2-devel pam-devel tar gzip
|
||||||
|
mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
|
||||||
|
cp /src.tar.gz ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz
|
||||||
|
ln -sf ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz ~/rpmbuild/SOURCES/$RELEASE.tar.gz
|
||||||
|
cp /3proxy.spec ~/rpmbuild/SPECS/3proxy-$RELEASE.spec
|
||||||
|
cd ~/rpmbuild/SPECS
|
||||||
|
rpmbuild -ba \
|
||||||
|
--define "use_source_date_epoch_as_buildtime 1" \
|
||||||
|
--define "clamp_mtime_to_source_date_epoch 1" \
|
||||||
|
--define "_buildhost 3proxy.org" \
|
||||||
|
3proxy-$RELEASE.spec
|
||||||
|
cp ~/rpmbuild/RPMS/*/*.rpm /out/
|
||||||
|
chown "$HOSTUID:$HOSTGID" /out/*.rpm || chmod 0666 /out/*.rpm'
|
||||||
|
done
|
||||||
|
for f in rpmout/*.rpm; do
|
||||||
|
dist=$(rpm -qp --qf '%{RELEASE}' "$f" | sed 's/^1\.//')
|
||||||
|
arch=$(rpm -qp --qf '%{ARCH}' "$f")
|
||||||
|
mv "$f" "3proxy-$RELEASE.$dist.$arch.rpm"
|
||||||
|
done
|
||||||
|
rmdir rpmout
|
||||||
|
ls -l *.rpm
|
||||||
- name: Get artifact rpm
|
- name: Get artifact rpm
|
||||||
uses: actions/upload-artifact@v7
|
uses: actions/upload-artifact@v7
|
||||||
with:
|
with:
|
||||||
name: "3proxy-${{ env.RELEASE }}-arm64.rpm"
|
name: "3proxy-${{ env.RELEASE }}-arm64.rpm"
|
||||||
path: "*.rpm"
|
path: "*.rpm"
|
||||||
- name: Upload rpm to release
|
|
||||||
if: github.event_name == 'release'
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ github.token }}
|
|
||||||
TAG: ${{ github.event.release.tag_name }}
|
|
||||||
run: gh release upload "$TAG" 3proxy-${{ env.RELEASE }}.arm64.rpm
|
|
||||||
- name: debbuild
|
- name: debbuild
|
||||||
run: |
|
run: |
|
||||||
ret=`pwd`
|
docker run --rm \
|
||||||
cd ~/debian/
|
-v "$HOME/debian:/debian" \
|
||||||
tar xzf 3proxy_$RELEASE.orig.tar.gz
|
-e RELEASE="$RELEASE" -e VERSION="$VERSION" \
|
||||||
cd 3proxy-$RELEASE
|
-e SOURCE_DATE_EPOCH="$SOURCE_DATE_EPOCH" \
|
||||||
echo "3proxy ($RELEASE-$VERSION) buster; urgency=medium" >debian/changelog
|
ubuntu:22.04 bash -c '
|
||||||
echo " " >>debian/changelog
|
set -e
|
||||||
echo " *3proxy $RELEASE build" >>debian/changelog
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
echo " " >>debian/changelog
|
apt-get update
|
||||||
echo " -- z3APA3A <3apa3a@3proxy.org> "`date "+%a, %d %b %Y %H:%M:%S %z"` >>debian/changelog
|
apt-get install -y build-essential debhelper fakeroot libssl-dev libpcre2-dev libpam0g-dev
|
||||||
echo "">>debian/changelog
|
cd /debian
|
||||||
dpkg-buildpackage
|
tar xzf 3proxy_$RELEASE.orig.tar.gz
|
||||||
cd $ret
|
cd 3proxy-$RELEASE
|
||||||
|
{ echo "3proxy ($RELEASE-$VERSION) buster; urgency=medium"
|
||||||
|
echo " "
|
||||||
|
echo " *3proxy $RELEASE build"
|
||||||
|
echo " "
|
||||||
|
echo " -- z3APA3A <3apa3a@3proxy.org> $(date -R -u -d @$SOURCE_DATE_EPOCH)"
|
||||||
|
echo ""
|
||||||
|
} > debian/changelog
|
||||||
|
dpkg-buildpackage'
|
||||||
cp ~/debian/3proxy_$RELEASE-"$VERSION"_arm64.deb ./3proxy-$RELEASE.arm64.deb
|
cp ~/debian/3proxy_$RELEASE-"$VERSION"_arm64.deb ./3proxy-$RELEASE.arm64.deb
|
||||||
- name: Get artifact deb
|
- name: Get artifact deb
|
||||||
uses: actions/upload-artifact@v7
|
uses: actions/upload-artifact@v7
|
||||||
with:
|
with:
|
||||||
name: "3proxy-${{ env.RELEASE }}-arm64.deb"
|
name: "3proxy-${{ env.RELEASE }}-arm64.deb"
|
||||||
path: "*.deb"
|
path: "*.deb"
|
||||||
- name: Upload deb to release
|
- name: Import signing key
|
||||||
|
if: github.event_name == 'release'
|
||||||
|
env:
|
||||||
|
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||||
|
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
|
||||||
|
run: |
|
||||||
|
if [ -z "$GPG_PRIVATE_KEY" ]; then echo "GPG_PRIVATE_KEY is not set"; exit 1; fi
|
||||||
|
mkdir -p ~/.gnupg && chmod 700 ~/.gnupg
|
||||||
|
printf 'allow-loopback-pinentry\ndefault-cache-ttl 7200\nmax-cache-ttl 7200\n' > ~/.gnupg/gpg-agent.conf
|
||||||
|
gpgconf --kill gpg-agent || true
|
||||||
|
printf '%s' "$GPG_PRIVATE_KEY" | gpg --batch --import
|
||||||
|
KEYID=$(gpg --list-secret-keys --with-colons | awk -F: '/^sec:/{print $5; exit}')
|
||||||
|
echo "GPG_KEYID=$KEYID" >> $GITHUB_ENV
|
||||||
|
echo prime > /tmp/prime.txt
|
||||||
|
gpg --batch --yes --pinentry-mode loopback --passphrase "$GPG_PASSPHRASE" \
|
||||||
|
-u "$KEYID" --detach-sign -o /dev/null /tmp/prime.txt
|
||||||
|
rm -f /tmp/prime.txt
|
||||||
|
- name: Sign rpm
|
||||||
|
if: github.event_name == 'release'
|
||||||
|
env:
|
||||||
|
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
|
||||||
|
run: |
|
||||||
|
GPGBIN=$(command -v gpg)
|
||||||
|
if [ -z "$GPGBIN" ]; then echo "gpg not found"; exit 1; fi
|
||||||
|
umask 077
|
||||||
|
printf '%s' "$GPG_PASSPHRASE" > /tmp/gpgpass
|
||||||
|
echo test > /tmp/signtest
|
||||||
|
gpg --batch --yes --pinentry-mode loopback --passphrase-file /tmp/gpgpass \
|
||||||
|
-u "$GPG_KEYID" --detach-sign -o /tmp/signtest.sig /tmp/signtest
|
||||||
|
echo "key can sign"
|
||||||
|
{ echo "%_gpg_name $GPG_KEYID"
|
||||||
|
echo "%__gpg $GPGBIN"
|
||||||
|
echo '%__gpg_sign_cmd %{__gpg} gpg --batch --no-armor --pinentry-mode loopback --passphrase-file /tmp/gpgpass --no-secmem-warning --digest-algo sha256 -u "%{_gpg_name}" -sbo %{__signature_filename} %{__plaintext_filename}'
|
||||||
|
} > ~/.rpmmacros
|
||||||
|
rpm --addsign *.rpm
|
||||||
|
rm -f /tmp/gpgpass /tmp/signtest /tmp/signtest.sig
|
||||||
|
for f in *.rpm; do
|
||||||
|
sig=$(rpm -qp --qf '%{RSAHEADER:pgpsig}' "$f" 2>/dev/null)
|
||||||
|
case "$sig" in ""|"(none)")
|
||||||
|
sig=$(rpm -qp --qf '%{DSAHEADER:pgpsig}' "$f" 2>/dev/null) ;;
|
||||||
|
esac
|
||||||
|
case "$sig" in ""|"(none)")
|
||||||
|
echo "$f is not signed"
|
||||||
|
echo "--- rpm version ---"; rpm --version
|
||||||
|
echo "--- sign cmd ---"; rpm --eval '%{__gpg_sign_cmd}'
|
||||||
|
echo "--- secret keys ---"; gpg --list-secret-keys --with-colons | grep -E '^(sec|ssb):' || true
|
||||||
|
exit 1 ;;
|
||||||
|
esac
|
||||||
|
echo "$f: $sig"
|
||||||
|
done
|
||||||
|
- name: Checksums and detached signatures
|
||||||
|
if: github.event_name == 'release'
|
||||||
|
env:
|
||||||
|
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
|
||||||
|
run: |
|
||||||
|
sha256sum *.rpm *.deb > SHA256SUMS-arm64
|
||||||
|
for f in *.deb SHA256SUMS-arm64; do
|
||||||
|
gpg --batch --yes --pinentry-mode loopback --passphrase "$GPG_PASSPHRASE" \
|
||||||
|
-u "$GPG_KEYID" --armor --detach-sign "$f"
|
||||||
|
done
|
||||||
|
sha256sum -c SHA256SUMS-arm64
|
||||||
|
gpg --verify SHA256SUMS-arm64.asc SHA256SUMS-arm64
|
||||||
|
- name: Attest build provenance
|
||||||
|
if: github.event_name == 'release'
|
||||||
|
uses: actions/attest-build-provenance@v2
|
||||||
|
with:
|
||||||
|
subject-path: |
|
||||||
|
*.rpm
|
||||||
|
*.deb
|
||||||
|
- name: Upload to release
|
||||||
if: github.event_name == 'release'
|
if: github.event_name == 'release'
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ github.token }}
|
GH_TOKEN: ${{ github.token }}
|
||||||
TAG: ${{ github.event.release.tag_name }}
|
TAG: ${{ github.event.release.tag_name }}
|
||||||
run: gh release upload "$TAG" 3proxy-${{ env.RELEASE }}.arm64.deb
|
run: gh release upload "$TAG" *.rpm *.deb *.deb.asc SHA256SUMS-arm64 SHA256SUMS-arm64.asc
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
name: RPM/DEB build armhf
|
name: DEB build armhf
|
||||||
|
|
||||||
on:
|
on:
|
||||||
release:
|
release:
|
||||||
@@ -6,10 +6,14 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ci:
|
ci:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
id-token: write
|
||||||
|
attestations: write
|
||||||
name: "${{ matrix.target }}"
|
name: "${{ matrix.target }}"
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
@@ -22,38 +26,12 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
pwd
|
pwd
|
||||||
echo "RELEASE=$(cat RELEASE)" >> $GITHUB_ENV
|
echo "RELEASE=$(cat RELEASE)" >> $GITHUB_ENV
|
||||||
echo "VERSION=$(date +%y%m%d%H%M%S)" >> $GITHUB_ENV
|
BUILDDATE=$(sed -n 's/^#define BUILDDATE "\(.*\)"$/\1/p' src/version.h)
|
||||||
echo "MAJOR=$(cat RELEASE | cut -d "-" -f 1)" >> $GITHUB_ENV
|
[ -n "$BUILDDATE" ] || BUILDDATE=$(date -u +%y%m%d%H%M%S)
|
||||||
echo "SUBMAJOR=$(cat RELEASE | cut -d "-" -f 2)" >> $GITHUB_ENV
|
echo "VERSION=$BUILDDATE" >> $GITHUB_ENV
|
||||||
echo "MINOR=$(cat RELEASE | cut -d "-" -f 3)" >> $GITHUB_ENV
|
SOURCE_DATE_EPOCH=$(date -u -d "20${BUILDDATE:0:2}-${BUILDDATE:2:2}-${BUILDDATE:4:2} ${BUILDDATE:6:2}:${BUILDDATE:8:2}:${BUILDDATE:10:2}" +%s)
|
||||||
- name: Linux libraries
|
echo "SOURCE_DATE_EPOCH=$SOURCE_DATE_EPOCH" >> $GITHUB_ENV
|
||||||
run: |
|
- name: configure deb env
|
||||||
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: |
|
run: |
|
||||||
mkdir ~/debian
|
mkdir ~/debian
|
||||||
mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
|
mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
|
||||||
@@ -61,59 +39,81 @@ jobs:
|
|||||||
ln -s ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz ~/rpmbuild/SOURCES/$RELEASE.tar.gz
|
ln -s ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz ~/rpmbuild/SOURCES/$RELEASE.tar.gz
|
||||||
cp scripts/rh/3proxy.spec ~/rpmbuild/SPECS/3proxy-$RELEASE.spec
|
cp scripts/rh/3proxy.spec ~/rpmbuild/SPECS/3proxy-$RELEASE.spec
|
||||||
cp ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz ~/debian/3proxy_$RELEASE.orig.tar.gz
|
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-gnueabihf 3proxy-$RELEASE.spec
|
|
||||||
cd $ret
|
|
||||||
mv ~/rpmbuild/RPMS/arm/3proxy-$RELEASE-1.arm.rpm 3proxy-$RELEASE.arm.rpm
|
|
||||||
- name: Get artifact rpm
|
|
||||||
uses: actions/upload-artifact@v7
|
|
||||||
with:
|
|
||||||
name: "3proxy-${{ env.RELEASE }}-arm.rpm"
|
|
||||||
path: "*.rpm"
|
|
||||||
- name: Upload rpm to release
|
|
||||||
if: github.event_name == 'release'
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ github.token }}
|
|
||||||
TAG: ${{ github.event.release.tag_name }}
|
|
||||||
run: gh release upload "$TAG" 3proxy-${{ env.RELEASE }}.arm.rpm
|
|
||||||
- name: debbuild
|
- name: debbuild
|
||||||
run: |
|
run: |
|
||||||
ret=`pwd`
|
docker run --rm \
|
||||||
cd ~/debian/
|
-v "$HOME/debian:/debian" \
|
||||||
tar xzf 3proxy_$RELEASE.orig.tar.gz
|
-e RELEASE="$RELEASE" -e VERSION="$VERSION" \
|
||||||
cd 3proxy-$RELEASE
|
-e SOURCE_DATE_EPOCH="$SOURCE_DATE_EPOCH" \
|
||||||
echo "3proxy ($RELEASE-$VERSION) buster; urgency=medium" >debian/changelog
|
ubuntu:22.04 bash -c '
|
||||||
echo " " >>debian/changelog
|
set -e
|
||||||
echo " *3proxy $RELEASE build" >>debian/changelog
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
echo " " >>debian/changelog
|
dpkg --add-architecture armhf
|
||||||
echo " -- z3APA3A <3apa3a@3proxy.org> "`date "+%a, %d %b %Y %H:%M:%S %z"` >>debian/changelog
|
sed -i "s|^deb |deb [arch=amd64] |" /etc/apt/sources.list
|
||||||
echo "">>debian/changelog
|
{ echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports jammy main restricted universe multiverse"
|
||||||
PATH=/usr/arm-linux-gnueabihf/bin:$PATH
|
echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports jammy-updates main restricted universe multiverse"
|
||||||
export PATH=$PATH
|
} >> /etc/apt/sources.list
|
||||||
CC=arm-linux-gnueabihf-gcc
|
apt-get update
|
||||||
export CC=$CC
|
apt-get install -y crossbuild-essential-armhf build-essential debhelper fakeroot \
|
||||||
export RPATH=/usr/arm-linux-gnueabihf/lib:$RPATH
|
libssl-dev:armhf libpcre2-dev:armhf libpam0g-dev:armhf
|
||||||
export LD_LIBRARY_PATH=/usr/arm-linux-gnueabihf/lib:$LD_LIBRARY_PATH
|
cd /debian
|
||||||
dpkg-buildpackage
|
tar xzf 3proxy_$RELEASE.orig.tar.gz
|
||||||
cd $ret
|
cd 3proxy-$RELEASE
|
||||||
|
{ echo "3proxy ($RELEASE-$VERSION) buster; urgency=medium"
|
||||||
|
echo " "
|
||||||
|
echo " *3proxy $RELEASE build"
|
||||||
|
echo " "
|
||||||
|
echo " -- z3APA3A <3apa3a@3proxy.org> $(date -R -u -d @$SOURCE_DATE_EPOCH)"
|
||||||
|
echo ""
|
||||||
|
} > debian/changelog
|
||||||
|
export PATH=/usr/arm-linux-gnueabihf/bin:$PATH
|
||||||
|
export CC=arm-linux-gnueabihf-gcc
|
||||||
|
export LD_LIBRARY_PATH=/usr/arm-linux-gnueabihf/lib:$LD_LIBRARY_PATH
|
||||||
|
dpkg-buildpackage'
|
||||||
cp ~/debian/3proxy_$RELEASE-"$VERSION"_armhf.deb ./3proxy-$RELEASE.arm.deb
|
cp ~/debian/3proxy_$RELEASE-"$VERSION"_armhf.deb ./3proxy-$RELEASE.arm.deb
|
||||||
- name: Get artifact deb
|
- name: Get artifact deb
|
||||||
uses: actions/upload-artifact@v7
|
uses: actions/upload-artifact@v7
|
||||||
with:
|
with:
|
||||||
name: "3proxy-${{ env.RELEASE }}-arm.deb"
|
name: "3proxy-${{ env.RELEASE }}-arm.deb"
|
||||||
path: "*.deb"
|
path: "*.deb"
|
||||||
- name: Upload deb to release
|
- name: Import signing key
|
||||||
|
if: github.event_name == 'release'
|
||||||
|
env:
|
||||||
|
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||||
|
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
|
||||||
|
run: |
|
||||||
|
if [ -z "$GPG_PRIVATE_KEY" ]; then echo "GPG_PRIVATE_KEY is not set"; exit 1; fi
|
||||||
|
mkdir -p ~/.gnupg && chmod 700 ~/.gnupg
|
||||||
|
printf 'allow-loopback-pinentry\ndefault-cache-ttl 7200\nmax-cache-ttl 7200\n' > ~/.gnupg/gpg-agent.conf
|
||||||
|
gpgconf --kill gpg-agent || true
|
||||||
|
printf '%s' "$GPG_PRIVATE_KEY" | gpg --batch --import
|
||||||
|
KEYID=$(gpg --list-secret-keys --with-colons | awk -F: '/^sec:/{print $5; exit}')
|
||||||
|
echo "GPG_KEYID=$KEYID" >> $GITHUB_ENV
|
||||||
|
echo prime > /tmp/prime.txt
|
||||||
|
gpg --batch --yes --pinentry-mode loopback --passphrase "$GPG_PASSPHRASE" \
|
||||||
|
-u "$KEYID" --detach-sign -o /dev/null /tmp/prime.txt
|
||||||
|
rm -f /tmp/prime.txt
|
||||||
|
- name: Checksums and detached signatures
|
||||||
|
if: github.event_name == 'release'
|
||||||
|
env:
|
||||||
|
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
|
||||||
|
run: |
|
||||||
|
sha256sum *.deb > SHA256SUMS-arm
|
||||||
|
for f in *.deb SHA256SUMS-arm; do
|
||||||
|
gpg --batch --yes --pinentry-mode loopback --passphrase "$GPG_PASSPHRASE" \
|
||||||
|
-u "$GPG_KEYID" --armor --detach-sign "$f"
|
||||||
|
done
|
||||||
|
sha256sum -c SHA256SUMS-arm
|
||||||
|
gpg --verify SHA256SUMS-arm.asc SHA256SUMS-arm
|
||||||
|
- name: Attest build provenance
|
||||||
|
if: github.event_name == 'release'
|
||||||
|
uses: actions/attest-build-provenance@v2
|
||||||
|
with:
|
||||||
|
subject-path: |
|
||||||
|
*.deb
|
||||||
|
- name: Upload to release
|
||||||
if: github.event_name == 'release'
|
if: github.event_name == 'release'
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ github.token }}
|
GH_TOKEN: ${{ github.token }}
|
||||||
TAG: ${{ github.event.release.tag_name }}
|
TAG: ${{ github.event.release.tag_name }}
|
||||||
run: gh release upload "$TAG" 3proxy-${{ env.RELEASE }}.arm.deb
|
run: gh release upload "$TAG" *.deb *.deb.asc SHA256SUMS-arm SHA256SUMS-arm.asc
|
||||||
@@ -6,10 +6,14 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ci:
|
ci:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
id-token: write
|
||||||
|
attestations: write
|
||||||
name: "${{ matrix.target }}"
|
name: "${{ matrix.target }}"
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
@@ -22,12 +26,13 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
pwd
|
pwd
|
||||||
echo "RELEASE=$(cat RELEASE)" >> $GITHUB_ENV
|
echo "RELEASE=$(cat RELEASE)" >> $GITHUB_ENV
|
||||||
echo "VERSION=$(date +%y%m%d%H%M%S)" >> $GITHUB_ENV
|
BUILDDATE=$(sed -n 's/^#define BUILDDATE "\(.*\)"$/\1/p' src/version.h)
|
||||||
echo "MAJOR=$(cat RELEASE | cut -d "-" -f 1)" >> $GITHUB_ENV
|
[ -n "$BUILDDATE" ] || BUILDDATE=$(date -u +%y%m%d%H%M%S)
|
||||||
echo "SUBMAJOR=$(cat RELEASE | cut -d "-" -f 2)" >> $GITHUB_ENV
|
echo "VERSION=$BUILDDATE" >> $GITHUB_ENV
|
||||||
echo "MINOR=$(cat RELEASE | cut -d "-" -f 3)" >> $GITHUB_ENV
|
SOURCE_DATE_EPOCH=$(date -u -d "20${BUILDDATE:0:2}-${BUILDDATE:2:2}-${BUILDDATE:4:2} ${BUILDDATE:6:2}:${BUILDDATE:8:2}:${BUILDDATE:10:2}" +%s)
|
||||||
|
echo "SOURCE_DATE_EPOCH=$SOURCE_DATE_EPOCH" >> $GITHUB_ENV
|
||||||
- name: echo env
|
- name: echo env
|
||||||
run: echo "release $RELEASE version $VERSION major $MAJOR submajor $SUBMAJOR minor $MINOR"
|
run: echo "release $RELEASE version $VERSION"
|
||||||
- name: Linux libraries
|
- name: Linux libraries
|
||||||
run: |
|
run: |
|
||||||
sudo apt update
|
sudo apt update
|
||||||
@@ -42,46 +47,143 @@ jobs:
|
|||||||
cp ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz ~/debian/3proxy_$RELEASE.orig.tar.gz
|
cp ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz ~/debian/3proxy_$RELEASE.orig.tar.gz
|
||||||
- name: rpmbuild
|
- name: rpmbuild
|
||||||
run: |
|
run: |
|
||||||
ret=`pwd`
|
mkdir -p rpmout
|
||||||
cd ~/rpmbuild/SPECS
|
for EL in 8 9 10; do
|
||||||
rpmbuild -ba 3proxy-$RELEASE.spec
|
docker run --rm \
|
||||||
cd $ret
|
-v "$HOME/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz:/src.tar.gz:ro" \
|
||||||
mv ~/rpmbuild/RPMS/x86_64/3proxy-$RELEASE-1.x86_64.rpm 3proxy-$RELEASE.x86_64.rpm
|
-v "$PWD/scripts/rh/3proxy.spec:/3proxy.spec:ro" \
|
||||||
|
-v "$PWD/rpmout:/out" \
|
||||||
|
-e RELEASE="$RELEASE" -e HOSTUID="$(id -u)" -e HOSTGID="$(id -g)" \
|
||||||
|
-e SOURCE_DATE_EPOCH="$SOURCE_DATE_EPOCH" \
|
||||||
|
"almalinux:$EL" bash -c '
|
||||||
|
set -e
|
||||||
|
dnf -y install rpm-build gcc make openssl-devel pcre2-devel pam-devel tar gzip
|
||||||
|
mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
|
||||||
|
cp /src.tar.gz ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz
|
||||||
|
ln -sf ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz ~/rpmbuild/SOURCES/$RELEASE.tar.gz
|
||||||
|
cp /3proxy.spec ~/rpmbuild/SPECS/3proxy-$RELEASE.spec
|
||||||
|
cd ~/rpmbuild/SPECS
|
||||||
|
rpmbuild -ba \
|
||||||
|
--define "use_source_date_epoch_as_buildtime 1" \
|
||||||
|
--define "clamp_mtime_to_source_date_epoch 1" \
|
||||||
|
--define "_buildhost 3proxy.org" \
|
||||||
|
3proxy-$RELEASE.spec
|
||||||
|
cp ~/rpmbuild/RPMS/*/*.rpm /out/
|
||||||
|
chown "$HOSTUID:$HOSTGID" /out/*.rpm || chmod 0666 /out/*.rpm'
|
||||||
|
done
|
||||||
|
for f in rpmout/*.rpm; do
|
||||||
|
dist=$(rpm -qp --qf '%{RELEASE}' "$f" | sed 's/^1\.//')
|
||||||
|
arch=$(rpm -qp --qf '%{ARCH}' "$f")
|
||||||
|
mv "$f" "3proxy-$RELEASE.$dist.$arch.rpm"
|
||||||
|
done
|
||||||
|
rmdir rpmout
|
||||||
|
ls -l *.rpm
|
||||||
- name: Get artifact rpm
|
- name: Get artifact rpm
|
||||||
uses: actions/upload-artifact@v7
|
uses: actions/upload-artifact@v7
|
||||||
with:
|
with:
|
||||||
name: "3proxy-${{ env.RELEASE }}-x86_64.rpm"
|
name: "3proxy-${{ env.RELEASE }}-x86_64.rpm"
|
||||||
path: "*.rpm"
|
path: "*.rpm"
|
||||||
- name: Upload rpm to release
|
|
||||||
if: github.event_name == 'release'
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ github.token }}
|
|
||||||
TAG: ${{ github.event.release.tag_name }}
|
|
||||||
run: gh release upload "$TAG" 3proxy-${{ env.RELEASE }}.x86_64.rpm
|
|
||||||
- name: debbuild
|
- name: debbuild
|
||||||
run: |
|
run: |
|
||||||
ret=`pwd`
|
docker run --rm \
|
||||||
cd ~/debian/
|
-v "$HOME/debian:/debian" \
|
||||||
tar xzf 3proxy_$RELEASE.orig.tar.gz
|
-e RELEASE="$RELEASE" -e VERSION="$VERSION" \
|
||||||
cd 3proxy-$RELEASE
|
-e SOURCE_DATE_EPOCH="$SOURCE_DATE_EPOCH" \
|
||||||
echo "3proxy ($RELEASE-$VERSION) buster; urgency=medium" >debian/changelog
|
ubuntu:22.04 bash -c '
|
||||||
echo " " >>debian/changelog
|
set -e
|
||||||
echo " *3proxy $RELEASE build" >>debian/changelog
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
echo " " >>debian/changelog
|
apt-get update
|
||||||
echo " -- z3APA3A <3apa3a@3proxy.org> "`date "+%a, %d %b %Y %H:%M:%S %z"` >>debian/changelog
|
apt-get install -y build-essential debhelper fakeroot libssl-dev libpcre2-dev libpam0g-dev
|
||||||
echo "">>debian/changelog
|
cd /debian
|
||||||
dpkg-buildpackage
|
tar xzf 3proxy_$RELEASE.orig.tar.gz
|
||||||
cd $ret
|
cd 3proxy-$RELEASE
|
||||||
|
{ echo "3proxy ($RELEASE-$VERSION) buster; urgency=medium"
|
||||||
|
echo " "
|
||||||
|
echo " *3proxy $RELEASE build"
|
||||||
|
echo " "
|
||||||
|
echo " -- z3APA3A <3apa3a@3proxy.org> $(date -R -u -d @$SOURCE_DATE_EPOCH)"
|
||||||
|
echo ""
|
||||||
|
} > debian/changelog
|
||||||
|
dpkg-buildpackage'
|
||||||
cp ~/debian/3proxy_$RELEASE-"$VERSION"_amd64.deb ./3proxy-$RELEASE.x86_64.deb
|
cp ~/debian/3proxy_$RELEASE-"$VERSION"_amd64.deb ./3proxy-$RELEASE.x86_64.deb
|
||||||
- name: Get artifact deb
|
- name: Get artifact deb
|
||||||
uses: actions/upload-artifact@v7
|
uses: actions/upload-artifact@v7
|
||||||
with:
|
with:
|
||||||
name: "3proxy-${{ env.RELEASE }}-x86_64.deb"
|
name: "3proxy-${{ env.RELEASE }}-x86_64.deb"
|
||||||
path: "*.deb"
|
path: "*.deb"
|
||||||
- name: Upload deb to release
|
|
||||||
|
- name: Import signing key
|
||||||
|
if: github.event_name == 'release'
|
||||||
|
env:
|
||||||
|
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||||
|
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
|
||||||
|
run: |
|
||||||
|
if [ -z "$GPG_PRIVATE_KEY" ]; then echo "GPG_PRIVATE_KEY is not set"; exit 1; fi
|
||||||
|
mkdir -p ~/.gnupg && chmod 700 ~/.gnupg
|
||||||
|
printf 'allow-loopback-pinentry\ndefault-cache-ttl 7200\nmax-cache-ttl 7200\n' > ~/.gnupg/gpg-agent.conf
|
||||||
|
gpgconf --kill gpg-agent || true
|
||||||
|
printf '%s' "$GPG_PRIVATE_KEY" | gpg --batch --import
|
||||||
|
KEYID=$(gpg --list-secret-keys --with-colons | awk -F: '/^sec:/{print $5; exit}')
|
||||||
|
echo "GPG_KEYID=$KEYID" >> $GITHUB_ENV
|
||||||
|
echo prime > /tmp/prime.txt
|
||||||
|
gpg --batch --yes --pinentry-mode loopback --passphrase "$GPG_PASSPHRASE" \
|
||||||
|
-u "$KEYID" --detach-sign -o /dev/null /tmp/prime.txt
|
||||||
|
rm -f /tmp/prime.txt
|
||||||
|
- name: Sign rpm
|
||||||
|
if: github.event_name == 'release'
|
||||||
|
env:
|
||||||
|
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
|
||||||
|
run: |
|
||||||
|
GPGBIN=$(command -v gpg)
|
||||||
|
if [ -z "$GPGBIN" ]; then echo "gpg not found"; exit 1; fi
|
||||||
|
umask 077
|
||||||
|
printf '%s' "$GPG_PASSPHRASE" > /tmp/gpgpass
|
||||||
|
echo test > /tmp/signtest
|
||||||
|
gpg --batch --yes --pinentry-mode loopback --passphrase-file /tmp/gpgpass \
|
||||||
|
-u "$GPG_KEYID" --detach-sign -o /tmp/signtest.sig /tmp/signtest
|
||||||
|
echo "key can sign"
|
||||||
|
{ echo "%_gpg_name $GPG_KEYID"
|
||||||
|
echo "%__gpg $GPGBIN"
|
||||||
|
echo '%__gpg_sign_cmd %{__gpg} gpg --batch --no-armor --pinentry-mode loopback --passphrase-file /tmp/gpgpass --no-secmem-warning --digest-algo sha256 -u "%{_gpg_name}" -sbo %{__signature_filename} %{__plaintext_filename}'
|
||||||
|
} > ~/.rpmmacros
|
||||||
|
rpm --addsign *.rpm
|
||||||
|
rm -f /tmp/gpgpass /tmp/signtest /tmp/signtest.sig
|
||||||
|
for f in *.rpm; do
|
||||||
|
sig=$(rpm -qp --qf '%{RSAHEADER:pgpsig}' "$f" 2>/dev/null)
|
||||||
|
case "$sig" in ""|"(none)")
|
||||||
|
sig=$(rpm -qp --qf '%{DSAHEADER:pgpsig}' "$f" 2>/dev/null) ;;
|
||||||
|
esac
|
||||||
|
case "$sig" in ""|"(none)")
|
||||||
|
echo "$f is not signed"
|
||||||
|
echo "--- rpm version ---"; rpm --version
|
||||||
|
echo "--- sign cmd ---"; rpm --eval '%{__gpg_sign_cmd}'
|
||||||
|
echo "--- secret keys ---"; gpg --list-secret-keys --with-colons | grep -E '^(sec|ssb):' || true
|
||||||
|
exit 1 ;;
|
||||||
|
esac
|
||||||
|
echo "$f: $sig"
|
||||||
|
done
|
||||||
|
- name: Checksums and detached signatures
|
||||||
|
if: github.event_name == 'release'
|
||||||
|
env:
|
||||||
|
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
|
||||||
|
run: |
|
||||||
|
sha256sum *.rpm *.deb > SHA256SUMS-x86_64
|
||||||
|
for f in *.deb SHA256SUMS-x86_64; do
|
||||||
|
gpg --batch --yes --pinentry-mode loopback --passphrase "$GPG_PASSPHRASE" \
|
||||||
|
-u "$GPG_KEYID" --armor --detach-sign "$f"
|
||||||
|
done
|
||||||
|
sha256sum -c SHA256SUMS-x86_64
|
||||||
|
gpg --verify SHA256SUMS-x86_64.asc SHA256SUMS-x86_64
|
||||||
|
- name: Attest build provenance
|
||||||
|
if: github.event_name == 'release'
|
||||||
|
uses: actions/attest-build-provenance@v2
|
||||||
|
with:
|
||||||
|
subject-path: |
|
||||||
|
*.rpm
|
||||||
|
*.deb
|
||||||
|
- name: Upload to release
|
||||||
if: github.event_name == 'release'
|
if: github.event_name == 'release'
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ github.token }}
|
GH_TOKEN: ${{ github.token }}
|
||||||
TAG: ${{ github.event.release.tag_name }}
|
TAG: ${{ github.event.release.tag_name }}
|
||||||
run: gh release upload "$TAG" 3proxy-${{ env.RELEASE }}.x86_64.deb
|
run: gh release upload "$TAG" *.rpm *.deb *.deb.asc SHA256SUMS-x86_64 SHA256SUMS-x86_64.asc
|
||||||
|
|
||||||
@@ -6,10 +6,14 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ci:
|
ci:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
id-token: write
|
||||||
|
attestations: write
|
||||||
name: "${{ matrix.target }}"
|
name: "${{ matrix.target }}"
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
@@ -86,10 +90,30 @@ jobs:
|
|||||||
if: github.event_name == 'release'
|
if: github.event_name == 'release'
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: Compress-Archive -Path dist/* -DestinationPath 3proxy-${{ env.RELEASE }}-lite.zip
|
run: Compress-Archive -Path dist/* -DestinationPath 3proxy-${{ env.RELEASE }}-lite.zip
|
||||||
|
- name: Checksums and detached signature
|
||||||
|
if: github.event_name == 'release'
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||||
|
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
|
||||||
|
run: |
|
||||||
|
if [ -z "$GPG_PRIVATE_KEY" ]; then echo "GPG_PRIVATE_KEY is not set"; exit 1; fi
|
||||||
|
printf '%s' "$GPG_PRIVATE_KEY" | gpg --batch --import
|
||||||
|
KEYID=$(gpg --list-secret-keys --with-colons | awk -F: '/^sec:/{print $5; exit}')
|
||||||
|
sha256sum *.zip > SHA256SUMS-win-lite
|
||||||
|
gpg --batch --yes --pinentry-mode loopback --passphrase "$GPG_PASSPHRASE" \
|
||||||
|
-u "$KEYID" --armor --detach-sign SHA256SUMS-win-lite
|
||||||
|
sha256sum -c SHA256SUMS-win-lite
|
||||||
|
- name: Attest build provenance
|
||||||
|
if: github.event_name == 'release'
|
||||||
|
uses: actions/attest-build-provenance@v2
|
||||||
|
with:
|
||||||
|
subject-path: |
|
||||||
|
*.zip
|
||||||
- name: Upload to release
|
- name: Upload to release
|
||||||
if: github.event_name == 'release'
|
if: github.event_name == 'release'
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ github.token }}
|
GH_TOKEN: ${{ github.token }}
|
||||||
TAG: ${{ github.event.release.tag_name }}
|
TAG: ${{ github.event.release.tag_name }}
|
||||||
run: gh release upload "$TAG" 3proxy-${{ env.RELEASE }}-lite.zip
|
run: gh release upload "$TAG" *.zip SHA256SUMS-win-lite SHA256SUMS-win-lite.asc
|
||||||
@@ -6,10 +6,14 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ci:
|
ci:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
id-token: write
|
||||||
|
attestations: write
|
||||||
name: "${{ matrix.target }}"
|
name: "${{ matrix.target }}"
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
@@ -101,10 +105,30 @@ jobs:
|
|||||||
if: github.event_name == 'release'
|
if: github.event_name == 'release'
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: Compress-Archive -Path dist/* -DestinationPath 3proxy-${{ env.RELEASE }}-x86.zip
|
run: Compress-Archive -Path dist/* -DestinationPath 3proxy-${{ env.RELEASE }}-x86.zip
|
||||||
|
- name: Checksums and detached signature
|
||||||
|
if: github.event_name == 'release'
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||||
|
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
|
||||||
|
run: |
|
||||||
|
if [ -z "$GPG_PRIVATE_KEY" ]; then echo "GPG_PRIVATE_KEY is not set"; exit 1; fi
|
||||||
|
printf '%s' "$GPG_PRIVATE_KEY" | gpg --batch --import
|
||||||
|
KEYID=$(gpg --list-secret-keys --with-colons | awk -F: '/^sec:/{print $5; exit}')
|
||||||
|
sha256sum *.zip > SHA256SUMS-win-x86
|
||||||
|
gpg --batch --yes --pinentry-mode loopback --passphrase "$GPG_PASSPHRASE" \
|
||||||
|
-u "$KEYID" --armor --detach-sign SHA256SUMS-win-x86
|
||||||
|
sha256sum -c SHA256SUMS-win-x86
|
||||||
|
- name: Attest build provenance
|
||||||
|
if: github.event_name == 'release'
|
||||||
|
uses: actions/attest-build-provenance@v2
|
||||||
|
with:
|
||||||
|
subject-path: |
|
||||||
|
*.zip
|
||||||
- name: Upload to release
|
- name: Upload to release
|
||||||
if: github.event_name == 'release'
|
if: github.event_name == 'release'
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ github.token }}
|
GH_TOKEN: ${{ github.token }}
|
||||||
TAG: ${{ github.event.release.tag_name }}
|
TAG: ${{ github.event.release.tag_name }}
|
||||||
run: gh release upload "$TAG" 3proxy-${{ env.RELEASE }}-x86.zip
|
run: gh release upload "$TAG" *.zip SHA256SUMS-win-x86 SHA256SUMS-win-x86.asc
|
||||||
@@ -6,10 +6,14 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ci:
|
ci:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
id-token: write
|
||||||
|
attestations: write
|
||||||
name: "${{ matrix.target }}"
|
name: "${{ matrix.target }}"
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
@@ -102,10 +106,30 @@ jobs:
|
|||||||
if: github.event_name == 'release'
|
if: github.event_name == 'release'
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: Compress-Archive -Path dist/* -DestinationPath 3proxy-${{ env.RELEASE }}-x64.zip
|
run: Compress-Archive -Path dist/* -DestinationPath 3proxy-${{ env.RELEASE }}-x64.zip
|
||||||
|
- name: Checksums and detached signature
|
||||||
|
if: github.event_name == 'release'
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||||
|
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
|
||||||
|
run: |
|
||||||
|
if [ -z "$GPG_PRIVATE_KEY" ]; then echo "GPG_PRIVATE_KEY is not set"; exit 1; fi
|
||||||
|
printf '%s' "$GPG_PRIVATE_KEY" | gpg --batch --import
|
||||||
|
KEYID=$(gpg --list-secret-keys --with-colons | awk -F: '/^sec:/{print $5; exit}')
|
||||||
|
sha256sum *.zip > SHA256SUMS-win-x64
|
||||||
|
gpg --batch --yes --pinentry-mode loopback --passphrase "$GPG_PASSPHRASE" \
|
||||||
|
-u "$KEYID" --armor --detach-sign SHA256SUMS-win-x64
|
||||||
|
sha256sum -c SHA256SUMS-win-x64
|
||||||
|
- name: Attest build provenance
|
||||||
|
if: github.event_name == 'release'
|
||||||
|
uses: actions/attest-build-provenance@v2
|
||||||
|
with:
|
||||||
|
subject-path: |
|
||||||
|
*.zip
|
||||||
- name: Upload to release
|
- name: Upload to release
|
||||||
if: github.event_name == 'release'
|
if: github.event_name == 'release'
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ github.token }}
|
GH_TOKEN: ${{ github.token }}
|
||||||
TAG: ${{ github.event.release.tag_name }}
|
TAG: ${{ github.event.release.tag_name }}
|
||||||
run: gh release upload "$TAG" 3proxy-${{ env.RELEASE }}-x64.zip
|
run: gh release upload "$TAG" *.zip SHA256SUMS-win-x64 SHA256SUMS-win-x64.asc
|
||||||
@@ -6,10 +6,14 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ci:
|
ci:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
id-token: write
|
||||||
|
attestations: write
|
||||||
name: "${{ matrix.target }}"
|
name: "${{ matrix.target }}"
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
@@ -101,10 +105,30 @@ jobs:
|
|||||||
if: github.event_name == 'release'
|
if: github.event_name == 'release'
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: Compress-Archive -Path dist/* -DestinationPath 3proxy-${{ env.RELEASE }}-arm64.zip
|
run: Compress-Archive -Path dist/* -DestinationPath 3proxy-${{ env.RELEASE }}-arm64.zip
|
||||||
|
- name: Checksums and detached signature
|
||||||
|
if: github.event_name == 'release'
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||||
|
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
|
||||||
|
run: |
|
||||||
|
if [ -z "$GPG_PRIVATE_KEY" ]; then echo "GPG_PRIVATE_KEY is not set"; exit 1; fi
|
||||||
|
printf '%s' "$GPG_PRIVATE_KEY" | gpg --batch --import
|
||||||
|
KEYID=$(gpg --list-secret-keys --with-colons | awk -F: '/^sec:/{print $5; exit}')
|
||||||
|
sha256sum *.zip > SHA256SUMS-win-arm64
|
||||||
|
gpg --batch --yes --pinentry-mode loopback --passphrase "$GPG_PASSPHRASE" \
|
||||||
|
-u "$KEYID" --armor --detach-sign SHA256SUMS-win-arm64
|
||||||
|
sha256sum -c SHA256SUMS-win-arm64
|
||||||
|
- name: Attest build provenance
|
||||||
|
if: github.event_name == 'release'
|
||||||
|
uses: actions/attest-build-provenance@v2
|
||||||
|
with:
|
||||||
|
subject-path: |
|
||||||
|
*.zip
|
||||||
- name: Upload to release
|
- name: Upload to release
|
||||||
if: github.event_name == 'release'
|
if: github.event_name == 'release'
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ github.token }}
|
GH_TOKEN: ${{ github.token }}
|
||||||
TAG: ${{ github.event.release.tag_name }}
|
TAG: ${{ github.event.release.tag_name }}
|
||||||
run: gh release upload "$TAG" 3proxy-${{ env.RELEASE }}-arm64.zip
|
run: gh release upload "$TAG" *.zip SHA256SUMS-win-arm64 SHA256SUMS-win-arm64.asc
|
||||||
@@ -1,99 +0,0 @@
|
|||||||
name: Build Docker images (GHCR)
|
|
||||||
|
|
||||||
on:
|
|
||||||
release:
|
|
||||||
types: [published]
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
packages: write
|
|
||||||
id-token: write
|
|
||||||
|
|
||||||
env:
|
|
||||||
REGISTRY: ghcr.io
|
|
||||||
IMAGE_NAME: ${{ github.repository }}
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
name: Build and push Docker images
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v7
|
|
||||||
|
|
||||||
- name: Determine tags
|
|
||||||
id: tags
|
|
||||||
env:
|
|
||||||
RELEASE_TAG: ${{ github.event.release.tag_name }}
|
|
||||||
IMAGE: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
|
||||||
run: |
|
|
||||||
if [[ "$RELEASE_TAG" != "" ]]; then
|
|
||||||
RELEASE="${RELEASE_TAG#v}"
|
|
||||||
echo "minimal=${IMAGE}:${RELEASE}.minimal,${IMAGE}:minimal" >> "$GITHUB_OUTPUT"
|
|
||||||
echo "busybox=${IMAGE}:${RELEASE}.busybox,${IMAGE}:busybox" >> "$GITHUB_OUTPUT"
|
|
||||||
echo "full=${IMAGE}:${RELEASE},${IMAGE}:latest" >> "$GITHUB_OUTPUT"
|
|
||||||
else
|
|
||||||
DATETIME=$(date +%d%m%y%H%M%S)
|
|
||||||
BRANCH=$(echo "${GITHUB_REF#refs/heads/}" | tr "/" "-")
|
|
||||||
echo "minimal=${IMAGE}:${DATETIME}-${BRANCH}.minimal,${IMAGE}:${BRANCH}.minimal" >> "$GITHUB_OUTPUT"
|
|
||||||
echo "busybox=${IMAGE}:${DATETIME}-${BRANCH}.busybox,${IMAGE}:${BRANCH}.busybox" >> "$GITHUB_OUTPUT"
|
|
||||||
echo "full=${IMAGE}:${DATETIME}-${BRANCH},${IMAGE}:${BRANCH}" >> "$GITHUB_OUTPUT"
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Set up QEMU
|
|
||||||
uses: docker/setup-qemu-action@v4
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v4
|
|
||||||
|
|
||||||
- name: Install cosign
|
|
||||||
uses: sigstore/cosign-installer@v3
|
|
||||||
|
|
||||||
- name: Login to GHCR
|
|
||||||
if: github.event_name != 'pull_request'
|
|
||||||
uses: docker/login-action@v4
|
|
||||||
with:
|
|
||||||
registry: ${{ env.REGISTRY }}
|
|
||||||
username: ${{ github.actor }}
|
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Build and push minimal
|
|
||||||
uses: docker/build-push-action@v7
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
file: Dockerfile.minimal
|
|
||||||
platforms: linux/amd64,linux/arm64,linux/arm/v7,ppc64le
|
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
|
||||||
tags: ${{ steps.tags.outputs.minimal }}
|
|
||||||
|
|
||||||
- name: Build and push busybox
|
|
||||||
uses: docker/build-push-action@v7
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
file: Dockerfile.busybox
|
|
||||||
platforms: linux/amd64,linux/arm64,linux/arm/v7,ppc64le
|
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
|
||||||
tags: ${{ steps.tags.outputs.busybox }}
|
|
||||||
|
|
||||||
- name: Build and push full
|
|
||||||
uses: docker/build-push-action@v7
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
file: Dockerfile.full
|
|
||||||
platforms: linux/amd64,linux/arm64,linux/arm/v7,ppc64le
|
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
|
||||||
tags: ${{ steps.tags.outputs.full }}
|
|
||||||
|
|
||||||
- name: Sign images
|
|
||||||
if: github.event_name != 'pull_request'
|
|
||||||
env:
|
|
||||||
TAGS_MINIMAL: ${{ steps.tags.outputs.minimal }}
|
|
||||||
TAGS_BUSYBOX: ${{ steps.tags.outputs.busybox }}
|
|
||||||
TAGS_FULL: ${{ steps.tags.outputs.full }}
|
|
||||||
run: |
|
|
||||||
IFS=',' read -ra TAGS <<< "$TAGS_MINIMAL,$TAGS_BUSYBOX,$TAGS_FULL"
|
|
||||||
for tag in "${TAGS[@]}"; do
|
|
||||||
cosign sign --yes "$tag"
|
|
||||||
done
|
|
||||||
|
|
||||||
+152
-54
@@ -1,4 +1,4 @@
|
|||||||
name: Build Docker images (Docker Hub)
|
name: Build Docker images
|
||||||
|
|
||||||
on:
|
on:
|
||||||
release:
|
release:
|
||||||
@@ -7,89 +7,187 @@ on:
|
|||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
id-token: write
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
REGISTRY: docker.io
|
DOCKERHUB_IMAGE: docker.io/3proxy/3proxy
|
||||||
IMAGE_NAME: 3proxy/3proxy
|
GHCR_IMAGE: ghcr.io/3proxy/3proxy
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Build and push Docker images
|
name: ${{ matrix.image }} ${{ matrix.platform }}
|
||||||
runs-on: ubuntu-latest
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
|
runs-on: ${{ matrix.runner }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
image: [full, busybox, minimal]
|
||||||
|
platform: [linux/amd64, linux/arm64, linux/arm/v7]
|
||||||
|
include:
|
||||||
|
- platform: linux/amd64
|
||||||
|
runner: ubuntu-latest
|
||||||
|
- platform: linux/arm64
|
||||||
|
runner: ubuntu-24.04-arm
|
||||||
|
- platform: linux/arm/v7
|
||||||
|
runner: ubuntu-24.04-arm
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v7
|
uses: actions/checkout@v7
|
||||||
|
|
||||||
- name: Determine tags
|
- name: Platform name
|
||||||
id: tags
|
id: platform
|
||||||
env:
|
run: echo "pair=$(echo '${{ matrix.platform }}' | tr / -)" >> "$GITHUB_OUTPUT"
|
||||||
RELEASE_TAG: ${{ github.event.release.tag_name }}
|
|
||||||
run: |
|
|
||||||
if [[ "$RELEASE_TAG" != "" ]]; then
|
|
||||||
RELEASE="${RELEASE_TAG#v}"
|
|
||||||
echo "minimal=${REGISTRY}/${IMAGE_NAME}:${RELEASE}.minimal,${REGISTRY}/${IMAGE_NAME}:minimal" >> "$GITHUB_OUTPUT"
|
|
||||||
echo "busybox=${REGISTRY}/${IMAGE_NAME}:${RELEASE}.busybox,${REGISTRY}/${IMAGE_NAME}:busybox" >> "$GITHUB_OUTPUT"
|
|
||||||
echo "full=${REGISTRY}/${IMAGE_NAME}:${RELEASE},${REGISTRY}/${IMAGE_NAME}:latest" >> "$GITHUB_OUTPUT"
|
|
||||||
else
|
|
||||||
DATETIME=$(date +%d%m%y%H%M%S)
|
|
||||||
BRANCH=$(echo "${GITHUB_REF#refs/heads/}" | tr "/" "-")
|
|
||||||
echo "minimal=${REGISTRY}/${IMAGE_NAME}:${DATETIME}-${BRANCH}.minimal,${REGISTRY}/${IMAGE_NAME}:${BRANCH}.minimal" >> "$GITHUB_OUTPUT"
|
|
||||||
echo "busybox=${REGISTRY}/${IMAGE_NAME}:${DATETIME}-${BRANCH}.busybox,${REGISTRY}/${IMAGE_NAME}:${BRANCH}.busybox" >> "$GITHUB_OUTPUT"
|
|
||||||
echo "full=${REGISTRY}/${IMAGE_NAME}:${DATETIME}-${BRANCH},${REGISTRY}/${IMAGE_NAME}:${BRANCH}" >> "$GITHUB_OUTPUT"
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
|
if: matrix.platform == 'linux/arm/v7'
|
||||||
uses: docker/setup-qemu-action@v4
|
uses: docker/setup-qemu-action@v4
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v4
|
uses: docker/setup-buildx-action@v4
|
||||||
|
|
||||||
|
- name: Login to GHCR
|
||||||
|
uses: docker/login-action@v4
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Build and push by digest
|
||||||
|
id: build
|
||||||
|
uses: docker/build-push-action@v7
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: Dockerfile.${{ matrix.image }}
|
||||||
|
platforms: ${{ matrix.platform }}
|
||||||
|
provenance: false
|
||||||
|
sbom: false
|
||||||
|
outputs: type=image,name=${{ env.GHCR_IMAGE }},push-by-digest=true,name-canonical=true,push=true
|
||||||
|
|
||||||
|
- name: Export digest
|
||||||
|
env:
|
||||||
|
DIGEST: ${{ steps.build.outputs.digest }}
|
||||||
|
run: |
|
||||||
|
mkdir -p /tmp/digests
|
||||||
|
touch "/tmp/digests/${DIGEST#sha256:}"
|
||||||
|
|
||||||
|
- name: Upload digest
|
||||||
|
uses: actions/upload-artifact@v7
|
||||||
|
with:
|
||||||
|
name: digests-${{ matrix.image }}-${{ steps.platform.outputs.pair }}
|
||||||
|
path: /tmp/digests/*
|
||||||
|
if-no-files-found: error
|
||||||
|
retention-days: 1
|
||||||
|
|
||||||
|
publish:
|
||||||
|
name: Publish ${{ matrix.image }}
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
|
id-token: write
|
||||||
|
attestations: write
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- image: full
|
||||||
|
suffix: ''
|
||||||
|
floating: latest
|
||||||
|
- image: busybox
|
||||||
|
suffix: .busybox
|
||||||
|
floating: busybox
|
||||||
|
- image: minimal
|
||||||
|
suffix: .minimal
|
||||||
|
floating: minimal
|
||||||
|
steps:
|
||||||
|
- name: Download digests
|
||||||
|
uses: actions/download-artifact@v7
|
||||||
|
with:
|
||||||
|
path: /tmp/digests
|
||||||
|
pattern: digests-${{ matrix.image }}-*
|
||||||
|
merge-multiple: true
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v4
|
||||||
|
|
||||||
- name: Install cosign
|
- name: Install cosign
|
||||||
uses: sigstore/cosign-installer@v3
|
uses: sigstore/cosign-installer@v3
|
||||||
|
with:
|
||||||
|
cosign-release: v2.4.3
|
||||||
|
|
||||||
- name: Login to Docker Hub
|
- name: Login to Docker Hub
|
||||||
if: github.event_name != 'pull_request'
|
|
||||||
uses: docker/login-action@v4
|
uses: docker/login-action@v4
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Build and push minimal
|
- name: Login to GHCR
|
||||||
uses: docker/build-push-action@v7
|
uses: docker/login-action@v4
|
||||||
with:
|
with:
|
||||||
context: .
|
registry: ghcr.io
|
||||||
file: Dockerfile.minimal
|
username: ${{ github.actor }}
|
||||||
platforms: linux/amd64,linux/arm64,linux/arm/v7,ppc64le
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
|
||||||
tags: ${{ steps.tags.outputs.minimal }}
|
|
||||||
|
|
||||||
- name: Build and push busybox
|
- name: Determine tags
|
||||||
uses: docker/build-push-action@v7
|
id: tags
|
||||||
with:
|
env:
|
||||||
context: .
|
RELEASE_TAG: ${{ github.event.release.tag_name }}
|
||||||
file: Dockerfile.busybox
|
SUFFIX: ${{ matrix.suffix }}
|
||||||
platforms: linux/amd64,linux/arm64,linux/arm/v7,ppc64le
|
FLOATING: ${{ matrix.floating }}
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
run: |
|
||||||
tags: ${{ steps.tags.outputs.busybox }}
|
if [[ "$RELEASE_TAG" != "" ]]; then
|
||||||
|
RELEASE="${RELEASE_TAG#v}"
|
||||||
|
echo "versioned=${RELEASE}${SUFFIX}" >> "$GITHUB_OUTPUT"
|
||||||
|
echo "moving=${FLOATING}" >> "$GITHUB_OUTPUT"
|
||||||
|
else
|
||||||
|
DATETIME=$(date +%d%m%y%H%M%S)
|
||||||
|
BRANCH=$(echo "${GITHUB_REF#refs/heads/}" | tr "/" "-")
|
||||||
|
echo "versioned=${DATETIME}-${BRANCH}${SUFFIX}" >> "$GITHUB_OUTPUT"
|
||||||
|
echo "moving=${BRANCH}${SUFFIX}" >> "$GITHUB_OUTPUT"
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Build and push full
|
- name: Create manifest list and push
|
||||||
uses: docker/build-push-action@v7
|
working-directory: /tmp/digests
|
||||||
|
env:
|
||||||
|
VERSIONED: ${{ steps.tags.outputs.versioned }}
|
||||||
|
MOVING: ${{ steps.tags.outputs.moving }}
|
||||||
|
run: |
|
||||||
|
docker buildx imagetools create \
|
||||||
|
-t "${DOCKERHUB_IMAGE}:${VERSIONED}" \
|
||||||
|
-t "${DOCKERHUB_IMAGE}:${MOVING}" \
|
||||||
|
-t "${GHCR_IMAGE}:${VERSIONED}" \
|
||||||
|
-t "${GHCR_IMAGE}:${MOVING}" \
|
||||||
|
$(printf "${GHCR_IMAGE}@sha256:%s " *)
|
||||||
|
|
||||||
|
- name: Get pushed digest
|
||||||
|
id: digest
|
||||||
|
env:
|
||||||
|
VERSIONED: ${{ steps.tags.outputs.versioned }}
|
||||||
|
run: |
|
||||||
|
DIGEST=$(docker buildx imagetools inspect "${DOCKERHUB_IMAGE}:${VERSIONED}" \
|
||||||
|
--format '{{json .Manifest}}' | jq -r .digest)
|
||||||
|
echo "digest=${DIGEST}" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
- name: Attest Docker Hub image
|
||||||
|
uses: actions/attest-build-provenance@v2
|
||||||
with:
|
with:
|
||||||
context: .
|
subject-name: ${{ env.DOCKERHUB_IMAGE }}
|
||||||
file: Dockerfile.full
|
subject-digest: ${{ steps.digest.outputs.digest }}
|
||||||
platforms: linux/amd64,linux/arm64,linux/arm/v7,ppc64le
|
push-to-registry: false
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
|
||||||
tags: ${{ steps.tags.outputs.full }}
|
- name: Attest GHCR image
|
||||||
|
uses: actions/attest-build-provenance@v2
|
||||||
|
with:
|
||||||
|
subject-name: ${{ env.GHCR_IMAGE }}
|
||||||
|
subject-digest: ${{ steps.digest.outputs.digest }}
|
||||||
|
push-to-registry: false
|
||||||
|
|
||||||
- name: Sign images
|
- name: Sign images
|
||||||
if: github.event_name != 'pull_request'
|
|
||||||
env:
|
env:
|
||||||
TAGS_MINIMAL: ${{ steps.tags.outputs.minimal }}
|
DIGEST: ${{ steps.digest.outputs.digest }}
|
||||||
TAGS_BUSYBOX: ${{ steps.tags.outputs.busybox }}
|
|
||||||
TAGS_FULL: ${{ steps.tags.outputs.full }}
|
|
||||||
run: |
|
run: |
|
||||||
IFS=',' read -ra TAGS <<< "$TAGS_MINIMAL,$TAGS_BUSYBOX,$TAGS_FULL"
|
cosign sign --yes "${DOCKERHUB_IMAGE}@${DIGEST}"
|
||||||
for tag in "${TAGS[@]}"; do
|
cosign sign --yes "${GHCR_IMAGE}@${DIGEST}"
|
||||||
cosign sign --yes "$tag"
|
|
||||||
done
|
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
name: Update HTML documentation
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- 'man/**'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
docs:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v7
|
||||||
|
|
||||||
|
- name: Install groff
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y groff
|
||||||
|
|
||||||
|
- name: Generate HTML from man pages
|
||||||
|
run: |
|
||||||
|
mkdir -p doc/html/man5 doc/html/man8
|
||||||
|
echo \<html\>\<title\>3proxy documentation\</title\>\<body\>\<h2\>3proxy documentation\</h2\> >doc/html/index.html
|
||||||
|
echo \<a href=\"securityen.html\"\>Security recommendations\</a\>\<br\> >>doc/html/index.html
|
||||||
|
echo \<a href=\"highload.html\"\>Optimizing 3proxy for high loads\</a\>\<br\> >>doc/html/index.html
|
||||||
|
echo \<a href=\"howtoe.html\"\>How To \(English, very incomplete\)\</a\>\<br\> >>doc/html/index.html
|
||||||
|
echo \<a href=\"howtor.html\"\>How To \(Russian\)\</a\>\<br\> >>doc/html/index.html
|
||||||
|
echo \<a href=\"devref.html\"\>Developer reference\</a\>\<br\> >>doc/html/index.html
|
||||||
|
echo \<h3\>Man pages:\</h3\> >>doc/html/index.html
|
||||||
|
cd man
|
||||||
|
for i in *.8; do ((bash -c "groff -mandoc -Thtml $i | grep -v DOCTYPE| grep -v text/css| grep -v 'meta ' | grep -v /style | grep -v { | grep -v /title | grep -v www.w3.org | grep -v CreationDate" > ../doc/html/man8/$i.html ) && echo \<br\>\<A HREF=\"man8/$i.html\"\>$i\</A\> >> ../doc/html/index.html); done
|
||||||
|
for i in *.5; do ((bash -c "groff -mandoc -Thtml $i | grep -v DOCTYPE| grep -v text/css| grep -v 'meta ' | grep -v /style | grep -v { | grep -v /title | grep -v www.w3.org | grep -v CreationDate" > ../doc/html/man5/$i.html ) && echo \<br\>\<A HREF=\"man5/$i.html\"\>$i\</A\> >> ../doc/html/index.html); done
|
||||||
|
cd ..
|
||||||
|
echo \</body\>\</html\> >>doc/html/index.html
|
||||||
|
|
||||||
|
- name: Commit
|
||||||
|
run: |
|
||||||
|
if [ -z "$(git status --porcelain doc/html)" ]; then
|
||||||
|
echo "documentation already up to date"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
git config user.name "github-actions[bot]"
|
||||||
|
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||||
|
git add doc/html
|
||||||
|
git commit -m "Update HTML documentation from man pages"
|
||||||
|
git push
|
||||||
@@ -0,0 +1,94 @@
|
|||||||
|
name: Update version files
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- RELEASE
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
version:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v7
|
||||||
|
|
||||||
|
- name: Regenerate version files
|
||||||
|
run: |
|
||||||
|
RELEASE=$(tr -d ' \t\r\n' < RELEASE)
|
||||||
|
if [ -z "$RELEASE" ]; then echo "RELEASE is empty"; exit 1; fi
|
||||||
|
MAJOR=$(echo "$RELEASE" | cut -d . -f 1)
|
||||||
|
SUBMAJOR=$(echo "$RELEASE" | cut -d . -f 2)
|
||||||
|
MINOR=$(echo "$RELEASE" | cut -d . -f 3)
|
||||||
|
SUBMINOR=$(echo "$RELEASE" | cut -d . -f 4)
|
||||||
|
[ -n "$SUBMAJOR" ] || SUBMAJOR=0
|
||||||
|
[ -n "$MINOR" ] || MINOR=0
|
||||||
|
[ -n "$SUBMINOR" ] || SUBMINOR=0
|
||||||
|
|
||||||
|
# The build date is minted once per release and then carried in
|
||||||
|
# version.h, so that rebuilding the same commit yields the same
|
||||||
|
# version string and the same package names.
|
||||||
|
OLDRELEASE=$(sed -n 's/^#define VERSION "3proxy-\(.*\)"$/\1/p' src/version.h 2>/dev/null)
|
||||||
|
OLDBUILDDATE=$(sed -n 's/^#define BUILDDATE "\(.*\)"$/\1/p' src/version.h 2>/dev/null)
|
||||||
|
if [ "$OLDRELEASE" = "$RELEASE" ] && [ -n "$OLDBUILDDATE" ]; then
|
||||||
|
BUILDDATE="$OLDBUILDDATE"
|
||||||
|
else
|
||||||
|
BUILDDATE=$(date -u +%y%m%d%H%M%S)
|
||||||
|
fi
|
||||||
|
echo "release $RELEASE -> $MAJOR $SUBMAJOR $MINOR $SUBMINOR, build date $BUILDDATE"
|
||||||
|
SOURCE_DATE_EPOCH=$(date -u -d "20${BUILDDATE:0:2}-${BUILDDATE:2:2}-${BUILDDATE:4:2} ${BUILDDATE:6:2}:${BUILDDATE:8:2}:${BUILDDATE:10:2}" +%s)
|
||||||
|
YEAR=$(date -u -d @$SOURCE_DATE_EPOCH +%Y)
|
||||||
|
|
||||||
|
DEBVERSION=$(head -1 debian/changelog | cut -d "(" -f 2 | cut -d ")" -f 1)
|
||||||
|
if [ "$DEBVERSION" != "$RELEASE-1" ]; then
|
||||||
|
mv debian/changelog debian/changelog.old
|
||||||
|
{ echo "3proxy ($RELEASE-1) buster; urgency=medium"
|
||||||
|
echo ""
|
||||||
|
echo " *3proxy $RELEASE initial build"
|
||||||
|
echo ""
|
||||||
|
echo " -- z3APA3A <3apa3a@3proxy.org> $(date -R -u -d @$SOURCE_DATE_EPOCH)"
|
||||||
|
echo ""
|
||||||
|
cat debian/changelog.old
|
||||||
|
} > debian/changelog
|
||||||
|
rm -f debian/changelog.old
|
||||||
|
fi
|
||||||
|
|
||||||
|
mv scripts/rh/3proxy.spec scripts/rh/3proxy.spec.old
|
||||||
|
{ echo "Name: 3proxy"
|
||||||
|
echo "Version: $RELEASE"
|
||||||
|
echo "Release: 1%{?dist}"
|
||||||
|
tail --lines=+4 scripts/rh/3proxy.spec.old
|
||||||
|
} > scripts/rh/3proxy.spec
|
||||||
|
rm -f scripts/rh/3proxy.spec.old
|
||||||
|
|
||||||
|
{ echo "#ifndef VERSION"
|
||||||
|
echo "#define VERSION \"3proxy-$RELEASE\""
|
||||||
|
echo "#endif"
|
||||||
|
echo "#ifndef BUILDDATE"
|
||||||
|
echo "#define BUILDDATE \"$BUILDDATE\""
|
||||||
|
echo "#endif"
|
||||||
|
echo "#define MAJOR3PROXY $MAJOR"
|
||||||
|
echo "#define SUBMAJOR3PROXY $SUBMAJOR"
|
||||||
|
echo "#define MINOR3PROXY $MINOR"
|
||||||
|
echo "#define SUBMINOR3PROXY $SUBMINOR"
|
||||||
|
echo "#define RELEASE3PROXY \"3proxy-$RELEASE(\" BUILDDATE \")\\0\""
|
||||||
|
echo "#ifndef YEAR3PROXY"
|
||||||
|
echo "#define YEAR3PROXY \"$YEAR\""
|
||||||
|
echo "#endif"
|
||||||
|
} > src/version.h
|
||||||
|
|
||||||
|
- name: Commit
|
||||||
|
run: |
|
||||||
|
if [ -z "$(git status --porcelain debian/changelog scripts/rh/3proxy.spec src/version.h)" ]; then
|
||||||
|
echo "version files already up to date"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
git config user.name "github-actions[bot]"
|
||||||
|
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||||
|
git add debian/changelog scripts/rh/3proxy.spec src/version.h
|
||||||
|
git commit -m "Update version files for $(tr -d ' \t\r\n' < RELEASE)"
|
||||||
|
git push
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
name: Update wiki
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- 'doc/html/**'
|
||||||
|
workflow_run:
|
||||||
|
workflows: ["Update HTML documentation"]
|
||||||
|
types: [completed]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: update-wiki
|
||||||
|
cancel-in-progress: false
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
wiki:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
ref: master
|
||||||
|
|
||||||
|
- name: Clone wiki
|
||||||
|
run: |
|
||||||
|
git clone --quiet \
|
||||||
|
"https://x-access-token:${{ github.token }}@github.com/${{ github.repository }}.wiki.git" wiki
|
||||||
|
|
||||||
|
- name: Copy documentation
|
||||||
|
run: |
|
||||||
|
cp -f doc/html/man8/3proxy.8.html wiki/3proxy.md
|
||||||
|
cp -f doc/html/man8/3proxy_crypt.8.html wiki/3proxy_crypt.md
|
||||||
|
cp -f doc/html/man8/ftppr.8.html wiki/ftppr.md
|
||||||
|
cp -f doc/html/man8/pop3p.8.html wiki/pop3p.md
|
||||||
|
cp -f doc/html/man8/imapp.8.html wiki/imapp.md
|
||||||
|
cp -f doc/html/man8/proxy.8.html wiki/proxy.md
|
||||||
|
cp -f doc/html/man8/smtpp.8.html wiki/smtpp.md
|
||||||
|
cp -f doc/html/man8/socks.8.html wiki/socks.md
|
||||||
|
cp -f doc/html/man8/tlspr.8.html wiki/tlspr.md
|
||||||
|
cp -f doc/html/man8/tcppm.8.html wiki/tcppm.md
|
||||||
|
cp -f doc/html/man8/udppm.8.html wiki/udppm.md
|
||||||
|
cp -f doc/html/man5/3proxy.cfg.5.html wiki/3proxy.cfg.md
|
||||||
|
cp -f doc/html/highload.html wiki/High-Load.md
|
||||||
|
cp -f doc/html/howtoe.html wiki/How-To.md
|
||||||
|
cp -f doc/html/howtor.html "wiki/How-To-(русский).md"
|
||||||
|
cp -f doc/html/securityen.html wiki/Security-recommendations.md
|
||||||
|
cp -f doc/html/devel/devref.html wiki/DevelopeReference.md
|
||||||
|
cp -f doc/html/plugins/TransparentPlugin.html wiki/TransparentPlugin.md
|
||||||
|
cp -f doc/html/plugins/StringsPlugin.html wiki/StringsPlugin.md
|
||||||
|
cp -f doc/html/plugins/TrafficPlugin.html wiki/TrafficPlugin.md
|
||||||
|
cp -f doc/html/plugins/WindowsAuthentication.html wiki/WindowsAuthentication.md
|
||||||
|
cp -f doc/html/plugins/TransparentPlugin.ru.html "wiki/TransparentPlugin-(русский).md"
|
||||||
|
cp -f doc/html/plugins/StringsPlugin.ru.html "wiki/StringsPlugin-(русский).md"
|
||||||
|
cp -f doc/html/plugins/TrafficPlugin.ru.html "wiki/TrafficPlugin-(русский).md"
|
||||||
|
cp -f doc/html/plugins/WindowsAuthentication.ru.html "wiki/WindowsAuthentication-(русский).md"
|
||||||
|
|
||||||
|
- name: Commit
|
||||||
|
run: |
|
||||||
|
cd wiki
|
||||||
|
if [ -z "$(git status --porcelain)" ]; then
|
||||||
|
echo "wiki already up to date"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
git status --short
|
||||||
|
git config user.name "github-actions[bot]"
|
||||||
|
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||||
|
git add -A
|
||||||
|
git commit -m "Update documentation from master"
|
||||||
|
git push
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||||
|
|
||||||
|
mQINBGqIZCIBEADF3zxdMo2dvUGAlQm3aIcQiqmpLMHucvLfSK3fHtwagO8f03CO
|
||||||
|
bEx9EfIK/U6BzLwEJ0CxyClzfvgo9COVpi5EjES9sI2LXzcgc4hGaYO0Q4Unj//0
|
||||||
|
W/G8aarDaLF2NRKMLf07eaYGBRJjqHnmeHgOHdr+SnN0JtMSadWMHoliB8esnabz
|
||||||
|
5CO4JabTrhwoez3DMLSgJNIod7wL6PJJv/2BeRahwNr2CjaXmzZKr/j7fc1MKLij
|
||||||
|
bsvJ5OmLmngZr6CHDa9cBhVhiH+7RgWLCsRlEGxEv7w0afp/T0xDwNAPkGzk5ObC
|
||||||
|
BrdXvypTAbNyUoVT8qSVJwkneZ4S0Ts4rRRNfNpaus4tsCmgyGKzsrbxvbiBOTPW
|
||||||
|
jB/fjkgr6X9M/AQ3yGpXrwXRJrM/nSfjUyOEHXttTC9HpGt41NH/mpC4mDWa1Kxi
|
||||||
|
FMxuo1+dw2kpDKl0Bp78IGdCo5akHwftFr8aHgmfZoGXAGJRHPAWbJGjC2ARy8yp
|
||||||
|
QOpxba0S3VlCU6bs8MDKl6cpWItnlXcl/GD/Qc55bjLXjFv1pbn2RUSYZS+n9wDX
|
||||||
|
64syZf3dZ/N5U4ydmybWfiLFUXqKQLtdO8QAWQGt4TSwKptTmI581/MMCTQ8qWZL
|
||||||
|
zgFj6C/8K0SZ4lMOv+5zfc2+QOoWw7E2Ws3stEKTyWjOMm/QMJAGumqvqwARAQAB
|
||||||
|
tCozcHJveHkgcmVsZWFzZSBzaWduaW5nIDwzcHJveHlAM3Byb3h5Lm9yZz6JAm0E
|
||||||
|
EwEIAFcWIQT8EiFEmfzHuhz/bNwDEjhOOnOUCwUCaohkIhsUgAAAAAAEAA5tYW51
|
||||||
|
MiwyLjUrMS4xMiwwLDMCGwMFCwkIBwICIgIGFQoJCAsCBBYCAwECHgcCF4AACgkQ
|
||||||
|
AxI4TjpzlAsCwRAAtH3OO42yCd2B8Od4yS1yBDkaIFwEm8hF68eou6uaSDkKG8YZ
|
||||||
|
C3DUH7qk0nXEMQu/5J6RWZKlW1C8D3AkUR9A1g54o6mUg4IL5196XsrQRdVu64YF
|
||||||
|
nLCk17Piku1lMk+Re6bZ6uJv5UlSv8d0dvxmAYzjusyPyBC2VXy7B0CoDif6AmXt
|
||||||
|
aw2/V6m0dRrfFo4W9mJKUqTAJcdBOKzEiQb7qLnzuwy4CB5qsvnEQTqymoCXFXzg
|
||||||
|
VDCSKRLXnbDPbIs0TvsCmthn/w1hCgftPq4W0s7EUJBOhbrjF59+AuTb+U1wIXNR
|
||||||
|
1+DPF+V+5RlwWjOWMlsOVGk2jaxjVY8wuaD3rE6ISJkt1pRv/WVdY984rT7Eu94J
|
||||||
|
ZHnxPjFrb2ohFKjoBCt60kbgZbuQ6yvEma5lAF9K63gwMNNyGZvq6QWl58iouzuS
|
||||||
|
3B9t7EwGwFstJfaXVhn/rnIHoExgxVZMbbsmXiGJyE2KcfVmlZcEi0MIyqEeBSDD
|
||||||
|
gjpE4yVO6StBtJKfXra8rMwtsbWBw9MptPhcLvdWtN6TG0CxDyTHhdL1pSLNcwX1
|
||||||
|
CTVpwi6+WmGogcv0WFNn5caQUpu9le/v/5qLRK08KWOH8inMJmTfpJg/9869YJuF
|
||||||
|
vDKdzJd6jug5YQRfV/7YVC2hdSOBLvBuDpRINePrj9CKJ34qG+jRSJ5xwYk=
|
||||||
|
=IS3Y
|
||||||
|
-----END PGP PUBLIC KEY BLOCK-----
|
||||||
@@ -1,28 +1,13 @@
|
|||||||
3proxy-0.9.8 Released August, 7 2026
|
3proxy-1.0.0 Released August, 22 2026
|
||||||
|
|
||||||
!! Fix: use-after-free on the ftp:// request path in HTTP proxy, a request buffer reallocation left a stale pointer; heap corruption, requires authenticated access
|
No changes in 3proxy code, this release only changes how packages are built, signed and published.
|
||||||
!! Fix: buffer overflow in radsend() with an oversized request hostname; RADIUS is experimental, log radius or auth radius with fakeresolve is required to reach it
|
|
||||||
!! Fix: buffer overflow in smtpp when relaying AUTH LOGIN credentials to a server which offers AUTH PLAIN only; requires authorised access to smtpp
|
! Fix: TLS, PCRE2 and PAM support was silently left out when 3proxy was built on a system whose /bin/sh is not dash, which is every RPM based distribution and macOS; the library checks built their test program with echo and escape sequences, which only dash expands, so every check failed and the features were dropped without a diagnostic
|
||||||
!! Fix: out-of-bounds read in tlspr on a malformed TLS ClientHello
|
! Fix: rpm packages were built on Ubuntu and required glibc 2.38, libssl.so.3 and libpcre2-8, which no RPM based distribution provides, so they could not be installed anywhere; they are built against AlmaLinux 8, 9 and 10 now and carry an el8, el9 or el10 tag, covering RHEL, AlmaLinux, Rocky and CentOS Stream of the same version
|
||||||
!! Fix: LDAP injection and unsafe counter file names in LdapPlugin; the plugin is unsupported and is not built with 3proxy
|
! Fix: the rpm package depended on its own interpreter, /bin/3proxy, taken from the first line of the installed configuration file, and could not be installed on el9 or el10 because rpm resolves that dependency to /usr/bin/3proxy
|
||||||
!! Fix: password and hash comparison in strong authentication is constant-time now
|
! Fix: deb packages required glibc 2.38 and libssl3t64 and installed on Ubuntu 24.04 and newer only; they are built against Ubuntu 22.04 now and install on Ubuntu 22.04 and later as well as Debian 12 and later
|
||||||
!! Fix: bounds validation and match/depth limits in pcre filters
|
+ Signed apt and dnf repositories are published at https://3proxy.org/repo/ in two channels: current, built from the master branch, and lts, built from the 0.9 branch; packages and repository metadata are both signed
|
||||||
+ imapp: IMAPv4 proxy added, supports LOGIN command, AUTH PLAIN and AUTH LOGIN
|
+ Release binaries are published with SHA256 checksums, an OpenPGP signature and a GitHub build provenance attestation; docker images are signed and attested as well
|
||||||
+ STARTTLS support for smtpp, pop3p, imapp and tlspr, on both client and server side; -x option to disable
|
+ The release signing key is an RSA-4096 key published as 3proxy-release-key.asc in the repository; rpm 4.14 and earlier can not import an Ed25519 key at all, which would leave RHEL 8 and its derivatives unable to verify anything
|
||||||
+ wolfSSL is supported as an alternative TLS backend, WOLFSSL_CHECK=true selects it (wolfSSL must be built with --enable-opensslextra)
|
+ Packages are reproducible: rebuilding a release produces byte identical deb and rpm files, every timestamp is derived from the build date recorded for the release
|
||||||
+ Chunked Transfer-Encoding from client is supported by HTTP proxy
|
- 32-bit ARM (armhf) is published as a deb package only, Enterprise Linux has no 32-bit ARM build
|
||||||
+ dnspr: -F option added, fake resolve to redirect traffic
|
|
||||||
+ ucrt64 build support; static libraries support in Makefile.win
|
|
||||||
+ minimal and busybox Docker images switched to musl + wolfSSL
|
|
||||||
- splice() support is not built by default anymore, it is slower than the read/write path for most traffic; add -DWITHSPLICE to build it
|
|
||||||
! Fix: hashtable item was added with wrong index on table grow; with large username/password tables it could cause a single record to be missing
|
|
||||||
! Fix: race conditions; stack overflow on FreeBSD
|
|
||||||
! Fix: generated certificates are X.509 v3 with basicConstraints CA:FALSE and extendedKeyUsage serverAuth, required by Apple TLS stack and by Chrome on macOS/iOS
|
|
||||||
! Fix: dnspr was broken since udppm rewrite
|
|
||||||
! Fix: short cleartext passwords failed authentication
|
|
||||||
! Fix: parent negotiation after sending PROXY protocol header
|
|
||||||
! Fix: maxchild dropped to 100 on config reload if not set explicitly
|
|
||||||
! Fix: getrandom() is not used with glibc below 2.25
|
|
||||||
! Fix: IPV6_BOUND_IF definition for legacy MacOS
|
|
||||||
! Fix: cmake build, arm64 Docker build, Makefile.win with UCRT
|
|
||||||
! Multiple minor bugfixes and code cleanup
|
|
||||||
+12
-27
@@ -1,28 +1,13 @@
|
|||||||
3proxy-0.9.8 Вышел 7 Августа 2026
|
3proxy-1.0.0 Вышел 22 Августа 2026
|
||||||
|
|
||||||
!! Исправление: use-after-free на пути обработки запроса ftp:// в HTTP-прокси, перевыделение буфера запроса оставляло устаревший указатель; повреждение кучи, требуется аутентифицированный доступ
|
Изменений в коде 3proxy нет, этот выпуск меняет только сборку, подписывание и публикацию пакетов.
|
||||||
!! Исправление: переполнение буфера в radsend() при слишком длинном имени хоста в запросе; RADIUS является экспериментальным, для достижения кода необходимы log radius или auth radius в сочетании с fakeresolve
|
|
||||||
!! Исправление: переполнение буфера в smtpp при передаче учётных данных AUTH LOGIN серверу, поддерживающему только AUTH PLAIN; требуется авторизованный доступ к smtpp
|
! Исправление: поддержка TLS, PCRE2 и PAM молча не включалась при сборке в системах, где /bin/sh не dash, то есть во всех дистрибутивах на основе RPM и в macOS; проверки наличия библиотек формировали тестовую программу через echo с escape-последовательностями, которые раскрывает только dash, поэтому все проверки завершались неудачно и возможности отключались без каких-либо сообщений
|
||||||
!! Исправление: чтение за границами буфера в tlspr при некорректном TLS ClientHello
|
! Исправление: пакеты rpm собирались в Ubuntu и требовали glibc 2.38, libssl.so.3 и libpcre2-8, которых нет ни в одном дистрибутиве на основе RPM, поэтому установить их было невозможно нигде; теперь они собираются в AlmaLinux 8, 9 и 10 и содержат метку el8, el9 или el10, что покрывает RHEL, AlmaLinux, Rocky и CentOS Stream соответствующей версии
|
||||||
!! Исправление: LDAP-инъекция и небезопасные имена файлов счётчиков в LdapPlugin; плагин не поддерживается и не собирается вместе с 3proxy
|
! Исправление: пакет rpm зависел от собственного интерпретатора /bin/3proxy, взятого из первой строки устанавливаемого файла конфигурации, и не устанавливался в el9 и el10, поскольку rpm приводит эту зависимость к /usr/bin/3proxy
|
||||||
!! Исправление: сравнение паролей и хешей в strong-аутентификации теперь выполняется за постоянное время
|
! Исправление: пакеты deb требовали glibc 2.38 и libssl3t64 и устанавливались только в Ubuntu 24.04 и новее; теперь они собираются в Ubuntu 22.04 и устанавливаются в Ubuntu 22.04 и новее, а также в Debian 12 и новее
|
||||||
!! Исправление: проверка границ и ограничения match/depth в pcre-фильтрах
|
+ Подписанные репозитории apt и dnf публикуются на https://3proxy.org/repo/ в двух каналах: current, собираемый из ветки master, и lts, собираемый из ветки 0.9; подписываются и пакеты, и метаданные репозитория
|
||||||
+ imapp: добавлен IMAPv4-прокси, поддерживаются команда LOGIN, AUTH PLAIN и AUTH LOGIN
|
+ Двоичные файлы релиза публикуются с контрольными суммами SHA256, подписью OpenPGP и подтверждением происхождения сборки GitHub (build provenance attestation); образы docker также подписываются и снабжаются подтверждением
|
||||||
+ Поддержка STARTTLS для smtpp, pop3p, imapp и tlspr, как со стороны клиента, так и со стороны сервера; опция -x для отключения
|
+ Ключ подписи релизов — RSA-4096, опубликован в репозитории как 3proxy-release-key.asc; rpm версии 4.14 и более ранние вообще не могут импортировать ключ Ed25519, что лишило бы RHEL 8 и производные от него возможности проверки
|
||||||
+ wolfSSL поддерживается как альтернативный TLS-бэкенд, выбирается через WOLFSSL_CHECK=true (wolfSSL должен быть собран с --enable-opensslextra)
|
+ Пакеты воспроизводимы: повторная сборка релиза даёт побайтово идентичные файлы deb и rpm, все отметки времени берутся из даты сборки, записанной для релиза
|
||||||
+ HTTP-прокси поддерживает Transfer-Encoding: chunked от клиента
|
- Для 32-битной ARM (armhf) публикуется только пакет deb, в Enterprise Linux нет сборки для 32-битной ARM
|
||||||
+ dnspr: добавлена опция -F, фиктивное разрешение имён для перенаправления трафика
|
|
||||||
+ Поддержка сборки ucrt64; поддержка статических библиотек в Makefile.win
|
|
||||||
+ Docker-образы minimal и busybox переведены на musl + wolfSSL
|
|
||||||
- Поддержка splice() больше не собирается по умолчанию, она медленнее пути read/write для большинства видов трафика; для сборки добавьте -DWITHSPLICE
|
|
||||||
! Исправление: элемент хеш-таблицы добавлялся с неверным индексом при росте таблицы; на больших таблицах пользователей/паролей это могло приводить к отсутствию одной записи
|
|
||||||
! Исправление: состояния гонки; переполнение стека во FreeBSD
|
|
||||||
! Исправление: генерируемые сертификаты имеют формат X.509 v3 с basicConstraints CA:FALSE и extendedKeyUsage serverAuth, что требуется TLS-стеком Apple и Chrome в macOS/iOS
|
|
||||||
! Исправление: dnspr был сломан со времён переписывания udppm
|
|
||||||
! Исправление: короткие пароли в открытом виде не проходили аутентификацию
|
|
||||||
! Исправление: согласование с родителем после отправки заголовка PROXY protocol
|
|
||||||
! Исправление: maxchild сбрасывался в 100 при перезагрузке конфигурации, если не задан явно
|
|
||||||
! Исправление: getrandom() не используется с glibc ниже 2.25
|
|
||||||
! Исправление: определение IPV6_BOUND_IF для устаревших версий MacOS
|
|
||||||
! Исправление: сборка cmake, сборка Docker для arm64, Makefile.win с UCRT
|
|
||||||
! Множество мелких исправлений и очистка кода
|
|
||||||
+4
-4
@@ -52,14 +52,14 @@ ifeq ($(LIBSTATIC), true)
|
|||||||
STATIC_SUFFIX = -Wl,-Bdynamic
|
STATIC_SUFFIX = -Wl,-Bdynamic
|
||||||
ZLIB = -lz -lzstd
|
ZLIB = -lz -lzstd
|
||||||
endif
|
endif
|
||||||
WOLFSSL_CHECK ?= $(shell echo "\#include <wolfssl/options.h>\\n\#include <wolfssl/openssl/ssl.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testwssl.o - 2>/dev/null && $(CC) $(LDFLAGS) -otestwssl testwssl.o $(STATIC_PREFIX) -lwolfssl $(STATIC_SUFFIX) 2>/dev/null && rm testwssl testwssl.o && echo true||echo false)
|
WOLFSSL_CHECK ?= $(shell printf "\#include <wolfssl/options.h>\\n\#include <wolfssl/openssl/ssl.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testwssl.o - 2>/dev/null && $(CC) $(LDFLAGS) -otestwssl testwssl.o $(STATIC_PREFIX) -lwolfssl $(STATIC_SUFFIX) 2>/dev/null && rm testwssl testwssl.o && echo true||echo false)
|
||||||
ifeq ($(WOLFSSL_CHECK), true)
|
ifeq ($(WOLFSSL_CHECK), true)
|
||||||
LIBS += $(STATIC_PREFIX) -lwolfssl $(STATIC_SUFFIX)
|
LIBS += $(STATIC_PREFIX) -lwolfssl $(STATIC_SUFFIX)
|
||||||
CFLAGS += -DWITH_SSL -DWITH_WOLFSSL
|
CFLAGS += -DWITH_SSL -DWITH_WOLFSSL
|
||||||
SSL_OBJS = ssllib$(OBJSUFFICS) ssl$(OBJSUFFICS)
|
SSL_OBJS = ssllib$(OBJSUFFICS) ssl$(OBJSUFFICS)
|
||||||
ZLIB :=
|
ZLIB :=
|
||||||
else
|
else
|
||||||
OPENSSL_CHECK ?= $(shell echo "\#include <openssl/ssl.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testssl.o - 2>/dev/null && $(CC) $(LDFLAGS) -otestssl testssl.o $(STATIC_PREFIX) $(ZLIB) -lcrypto -lssl $(STATIC_SUFFIX) 2>/dev/null && rm testssl testssl.o && echo true||echo false)
|
OPENSSL_CHECK ?= $(shell printf "\#include <openssl/ssl.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testssl.o - 2>/dev/null && $(CC) $(LDFLAGS) -otestssl testssl.o $(STATIC_PREFIX) $(ZLIB) -lcrypto -lssl $(STATIC_SUFFIX) 2>/dev/null && rm testssl testssl.o && echo true||echo false)
|
||||||
ifeq ($(OPENSSL_CHECK), true)
|
ifeq ($(OPENSSL_CHECK), true)
|
||||||
LIBS += $(STATIC_PREFIX) $(ZLIB) -l crypto -l ssl $(STATIC_SUFFIX)
|
LIBS += $(STATIC_PREFIX) $(ZLIB) -l crypto -l ssl $(STATIC_SUFFIX)
|
||||||
CFLAGS += -DWITH_SSL
|
CFLAGS += -DWITH_SSL
|
||||||
@@ -68,13 +68,13 @@ else
|
|||||||
ZLIB :=
|
ZLIB :=
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
PCRE_CHECK ?= $(shell echo "\#define PCRE2_CODE_UNIT_WIDTH 8\\n\#include <pcre2.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testpcre.o - 2>/dev/null && $(CC) -o testpcre testpcre.o $(LDFLAGS) -lpcre2-8 2>/dev/null && rm testpcre testpcre.o && echo true||echo false)
|
PCRE_CHECK ?= $(shell printf "\#define PCRE2_CODE_UNIT_WIDTH 8\\n\#include <pcre2.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testpcre.o - 2>/dev/null && $(CC) -o testpcre testpcre.o $(LDFLAGS) -lpcre2-8 2>/dev/null && rm testpcre testpcre.o && echo true||echo false)
|
||||||
ifeq ($(PCRE_CHECK), true)
|
ifeq ($(PCRE_CHECK), true)
|
||||||
CFLAGS += -DWITH_PCRE
|
CFLAGS += -DWITH_PCRE
|
||||||
PCRE_OBJS = pcre$(OBJSUFFICS)
|
PCRE_OBJS = pcre$(OBJSUFFICS)
|
||||||
PCRE_LIBS = $(STATIC_PREFIX) -lpcre2-8 $(STATIC_SUFFIX)
|
PCRE_LIBS = $(STATIC_PREFIX) -lpcre2-8 $(STATIC_SUFFIX)
|
||||||
endif
|
endif
|
||||||
PAM_CHECK ?= $(shell echo "\#include <security/pam_appl.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testpam.o - 2>/dev/null && $(CC) $(LDFLAGS) -o testpam testpam.o -lpam 2>/dev/null && rm testpam testpam.o && echo true||echo false)
|
PAM_CHECK ?= $(shell printf "\#include <security/pam_appl.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testpam.o - 2>/dev/null && $(CC) $(LDFLAGS) -o testpam testpam.o -lpam 2>/dev/null && rm testpam testpam.o && echo true||echo false)
|
||||||
ifeq ($(PAM_CHECK), true)
|
ifeq ($(PAM_CHECK), true)
|
||||||
PLUGINS += PamAuth
|
PLUGINS += PamAuth
|
||||||
endif
|
endif
|
||||||
|
|||||||
+4
-4
@@ -60,14 +60,14 @@ ifeq ($(LIBSTATIC), true)
|
|||||||
ZLIB = -lz -lzstd
|
ZLIB = -lz -lzstd
|
||||||
endif
|
endif
|
||||||
|
|
||||||
WOLFSSL_CHECK ?= $(shell echo "\#include <wolfssl/options.h>\\n\#include <wolfssl/openssl/ssl.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testwssl.o - 2>/dev/null && $(CC) $(LDFLAGS) -otestwssl testwssl.o $(STATIC_PREFIX) -lwolfssl $(STATIC_SUFFIX) 2>/dev/null && rm testwssl testwssl.o && echo true||echo false)
|
WOLFSSL_CHECK ?= $(shell printf "\#include <wolfssl/options.h>\\n\#include <wolfssl/openssl/ssl.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testwssl.o - 2>/dev/null && $(CC) $(LDFLAGS) -otestwssl testwssl.o $(STATIC_PREFIX) -lwolfssl $(STATIC_SUFFIX) 2>/dev/null && rm testwssl testwssl.o && echo true||echo false)
|
||||||
ifeq ($(WOLFSSL_CHECK), true)
|
ifeq ($(WOLFSSL_CHECK), true)
|
||||||
LIBS += $(STATIC_PREFIX) -lwolfssl $(STATIC_SUFFIX)
|
LIBS += $(STATIC_PREFIX) -lwolfssl $(STATIC_SUFFIX)
|
||||||
CFLAGS += -DWITH_SSL -DWITH_WOLFSSL
|
CFLAGS += -DWITH_SSL -DWITH_WOLFSSL
|
||||||
SSL_OBJS = ssllib$(OBJSUFFICS) ssl$(OBJSUFFICS)
|
SSL_OBJS = ssllib$(OBJSUFFICS) ssl$(OBJSUFFICS)
|
||||||
ZLIB :=
|
ZLIB :=
|
||||||
else
|
else
|
||||||
OPENSSL_CHECK ?= $(shell echo "\#include <openssl/ssl.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testssl.o - 2>/dev/null && $(CC) $(LDFLAGS) -otestssl testssl.o $(STATIC_PREFIX) $(ZLIB) -lcrypto -lssl $(STATIC_SUFFIX) 2>/dev/null && rm testssl testssl.o && echo true||echo false)
|
OPENSSL_CHECK ?= $(shell printf "\#include <openssl/ssl.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testssl.o - 2>/dev/null && $(CC) $(LDFLAGS) -otestssl testssl.o $(STATIC_PREFIX) $(ZLIB) -lcrypto -lssl $(STATIC_SUFFIX) 2>/dev/null && rm testssl testssl.o && echo true||echo false)
|
||||||
ifeq ($(OPENSSL_CHECK), true)
|
ifeq ($(OPENSSL_CHECK), true)
|
||||||
LIBS += $(STATIC_PREFIX) $(ZLIB) -lcrypto -lssl $(STATIC_SUFFIX)
|
LIBS += $(STATIC_PREFIX) $(ZLIB) -lcrypto -lssl $(STATIC_SUFFIX)
|
||||||
CFLAGS += -DWITH_SSL
|
CFLAGS += -DWITH_SSL
|
||||||
@@ -76,13 +76,13 @@ else
|
|||||||
ZLIB :=
|
ZLIB :=
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
PCRE_CHECK ?= $(shell echo "\#define PCRE2_CODE_UNIT_WIDTH 8\\n\#include <pcre2.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testpcre.o - 2>/dev/null && $(CC) -o testpcre testpcre.o $(LDFLAGS) $(STATIC_PREFIX) -lpcre2-8 $(STATIC_SUFFIX) 2>/dev/null && rm testpcre testpcre.o && echo true||echo false)
|
PCRE_CHECK ?= $(shell printf "\#define PCRE2_CODE_UNIT_WIDTH 8\\n\#include <pcre2.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testpcre.o - 2>/dev/null && $(CC) -o testpcre testpcre.o $(LDFLAGS) $(STATIC_PREFIX) -lpcre2-8 $(STATIC_SUFFIX) 2>/dev/null && rm testpcre testpcre.o && echo true||echo false)
|
||||||
ifeq ($(PCRE_CHECK), true)
|
ifeq ($(PCRE_CHECK), true)
|
||||||
CFLAGS += -DWITH_PCRE
|
CFLAGS += -DWITH_PCRE
|
||||||
PCRE_OBJS = pcre$(OBJSUFFICS)
|
PCRE_OBJS = pcre$(OBJSUFFICS)
|
||||||
PCRE_LIBS = $(STATIC_PREFIX) -lpcre2-8 $(STATIC_SUFFIX)
|
PCRE_LIBS = $(STATIC_PREFIX) -lpcre2-8 $(STATIC_SUFFIX)
|
||||||
endif
|
endif
|
||||||
PAM_CHECK ?= $(shell echo "\#include <security/pam_appl.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testpam.o - 2>/dev/null && $(CC) $(LDFLAGS) -o testpam testpam.o -lpam 2>/dev/null && rm testpam testpam.o && echo true||echo false)
|
PAM_CHECK ?= $(shell printf "\#include <security/pam_appl.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testpam.o - 2>/dev/null && $(CC) $(LDFLAGS) -o testpam testpam.o -lpam 2>/dev/null && rm testpam testpam.o && echo true||echo false)
|
||||||
ifeq ($(PAM_CHECK), true)
|
ifeq ($(PAM_CHECK), true)
|
||||||
PLUGINS += PamAuth
|
PLUGINS += PamAuth
|
||||||
endif
|
endif
|
||||||
|
|||||||
+3
-3
@@ -31,20 +31,20 @@ COMPATLIBS =
|
|||||||
MAKEFILE = Makefile.Solaris
|
MAKEFILE = Makefile.Solaris
|
||||||
PLUGINS = StringsPlugin TrafficPlugin TransparentPlugin FilePlugin
|
PLUGINS = StringsPlugin TrafficPlugin TransparentPlugin FilePlugin
|
||||||
|
|
||||||
WOLFSSL_CHECK = $(shell echo "\#include <wolfssl/options.h>\\n\#include <wolfssl/openssl/ssl.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testwssl.o - 2>/dev/null && $(CC) $(LDFLAGS) -o testwssl testwssl.o -lwolfssl 2>/dev/null && rm testwssl testwssl.o && echo true||echo false)
|
WOLFSSL_CHECK = $(shell printf "\#include <wolfssl/options.h>\\n\#include <wolfssl/openssl/ssl.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testwssl.o - 2>/dev/null && $(CC) $(LDFLAGS) -o testwssl testwssl.o -lwolfssl 2>/dev/null && rm testwssl testwssl.o && echo true||echo false)
|
||||||
ifeq ($(WOLFSSL_CHECK), true)
|
ifeq ($(WOLFSSL_CHECK), true)
|
||||||
LIBS += -lwolfssl
|
LIBS += -lwolfssl
|
||||||
CFLAGS += -DWITH_SSL -DWITH_WOLFSSL
|
CFLAGS += -DWITH_SSL -DWITH_WOLFSSL
|
||||||
SSL_OBJS = ssllib$(OBJSUFFICS) ssl$(OBJSUFFICS)
|
SSL_OBJS = ssllib$(OBJSUFFICS) ssl$(OBJSUFFICS)
|
||||||
else
|
else
|
||||||
OPENSSL_CHECK = $(shell echo "\#include <openssl/ssl.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testssl.o - 2>/dev/null && $(CC) $(LDFLAGS) -o testssl testssl.o -lcrypto -lssl 2>/dev/null && rm testssl testssl.o && echo true||echo false)
|
OPENSSL_CHECK = $(shell printf "\#include <openssl/ssl.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testssl.o - 2>/dev/null && $(CC) $(LDFLAGS) -o testssl testssl.o -lcrypto -lssl 2>/dev/null && rm testssl testssl.o && echo true||echo false)
|
||||||
ifeq ($(OPENSSL_CHECK), true)
|
ifeq ($(OPENSSL_CHECK), true)
|
||||||
LIBS += -l crypto -l ssl
|
LIBS += -l crypto -l ssl
|
||||||
CFLAGS += -DWITH_SSL
|
CFLAGS += -DWITH_SSL
|
||||||
SSL_OBJS = ssllib$(OBJSUFFICS) ssl$(OBJSUFFICS)
|
SSL_OBJS = ssllib$(OBJSUFFICS) ssl$(OBJSUFFICS)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
PCRE_CHECK = $(shell echo "\#define PCRE2_CODE_UNIT_WIDTH 8\\n\#include <pcre2.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testpcre.o - 2>/dev/null && $(CC) -o testpcre testpcre.o $(LDFLAGS) -Wl,-Bstatic -lpcre2-8 -Wl,-Bdynamic 2>/dev/null && rm testpcre testpcre.o && echo true||echo false)
|
PCRE_CHECK = $(shell printf "\#define PCRE2_CODE_UNIT_WIDTH 8\\n\#include <pcre2.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testpcre.o - 2>/dev/null && $(CC) -o testpcre testpcre.o $(LDFLAGS) -Wl,-Bstatic -lpcre2-8 -Wl,-Bdynamic 2>/dev/null && rm testpcre testpcre.o && echo true||echo false)
|
||||||
ifeq ($(PCRE_CHECK), true)
|
ifeq ($(PCRE_CHECK), true)
|
||||||
CFLAGS += -DWITH_PCRE
|
CFLAGS += -DWITH_PCRE
|
||||||
PCRE_OBJS = pcre$(OBJSUFFICS)
|
PCRE_OBJS = pcre$(OBJSUFFICS)
|
||||||
|
|||||||
+4
-4
@@ -54,14 +54,14 @@ ifeq ($(LIBSTATIC), true)
|
|||||||
STATIC_SUFFIX = -Wl,-Bdynamic
|
STATIC_SUFFIX = -Wl,-Bdynamic
|
||||||
ZLIB = -lz -lzstd
|
ZLIB = -lz -lzstd
|
||||||
endif
|
endif
|
||||||
WOLFSSL_CHECK ?= $(shell echo "\#include <wolfssl/options.h>\\n\#include <wolfssl/openssl/ssl.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testwssl.o - 2>/dev/null && $(CC) $(LDFLAGS) -otestwssl testwssl.o $(STATIC_PREFIX) -lwolfssl $(STATIC_SUFFIX) 2>/dev/null && rm testwssl testwssl.o && echo true||echo false)
|
WOLFSSL_CHECK ?= $(shell printf "\#include <wolfssl/options.h>\\n\#include <wolfssl/openssl/ssl.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testwssl.o - 2>/dev/null && $(CC) $(LDFLAGS) -otestwssl testwssl.o $(STATIC_PREFIX) -lwolfssl $(STATIC_SUFFIX) 2>/dev/null && rm testwssl testwssl.o && echo true||echo false)
|
||||||
ifeq ($(WOLFSSL_CHECK), true)
|
ifeq ($(WOLFSSL_CHECK), true)
|
||||||
LIBS += $(STATIC_PREFIX) -lwolfssl $(STATIC_SUFFIX)
|
LIBS += $(STATIC_PREFIX) -lwolfssl $(STATIC_SUFFIX)
|
||||||
CFLAGS += -DWITH_SSL -DWITH_WOLFSSL
|
CFLAGS += -DWITH_SSL -DWITH_WOLFSSL
|
||||||
SSL_OBJS = ssllib$(OBJSUFFICS) ssl$(OBJSUFFICS)
|
SSL_OBJS = ssllib$(OBJSUFFICS) ssl$(OBJSUFFICS)
|
||||||
ZLIB :=
|
ZLIB :=
|
||||||
else
|
else
|
||||||
OPENSSL_CHECK ?= $(shell echo "\#include <openssl/ssl.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testssl.o - 2>/dev/null && $(CC) $(LDFLAGS) -otestssl testssl.o $(STATIC_PREFIX) $(ZLIB) -lcrypto -lssl $(STATIC_SUFFIX) 2>/dev/null && rm testssl testssl.o && echo true||echo false)
|
OPENSSL_CHECK ?= $(shell printf "\#include <openssl/ssl.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testssl.o - 2>/dev/null && $(CC) $(LDFLAGS) -otestssl testssl.o $(STATIC_PREFIX) $(ZLIB) -lcrypto -lssl $(STATIC_SUFFIX) 2>/dev/null && rm testssl testssl.o && echo true||echo false)
|
||||||
ifeq ($(OPENSSL_CHECK), true)
|
ifeq ($(OPENSSL_CHECK), true)
|
||||||
LIBS += $(STATIC_PREFIX) $(ZLIB) -lcrypto -lssl $(STATIC_SUFFIX)
|
LIBS += $(STATIC_PREFIX) $(ZLIB) -lcrypto -lssl $(STATIC_SUFFIX)
|
||||||
CFLAGS += -DWITH_SSL
|
CFLAGS += -DWITH_SSL
|
||||||
@@ -70,13 +70,13 @@ else
|
|||||||
ZLIB :=
|
ZLIB :=
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
PCRE_CHECK ?= $(shell echo "\#define PCRE2_CODE_UNIT_WIDTH 8\\n\#include <pcre2.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testpcre.o - 2>/dev/null && $(CC) -o testpcre testpcre.o $(LDFLAGS) $(STATIC_PREFIX) -lpcre2-8 $(STATIC_SUFFIX) 2>/dev/null && rm testpcre testpcre.o && echo true||echo false)
|
PCRE_CHECK ?= $(shell printf "\#define PCRE2_CODE_UNIT_WIDTH 8\\n\#include <pcre2.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testpcre.o - 2>/dev/null && $(CC) -o testpcre testpcre.o $(LDFLAGS) $(STATIC_PREFIX) -lpcre2-8 $(STATIC_SUFFIX) 2>/dev/null && rm testpcre testpcre.o && echo true||echo false)
|
||||||
ifeq ($(PCRE_CHECK), true)
|
ifeq ($(PCRE_CHECK), true)
|
||||||
CFLAGS += -DWITH_PCRE
|
CFLAGS += -DWITH_PCRE
|
||||||
PCRE_OBJS = pcre$(OBJSUFFICS)
|
PCRE_OBJS = pcre$(OBJSUFFICS)
|
||||||
PCRE_LIBS = $(STATIC_PREFIX) -lpcre2-8 $(STATIC_SUFFIX)
|
PCRE_LIBS = $(STATIC_PREFIX) -lpcre2-8 $(STATIC_SUFFIX)
|
||||||
endif
|
endif
|
||||||
PAM_CHECK ?= $(shell echo "\#include <security/pam_appl.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testpam.o - 2>/dev/null && $(CC) $(LDFLAGS) -o testpam testpam.o -lpam 2>/dev/null && rm testpam testpam.o && echo true||echo false)
|
PAM_CHECK ?= $(shell printf "\#include <security/pam_appl.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testpam.o - 2>/dev/null && $(CC) $(LDFLAGS) -o testpam testpam.o -lpam 2>/dev/null && rm testpam testpam.o && echo true||echo false)
|
||||||
ifeq ($(PAM_CHECK), true)
|
ifeq ($(PAM_CHECK), true)
|
||||||
PLUGINS += PamAuth
|
PLUGINS += PamAuth
|
||||||
endif
|
endif
|
||||||
|
|||||||
+4
-4
@@ -47,14 +47,14 @@ ifeq ($(LIBSTATIC), true)
|
|||||||
STATIC_SUFFIX = -Wl,-Bdynamic
|
STATIC_SUFFIX = -Wl,-Bdynamic
|
||||||
ZLIB = -lz
|
ZLIB = -lz
|
||||||
endif
|
endif
|
||||||
WOLFSSL_CHECK = $(shell echo "\#include <wolfssl/options.h>\\n\#include <wolfssl/openssl/ssl.h>\\n int main(){return 0;}" | tr -d '\\\\' | $(CC) -x c $(CFLAGS) $(LDFLAGS) $(STATIC_PREFIX) -lwolfssl $(STATIC_SUFFIX) -o testwssl - 2>/dev/null && rm testwssl && echo true||echo false)
|
WOLFSSL_CHECK = $(shell printf "\#include <wolfssl/options.h>\\n\#include <wolfssl/openssl/ssl.h>\\n int main(){return 0;}" | tr -d '\\\\' | $(CC) -x c $(CFLAGS) $(LDFLAGS) $(STATIC_PREFIX) -lwolfssl $(STATIC_SUFFIX) -o testwssl - 2>/dev/null && rm testwssl && echo true||echo false)
|
||||||
ifeq ($(WOLFSSL_CHECK), true)
|
ifeq ($(WOLFSSL_CHECK), true)
|
||||||
LIBS += $(STATIC_PREFIX) -lwolfssl $(STATIC_SUFFIX) -lws2_32
|
LIBS += $(STATIC_PREFIX) -lwolfssl $(STATIC_SUFFIX) -lws2_32
|
||||||
CFLAGS += -DWITH_SSL -DWITH_WOLFSSL
|
CFLAGS += -DWITH_SSL -DWITH_WOLFSSL
|
||||||
SSL_OBJS = ssllib$(OBJSUFFICS) ssl$(OBJSUFFICS)
|
SSL_OBJS = ssllib$(OBJSUFFICS) ssl$(OBJSUFFICS)
|
||||||
ZLIB :=
|
ZLIB :=
|
||||||
else
|
else
|
||||||
OPENSSL_CHECK = $(shell echo "\#include <openssl/ssl.h>\\n int main(){return 0;}" | tr -d '\\\\' | $(CC) -x c $(CFLAGS) $(LDFLAGS) $(STATIC_PREFIX) $(ZLIB) -l crypto -l ssl $(STATIC_SUFFIX) -o testssl - 2>/dev/null && rm testssl && echo true||echo false)
|
OPENSSL_CHECK = $(shell printf "\#include <openssl/ssl.h>\\n int main(){return 0;}" | tr -d '\\\\' | $(CC) -x c $(CFLAGS) $(LDFLAGS) $(STATIC_PREFIX) $(ZLIB) -l crypto -l ssl $(STATIC_SUFFIX) -o testssl - 2>/dev/null && rm testssl && echo true||echo false)
|
||||||
ifeq ($(OPENSSL_CHECK), true)
|
ifeq ($(OPENSSL_CHECK), true)
|
||||||
LIBS += $(STATIC_PREFIX) $(ZLIB) -l crypto -l ssl $(STATIC_SUFFIX) -lcrypt32
|
LIBS += $(STATIC_PREFIX) $(ZLIB) -l crypto -l ssl $(STATIC_SUFFIX) -lcrypt32
|
||||||
CFLAGS += -DWITH_SSL
|
CFLAGS += -DWITH_SSL
|
||||||
@@ -63,11 +63,11 @@ else
|
|||||||
ZLIB :=
|
ZLIB :=
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
PAM_CHECK = $(shell echo "\#include <security/pam_appl.h>\\n int main(){return 0;}" | tr -d '\\\\' | $(CC) -x c $(CFLAGS) $(LDFLAGS) -l pam -o testpam - 2>/dev/null && rm testpam && echo true||echo false)
|
PAM_CHECK = $(shell printf "\#include <security/pam_appl.h>\\n int main(){return 0;}" | tr -d '\\\\' | $(CC) -x c $(CFLAGS) $(LDFLAGS) -l pam -o testpam - 2>/dev/null && rm testpam && echo true||echo false)
|
||||||
ifeq ($(PAM_CHECK), true)
|
ifeq ($(PAM_CHECK), true)
|
||||||
PLUGINS += PamAuth
|
PLUGINS += PamAuth
|
||||||
endif
|
endif
|
||||||
PCRE_CHECK = $(shell echo "\#define PCRE2_CODE_UNIT_WIDTH 8\\n#include <pcre2.h>\\n int main(){return 0;}" | tr -d '\\\\' | $(CC) -x c $(CFLAGS) $(LDFLAGS) $(STATIC_PREFIX) -lpcre2-8 $(STATIC_SUFFIX) -o testpcre - 2>/dev/null && rm testpcre && echo true||echo false)
|
PCRE_CHECK = $(shell printf "\#define PCRE2_CODE_UNIT_WIDTH 8\\n#include <pcre2.h>\\n int main(){return 0;}" | tr -d '\\\\' | $(CC) -x c $(CFLAGS) $(LDFLAGS) $(STATIC_PREFIX) -lpcre2-8 $(STATIC_SUFFIX) -o testpcre - 2>/dev/null && rm testpcre && echo true||echo false)
|
||||||
ifeq ($(PCRE_CHECK), true)
|
ifeq ($(PCRE_CHECK), true)
|
||||||
CFLAGS += -DWITH_PCRE
|
CFLAGS += -DWITH_PCRE
|
||||||
PCRE_OBJS = pcre$(OBJSUFFICS)
|
PCRE_OBJS = pcre$(OBJSUFFICS)
|
||||||
|
|||||||
@@ -6,13 +6,52 @@
|
|||||||
|
|
||||||
### Branches
|
### Branches
|
||||||
|
|
||||||
- **Master** (stable) branch - 3proxy 0.9
|
- **Master** (current/latest) branch - 3proxy 1.0
|
||||||
- **Devel** branch - 3proxy 10 (don't use it)
|
- **0.9** (LTS) branch - 3proxy 0.9.9.x
|
||||||
|
- **Devel** branch - 3proxy 2.0-devel (don't use it)
|
||||||
|
|
||||||
### Binaries (deb / rpm / Windows zip)
|
### Binaries (deb / rpm / Windows zip)
|
||||||
|
|
||||||
https://github.com/3proxy/3proxy/releases
|
https://github.com/3proxy/3proxy/releases
|
||||||
|
|
||||||
|
### Package repository (apt / dnf)
|
||||||
|
|
||||||
|
Signed apt and dnf repositories are published at https://3proxy.org/repo/ in
|
||||||
|
two channels: `current` (master) and `lts` (0.9 branch).
|
||||||
|
|
||||||
|
Debian 12 and Ubuntu 22.04 or newer:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo curl -fsSL https://3proxy.org/repo/3proxy-release-key.asc \
|
||||||
|
-o /usr/share/keyrings/3proxy.asc
|
||||||
|
sudo tee /etc/apt/sources.list.d/3proxy.sources <<EOF
|
||||||
|
Types: deb
|
||||||
|
URIs: https://3proxy.org/repo/deb
|
||||||
|
Suites: current
|
||||||
|
Components: main
|
||||||
|
Signed-By: /usr/share/keyrings/3proxy.asc
|
||||||
|
EOF
|
||||||
|
sudo apt update && sudo apt install 3proxy
|
||||||
|
```
|
||||||
|
|
||||||
|
AlmaLinux, RHEL, Rocky and CentOS Stream 8, 9 and 10:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo tee /etc/yum.repos.d/3proxy.repo <<EOF
|
||||||
|
[3proxy]
|
||||||
|
name=3proxy
|
||||||
|
baseurl=https://3proxy.org/repo/rpm/current/el\$releasever/\$basearch/
|
||||||
|
enabled=1
|
||||||
|
gpgcheck=1
|
||||||
|
repo_gpgcheck=1
|
||||||
|
gpgkey=https://3proxy.org/repo/3proxy-release-key.asc
|
||||||
|
EOF
|
||||||
|
sudo dnf install 3proxy
|
||||||
|
```
|
||||||
|
|
||||||
|
Both the packages and the repository metadata are signed. See
|
||||||
|
https://3proxy.org/repo/ for the `lts` channel and for release key details.
|
||||||
|
|
||||||
### Docker images
|
### Docker images
|
||||||
|
|
||||||
https://hub.docker.com/r/3proxy/3proxy
|
https://hub.docker.com/r/3proxy/3proxy
|
||||||
@@ -29,7 +68,9 @@ Documentation (man pages and HTML) available with download, on https://3proxy.or
|
|||||||
|
|
||||||
## Docker images
|
## Docker images
|
||||||
|
|
||||||
3 docker configurations are provided, default (full) also tagged as `:latest`, `:busybox` and `:minimal`, all refer to newest stable version. Except busybox, images are distroless and contain only binaries, you can not sh inside the container. `:busybox` contains busybox shell.
|
3 docker configurations are provided, default (full) also tagged as `:latest`, `:busybox` and `:minimal`, all refer to newest stable version. Except busybox, images are distroless and contain only binaries, you can not sh inside the container. `:busybox` contains busybox shell. Images are based on current (master) branch.
|
||||||
|
|
||||||
|
Images marked as LTS (`:lts`, `:lts-busybox`, `:lts-minimal`) are built from LTS branch (0.9.9.x)
|
||||||
|
|
||||||
### Default image (`:latest`):
|
### Default image (`:latest`):
|
||||||
|
|
||||||
|
|||||||
+64
@@ -0,0 +1,64 @@
|
|||||||
|
# Security Policy
|
||||||
|
|
||||||
|
## Supported Versions
|
||||||
|
|
||||||
|
| Version | Supported |
|
||||||
|
| ------- | ------------------ |
|
||||||
|
| 0.9.8 | :white_check_mark: |
|
||||||
|
| < 0.9.8 | :x: |
|
||||||
|
|
||||||
|
## Reporting a Vulnerability
|
||||||
|
|
||||||
|
Report to 3proxy@3proxy.org or via [GitHub security reporting](https://github.com/3proxy/3proxy/security)
|
||||||
|
|
||||||
|
For High/Critical patched version is released within 2 weeks
|
||||||
|
|
||||||
|
## Verifying downloads
|
||||||
|
|
||||||
|
Release binaries are published with SHA256 checksums, an OpenPGP signature and
|
||||||
|
a GitHub build provenance attestation.
|
||||||
|
|
||||||
|
The release signing key is `3proxy-release-key.asc` in the root of this
|
||||||
|
repository, an RSA-4096 key:
|
||||||
|
|
||||||
|
```
|
||||||
|
pub rsa4096 2026-08-21 [SC]
|
||||||
|
FC12 2144 99FC C7BA 1CFF 6CDC 0312 384E 3A73 940B
|
||||||
|
uid 3proxy release signing <3proxy@3proxy.org>
|
||||||
|
```
|
||||||
|
|
||||||
|
Import it once:
|
||||||
|
|
||||||
|
```
|
||||||
|
gpg --import 3proxy-release-key.asc
|
||||||
|
```
|
||||||
|
|
||||||
|
Checksums and the checksum file signature:
|
||||||
|
|
||||||
|
```
|
||||||
|
gpg --verify SHA256SUMS-x86_64.asc SHA256SUMS-x86_64
|
||||||
|
sha256sum -c SHA256SUMS-x86_64
|
||||||
|
```
|
||||||
|
|
||||||
|
RPM packages are signed, the signature is checked by rpm itself:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo rpm --import 3proxy-release-key.asc
|
||||||
|
rpm -K 3proxy-0.9.9.x86_64.rpm
|
||||||
|
```
|
||||||
|
|
||||||
|
DEB packages are published with a detached signature:
|
||||||
|
|
||||||
|
```
|
||||||
|
gpg --verify 3proxy-0.9.9.x86_64.deb.asc 3proxy-0.9.9.x86_64.deb
|
||||||
|
```
|
||||||
|
|
||||||
|
Build provenance (which workflow, commit and runner produced the file) is
|
||||||
|
verified with the GitHub CLI:
|
||||||
|
|
||||||
|
```
|
||||||
|
gh attestation verify 3proxy-0.9.9.x86_64.rpm --owner 3proxy
|
||||||
|
gh attestation verify oci://docker.io/3proxy/3proxy:latest --owner 3proxy
|
||||||
|
```
|
||||||
|
|
||||||
|
Windows binaries are Authenticode signed in addition to the above.
|
||||||
Vendored
+12
@@ -1,3 +1,15 @@
|
|||||||
|
3proxy (1.0.0-1) buster; urgency=medium
|
||||||
|
|
||||||
|
*3proxy 1.0.0 initial build
|
||||||
|
|
||||||
|
-- z3APA3A <3apa3a@3proxy.org> Sat, 22 Aug 2026 12:13:00 +0000
|
||||||
|
|
||||||
|
3proxy (0.9.9-1) buster; urgency=medium
|
||||||
|
|
||||||
|
*3proxy 0.9.9 initial build
|
||||||
|
|
||||||
|
-- z3APA3A <3apa3a@3proxy.org> Thu, 20 Aug 2026 18:29:37 +0300
|
||||||
|
|
||||||
3proxy (0.9.8-1) buster; urgency=medium
|
3proxy (0.9.8-1) buster; urgency=medium
|
||||||
|
|
||||||
*3proxy 0.9.8 initial build
|
*3proxy 0.9.8 initial build
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
! Fix: DNS replies are validated now: a reply from an address other than the nameserver the query was sent to, and a reply with a question section not matching the query, are dropped; both were accepted before
|
||||||
|
! Fix: socket leak with SOCKSv5 UDP ASSOCIATE through a parent proxy, sockets were accumulated in CLOSE_WAIT state until descriptors ran out
|
||||||
|
! Fix: file descriptor leak in HTTP proxy on the ftp:// request path
|
||||||
|
! Fix: crash with illegal instruction on some platforms (e.g. some musl based Linux builds), caused by a memcpy on overlapping buffers
|
||||||
|
! Fix: extip and ha (HAProxy PROXY protocol) parents are applied to SOCKSv5 UDP ASSOCIATE now
|
||||||
|
! Fix: only socks5 and socks5+ parents are tried for UDP ASSOCIATE, other parent types can not be used for UDP
|
||||||
|
! Fix: udppm through a SOCKSv5 parent did not work
|
||||||
|
! Fix: -Ne and -Ni options were never applied, the option letter was not parsed; -Ne is not applied to the UDP ASSOCIATE reply anymore, -Ni is applied to it
|
||||||
|
! Fix: -4 / -6 handling for UDP in socks; a single UDP association can use both IPv4 and IPv6 destinations now
|
||||||
|
! Fix: a datagram with a null destination address is dropped now
|
||||||
|
! Fix: DNS over TCP: a reply which did not fit a single read was never processed
|
||||||
|
! Documentation: "How to apply ACLs to UDP traffic" added to HOWTO; authentication cache, ACL and UDP notes added to "Optimizing 3proxy for High Load" and to security recommendations
|
||||||
|
+ SOCKSv5 UDP: the destination of every datagram is authorized, so ACLs limiting the destination address, host name or port apply to UDP traffic now; the parent proxy and the external address are selected for the destination of the datagram and not for the UDP ASSOCIATE request
|
||||||
|
+ socks: -U option to control what happens when the destination changes within an UDP association: log it, authorize it, both (default) or neither
|
||||||
|
+ -C option (for TCP services) to terminate the session as soon as any of the sides closes the connection; by default the session is kept until both sides close it (TCP half-close)
|
||||||
|
+ timeouts: LINGER value added (11th, default 5), used to deliver buffered data after one of the sides has closed its sending side and as SO_LINGER value on outgoing connections
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
No changes in 3proxy code, this release only changes how packages are built, signed and published.
|
||||||
|
|
||||||
|
! Fix: TLS, PCRE2 and PAM support was silently left out when 3proxy was built on a system whose /bin/sh is not dash, which is every RPM based distribution and macOS; the library checks built their test program with echo and escape sequences, which only dash expands, so every check failed and the features were dropped without a diagnostic
|
||||||
|
! Fix: rpm packages were built on Ubuntu and required glibc 2.38, libssl.so.3 and libpcre2-8, which no RPM based distribution provides, so they could not be installed anywhere; they are built against AlmaLinux 8, 9 and 10 now and carry an el8, el9 or el10 tag, covering RHEL, AlmaLinux, Rocky and CentOS Stream of the same version
|
||||||
|
! Fix: the rpm package depended on its own interpreter, /bin/3proxy, taken from the first line of the installed configuration file, and could not be installed on el9 or el10 because rpm resolves that dependency to /usr/bin/3proxy
|
||||||
|
! Fix: deb packages required glibc 2.38 and libssl3t64 and installed on Ubuntu 24.04 and newer only; they are built against Ubuntu 22.04 now and install on Ubuntu 22.04 and later as well as Debian 12 and later
|
||||||
|
+ Signed apt and dnf repositories are published at https://3proxy.org/repo/ in two channels: current, built from the master branch, and lts, built from the 0.9 branch; packages and repository metadata are both signed
|
||||||
|
+ Release binaries are published with SHA256 checksums, an OpenPGP signature and a GitHub build provenance attestation; docker images are signed and attested as well
|
||||||
|
+ The release signing key is an RSA-4096 key published as 3proxy-release-key.asc in the repository; rpm 4.14 and earlier can not import an Ed25519 key at all, which would leave RHEL 8 and its derivatives unable to verify anything
|
||||||
|
+ Packages are reproducible: rebuilding a release produces byte identical deb and rpm files, every timestamp is derived from the build date recorded for the release
|
||||||
|
- 32-bit ARM (armhf) is published as a deb package only, Enterprise Linux has no 32-bit ARM build
|
||||||
+174
-6
@@ -428,13 +428,181 @@ use 3proxy's built-in resolver (nserver / nscache / nscache6).
|
|||||||
Public resolvers like those from Google have rate limits. For a large number of
|
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).
|
requests, install a local caching recursor (ISC bind named, PowerDNS recursor, etc).
|
||||||
|
|
||||||
<h4>Avoid Large Lists</h4>
|
<h4>Use the Authentication Cache</h4>
|
||||||
|
|
||||||
Currently, 3proxy is not optimized to use large ACLs, user lists, etc. All lists
|
Authentication and authorization are performed for every request. Password
|
||||||
are processed linearly. In the devel version, you can use RADIUS authentication to avoid
|
lookup itself is a hash lookup and is cheap, but the ACL is walked linearly,
|
||||||
user lists and ACLs in 3proxy itself. Also, RADIUS allows you to easily set an outgoing IP
|
and with RADIUS or plugin authentication every request costs a network round
|
||||||
on a per-user basis or implement more sophisticated logic.
|
trip. 'authcache' keeps the result of a successful authentication for a number
|
||||||
RADIUS is a new beta feature; test it before using it in production.
|
of seconds:
|
||||||
|
<pre>
|
||||||
|
authcache <cachetype> <cachetime> <cachesize>
|
||||||
|
</pre>
|
||||||
|
'cachetype' lists the fields the entry is keyed by, 'cachetime' is the lifetime
|
||||||
|
in seconds, and the optional 'cachesize' limits the number of entries. The
|
||||||
|
cached type must be placed before the real authentication type in the 'auth'
|
||||||
|
command: a cache miss falls through to the next type in the chain, and a hit
|
||||||
|
skips it.
|
||||||
|
|
||||||
|
<p>There are two cached types:
|
||||||
|
<ul>
|
||||||
|
<li>'cache' caches the authentication only; the ACL is still checked on every
|
||||||
|
request. Use it when ACLs must take effect immediately, or when the
|
||||||
|
authentication method returns per-user parameters that the authorization step
|
||||||
|
has to apply.
|
||||||
|
<li>'cacheacl' also caches the authorization result, so the ACL is not walked
|
||||||
|
at all on a hit. This is the one that helps with long ACLs, but the key must
|
||||||
|
cover every field the ACL limits, and it can not be used with redirections.
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p><b>'cacheacl' does not work with parent proxies.</b> Redirections are applied
|
||||||
|
while the ACL is walked, so on a 'cacheacl' hit no redirection happens at all:
|
||||||
|
the request is sent directly instead of through the 'parent' proxy of the
|
||||||
|
matching ACL entry, and nothing is reported. The first request for a given key
|
||||||
|
uses the parent and the rest do not, which makes it look intermittent. Use
|
||||||
|
'cache' with parent proxies:
|
||||||
|
<pre>
|
||||||
|
authcache user,pass 60
|
||||||
|
auth cache strong
|
||||||
|
allow user1
|
||||||
|
parent 1000 socks5 10.0.0.1 1080
|
||||||
|
proxy
|
||||||
|
</pre>
|
||||||
|
The one exception is 'parent ... extip': the external address is stored in the
|
||||||
|
cache entry and restored on a hit, but only if 'ext' is a part of the key:
|
||||||
|
<pre>
|
||||||
|
authcache user,pass,ext 60
|
||||||
|
auth cacheacl strong
|
||||||
|
allow user1
|
||||||
|
parent 1000 extip 1.2.3.4 0
|
||||||
|
proxy
|
||||||
|
</pre>
|
||||||
|
Without 'ext' in the key the external address falls back to the default one on
|
||||||
|
every cache hit.
|
||||||
|
|
||||||
|
<p><b>The key must match the ACL.</b> On a 'cacheacl' hit the cached result is
|
||||||
|
reused as is, so any field the ACL limits but the key does not contain makes
|
||||||
|
the cached result apply to a request it was not computed for. Use 'user' and
|
||||||
|
'pass' for the userlist, 'ip' for the sourcelist, 'dstaddr' and 'dsthost' for
|
||||||
|
the targetlist, 'dstport' for the targetportlist and 'dstoper' for the
|
||||||
|
operationlist. For this ACL:
|
||||||
|
<pre>
|
||||||
|
allow user1,user2 * * 80,443
|
||||||
|
deny *
|
||||||
|
</pre>
|
||||||
|
the key needs 'user', 'pass' and 'dstport':
|
||||||
|
<pre>
|
||||||
|
users $/etc/3proxy/passwd
|
||||||
|
authcache user,pass,dstport 60 65536
|
||||||
|
auth cacheacl strong
|
||||||
|
allow user1,user2 * * 80,443
|
||||||
|
deny *
|
||||||
|
proxy
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<p>With RADIUS the round trip is the expensive part, so cache by whatever
|
||||||
|
identifies the client:
|
||||||
|
<pre>
|
||||||
|
radius secret 1.2.3.4
|
||||||
|
authcache ip,user,pass 600
|
||||||
|
auth cache radius
|
||||||
|
proxy
|
||||||
|
</pre>
|
||||||
|
'cache' rather than 'cacheacl' is used here because RADIUS may return per-user
|
||||||
|
parameters such as the outgoing IP; add 'ext' to the key to cache the external
|
||||||
|
address returned by RADIUS as well.
|
||||||
|
|
||||||
|
<p>Choose 'cachetime' to balance the load against how quickly a password or ACL
|
||||||
|
change has to take effect. Cache entries are <b>not</b> invalidated by a
|
||||||
|
configuration reload, so a long lifetime keeps applying the old decision to
|
||||||
|
existing keys after the new configuration is loaded.
|
||||||
|
|
||||||
|
<p>Note that 'ip' alone, or 'ip,user' without 'pass', assigns every connection
|
||||||
|
from the same address to the same user for the lifetime of the entry without
|
||||||
|
checking the password. That is a deliberate trade-off for high load; do not use
|
||||||
|
it where clients share addresses.
|
||||||
|
|
||||||
|
<h4>Tune UDP Destination Handling with '-U'</h4>
|
||||||
|
|
||||||
|
Within a SOCKSv5 UDP association the destination is taken from every datagram,
|
||||||
|
so 3proxy authorizes and logs every new destination. One association can reach
|
||||||
|
any number of destinations: a DNS forwarder produces one record, but a
|
||||||
|
peer-to-peer or QUIC client can produce hundreds, each costing an authorization
|
||||||
|
(a network round trip with RADIUS or plugin authentication) and a log record.
|
||||||
|
The 'socks' service option '-U' controls this:
|
||||||
|
<pre>
|
||||||
|
socks -U3 # default: log and authorize every new destination
|
||||||
|
socks -U2 # authorize, do not log
|
||||||
|
socks -U1 # log, do not authorize
|
||||||
|
socks -U0 # neither (same as bare -U)
|
||||||
|
</pre>
|
||||||
|
The destination of the first datagram is always authorized and logged, so the
|
||||||
|
association as a whole is still subject to ACLs, authentication and the choice
|
||||||
|
of the parent proxy.
|
||||||
|
|
||||||
|
<p>Before reaching for the option, note that the cost is already avoided when no
|
||||||
|
ACL entry reachable by the client limits the destination: in that case the
|
||||||
|
result can not depend on the destination and no re-authorization is performed
|
||||||
|
whatever '-U' says. '-U' only matters for configurations that do limit the
|
||||||
|
destination.
|
||||||
|
|
||||||
|
<p>For high load:
|
||||||
|
<ul>
|
||||||
|
<li><b>'-U2'</b> is the safe one. Destination ACLs keep working, only the
|
||||||
|
per-destination log records are dropped. Use it when log volume, not CPU, is
|
||||||
|
the problem.
|
||||||
|
<li><b>'-U' ('-U0')</b> removes both costs and is the fastest, but destination
|
||||||
|
ACLs then apply only to the first destination of each association, and the
|
||||||
|
parent proxy and external address chosen for it are kept for the whole
|
||||||
|
association. Use it when UDP destinations are not restricted anyway, or when
|
||||||
|
the restriction is enforced elsewhere (a firewall, or the parent proxy).
|
||||||
|
<li>Keep the default '-U3' when destination ACLs are a security boundary, and
|
||||||
|
make the authorization itself cheap with 'authcache' instead, see "Use the
|
||||||
|
Authentication Cache" above.
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h4>Avoid Large ACLs</h4>
|
||||||
|
|
||||||
|
Most of the large data structures are hash tables and scale to a large number of
|
||||||
|
records: the user list loaded by 'users' (including the '$/path/to/file' form),
|
||||||
|
the authentication cache ('authcache'), the DNS cache ('nscache'/'nscache6') and
|
||||||
|
the client table of the UDP portmapper. Their size is not a concern.
|
||||||
|
|
||||||
|
<p>The ACL is the exception and is still processed linearly. Every request walks
|
||||||
|
the access list entry by entry until one matches, and within an entry the
|
||||||
|
userlist, the sourcelist, the targetlist and the targetportlist are walked
|
||||||
|
linearly as well, so the cost is roughly the number of entries multiplied by the
|
||||||
|
size of the lists inside them. The 'bandlimin'/'bandlimout' and
|
||||||
|
'countin'/'countout' rules are separate lists of the same kind and are walked on
|
||||||
|
every request in addition to the access list.
|
||||||
|
|
||||||
|
<p>Two things follow from this:
|
||||||
|
<ul>
|
||||||
|
<li>Order matters. The walk stops at the first matching entry, so put the
|
||||||
|
entries that match most of the traffic first.
|
||||||
|
<li>Prefer fewer, wider entries over many narrow ones. One entry with a long
|
||||||
|
userlist is cheaper than one entry per user, because the outer walk is repeated
|
||||||
|
for every entry while the inner list is only walked for entries that got that
|
||||||
|
far.
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>With a large ACL, cache the authorization result instead of shortening the
|
||||||
|
list. 'cacheacl' walks the ACL once per cache entry rather than once per
|
||||||
|
request:
|
||||||
|
<pre>
|
||||||
|
users $/etc/3proxy/passwd
|
||||||
|
authcache user,pass,dstaddr,dstport 60 65536
|
||||||
|
auth cacheacl strong
|
||||||
|
</pre>
|
||||||
|
Both limitations from "Use the Authentication Cache" above apply: the cache key
|
||||||
|
must contain every field the ACL limits, and 'cacheacl' must not be used
|
||||||
|
together with parent proxies. Where a parent proxy is required, plain 'cache'
|
||||||
|
still removes the authentication cost but leaves the ACL walk on every request.
|
||||||
|
|
||||||
|
<p>RADIUS moves the user list and the ACLs out of 3proxy entirely, and also
|
||||||
|
allows you to set an outgoing IP on a per-user basis or to implement more
|
||||||
|
sophisticated logic. RADIUS is a new beta feature; test it before using it in
|
||||||
|
production.
|
||||||
|
|
||||||
<h4>Avoid Changing Configuration Too Often</h4>
|
<h4>Avoid Changing Configuration Too Often</h4>
|
||||||
|
|
||||||
|
|||||||
@@ -1338,6 +1338,82 @@ the second hop is 192.168.20.1, and the 3rd one is either 192.168.30.1 with a pr
|
|||||||
of 30% or 192.168.40.1 with a probability of 70%.
|
of 30% or 192.168.40.1 with a probability of 70%.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<li><a name="UDPACL">How to apply ACLs to UDP traffic</a>
|
||||||
|
<p>
|
||||||
|
A SOCKSv5 UDP ASSOCIATE request only asks 3proxy to open a relay port, it
|
||||||
|
carries no destination. The destination is taken from every datagram the client
|
||||||
|
sends afterwards, so a single association may reach any number of destinations.
|
||||||
|
3proxy authorizes the destination of every datagram, so ACLs limiting the
|
||||||
|
destination address, host name or port do apply to UDP traffic.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Differences from TCP:
|
||||||
|
</p>
|
||||||
|
<ul>
|
||||||
|
<li>A datagram to a denied destination is dropped, the association is not
|
||||||
|
terminated.
|
||||||
|
<li>The parent proxy and the external address are selected for the destination
|
||||||
|
of the datagram and not for the ASSOCIATE request, and are re-established if a
|
||||||
|
later destination selects another ACL entry. Only <code>socks5</code> and
|
||||||
|
<code>socks5+</code> parents can be used for UDP.
|
||||||
|
<li>ACLs are checked for the datagrams sent by the client only. A datagram
|
||||||
|
received on the association is relayed to the client without an ACL check: with
|
||||||
|
a parent proxy only the datagrams from the parent are accepted, an association
|
||||||
|
without a parent accepts a datagram from any source. The source reported to the
|
||||||
|
client is the actual source of the datagram. The address in the log record is the destination the
|
||||||
|
client sent the datagrams to, the source of the received datagrams is not
|
||||||
|
logged.
|
||||||
|
<li>A client may use a single association to reach many destinations. An ACL
|
||||||
|
entry which limits the destination silently drops the datagrams to every other
|
||||||
|
destination, so limiting the destination of UDP traffic can break such clients
|
||||||
|
in a way which is hard to diagnose. Limit it only when it is really required.
|
||||||
|
<li>Bandwidth limiters and traffic counters which limit the destination are
|
||||||
|
selected when the destination is authorized, so they are selected for the
|
||||||
|
destination of the first datagram and are not re-selected for every following
|
||||||
|
destination. They can not be applied per destination to incoming UDP traffic at
|
||||||
|
all.
|
||||||
|
<li>Every change of the destination host name, address or port is authorized
|
||||||
|
again and logged. Use <code>nscache</code> for host names and the
|
||||||
|
authentication cache for anything more expensive than 'iponly'. The
|
||||||
|
<code>-U</code> option of the <code>socks</code> service turns the logging
|
||||||
|
and/or the re-authorization off; with <code>-U0</code> or <code>-U1</code>
|
||||||
|
only the first destination of an association is authorized.
|
||||||
|
</ul>
|
||||||
|
<p>
|
||||||
|
Limit the destinations a client may send datagrams to:
|
||||||
|
</p><pre>
|
||||||
|
auth iponly
|
||||||
|
allow * * 8.8.8.8 53
|
||||||
|
deny *
|
||||||
|
socks -p1080
|
||||||
|
</pre>
|
||||||
|
<p>
|
||||||
|
The ASSOCIATE request succeeds, datagrams to 8.8.8.8:53 are relayed, datagrams
|
||||||
|
to any other destination are dropped.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
The same with 'strong' (or RADIUS, or plugin) authentication, where every new
|
||||||
|
destination would otherwise be authenticated again:
|
||||||
|
</p><pre>
|
||||||
|
users user1:CL:password
|
||||||
|
authcache user,pass,dstaddr,dstport 60
|
||||||
|
auth cacheacl strong
|
||||||
|
allow user1 * 8.8.8.8 53
|
||||||
|
deny *
|
||||||
|
socks -p1080
|
||||||
|
</pre>
|
||||||
|
<p>
|
||||||
|
With 'cacheacl' the ACL result is not re-evaluated on a cache hit, so every
|
||||||
|
field the ACL limits must be a part of the cache key: 'user' and 'pass' for the
|
||||||
|
userlist, 'dstaddr' and 'dstport' for the targetlist and the targetportlist,
|
||||||
|
'ip' for the sourcelist, 'dsthost' for host names in the targetlist, 'dstoper'
|
||||||
|
for the operationlist. Without the destination in the key the result cached for
|
||||||
|
one destination is applied to any other destination and the destination is not
|
||||||
|
checked at all. Use plain 'cache' instead of 'cacheacl' if ACLs may change
|
||||||
|
during the cache lifetime, or if a parent proxy is used: on a 'cacheacl' hit
|
||||||
|
the ACL is not walked, so no parent proxy is selected and datagrams are sent
|
||||||
|
directly.
|
||||||
|
</p>
|
||||||
<li><A NAME="BANDLIM">How to limit bandwidth</a>
|
<li><A NAME="BANDLIM">How to limit bandwidth</a>
|
||||||
<p>
|
<p>
|
||||||
3proxy supports bandwidth filters. Use the bandlimin/bandlimout and
|
3proxy supports bandwidth filters. Use the bandlimin/bandlimout and
|
||||||
|
|||||||
@@ -1371,6 +1371,85 @@ pcre_extend deny * 192.168.0.1/16
|
|||||||
192.168.10.1, второе - 192.168.20.1, а третье - либо 192.168.30.1 с
|
192.168.10.1, второе - 192.168.20.1, а третье - либо 192.168.30.1 с
|
||||||
вероятностью 0.3 либо 192.168.40.1 с вероятностью 0.7
|
вероятностью 0.3 либо 192.168.40.1 с вероятностью 0.7
|
||||||
</p>
|
</p>
|
||||||
|
<li><a name="UDPACL"><i>Как применять ACL к UDP трафику</i></a>
|
||||||
|
<p>
|
||||||
|
Запрос SOCKSv5 UDP ASSOCIATE лишь просит 3proxy открыть порт для ретрансляции
|
||||||
|
и не содержит адреса назначения. Адрес назначения берется из каждой
|
||||||
|
датаграммы, отправленной клиентом, поэтому одна ассоциация может обращаться
|
||||||
|
к любому числу адресов назначения. 3proxy авторизует адрес назначения каждой
|
||||||
|
датаграммы, поэтому ACL, ограничивающие адрес, имя хоста или порт
|
||||||
|
назначения, применяются и к UDP трафику.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Отличия от TCP:
|
||||||
|
</p>
|
||||||
|
<ul>
|
||||||
|
<li>Датаграмма к запрещенному адресу назначения отбрасывается, ассоциация
|
||||||
|
при этом не завершается.
|
||||||
|
<li>Вышестоящий прокси и внешний адрес выбираются для адреса назначения
|
||||||
|
датаграммы, а не для запроса ASSOCIATE, и устанавливаются заново, если
|
||||||
|
последующий адрес назначения соответствует другой записи ACL. Для UDP
|
||||||
|
могут использоваться только родители типа <code>socks5</code> и
|
||||||
|
<code>socks5+</code>.
|
||||||
|
<li>ACL проверяются только для датаграмм, отправленных клиентом. Датаграмма,
|
||||||
|
полученная в рамках ассоциации, передается клиенту без проверки ACL: при
|
||||||
|
использовании вышестоящего прокси принимаются только датаграммы от него, а
|
||||||
|
ассоциация без вышестоящего прокси принимает датаграмму от любого источника.
|
||||||
|
Клиенту сообщается фактический адрес источника датаграммы. В журнал записывается адрес назначения, на который клиент
|
||||||
|
отправлял датаграммы, а не адрес источника полученных датаграмм.
|
||||||
|
<li>Клиент может использовать одну ассоциацию для обращения ко многим адресам
|
||||||
|
назначения. Запись ACL, ограничивающая адрес назначения, молча отбрасывает
|
||||||
|
датаграммы ко всем остальным адресам назначения, поэтому ограничение адреса
|
||||||
|
назначения для UDP может нарушить работу таких клиентов, и причину трудно
|
||||||
|
установить. Ограничивайте его, только если это действительно необходимо.
|
||||||
|
<li>Ограничители полосы и счетчики трафика, ограничивающие адрес назначения,
|
||||||
|
выбираются при авторизации адреса назначения, поэтому они выбираются для
|
||||||
|
адреса назначения первой датаграммы и не выбираются заново для каждого
|
||||||
|
последующего адреса назначения. К входящему UDP трафику они не могут быть
|
||||||
|
применены по адресу назначения вообще.
|
||||||
|
<li>Каждое изменение имени хоста, адреса или порта назначения
|
||||||
|
авторизуется заново и записывается в журнал. Используйте <code>nscache</code>
|
||||||
|
для имен хостов и кэш аутентификации для всего, что дороже 'iponly'. Опция
|
||||||
|
<code>-U</code> сервиса <code>socks</code> отключает журналирование и/или
|
||||||
|
повторную авторизацию; при <code>-U0</code> или <code>-U1</code>
|
||||||
|
авторизуется только первый адрес назначения ассоциации.
|
||||||
|
</ul>
|
||||||
|
<p>
|
||||||
|
Ограничить адреса назначения, куда клиент может отправлять датаграммы:
|
||||||
|
</p><pre>
|
||||||
|
auth iponly
|
||||||
|
allow * * 8.8.8.8 53
|
||||||
|
deny *
|
||||||
|
socks -p1080
|
||||||
|
</pre>
|
||||||
|
<p>
|
||||||
|
Запрос ASSOCIATE выполняется успешно, датаграммы к 8.8.8.8:53 передаются,
|
||||||
|
датаграммы к любому другому адресу назначения отбрасываются.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
То же самое с аутентификацией 'strong' (или RADIUS, или через плагин), при
|
||||||
|
которой иначе каждый новый адрес назначения аутентифицировался бы заново:
|
||||||
|
</p><pre>
|
||||||
|
users user1:CL:password
|
||||||
|
authcache user,pass,dstaddr,dstport 60
|
||||||
|
auth cacheacl strong
|
||||||
|
allow user1 * 8.8.8.8 53
|
||||||
|
deny *
|
||||||
|
socks -p1080
|
||||||
|
</pre>
|
||||||
|
<p>
|
||||||
|
При 'cacheacl' результат проверки ACL не вычисляется заново при попадании
|
||||||
|
в кэш, поэтому каждое поле, ограничиваемое в ACL, должно входить в ключ
|
||||||
|
кэша: 'user' и 'pass' для списка пользователей, 'dstaddr' и 'dstport' для списка
|
||||||
|
адресов и списка портов назначения, 'ip' для списка источников, 'dsthost'
|
||||||
|
для имен хостов в списке назначения, 'dstoper' для списка операций. Без
|
||||||
|
адреса назначения в ключе результат, закэшированный для одного адреса
|
||||||
|
назначения, применяется к любому другому, и адрес назначения не
|
||||||
|
проверяется вообще. Используйте 'cache' вместо 'cacheacl', если ACL могут
|
||||||
|
изменяться в течение времени жизни кэша или если используется вышестоящий
|
||||||
|
прокси: при попадании в кэш 'cacheacl' обход ACL не выполняется, поэтому
|
||||||
|
вышестоящий прокси не выбирается и датаграммы отправляются напрямую.
|
||||||
|
</p>
|
||||||
<li><a name="BANDLIM"><i>Как ограничивать скорости приема</i></a>
|
<li><a name="BANDLIM"><i>Как ограничивать скорости приема</i></a>
|
||||||
<p>
|
<p>
|
||||||
3proxy позволяет устанавливать фильтры ширины потребляемого канала. Для этого
|
3proxy позволяет устанавливать фильтры ширины потребляемого канала. Для этого
|
||||||
|
|||||||
+1
-1
@@ -5,8 +5,8 @@
|
|||||||
<a href="howtor.html">How To (Russian)</a><br>
|
<a href="howtor.html">How To (Russian)</a><br>
|
||||||
<a href="devref.html">Developer reference</a><br>
|
<a href="devref.html">Developer reference</a><br>
|
||||||
<h3>Man pages:</h3>
|
<h3>Man pages:</h3>
|
||||||
<br><A HREF="man8/3proxy_crypt.8.html">3proxy_crypt.8</A>
|
|
||||||
<br><A HREF="man8/3proxy.8.html">3proxy.8</A>
|
<br><A HREF="man8/3proxy.8.html">3proxy.8</A>
|
||||||
|
<br><A HREF="man8/3proxy_crypt.8.html">3proxy_crypt.8</A>
|
||||||
<br><A HREF="man8/ftppr.8.html">ftppr.8</A>
|
<br><A HREF="man8/ftppr.8.html">ftppr.8</A>
|
||||||
<br><A HREF="man8/imapp.8.html">imapp.8</A>
|
<br><A HREF="man8/imapp.8.html">imapp.8</A>
|
||||||
<br><A HREF="man8/pop3p.8.html">pop3p.8</A>
|
<br><A HREF="man8/pop3p.8.html">pop3p.8</A>
|
||||||
|
|||||||
+175
-89
@@ -1,4 +1,4 @@
|
|||||||
<!-- Creator : groff version 1.24.1 -->
|
<!-- Creator : groff version 1.23.0 -->
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>3proxy.cfg</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>3proxy.cfg</b>
|
||||||
3proxy configuration file</p>
|
3proxy configuration file</p>
|
||||||
|
|
||||||
<h2>DESCRIPTION
|
<h2>DESCRIPTION
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Common
|
<p style="margin-left:9%; margin-top: 1em">Common
|
||||||
structure: <br>
|
structure: <br>
|
||||||
Configuration file is a text file 3proxy reads configuration
|
Configuration file is a text file 3proxy reads configuration
|
||||||
from. Each line of the file is a command executed
|
from. Each line of the file is a command executed
|
||||||
@@ -51,12 +51,12 @@ command line. Additional space characters are ignored. Think
|
|||||||
about 3proxy as "application level router" with
|
about 3proxy as "application level router" with
|
||||||
console interface.</p>
|
console interface.</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Comments: <br>
|
<p style="margin-left:9%; margin-top: 1em">Comments: <br>
|
||||||
Any line beginning with a space character or ´#´
|
Any line beginning with a space character or ´#´
|
||||||
character is a comment. It´s ignored. <LF>s are
|
character is a comment. It´s ignored. <LF>s are
|
||||||
ignored. <CR> is the end of a command.</p>
|
ignored. <CR> is the end of a command.</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Quotation: <br>
|
<p style="margin-left:9%; margin-top: 1em">Quotation: <br>
|
||||||
The quotation character is " (double quote). Quotation
|
The quotation character is " (double quote). Quotation
|
||||||
must be used to quote spaces or other special characters. To
|
must be used to quote spaces or other special characters. To
|
||||||
use a quotation character inside a quoted string, the
|
use a quotation character inside a quoted string, the
|
||||||
@@ -65,7 +65,7 @@ to use HELLO "WORLD" as an argument, you should
|
|||||||
write it as "HELLO ""WORLD""".
|
write it as "HELLO ""WORLD""".
|
||||||
Good practice is to quote any argument you use.</p>
|
Good practice is to quote any argument you use.</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">File inclusion:
|
<p style="margin-left:9%; margin-top: 1em">File inclusion:
|
||||||
<br>
|
<br>
|
||||||
You can include file by using $FILENAME macro (replace
|
You can include file by using $FILENAME macro (replace
|
||||||
FILENAME with a path to file, for example
|
FILENAME with a path to file, for example
|
||||||
@@ -80,10 +80,10 @@ commands (like userlist, network lists, etc). To use dollar
|
|||||||
sign somewhere in argument it must be quoted. Recursion is
|
sign somewhere in argument it must be quoted. Recursion is
|
||||||
not allowed.</p>
|
not allowed.</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Next commands
|
<p style="margin-left:9%; margin-top: 1em">Next commands
|
||||||
start gateway services:</p>
|
start gateway services:</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>proxy</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>proxy</b>
|
||||||
[options] <b><br>
|
[options] <b><br>
|
||||||
socks</b> [options] <b><br>
|
socks</b> [options] <b><br>
|
||||||
pop3p</b> [options] <b><br>
|
pop3p</b> [options] <b><br>
|
||||||
@@ -119,7 +119,7 @@ destination, the port number is ignored but must be
|
|||||||
specified for syntax compatibility. <b><br>
|
specified for syntax compatibility. <b><br>
|
||||||
udppm</b> UDP portmapper</p>
|
udppm</b> UDP portmapper</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Options: <b><br>
|
<p style="margin-left:9%; margin-top: 1em">Options: <b><br>
|
||||||
-p</b><i>NUMBER</i> change default server port to NUMBER
|
-p</b><i>NUMBER</i> change default server port to NUMBER
|
||||||
<b><br>
|
<b><br>
|
||||||
-6</b> Only resolve IPv6 addresses. IPv4 addresses are
|
-6</b> Only resolve IPv6 addresses. IPv4 addresses are
|
||||||
@@ -221,7 +221,30 @@ built by default and is disabled even when built, because
|
|||||||
current Linux does not implement SPLICE_F_MOVE, so no real
|
current Linux does not implement SPLICE_F_MOVE, so no real
|
||||||
zero-copy takes place and the read/write path is faster for
|
zero-copy takes place and the read/write path is faster for
|
||||||
most traffic. Rebuild with -DWITHSPLICE to make -s
|
most traffic. Rebuild with -DWITHSPLICE to make -s
|
||||||
available, -s0 disables it explicitly. <br>
|
available, -s0 disables it explicitly. <b><br>
|
||||||
|
-C</b> <br>
|
||||||
|
(for TCP services) a connection closed by any of the sides
|
||||||
|
terminates the session, buffered data is delivered before
|
||||||
|
the sockets are closed. By default the session is kept until
|
||||||
|
both sides close the connection (TCP half-close). Half-close
|
||||||
|
is required for the protocols where one of the sides closes
|
||||||
|
its sending side and expects the answer, but it keeps the
|
||||||
|
socket of the side which has already closed the connection
|
||||||
|
in CLOSE_WAIT state. Use -C to close both sockets as soon as
|
||||||
|
any of the sides closes the connection, -C1 to request the
|
||||||
|
default behaviour explicitly. <b><br>
|
||||||
|
-U</b><i>[MODE]</i> <br>
|
||||||
|
(for socks) what to do when the destination changes within
|
||||||
|
an UDP association: <b>1</b> - log it, <b>2</b> - authorize
|
||||||
|
it, <b>3</b> - both, the default, <b>0</b> (same as bare
|
||||||
|
<b>-U</b>) - neither. The destination of the first datagram
|
||||||
|
is always authorized and logged. With <b>-U0</b> and
|
||||||
|
<b>-U1</b> the destination is not authorized again, so ACLs
|
||||||
|
limiting the destination only apply to the first destination
|
||||||
|
of the association, and the parent proxy and the external
|
||||||
|
address selected for it are kept for the whole association.
|
||||||
|
Use <b>-U2</b> to keep the authorization and to drop the
|
||||||
|
per-destination log records only. <br>
|
||||||
(for dnspr) simple, do not use resolver and 3proxy cache,
|
(for dnspr) simple, do not use resolver and 3proxy cache,
|
||||||
always use external DNS server. <br>
|
always use external DNS server. <br>
|
||||||
(for udppm) singlepacket, expect only one packet from both
|
(for udppm) singlepacket, expect only one packet from both
|
||||||
@@ -263,16 +286,16 @@ FTP client does it for you. That is, if you use 3proxy with
|
|||||||
authentication use proxyuser:proxypassword:FTPuser as FTP
|
authentication use proxyuser:proxypassword:FTPuser as FTP
|
||||||
username, otherwise do not change original FTP user name</p>
|
username, otherwise do not change original FTP user name</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>include</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>include</b>
|
||||||
<i><path></i> <br>
|
<i><path></i> <br>
|
||||||
Include config file</p>
|
Include config file</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>config</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>config</b>
|
||||||
<i><path></i> <br>
|
<i><path></i> <br>
|
||||||
Path to configuration file to use on 3proxy restart or to
|
Path to configuration file to use on 3proxy restart or to
|
||||||
save configuration.</p>
|
save configuration.</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>writable</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>writable</b>
|
||||||
<br>
|
<br>
|
||||||
ReOpens configuration file for write access via Web
|
ReOpens configuration file for write access via Web
|
||||||
interface, and rereads it. Usually should be first command
|
interface, and rereads it. Usually should be first command
|
||||||
@@ -280,10 +303,10 @@ on config file but in combination with config it can be used
|
|||||||
anywhere to open alternate config file. Think twice before
|
anywhere to open alternate config file. Think twice before
|
||||||
using it.</p>
|
using it.</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>end</b> <br>
|
<p style="margin-left:9%; margin-top: 1em"><b>end</b> <br>
|
||||||
End of configuration</p>
|
End of configuration</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>log</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>log</b>
|
||||||
[[@|&]<i>logfile</i>] [<i><LOGTYPE></i>] <br>
|
[[@|&]<i>logfile</i>] [<i><LOGTYPE></i>] <br>
|
||||||
sets logfile for all gateways <br>
|
sets logfile for all gateways <br>
|
||||||
@ (for Unix) use syslog, filename is used as ident name <br>
|
@ (for Unix) use syslog, filename is used as ident name <br>
|
||||||
@@ -309,12 +332,12 @@ with "logformat" filename must begin with
|
|||||||
Grinwitch time zone for all time-based format
|
Grinwitch time zone for all time-based format
|
||||||
specificators.</p>
|
specificators.</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>rotate</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>rotate</b>
|
||||||
<i><n></i> <br>
|
<i><n></i> <br>
|
||||||
how many archived log files to keep</p>
|
how many archived log files to keep</p>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>logformat</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>logformat</b>
|
||||||
<i><format></i> <br>
|
<i><format></i> <br>
|
||||||
Format for log record. First symbol in format must be L
|
Format for log record. First symbol in format must be L
|
||||||
(local time) or G (absolute Grinwitch time). It can be
|
(local time) or G (absolute Grinwitch time). It can be
|
||||||
@@ -326,7 +349,7 @@ logformat means comma and percent are replaced with space
|
|||||||
and all time based elemnts are in local time zone. <br>
|
and all time based elemnts are in local time zone. <br>
|
||||||
You can use:</p>
|
You can use:</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">%y Year in 2
|
<p style="margin-left:9%; margin-top: 1em">%y Year in 2
|
||||||
digit format <br>
|
digit format <br>
|
||||||
%Y Year in 4 digit format <br>
|
%Y Year in 4 digit format <br>
|
||||||
%m Month number <br>
|
%m Month number <br>
|
||||||
@@ -371,7 +394,7 @@ l_service, l_in, l_out, l_descr) values (´%d-%m-%Y
|
|||||||
%H:%M:%S´, ´%U´, ´%N´, %I, %O,
|
%H:%M:%S´, ´%U´, ´%N´, %I, %O,
|
||||||
´%T´)"</p>
|
´%T´)"</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>logdump</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>logdump</b>
|
||||||
<i><in_traffic_limit> <out_traffic_limit></i>
|
<i><in_traffic_limit> <out_traffic_limit></i>
|
||||||
<br>
|
<br>
|
||||||
Immediately creates additional log records if given amount
|
Immediately creates additional log records if given amount
|
||||||
@@ -381,7 +404,7 @@ to prevent information about long-lasting downloads on
|
|||||||
server shutdown.</p>
|
server shutdown.</p>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>delimchar</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>delimchar</b>
|
||||||
<i><char></i> <br>
|
<i><char></i> <br>
|
||||||
Sets the delimiter character used to separate username from
|
Sets the delimiter character used to separate username from
|
||||||
hostname in proxy authentication strings (e.g. for FTP, POP3
|
hostname in proxy authentication strings (e.g. for FTP, POP3
|
||||||
@@ -389,20 +412,20 @@ proxies). Default is ´@´. For example, to use
|
|||||||
´#´ instead: delimchar #. This allows usernames
|
´#´ instead: delimchar #. This allows usernames
|
||||||
to contain the ´@´ character.</p>
|
to contain the ´@´ character.</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>archiver</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>archiver</b>
|
||||||
<i><ext> <commandline></i> <br>
|
<i><ext> <commandline></i> <br>
|
||||||
Archiver to use for log files. <ext> is file extension
|
Archiver to use for log files. <ext> is file extension
|
||||||
produced by archiver. Filename will be last argument to
|
produced by archiver. Filename will be last argument to
|
||||||
archiver, optionally you can use %A as produced archive name
|
archiver, optionally you can use %A as produced archive name
|
||||||
and %F as filename.</p>
|
and %F as filename.</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>timeouts</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>timeouts</b>
|
||||||
<i><BYTE_SHORT> <BYTE_LONG> <STRING_SHORT>
|
<i><BYTE_SHORT> <BYTE_LONG> <STRING_SHORT>
|
||||||
<STRING_LONG> <CONNECTION_SHORT>
|
<STRING_LONG> <CONNECTION_SHORT>
|
||||||
<CONNECTION_LONG> <DNS> <CHAIN>
|
<CONNECTION_LONG> <DNS> <CHAIN>
|
||||||
<CONNECT> <CONNECTBACK></i> <br>
|
<CONNECT> <CONNECTBACK> <LINGER></i> <br>
|
||||||
Sets timeout values, defaults 1, 5, 30, 60, 180, 1800, 15,
|
Sets timeout values, defaults 1, 5, 30, 60, 180, 1800, 15,
|
||||||
60, 15, 5. <b><br>
|
60, 15, 5, 5. <b><br>
|
||||||
BYTE_SHORT</b> short timeout for single byte, is usually
|
BYTE_SHORT</b> short timeout for single byte, is usually
|
||||||
used for receiving single byte from stream. <b><br>
|
used for receiving single byte from stream. <b><br>
|
||||||
BYTE_LONG</b> long timeout for single byte, is usually used
|
BYTE_LONG</b> long timeout for single byte, is usually used
|
||||||
@@ -419,17 +442,22 @@ CONNECTION_LONG</b> inactivity timeout for long connection
|
|||||||
DNS</b> timeout for DNS request before requesting next
|
DNS</b> timeout for DNS request before requesting next
|
||||||
server <b><br>
|
server <b><br>
|
||||||
CHAIN</b> timeout for reading data from chained connection
|
CHAIN</b> timeout for reading data from chained connection
|
||||||
<br>
|
<b><br>
|
||||||
default timeouts 1 5 30 60 180 1800 15 60 15 5</p>
|
LINGER</b> timeout to deliver buffered data after one of the
|
||||||
|
sides has closed its sending side, also used as SO_LINGER
|
||||||
|
value on outgoing connections. Too small value may cause the
|
||||||
|
tail of the data to be lost on slow connections, too large
|
||||||
|
one delays release of the sockets. <br>
|
||||||
|
default timeouts 1 5 30 60 180 1800 15 60 15 5 5</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>maxseg</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>maxseg</b>
|
||||||
<i><value></i> <br>
|
<i><value></i> <br>
|
||||||
Sets TCP maximum segment size (MSS) for outgoing
|
Sets TCP maximum segment size (MSS) for outgoing
|
||||||
connections. This can be used to work around path MTU
|
connections. This can be used to work around path MTU
|
||||||
discovery issues or to optimize traffic for specific network
|
discovery issues or to optimize traffic for specific network
|
||||||
conditions.</p>
|
conditions.</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>radius</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>radius</b>
|
||||||
<i><NAS_SECRET>
|
<i><NAS_SECRET>
|
||||||
<radius_server_1</i>[:<i>port</i>][/<i>local_address_1</i>]
|
<radius_server_1</i>[:<i>port</i>][/<i>local_address_1</i>]
|
||||||
<i><radius_server_2</i>[:<i>port</i>][/<i>local_address_2</i>]
|
<i><radius_server_2</i>[:<i>port</i>][/<i>local_address_2</i>]
|
||||||
@@ -456,7 +484,7 @@ user), Reply-Message. Use <b>authcache</b> to speedup
|
|||||||
authentication. RADIUS feature is currently
|
authentication. RADIUS feature is currently
|
||||||
experimental.</p>
|
experimental.</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>nserver</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>nserver</b>
|
||||||
<i><ipaddr></i>[:<i>port</i>][/<i>tcp</i>] <br>
|
<i><ipaddr></i>[:<i>port</i>][/<i>tcp</i>] <br>
|
||||||
Nameserver to use for name resolutions. If none specified
|
Nameserver to use for name resolutions. If none specified
|
||||||
system routines for name resolution is used. Optional port
|
system routines for name resolution is used. Optional port
|
||||||
@@ -464,13 +492,13 @@ number may be specified. If optional /tcp is added to IP
|
|||||||
address, name resolution is performed over TCP.</p>
|
address, name resolution is performed over TCP.</p>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>authnserver</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>authnserver</b>
|
||||||
<i><ipaddr></i>[:<i>port</i>][/<i>tcp</i>] <br>
|
<i><ipaddr></i>[:<i>port</i>][/<i>tcp</i>] <br>
|
||||||
Nameserver to use for DNS-based authentication (e.g. dnsname
|
Nameserver to use for DNS-based authentication (e.g. dnsname
|
||||||
auth type). If not specified, nserver is used. The syntax is
|
auth type). If not specified, nserver is used. The syntax is
|
||||||
the same as for nserver.</p>
|
the same as for nserver.</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>nscache</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>nscache</b>
|
||||||
<i><cachesize></i> <b>nscache6</b>
|
<i><cachesize></i> <b>nscache6</b>
|
||||||
<i><cachesize></i> <br>
|
<i><cachesize></i> <br>
|
||||||
Cache <i><cachesize></i> records for name resolution
|
Cache <i><cachesize></i> records for name resolution
|
||||||
@@ -478,7 +506,7 @@ Cache <i><cachesize></i> records for name resolution
|
|||||||
cache size should usually be large enough (for example,
|
cache size should usually be large enough (for example,
|
||||||
65536).</p>
|
65536).</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>nsrecord</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>nsrecord</b>
|
||||||
<i><hostname> <hostaddr></i> <br>
|
<i><hostname> <hostaddr></i> <br>
|
||||||
Adds static record to nscache. <b>nscache</b> must be
|
Adds static record to nscache. <b>nscache</b> must be
|
||||||
enabled. If 0.0.0.0 is used as a hostaddr host will never
|
enabled. If 0.0.0.0 is used as a hostaddr host will never
|
||||||
@@ -486,14 +514,14 @@ resolve, it can be used to blacklist something or together
|
|||||||
with <b>dialer</b> command to set up UDL for dialing.</p>
|
with <b>dialer</b> command to set up UDL for dialing.</p>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>fakeresolve</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>fakeresolve</b>
|
||||||
<br>
|
<br>
|
||||||
All names are resolved to the 127.0.0.2 address. Useful if
|
All names are resolved to the 127.0.0.2 address. Useful if
|
||||||
all requests are redirected to a parent proxy with
|
all requests are redirected to a parent proxy with
|
||||||
<b>http</b>, <b>socks4+</b>, <b>connect+</b> or
|
<b>http</b>, <b>socks4+</b>, <b>connect+</b> or
|
||||||
<b>socks5+</b>.</p>
|
<b>socks5+</b>.</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>dialer</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>dialer</b>
|
||||||
<i><progname></i> <br>
|
<i><progname></i> <br>
|
||||||
Execute progname if external name can´t be resolved.
|
Execute progname if external name can´t be resolved.
|
||||||
Hint: if you use nscache, dialer may not work, because names
|
Hint: if you use nscache, dialer may not work, because names
|
||||||
@@ -501,7 +529,7 @@ will be resolved through cache. In this case you can use
|
|||||||
something like http://dial.right.now/ from browser to set up
|
something like http://dial.right.now/ from browser to set up
|
||||||
connection.</p>
|
connection.</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>internal</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>internal</b>
|
||||||
<i><ipaddr></i> <br>
|
<i><ipaddr></i> <br>
|
||||||
sets ip address of internal interface. This IP address will
|
sets ip address of internal interface. This IP address will
|
||||||
be used to bind gateways. Alternatively you can use -i
|
be used to bind gateways. Alternatively you can use -i
|
||||||
@@ -515,7 +543,7 @@ Unix sockets are supported with the syntax
|
|||||||
using Unix sockets, the socket file is automatically created
|
using Unix sockets, the socket file is automatically created
|
||||||
and removed on service start/stop.</p>
|
and removed on service start/stop.</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>external</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>external</b>
|
||||||
<i><ipaddr></i> <br>
|
<i><ipaddr></i> <br>
|
||||||
sets ip address of external interface. This IP address will
|
sets ip address of external interface. This IP address will
|
||||||
be source address for all connections made by proxy.
|
be source address for all connections made by proxy.
|
||||||
@@ -524,7 +552,7 @@ address for gateway. Since 0.8 version External or <b>-e</b>
|
|||||||
can be given twice: once with IPv4 and once with IPv6
|
can be given twice: once with IPv4 and once with IPv6
|
||||||
address.</p>
|
address.</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>maxconn</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>maxconn</b>
|
||||||
<i><number></i> <br>
|
<i><number></i> <br>
|
||||||
sets the maximum number of simultaneous connections to each
|
sets the maximum number of simultaneous connections to each
|
||||||
service started after this command at the network level.
|
service started after this command at the network level.
|
||||||
@@ -534,13 +562,13 @@ will silently ignore new connections, while <b>connlim</b>
|
|||||||
will report back to the client that the connection limit has
|
will report back to the client that the connection limit has
|
||||||
been reached.</p>
|
been reached.</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>backlog</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>backlog</b>
|
||||||
<br>
|
<br>
|
||||||
sets the listening socket backlog of new connections.
|
sets the listening socket backlog of new connections.
|
||||||
Default is 1 + <b>maxconn</b>/8. Maximum value is capped by
|
Default is 1 + <b>maxconn</b>/8. Maximum value is capped by
|
||||||
kernel tunable somaxconn.</p>
|
kernel tunable somaxconn.</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>service</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>service</b>
|
||||||
<br>
|
<br>
|
||||||
(deprecated). Indicates that 3proxy should behave as a
|
(deprecated). Indicates that 3proxy should behave as a
|
||||||
Windows 95/98/NT/2000/XP service; has no effect under Unix.
|
Windows 95/98/NT/2000/XP service; has no effect under Unix.
|
||||||
@@ -548,7 +576,7 @@ Not required for 3proxy 0.6 and above. If you upgraded from
|
|||||||
a previous version of 3proxy, use --remove and --install to
|
a previous version of 3proxy, use --remove and --install to
|
||||||
reinstall the service.</p>
|
reinstall the service.</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>daemon</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>daemon</b>
|
||||||
<br>
|
<br>
|
||||||
Should be specified to close the console. Do not use
|
Should be specified to close the console. Do not use
|
||||||
´daemon´ with ´service´. At least
|
´daemon´ with ´service´. At least
|
||||||
@@ -556,7 +584,7 @@ under FreeBSD, <b>daemon</b> should precede any proxy
|
|||||||
service and log commands to avoid socket problems. Always
|
service and log commands to avoid socket problems. Always
|
||||||
place it in the beginning of the configuration file.</p>
|
place it in the beginning of the configuration file.</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>auth</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>auth</b>
|
||||||
<i><authtype></i> [...] <br>
|
<i><authtype></i> [...] <br>
|
||||||
Type of user authorization. Currently supported: <b><br>
|
Type of user authorization. Currently supported: <b><br>
|
||||||
none</b> - no authentication or authorization required. <br>
|
none</b> - no authentication or authorization required. <br>
|
||||||
@@ -584,11 +612,19 @@ but the ACL authorization result is also cached and not
|
|||||||
re-evaluated on each request. Faster than <b>cache</b>, but
|
re-evaluated on each request. Faster than <b>cache</b>, but
|
||||||
ACL changes do not take effect for cached users until the
|
ACL changes do not take effect for cached users until the
|
||||||
cache entry expires. Use <b>cache</b> if ACLs may change
|
cache entry expires. Use <b>cache</b> if ACLs may change
|
||||||
during the cache lifetime. <b><br>
|
during the cache lifetime. Because the ACL is not walked on
|
||||||
|
a cache hit, no redirection is applied to a request served
|
||||||
|
from the cache: it is sent directly instead of through the
|
||||||
|
<b>parent</b> proxy of the matching ACL entry, with no error
|
||||||
|
reported. Do not use <b>cacheacl</b> together with parent
|
||||||
|
proxies, use <b>cache</b> instead. The only redirection type
|
||||||
|
which survives is <b>extip</b>, and only if <b>ext</b> is a
|
||||||
|
part of the <b>authcache</b> key, because the external
|
||||||
|
address is then restored from the cache entry. <b><br>
|
||||||
radius</b> - authentication with RADIUS. <br>
|
radius</b> - authentication with RADIUS. <br>
|
||||||
Plugins may add additional authentication types.</p>
|
Plugins may add additional authentication types.</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">It´s
|
<p style="margin-left:9%; margin-top: 1em">It´s
|
||||||
possible to use multiple authentication types in the same
|
possible to use multiple authentication types in the same
|
||||||
command. E.g. <br>
|
command. E.g. <br>
|
||||||
auth iponly strong <br>
|
auth iponly strong <br>
|
||||||
@@ -602,7 +638,7 @@ for dedicated laptops and request a username/password for
|
|||||||
shared ones.</p>
|
shared ones.</p>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>authcache</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>authcache</b>
|
||||||
<i><cachtype> <cachtime> <cachesize></i>
|
<i><cachtype> <cachtime> <cachesize></i>
|
||||||
<br>
|
<br>
|
||||||
Cache authentication information for a given amount of time
|
Cache authentication information for a given amount of time
|
||||||
@@ -631,10 +667,23 @@ srvaddr</b> - cache by service (listener) address <b><br>
|
|||||||
srvport</b> - cache by service (listener) port <br>
|
srvport</b> - cache by service (listener) port <br>
|
||||||
Multiple types can be combined (e.g.
|
Multiple types can be combined (e.g.
|
||||||
<b>ip,user,dstaddr,dstport</b>). <br>
|
<b>ip,user,dstaddr,dstport</b>). <br>
|
||||||
|
With <b>cacheacl</b> the ACL result is not re-evaluated on a
|
||||||
|
cache hit, so every field the ACL limits must be a part of
|
||||||
|
the cache key, otherwise the result cached for one request
|
||||||
|
is applied to a different one: <b>user</b>/<b>pass</b> for
|
||||||
|
the userlist, <b>ip</b> for the sourcelist,
|
||||||
|
<b>dstaddr</b>/<b>dsthost</b> for the targetlist,
|
||||||
|
<b>dstport</b> for the targetportlist and <b>dstoper</b> for
|
||||||
|
the operationlist. It is especially important for SOCKSv5
|
||||||
|
UDP traffic, where the destination of every datagram is
|
||||||
|
authorized: without <b>dstaddr</b> and <b>dstport</b> in the
|
||||||
|
key the result cached for one destination is applied to any
|
||||||
|
other destination and the destination is not checked at all,
|
||||||
|
see <b>allow</b>. <br>
|
||||||
Use auth type <b>cache</b> (or <b>cacheacl</b>) for cached
|
Use auth type <b>cache</b> (or <b>cacheacl</b>) for cached
|
||||||
authentication</p>
|
authentication</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>allow</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>allow</b>
|
||||||
<i><userlist> <sourcelist> <targetlist>
|
<i><userlist> <sourcelist> <targetlist>
|
||||||
<targetportlist> <operationlist>
|
<targetportlist> <operationlist>
|
||||||
<weekdayslist> <timeperiodslist></i> <b><br>
|
<weekdayslist> <timeperiodslist></i> <b><br>
|
||||||
@@ -670,7 +719,7 @@ specific addresses immediately without any conditions you
|
|||||||
should either bind proxy to appropriate interface only or to
|
should either bind proxy to appropriate interface only or to
|
||||||
use ip filters.</p>
|
use ip filters.</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Operation is one
|
<p style="margin-left:9%; margin-top: 1em">Operation is one
|
||||||
of: <b><br>
|
of: <b><br>
|
||||||
CONNECT</b> establish outgoing TCP connection <b><br>
|
CONNECT</b> establish outgoing TCP connection <b><br>
|
||||||
BIND</b> bind TCP port for listening <b><br>
|
BIND</b> bind TCP port for listening <b><br>
|
||||||
@@ -694,15 +743,52 @@ remote side. <b><br>
|
|||||||
FTP</b> matches any FTP/FTP Data request <b><br>
|
FTP</b> matches any FTP/FTP Data request <b><br>
|
||||||
ADMIN</b> access to administration interface</p>
|
ADMIN</b> access to administration interface</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Weekdays are
|
<p style="margin-left:9%; margin-top: 1em">Weekdays are
|
||||||
week day numbers or periods, 0 or 7 means Sunday, 1 is
|
week day numbers or periods, 0 or 7 means Sunday, 1 is
|
||||||
Monday, 1-5 means Monday through Friday. <br>
|
Monday, 1-5 means Monday through Friday. <br>
|
||||||
Timeperiodlists is a list of time periods in
|
Timeperiodlists is a list of time periods in
|
||||||
HH:MM:SS-HH:MM:SS format. For example,
|
HH:MM:SS-HH:MM:SS format. For example,
|
||||||
00:00:00-08:00:00,17:00:00-24:00:00 lists non-working
|
00:00:00-08:00:00,17:00:00-24:00:00 lists non-working hours.
|
||||||
hours.</p>
|
<br>
|
||||||
|
A SOCKSv5 UDP ASSOCIATE request carries no destination, the
|
||||||
|
destination of every datagram is taken from the datagram
|
||||||
|
itself. 3proxy authorizes the destination of every datagram,
|
||||||
|
so ACLs limiting the destination address, the destination
|
||||||
|
host name or the destination port do apply to UDP traffic,
|
||||||
|
unless the <b>-U</b> option of the <b>socks</b> service says
|
||||||
|
otherwise. <br>
|
||||||
|
ACLs are only checked for the datagrams sent by the client.
|
||||||
|
A datagram received on the association is relayed to the
|
||||||
|
client without an ACL check: with a parent proxy only the
|
||||||
|
datagrams from the parent are accepted, an association
|
||||||
|
without a parent accepts a datagram from any source. The
|
||||||
|
source reported to the client is the actual source of the
|
||||||
|
datagram. The address in the log record is the destination
|
||||||
|
the client sent the datagrams to, the source of the
|
||||||
|
datagrams received on the association is not logged. <br>
|
||||||
|
A client may use a single association to reach many
|
||||||
|
destinations. An ACL entry which limits the destination
|
||||||
|
silently drops the datagrams to every other destination, so
|
||||||
|
limiting the destination of UDP traffic can break such
|
||||||
|
clients in a way which is hard to diagnose. Limit it only
|
||||||
|
when it is really required. <br>
|
||||||
|
Bandwidth limiters (<b>bandlimin</b>, <b>bandlimout</b>) and
|
||||||
|
traffic counters (<b>countin</b>, <b>countout</b>) which
|
||||||
|
limit the destination are selected when the destination is
|
||||||
|
authorized, so within an UDP association they are selected
|
||||||
|
for the destination of the first datagram and are not
|
||||||
|
re-selected for every following destination. They can not be
|
||||||
|
applied per destination to the incoming UDP traffic at all,
|
||||||
|
because an incoming datagram is not matched against any
|
||||||
|
destination. <br>
|
||||||
|
Only <b>socks5</b> and <b>socks5+</b> parents can be used
|
||||||
|
for UDP. Because every new destination is authorized, use
|
||||||
|
<b>authcache</b>, especially with ´strong´,
|
||||||
|
RADIUS or plugin authentication: <b>cacheacl</b> with the
|
||||||
|
destination in the cache key if no parent proxy is used,
|
||||||
|
<b>cache</b> otherwise, see <b>cacheacl</b>.</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>parent</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>parent</b>
|
||||||
<i><weight> <type> <ip> <port>
|
<i><weight> <type> <ip> <port>
|
||||||
<username> <password></i> <br>
|
<username> <password></i> <br>
|
||||||
this command must follow "allow" rule. It extends
|
this command must follow "allow" rule. It extends
|
||||||
@@ -732,7 +818,7 @@ connections. Chains are only applied to new connections,
|
|||||||
pipelined (keep-alive) requests in the same connection use
|
pipelined (keep-alive) requests in the same connection use
|
||||||
the same chain.</p>
|
the same chain.</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">type is one of:
|
<p style="margin-left:9%; margin-top: 1em">type is one of:
|
||||||
<b><br>
|
<b><br>
|
||||||
extip</b> does not actually redirect the request; it sets
|
extip</b> does not actually redirect the request; it sets
|
||||||
the external address for this request to <i><ip></i>.
|
the external address for this request to <i><ip></i>.
|
||||||
@@ -791,7 +877,7 @@ Requires SSL/TLS support (WITH_SSL) and is used with
|
|||||||
<b>ssl_client_mode 3</b>, which only handshakes TLS for
|
<b>ssl_client_mode 3</b>, which only handshakes TLS for
|
||||||
<b>s</b>-suffixed parents.</p>
|
<b>s</b>-suffixed parents.</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">IP and port are
|
<p style="margin-left:9%; margin-top: 1em">IP and port are
|
||||||
ip addres and port of parent proxy server. If IP is zero, ip
|
ip addres and port of parent proxy server. If IP is zero, ip
|
||||||
is taken from original request, only port is changed. If
|
is taken from original request, only port is changed. If
|
||||||
port is zero, it´s taken from original request, only
|
port is zero, it´s taken from original request, only
|
||||||
@@ -812,7 +898,7 @@ unix:@parent.proxy 3128). When using Unix sockets, the port
|
|||||||
number is ignored but must be specified for syntax
|
number is ignored but must be specified for syntax
|
||||||
compatibility.</p>
|
compatibility.</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Main purpose of
|
<p style="margin-left:9%; margin-top: 1em">Main purpose of
|
||||||
local redirections is to have the requested resource (URL or
|
local redirections is to have the requested resource (URL or
|
||||||
POP3 username) logged and protocol-specific filters applied.
|
POP3 username) logged and protocol-specific filters applied.
|
||||||
In case of local redirection, ACLs are reviewed twice:
|
In case of local redirection, ACLs are reviewed twice:
|
||||||
@@ -837,19 +923,19 @@ parent proxy. Username of ´*´ means username
|
|||||||
must be supplied by user.</p>
|
must be supplied by user.</p>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>parentretries</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>parentretries</b>
|
||||||
<i><number></i> <br>
|
<i><number></i> <br>
|
||||||
Number of retries to connect to parent proxy. Default is
|
Number of retries to connect to parent proxy. Default is
|
||||||
1.</p>
|
1.</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>nolog</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>nolog</b>
|
||||||
<i><n></i> <br>
|
<i><n></i> <br>
|
||||||
extends last allow or deny command to prevent logging, e.g.
|
extends last allow or deny command to prevent logging, e.g.
|
||||||
<br>
|
<br>
|
||||||
allow * * 192.168.1.1 <br>
|
allow * * 192.168.1.1 <br>
|
||||||
nolog</p>
|
nolog</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>weight</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>weight</b>
|
||||||
<i><n></i> <br>
|
<i><n></i> <br>
|
||||||
extends last allow or deny command to set weight for this
|
extends last allow or deny command to set weight for this
|
||||||
request <br>
|
request <br>
|
||||||
@@ -857,7 +943,7 @@ allow * * 192.168.1.1 <br>
|
|||||||
weight 100 <br>
|
weight 100 <br>
|
||||||
Weight may be used for different purposes.</p>
|
Weight may be used for different purposes.</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>force <br>
|
<p style="margin-left:9%; margin-top: 1em"><b>force <br>
|
||||||
noforce</b> <br>
|
noforce</b> <br>
|
||||||
If force is specified for service, configuration reload will
|
If force is specified for service, configuration reload will
|
||||||
require all current sessions of this service to be
|
require all current sessions of this service to be
|
||||||
@@ -867,7 +953,7 @@ closed. noforce allows to keep previously authenticated
|
|||||||
connections.</p>
|
connections.</p>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>bandlimin</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>bandlimin</b>
|
||||||
<i><rate> <userlist> <sourcelist>
|
<i><rate> <userlist> <sourcelist>
|
||||||
<targetlist> <targetportlist>
|
<targetlist> <targetportlist>
|
||||||
<operationlist> <weekdayslist>
|
<operationlist> <weekdayslist>
|
||||||
@@ -909,7 +995,7 @@ POP3, you can use <br>
|
|||||||
nobandlimin * * * 110 <br>
|
nobandlimin * * * 110 <br>
|
||||||
before the rest of bandlim rules.</p>
|
before the rest of bandlim rules.</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>connlim</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>connlim</b>
|
||||||
<i><rate> <period> <userlist>
|
<i><rate> <period> <userlist>
|
||||||
<sourcelist> <targetlist> <targetportlist>
|
<sourcelist> <targetlist> <targetportlist>
|
||||||
<operationlist> <weekdayslist>
|
<operationlist> <weekdayslist>
|
||||||
@@ -931,7 +1017,7 @@ required per client, a separate rule must be added for every
|
|||||||
client. Like with nobandlimin, noconnlim adds an
|
client. Like with nobandlimin, noconnlim adds an
|
||||||
exception.</p>
|
exception.</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>counter</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>counter</b>
|
||||||
<i><filename> <reporttype>
|
<i><filename> <reporttype>
|
||||||
<reportname></i> <b><br>
|
<reportname></i> <b><br>
|
||||||
countin</b> <i><number> <type> <limit>
|
countin</b> <i><number> <type> <limit>
|
||||||
@@ -959,7 +1045,7 @@ nocountall</b> <i><userlist> <sourcelist>
|
|||||||
<operationlist> <weekdayslist>
|
<operationlist> <weekdayslist>
|
||||||
<timeperiodslist></i></p>
|
<timeperiodslist></i></p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">counter,
|
<p style="margin-left:9%; margin-top: 1em">counter,
|
||||||
countin, nocountin, countout, nocountout, countall,
|
countin, nocountin, countout, nocountout, countall,
|
||||||
nocountall commands are used to set a traffic limit in MB
|
nocountall commands are used to set a traffic limit in MB
|
||||||
for a period of time (day, week or month). Filename is a
|
for a period of time (day, week or month). Filename is a
|
||||||
@@ -984,7 +1070,7 @@ report is a text file with counter values in the format:
|
|||||||
The rest of parameters is identical to
|
The rest of parameters is identical to
|
||||||
<b>bandlim</b>/<b>nobandlim</b>.</p>
|
<b>bandlim</b>/<b>nobandlim</b>.</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>users</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>users</b>
|
||||||
<i>username</i>[:<i>pwtype</i>:<i>password</i>] ... <br>
|
<i>username</i>[:<i>pwtype</i>:<i>password</i>] ... <br>
|
||||||
pwtype is one of: <br>
|
pwtype is one of: <br>
|
||||||
none (empty) - use system authentication <b><br>
|
none (empty) - use system authentication <b><br>
|
||||||
@@ -1002,7 +1088,7 @@ users "test4:CR:$3$salt$G47yV9w...." <br>
|
|||||||
Note: double quotes are required because the password
|
Note: double quotes are required because the password
|
||||||
contains a $ sign.</p>
|
contains a $ sign.</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>flush</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>flush</b>
|
||||||
<br>
|
<br>
|
||||||
empty the active access list. The access list must be
|
empty the active access list. The access list must be
|
||||||
flushed every time you create a new access list for a new
|
flushed every time you create a new access list for a new
|
||||||
@@ -1014,35 +1100,35 @@ allow * 192.168.1.0/24 <br>
|
|||||||
socks <br>
|
socks <br>
|
||||||
sets different ACLs for <b>pop3p</b> and <b>socks</b></p>
|
sets different ACLs for <b>pop3p</b> and <b>socks</b></p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>system</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>system</b>
|
||||||
<i><command></i> <br>
|
<i><command></i> <br>
|
||||||
execute system command</p>
|
execute system command</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>pidfile</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>pidfile</b>
|
||||||
<i><filename></i> <br>
|
<i><filename></i> <br>
|
||||||
write pid of current process to file. It can be used to
|
write pid of current process to file. It can be used to
|
||||||
manipulate 3proxy with signals under Unix. Currently next
|
manipulate 3proxy with signals under Unix. Currently next
|
||||||
signals are available:</p>
|
signals are available:</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>monitor</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>monitor</b>
|
||||||
<i><filename></i> <br>
|
<i><filename></i> <br>
|
||||||
If file monitored changes in modification time or size,
|
If file monitored changes in modification time or size,
|
||||||
3proxy reloads configuration within one minute. Any number
|
3proxy reloads configuration within one minute. Any number
|
||||||
of files may be monitored.</p>
|
of files may be monitored.</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>setuid</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>setuid</b>
|
||||||
<i><uid></i> <br>
|
<i><uid></i> <br>
|
||||||
calls setuid(uid), uid can be numeric or since 0.9 username.
|
calls setuid(uid), uid can be numeric or since 0.9 username.
|
||||||
Unix only. Warning: under some Linux kernels setuid() works
|
Unix only. Warning: under some Linux kernels setuid() works
|
||||||
for current thread only. It makes it impossible to suid for
|
for current thread only. It makes it impossible to suid for
|
||||||
all threads.</p>
|
all threads.</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>setgid</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>setgid</b>
|
||||||
<i><gid></i> <br>
|
<i><gid></i> <br>
|
||||||
calls setgid(gid), gid can be numeric or since 0.9
|
calls setgid(gid), gid can be numeric or since 0.9
|
||||||
groupname. Unix only.</p>
|
groupname. Unix only.</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>chroot</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>chroot</b>
|
||||||
<i><path></i> [<i><uid></i>]
|
<i><path></i> [<i><uid></i>]
|
||||||
[<i><gid></i>] <br>
|
[<i><gid></i>] <br>
|
||||||
calls chroot(path) and sets gid/uid. Unix only. uid/gid
|
calls chroot(path) and sets gid/uid. Unix only. uid/gid
|
||||||
@@ -1050,7 +1136,7 @@ supported since 0.9, can be numeric or
|
|||||||
username/groupname</p>
|
username/groupname</p>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>stacksize</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>stacksize</b>
|
||||||
<i><value_to_add_to_default_stack_size></i> <br>
|
<i><value_to_add_to_default_stack_size></i> <br>
|
||||||
Change the default size for thread stacks. May be required
|
Change the default size for thread stacks. May be required
|
||||||
in some situations, e.g. with non-default plugins, or on
|
in some situations, e.g. with non-default plugins, or on
|
||||||
@@ -1079,7 +1165,7 @@ disable the thread stack.</p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>plugin</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>plugin</b>
|
||||||
<i><path_to_shared_library>
|
<i><path_to_shared_library>
|
||||||
<function_to_call></i> [<i><arg1></i> ...] <br>
|
<function_to_call></i> [<i><arg1></i> ...] <br>
|
||||||
Loads specified library and calls given export function with
|
Loads specified library and calls given export function with
|
||||||
@@ -1090,7 +1176,7 @@ function_to_call must return 0 in case of success, value
|
|||||||
> 0 to indicate error.</p>
|
> 0 to indicate error.</p>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>filtermaxsize</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>filtermaxsize</b>
|
||||||
<i><max_size_of_data_to_filter></i> <br>
|
<i><max_size_of_data_to_filter></i> <br>
|
||||||
If Content-length (or another data length) is greater than
|
If Content-length (or another data length) is greater than
|
||||||
the given value, no data filtering will be performed through
|
the given value, no data filtering will be performed through
|
||||||
@@ -1102,13 +1188,13 @@ Content-Length changing. Default is 1MB (1048576).</p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">SSL/TLS support
|
<p style="margin-left:9%; margin-top: 1em">SSL/TLS support
|
||||||
is built into 3proxy (since 0.9.7) when compiled with
|
is built into 3proxy (since 0.9.7) when compiled with
|
||||||
OpenSSL (WITH_SSL). Previously available as SSLPlugin, the
|
OpenSSL (WITH_SSL). Previously available as SSLPlugin, the
|
||||||
functionality is now integrated into the main binary. The
|
functionality is now integrated into the main binary. The
|
||||||
plugin line is no longer required.</p>
|
plugin line is no longer required.</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">SSL/TLS can be
|
<p style="margin-left:9%; margin-top: 1em">SSL/TLS can be
|
||||||
used for: - transparent MITM (Man-in-the-Middle) for TLS
|
used for: - transparent MITM (Man-in-the-Middle) for TLS
|
||||||
traffic inspection - https:// proxy (TLS-encrypted
|
traffic inspection - https:// proxy (TLS-encrypted
|
||||||
connection between client and proxy) - TLS client
|
connection between client and proxy) - TLS client
|
||||||
@@ -1121,7 +1207,7 @@ certificates</p>
|
|||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>ssl_mitm</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>ssl_mitm</b>
|
||||||
- spoof certificates for services started below. Usage
|
- spoof certificates for services started below. Usage
|
||||||
without ssl_client_verify is insecure. <b><br>
|
without ssl_client_verify is insecure. <b><br>
|
||||||
ssl_nomitm</b> - do not spoof certificates for services
|
ssl_nomitm</b> - do not spoof certificates for services
|
||||||
@@ -1132,7 +1218,7 @@ started below</p>
|
|||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>ssl_serv</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>ssl_serv</b>
|
||||||
(or ssl_server) - require TLS connection from clients for
|
(or ssl_server) - require TLS connection from clients for
|
||||||
services below <b><br>
|
services below <b><br>
|
||||||
ssl_noserv</b> (or ssl_noserver) - do not require TLS
|
ssl_noserv</b> (or ssl_noserver) - do not require TLS
|
||||||
@@ -1143,7 +1229,7 @@ connection from clients for services below</p>
|
|||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>ssl_cli</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>ssl_cli</b>
|
||||||
(or ssl_client) - establish TLS connection to upstream
|
(or ssl_client) - establish TLS connection to upstream
|
||||||
server for services below <b><br>
|
server for services below <b><br>
|
||||||
ssl_nocli</b> (or ssl_noclient) - do not establish TLS
|
ssl_nocli</b> (or ssl_noclient) - do not establish TLS
|
||||||
@@ -1155,7 +1241,7 @@ connection to upstream server for services below</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>ssl_server_cert</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>ssl_server_cert</b>
|
||||||
<i>/path/to/cert</i> - Server certificate (should not be
|
<i>/path/to/cert</i> - Server certificate (should not be
|
||||||
self-signed, must contain SAN) for ssl_serv <b><br>
|
self-signed, must contain SAN) for ssl_serv <b><br>
|
||||||
ssl_server_key</b> <i>/path/to/key</i> - Server certificate
|
ssl_server_key</b> <i>/path/to/key</i> - Server certificate
|
||||||
@@ -1220,14 +1306,14 @@ generated MITM certificates cache</p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">PCRE (Perl
|
<p style="margin-left:9%; margin-top: 1em">PCRE (Perl
|
||||||
Compatible Regular Expressions) filtering is built into
|
Compatible Regular Expressions) filtering is built into
|
||||||
3proxy (since 0.9.7) when compiled with PCRE2 support
|
3proxy (since 0.9.7) when compiled with PCRE2 support
|
||||||
(WITH_PCRE). Previously available as PCREPlugin, the
|
(WITH_PCRE). Previously available as PCREPlugin, the
|
||||||
functionality is now integrated into the main binary. The
|
functionality is now integrated into the main binary. The
|
||||||
plugin line is no longer required.</p>
|
plugin line is no longer required.</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">PCRE filtering
|
<p style="margin-left:9%; margin-top: 1em">PCRE filtering
|
||||||
allows creating matching and replacement rules with regular
|
allows creating matching and replacement rules with regular
|
||||||
expressions for client requests, headers, and data.</p>
|
expressions for client requests, headers, and data.</p>
|
||||||
|
|
||||||
@@ -1236,7 +1322,7 @@ expressions for client requests, headers, and data.</p>
|
|||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>pcre</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>pcre</b>
|
||||||
<i>TYPE FILTER_ACTION REGEXP [ACE]</i> <br>
|
<i>TYPE FILTER_ACTION REGEXP [ACE]</i> <br>
|
||||||
Apply a rule for matching regular expression. <b><br>
|
Apply a rule for matching regular expression. <b><br>
|
||||||
pcre_rewrite</b> <i>TYPE FILTER_ACTION REGEXP
|
pcre_rewrite</b> <i>TYPE FILTER_ACTION REGEXP
|
||||||
@@ -1272,7 +1358,7 @@ PCRE_BSR_UNICODE.</p>
|
|||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">TYPE - type of
|
<p style="margin-left:9%; margin-top: 1em">TYPE - type of
|
||||||
filtered data (comma-delimited list): <br>
|
filtered data (comma-delimited list): <br>
|
||||||
request - content of the client’s request (e.g., HTTP
|
request - content of the client’s request (e.g., HTTP
|
||||||
GET request string) <br>
|
GET request string) <br>
|
||||||
@@ -1283,7 +1369,7 @@ data) <br>
|
|||||||
srvdata - data received from the server (e.g., HTML
|
srvdata - data received from the server (e.g., HTML
|
||||||
page)</p>
|
page)</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">FILTER_ACTION -
|
<p style="margin-left:9%; margin-top: 1em">FILTER_ACTION -
|
||||||
action on match: <br>
|
action on match: <br>
|
||||||
allow - allow this request without checking the rest of the
|
allow - allow this request without checking the rest of the
|
||||||
rules <br>
|
rules <br>
|
||||||
@@ -1292,18 +1378,18 @@ rules <br>
|
|||||||
dunno - continue with the rest of the rules (useful with
|
dunno - continue with the rest of the rules (useful with
|
||||||
pcre_rewrite)</p>
|
pcre_rewrite)</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">REGEXP - PCRE
|
<p style="margin-left:9%; margin-top: 1em">REGEXP - PCRE
|
||||||
(Perl) regular expression. Use * if no regexp matching is
|
(Perl) regular expression. Use * if no regexp matching is
|
||||||
required.</p>
|
required.</p>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">REWRITE_EXPRESSION
|
<p style="margin-left:9%; margin-top: 1em">REWRITE_EXPRESSION
|
||||||
- substitution string. May contain Perl-style substrings $1,
|
- substitution string. May contain Perl-style substrings $1,
|
||||||
$2, etc. $0 means the whole matched string. \r and \n may be
|
$2, etc. $0 means the whole matched string. \r and \n may be
|
||||||
used to insert new lines; the string may be empty
|
used to insert new lines; the string may be empty
|
||||||
("").</p>
|
("").</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">ACE - access
|
<p style="margin-left:9%; margin-top: 1em">ACE - access
|
||||||
control entry (user names, source IPs, destination IPs,
|
control entry (user names, source IPs, destination IPs,
|
||||||
ports, etc.), identical to allow/deny/bandlimin commands.
|
ports, etc.), identical to allow/deny/bandlimin commands.
|
||||||
The regular expression is only matched if the ACL matches
|
The regular expression is only matched if the ACL matches
|
||||||
@@ -1316,7 +1402,7 @@ authentication and/or allow/deny ACLs.</p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Report all bugs
|
<p style="margin-left:9%; margin-top: 1em">Report all bugs
|
||||||
to <b>3proxy@3proxy.org</b></p>
|
to <b>3proxy@3proxy.org</b></p>
|
||||||
|
|
||||||
<h2>SEE ALSO
|
<h2>SEE ALSO
|
||||||
@@ -1324,7 +1410,7 @@ to <b>3proxy@3proxy.org</b></p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">3proxy(8),
|
<p style="margin-left:9%; margin-top: 1em">3proxy(8),
|
||||||
3proxy_crypt(8), proxy(8), ftppr(8), socks(8), pop3p(8),
|
3proxy_crypt(8), proxy(8), ftppr(8), socks(8), pop3p(8),
|
||||||
imapp(8), smtpp(8), tlspr(8), tcppm(8), udppm(8),
|
imapp(8), smtpp(8), tlspr(8), tcppm(8), udppm(8),
|
||||||
syslogd(8), <br>
|
syslogd(8), <br>
|
||||||
@@ -1335,7 +1421,7 @@ https://3proxy.org/</p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">3proxy is
|
<p style="margin-left:9%; margin-top: 1em">3proxy is
|
||||||
designed by Vladimir Dubrovin <vlad@3proxy.org></p>
|
designed by Vladimir Dubrovin <vlad@3proxy.org></p>
|
||||||
<hr>
|
<hr>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
+28
-28
@@ -1,4 +1,4 @@
|
|||||||
<!-- Creator : groff version 1.24.1 -->
|
<!-- Creator : groff version 1.23.0 -->
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>3proxy</b> -
|
<p style="margin-left:9%; margin-top: 1em"><b>3proxy</b> -
|
||||||
3[APA3A] tiny proxy server, or trivial proxy server, or free
|
3[APA3A] tiny proxy server, or trivial proxy server, or free
|
||||||
proxy server</p>
|
proxy server</p>
|
||||||
|
|
||||||
@@ -34,7 +34,7 @@ proxy server</p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>3proxy</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>3proxy</b>
|
||||||
[<i>config_file</i>] <b><br>
|
[<i>config_file</i>] <b><br>
|
||||||
3proxy</b> [<i>--install</i>] <b><br>
|
3proxy</b> [<i>--install</i>] <b><br>
|
||||||
3proxy</b> [<i>--remove</i>]</p>
|
3proxy</b> [<i>--remove</i>]</p>
|
||||||
@@ -44,7 +44,7 @@ proxy server</p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>3proxy</b> is
|
<p style="margin-left:9%; margin-top: 1em"><b>3proxy</b> is
|
||||||
a universal proxy server. It can be used to provide internal
|
a universal proxy server. It can be used to provide internal
|
||||||
users with fully controllable access to external resources
|
users with fully controllable access to external resources
|
||||||
or to provide external users with access to internal
|
or to provide external users with access to internal
|
||||||
@@ -71,7 +71,7 @@ under Unix). So you can play your favourite games, listen to
|
|||||||
music, exchange files and messages and even accept incoming
|
music, exchange files and messages and even accept incoming
|
||||||
connections behind a proxy server.</p>
|
connections behind a proxy server.</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>dnspr</i>
|
<p style="margin-left:9%; margin-top: 1em"><i>dnspr</i>
|
||||||
does not exist as an independent service. It’s a DNS
|
does not exist as an independent service. It’s a DNS
|
||||||
caching proxy (it requires <i>nscache</i> and <i>nserver</i>
|
caching proxy (it requires <i>nscache</i> and <i>nserver</i>
|
||||||
to be set in the configuration. Only A-records are cached.
|
to be set in the configuration. Only A-records are cached.
|
||||||
@@ -79,7 +79,7 @@ Please note that this caching is mostly a ’hack’
|
|||||||
and has nothing to do with a real DNS server, but it works
|
and has nothing to do with a real DNS server, but it works
|
||||||
perfectly for SOHO networks.</p>
|
perfectly for SOHO networks.</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">3proxy supports
|
<p style="margin-left:9%; margin-top: 1em">3proxy supports
|
||||||
access control lists (ACL) like network router. Source and
|
access control lists (ACL) like network router. Source and
|
||||||
destination networks and destination port can be specified.
|
destination networks and destination port can be specified.
|
||||||
In addition, usernames and gateway action (for example GET
|
In addition, usernames and gateway action (for example GET
|
||||||
@@ -92,7 +92,7 @@ ACL action request can be allowed, denied or redirected to
|
|||||||
another host or to another proxy server or even to a chain
|
another host or to another proxy server or even to a chain
|
||||||
of proxy servers.</p>
|
of proxy servers.</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">It supports
|
<p style="margin-left:9%; margin-top: 1em">It supports
|
||||||
different types of logging: to logfiles, <b>syslog</b>(3)
|
different types of logging: to logfiles, <b>syslog</b>(3)
|
||||||
(only under Unix) or to an ODBC database. Logging format is
|
(only under Unix) or to an ODBC database. Logging format is
|
||||||
tunable to provide compatibility with existing log file
|
tunable to provide compatibility with existing log file
|
||||||
@@ -105,9 +105,9 @@ Apache or Squid log parsers.</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>config_file</b></p>
|
<p style="margin-left:9%; margin-top: 1em"><b>config_file</b></p>
|
||||||
|
|
||||||
<p style="margin-left:15%;">Name of config file. See
|
<p style="margin-left:18%;">Name of config file. See
|
||||||
<b>3proxy.cfg</b>(3) for configuration file format. Under
|
<b>3proxy.cfg</b>(3) for configuration file format. Under
|
||||||
Windows, if config_file is not specified, <b>3proxy</b>
|
Windows, if config_file is not specified, <b>3proxy</b>
|
||||||
looks for a file named <i>3proxy.cfg</i> in the default
|
looks for a file named <i>3proxy.cfg</i> in the default
|
||||||
@@ -119,14 +119,14 @@ script just by setting +x mode and adding <br>
|
|||||||
#!/usr/local/3proxy/3proxy <br>
|
#!/usr/local/3proxy/3proxy <br>
|
||||||
as a first line in 3proxy.cfg</p>
|
as a first line in 3proxy.cfg</p>
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>--install</b></p>
|
<p style="margin-left:9%;"><b>--install</b></p>
|
||||||
|
|
||||||
<p style="margin-left:15%;">(Windows NT family only)
|
<p style="margin-left:18%;">(Windows NT family only)
|
||||||
install <b>3proxy</b> as a system service</p>
|
install <b>3proxy</b> as a system service</p>
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>--remove</b></p>
|
<p style="margin-left:9%;"><b>--remove</b></p>
|
||||||
|
|
||||||
<p style="margin-left:15%;">(Windows NT family only) remove
|
<p style="margin-left:18%;">(Windows NT family only) remove
|
||||||
<b>3proxy</b> from system services</p>
|
<b>3proxy</b> from system services</p>
|
||||||
|
|
||||||
<h2>SIGNALS
|
<h2>SIGNALS
|
||||||
@@ -134,29 +134,29 @@ install <b>3proxy</b> as a system service</p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Under Unix there
|
<p style="margin-left:9%; margin-top: 1em">Under Unix there
|
||||||
are a few signals <b>3proxy</b> catches. See <b>kill</b>(1).
|
are a few signals <b>3proxy</b> catches. See <b>kill</b>(1).
|
||||||
<b><br>
|
<b><br>
|
||||||
SIGTERM</b></p>
|
SIGTERM</b></p>
|
||||||
|
|
||||||
<p style="margin-left:15%;">clean up connections and
|
<p style="margin-left:18%;">clean up connections and
|
||||||
exit</p>
|
exit</p>
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>SIGPAUSE</b></p>
|
<p style="margin-left:9%;"><b>SIGPAUSE</b></p>
|
||||||
|
|
||||||
<p style="margin-left:15%;">stop accepting new connections,
|
<p style="margin-left:18%;">stop accepting new connections,
|
||||||
on second signal - start and re-read configuration</p>
|
on second signal - start and re-read configuration</p>
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>SIGCONT</b></p>
|
<p style="margin-left:9%;"><b>SIGCONT</b></p>
|
||||||
|
|
||||||
<p style="margin-left:15%;">start to accept new
|
<p style="margin-left:18%;">start to accept new
|
||||||
connections</p>
|
connections</p>
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>SIGUSR1</b></p>
|
<p style="margin-left:9%;"><b>SIGUSR1</b></p>
|
||||||
|
|
||||||
<p style="margin-left:15%;">reload configuration</p>
|
<p style="margin-left:18%;">reload configuration</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Under Windows,
|
<p style="margin-left:9%; margin-top: 1em">Under Windows,
|
||||||
if <b>3proxy</b> is installed as a service you can use
|
if <b>3proxy</b> is installed as a service you can use
|
||||||
standard service management to start, stop, pause and
|
standard service management to start, stop, pause and
|
||||||
continue the 3proxy service, for example: <b><br>
|
continue the 3proxy service, for example: <b><br>
|
||||||
@@ -165,7 +165,7 @@ net stop 3proxy <br>
|
|||||||
net pause 3proxy <br>
|
net pause 3proxy <br>
|
||||||
net continue 3proxy</b></p>
|
net continue 3proxy</b></p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Web admin
|
<p style="margin-left:9%; margin-top: 1em">Web admin
|
||||||
service can also be used to reload configuration. Use wget
|
service can also be used to reload configuration. Use wget
|
||||||
to automate this task.</p>
|
to automate this task.</p>
|
||||||
|
|
||||||
@@ -175,10 +175,10 @@ to automate this task.</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>/usr/local/3proxy/3proxy.cfg
|
<p style="margin-left:9%; margin-top: 1em"><i>/usr/local/3proxy/3proxy.cfg
|
||||||
(3proxy.cfg)</i></p>
|
(3proxy.cfg)</i></p>
|
||||||
|
|
||||||
<p style="margin-left:15%;"><b>3proxy</b> configuration
|
<p style="margin-left:18%;"><b>3proxy</b> configuration
|
||||||
file</p>
|
file</p>
|
||||||
|
|
||||||
<h2>BUGS
|
<h2>BUGS
|
||||||
@@ -186,7 +186,7 @@ file</p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Report all bugs
|
<p style="margin-left:9%; margin-top: 1em">Report all bugs
|
||||||
to <b>3proxy@3proxy.org</b></p>
|
to <b>3proxy@3proxy.org</b></p>
|
||||||
|
|
||||||
<h2>SEE ALSO
|
<h2>SEE ALSO
|
||||||
@@ -194,7 +194,7 @@ to <b>3proxy@3proxy.org</b></p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">3proxy.cfg(5),
|
<p style="margin-left:9%; margin-top: 1em">3proxy.cfg(5),
|
||||||
proxy(8), ftppr(8), socks(8), pop3p(8), imapp(8), tcppm(8),
|
proxy(8), ftppr(8), socks(8), pop3p(8), imapp(8), tcppm(8),
|
||||||
udppm(8), kill(1), syslogd(8), <br>
|
udppm(8), kill(1), syslogd(8), <br>
|
||||||
https://3proxy.org/</p>
|
https://3proxy.org/</p>
|
||||||
@@ -204,7 +204,7 @@ https://3proxy.org/</p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">3proxy is
|
<p style="margin-left:9%; margin-top: 1em">3proxy is
|
||||||
designed by Vladimir Dubrovin <vlad@3proxy.org></p>
|
designed by Vladimir Dubrovin <vlad@3proxy.org></p>
|
||||||
<hr>
|
<hr>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!-- Creator : groff version 1.24.1 -->
|
<!-- Creator : groff version 1.23.0 -->
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>3proxy_crypt</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>3proxy_crypt</b>
|
||||||
- utility to generate encrypted passwords for 3proxy</p>
|
- utility to generate encrypted passwords for 3proxy</p>
|
||||||
|
|
||||||
<h2>SYNOPSIS
|
<h2>SYNOPSIS
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>3proxy_crypt</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>3proxy_crypt</b>
|
||||||
<i>password</i> <b><br>
|
<i>password</i> <b><br>
|
||||||
3proxy_crypt</b> <i>salt password</i></p>
|
3proxy_crypt</b> <i>salt password</i></p>
|
||||||
|
|
||||||
@@ -45,23 +45,23 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i><b>3proxy_crypt</b></i>
|
<p style="margin-left:9%; margin-top: 1em"><i><b>3proxy_crypt</b></i>
|
||||||
is a utility to generate encrypted password hashes for use
|
is a utility to generate encrypted password hashes for use
|
||||||
with 3proxy configuration. Encrypted passwords allow the
|
with 3proxy configuration. Encrypted passwords allow the
|
||||||
system to avoid storing passwords in cleartext in
|
system to avoid storing passwords in cleartext in
|
||||||
configuration files.</p>
|
configuration files.</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">When invoked
|
<p style="margin-left:9%; margin-top: 1em">When invoked
|
||||||
with a single argument, it produces an NT password hash
|
with a single argument, it produces an NT password hash
|
||||||
(MD4-based, suitable for NTLM authentication). The output is
|
(MD4-based, suitable for NTLM authentication). The output is
|
||||||
prefixed with <b>NT:</b>.</p>
|
prefixed with <b>NT:</b>.</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">When invoked
|
<p style="margin-left:9%; margin-top: 1em">When invoked
|
||||||
with two arguments (salt and password), it produces a
|
with two arguments (salt and password), it produces a
|
||||||
BLAKE2b password hash. The salt length is limited to 64
|
BLAKE2b password hash. The salt length is limited to 64
|
||||||
characters. The output is prefixed with <b>CR:</b>.</p>
|
characters. The output is prefixed with <b>CR:</b>.</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The resulting
|
<p style="margin-left:9%; margin-top: 1em">The resulting
|
||||||
hash can be used in the 3proxy configuration file with the
|
hash can be used in the 3proxy configuration file with the
|
||||||
<b>users</b> directive instead of a cleartext password.</p>
|
<b>users</b> directive instead of a cleartext password.</p>
|
||||||
|
|
||||||
@@ -71,25 +71,25 @@ hash can be used in the 3proxy configuration file with the
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>password</i></p>
|
<p style="margin-left:9%; margin-top: 1em"><i>password</i></p>
|
||||||
|
|
||||||
<p style="margin-left:15%;">Cleartext password to
|
<p style="margin-left:18%;">Cleartext password to
|
||||||
encrypt.</p>
|
encrypt.</p>
|
||||||
|
|
||||||
<table width="100%" border="0" rules="none" frame="void"
|
<table width="100%" border="0" rules="none" frame="void"
|
||||||
cellspacing="0" cellpadding="0">
|
cellspacing="0" cellpadding="0">
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="5%">
|
<td width="5%">
|
||||||
|
|
||||||
|
|
||||||
<p><i>salt</i></p></td>
|
<p><i>salt</i></p></td>
|
||||||
<td width="4%"></td>
|
<td width="4%"></td>
|
||||||
<td width="65%">
|
<td width="67%">
|
||||||
|
|
||||||
|
|
||||||
<p>Salt string for BLAKE2b hashing (max 64 characters).</p></td>
|
<p>Salt string for BLAKE2b hashing (max 64 characters).</p></td>
|
||||||
<td width="20%">
|
<td width="15%">
|
||||||
</td></tr>
|
</td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
@@ -98,30 +98,30 @@ encrypt.</p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Generate NT
|
<p style="margin-left:9%; margin-top: 1em">Generate NT
|
||||||
password hash:</p>
|
password hash:</p>
|
||||||
|
|
||||||
<p style="margin-left:15%;">3proxy_crypt
|
<p style="margin-left:18%;">3proxy_crypt
|
||||||
MySecretPassword</p>
|
MySecretPassword</p>
|
||||||
|
|
||||||
<p style="margin-left:6%;">Result:</p>
|
<p style="margin-left:9%;">Result:</p>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:15%;">NT:3F7E6D8D96E8E7A9B0C1D2E3F4A5B6C7</p>
|
<p style="margin-left:18%;">NT:3F7E6D8D96E8E7A9B0C1D2E3F4A5B6C7</p>
|
||||||
|
|
||||||
<p style="margin-left:6%;">Generate BLAKE2b password hash
|
<p style="margin-left:9%;">Generate BLAKE2b password hash
|
||||||
with salt:</p>
|
with salt:</p>
|
||||||
|
|
||||||
<p style="margin-left:15%;">3proxy_crypt MySalt
|
<p style="margin-left:18%;">3proxy_crypt MySalt
|
||||||
MySecretPassword</p>
|
MySecretPassword</p>
|
||||||
|
|
||||||
<p style="margin-left:6%;">Result:</p>
|
<p style="margin-left:9%;">Result:</p>
|
||||||
|
|
||||||
<p style="margin-left:15%;">CR:$3$MySalt$...</p>
|
<p style="margin-left:18%;">CR:$3$MySalt$...</p>
|
||||||
|
|
||||||
<p style="margin-left:6%;">Using in 3proxy.cfg:</p>
|
<p style="margin-left:9%;">Using in 3proxy.cfg:</p>
|
||||||
|
|
||||||
<p style="margin-left:15%;">users
|
<p style="margin-left:18%;">users
|
||||||
user1:CR:$3$MySalt$...</p>
|
user1:CR:$3$MySalt$...</p>
|
||||||
|
|
||||||
<h2>NOTES
|
<h2>NOTES
|
||||||
@@ -129,11 +129,11 @@ user1:CR:$3$MySalt$...</p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The NT hash uses
|
<p style="margin-left:9%; margin-top: 1em">The NT hash uses
|
||||||
the RSA MD4 Message-Digest Algorithm. The BLAKE2b hash uses
|
the RSA MD4 Message-Digest Algorithm. The BLAKE2b hash uses
|
||||||
the BLAKE2 cryptographic hash function.</p>
|
the BLAKE2 cryptographic hash function.</p>
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">When a password
|
<p style="margin-left:9%; margin-top: 1em">When a password
|
||||||
hash is prefixed with <b>NT:</b> or <b>CR:</b>, 3proxy uses
|
hash is prefixed with <b>NT:</b> or <b>CR:</b>, 3proxy uses
|
||||||
the corresponding algorithm to verify passwords instead of
|
the corresponding algorithm to verify passwords instead of
|
||||||
comparing cleartext strings.</p>
|
comparing cleartext strings.</p>
|
||||||
@@ -143,7 +143,7 @@ comparing cleartext strings.</p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Report all bugs
|
<p style="margin-left:9%; margin-top: 1em">Report all bugs
|
||||||
to <b>3proxy@3proxy.org</b></p>
|
to <b>3proxy@3proxy.org</b></p>
|
||||||
|
|
||||||
<h2>SEE ALSO
|
<h2>SEE ALSO
|
||||||
@@ -151,7 +151,7 @@ to <b>3proxy@3proxy.org</b></p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">3proxy(8),
|
<p style="margin-left:9%; margin-top: 1em">3proxy(8),
|
||||||
3proxy.cfg(5), <br>
|
3proxy.cfg(5), <br>
|
||||||
https://3proxy.org/</p>
|
https://3proxy.org/</p>
|
||||||
|
|
||||||
@@ -160,7 +160,7 @@ https://3proxy.org/</p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">3proxy is
|
<p style="margin-left:9%; margin-top: 1em">3proxy is
|
||||||
designed by Vladimir Dubrovin <vlad@3proxy.org></p>
|
designed by Vladimir Dubrovin <vlad@3proxy.org></p>
|
||||||
<hr>
|
<hr>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
+59
-61
@@ -1,4 +1,4 @@
|
|||||||
<!-- Creator : groff version 1.24.1 -->
|
<!-- Creator : groff version 1.23.0 -->
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>ftppr</b> -
|
<p style="margin-left:9%; margin-top: 1em"><b>ftppr</b> -
|
||||||
FTP proxy gateway service</p>
|
FTP proxy gateway service</p>
|
||||||
|
|
||||||
<h2>SYNOPSIS
|
<h2>SYNOPSIS
|
||||||
@@ -32,7 +32,7 @@ FTP proxy gateway service</p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>ftppr</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>ftppr</b>
|
||||||
[<b>-d</b>] [<b>-l</b>[[<i>@</i>]<i>logfile</i>]]
|
[<b>-d</b>] [<b>-l</b>[[<i>@</i>]<i>logfile</i>]]
|
||||||
[<b>-p</b><i>port</i>] [<b>-i</b><i>internal_ip</i>]
|
[<b>-p</b><i>port</i>] [<b>-i</b><i>internal_ip</i>]
|
||||||
[<b>-e</b><i>external_ip</i>]
|
[<b>-e</b><i>external_ip</i>]
|
||||||
@@ -43,7 +43,7 @@ FTP proxy gateway service</p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>ftppr</b> is
|
<p style="margin-left:9%; margin-top: 1em"><b>ftppr</b> is
|
||||||
FTP gateway service to allow internal users to access
|
FTP gateway service to allow internal users to access
|
||||||
external FTP servers.</p>
|
external FTP servers.</p>
|
||||||
|
|
||||||
@@ -55,81 +55,80 @@ external FTP servers.</p>
|
|||||||
<table width="100%" border="0" rules="none" frame="void"
|
<table width="100%" border="0" rules="none" frame="void"
|
||||||
cellspacing="0" cellpadding="0">
|
cellspacing="0" cellpadding="0">
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-I</b></p></td>
|
<p style="margin-top: 1em"><b>-I</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Inetd mode. Standalone service
|
<p style="margin-top: 1em">Inetd mode. Standalone service
|
||||||
only.</p> </td></tr>
|
only.</p> </td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-d</b></p></td>
|
<p><b>-d</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Daemonize. Detach service from
|
<p>Daemonize. Detach service from console and run in the
|
||||||
console and run in the background.</p></td></tr>
|
background.</p> </td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-t</b></p></td>
|
<p><b>-t</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Be silenT. Do not log
|
<p>Be silenT. Do not log start/stop/accept error
|
||||||
start/stop/accept error records.</p></td></tr>
|
records.</p> </td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-u</b></p></td>
|
<p><b>-u</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Never look for username
|
<p>Never look for username authentication.</p></td></tr>
|
||||||
authentication.</p> </td></tr>
|
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-e</b></p></td>
|
<p><b>-e</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">External address. IP address of
|
<p>External address. IP address of the interface the proxy
|
||||||
the interface the proxy should initiate connections from. By
|
should initiate connections from. By default, the system
|
||||||
default, the system will decide which address to use in
|
will decide which address to use in accordance with the
|
||||||
accordance with the routing table.</p></td></tr>
|
routing table.</p></td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>-ni</b><i>PATH</i></p>
|
<p style="margin-left:9%;"><b>-ni</b><i>PATH</i></p>
|
||||||
|
|
||||||
<p style="margin-left:15%;">(Linux only) Switch to the
|
<p style="margin-left:18%;">(Linux only) Switch to the
|
||||||
network namespace identified by <i>PATH</i> before opening
|
network namespace identified by <i>PATH</i> before opening
|
||||||
the listening socket. The current namespace is saved and
|
the listening socket. The current namespace is saved and
|
||||||
restored immediately after binding, so outgoing connections
|
restored immediately after binding, so outgoing connections
|
||||||
run in the original namespace unless <b>-ne</b> is also
|
run in the original namespace unless <b>-ne</b> is also
|
||||||
given.</p>
|
given.</p>
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>-ne</b><i>PATH</i></p>
|
<p style="margin-left:9%;"><b>-ne</b><i>PATH</i></p>
|
||||||
|
|
||||||
<p style="margin-left:15%;">(Linux only) Switch to the
|
<p style="margin-left:18%;">(Linux only) Switch to the
|
||||||
network namespace identified by <i>PATH</i> after the
|
network namespace identified by <i>PATH</i> after the
|
||||||
listening socket has been bound (and after restoring from
|
listening socket has been bound (and after restoring from
|
||||||
<b>-ni</b> if applicable). Both options accept any namespace
|
<b>-ni</b> if applicable). Both options accept any namespace
|
||||||
@@ -140,13 +139,13 @@ file path (e.g. <i>/var/run/netns/myns</i> or
|
|||||||
<table width="100%" border="0" rules="none" frame="void"
|
<table width="100%" border="0" rules="none" frame="void"
|
||||||
cellspacing="0" cellpadding="0">
|
cellspacing="0" cellpadding="0">
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p><b>-i</b></p></td>
|
<p><b>-i</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p>Internal address. IP address the proxy accepts
|
<p>Internal address. IP address the proxy accepts
|
||||||
@@ -156,56 +155,55 @@ be specified with <i>-iunix:/path/to/socket</i> syntax
|
|||||||
(e.g., -iunix:/var/run/ftppr.sock). On Linux, abstract
|
(e.g., -iunix:/var/run/ftppr.sock). On Linux, abstract
|
||||||
sockets use <i>-iunix:@socketname</i> syntax.</p></td></tr>
|
sockets use <i>-iunix:@socketname</i> syntax.</p></td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-h</b></p></td>
|
<p><b>-h</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Default destination. It’s
|
<p>Default destination. It’s used if the target
|
||||||
used if the target address is not specified by the user.</p></td></tr>
|
address is not specified by the user.</p></td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-p</b></p></td>
|
<p><b>-p</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Port. Port proxy listens for
|
<p>Port. Port proxy listens for incoming connections.
|
||||||
incoming connections. Default is 21.</p></td></tr>
|
Default is 21.</p></td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-l</b></p></td>
|
<p><b>-l</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Log. By default logging is to
|
<p>Log. By default logging is to stdout. If <i>logfile</i>
|
||||||
stdout. If <i>logfile</i> is specified logging is to file.
|
is specified logging is to file. Under Unix, if
|
||||||
Under Unix, if ´<i>@</i>´ precedes
|
´<i>@</i>´ precedes <i>logfile</i>, syslog is
|
||||||
<i>logfile</i>, syslog is used for logging.</p></td></tr>
|
used for logging.</p></td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-S</b></p></td>
|
<p><b>-S</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Increase or decrease stack size.
|
<p>Increase or decrease stack size. You may want to try
|
||||||
You may want to try something like -S8192 if you experience
|
something like -S8192 if you experience 3proxy crashes.</p></td></tr>
|
||||||
3proxy crashes.</p></td></tr>
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<h2>CLIENTS
|
<h2>CLIENTS
|
||||||
@@ -213,7 +211,7 @@ You may want to try something like -S8192 if you experience
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">You can use any
|
<p style="margin-left:9%; margin-top: 1em">You can use any
|
||||||
FTP client, regardless of FTP proxy support. For a client
|
FTP client, regardless of FTP proxy support. For a client
|
||||||
with FTP proxy support, configure <i>internal_ip</i> and
|
with FTP proxy support, configure <i>internal_ip</i> and
|
||||||
<i>port</i> in the FTP proxy parameters. For clients without
|
<i>port</i> in the FTP proxy parameters. For clients without
|
||||||
@@ -232,7 +230,7 @@ supported.</p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Report all bugs
|
<p style="margin-left:9%; margin-top: 1em">Report all bugs
|
||||||
to <b>3proxy@3proxy.org</b></p>
|
to <b>3proxy@3proxy.org</b></p>
|
||||||
|
|
||||||
<h2>SEE ALSO
|
<h2>SEE ALSO
|
||||||
@@ -240,7 +238,7 @@ to <b>3proxy@3proxy.org</b></p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">3proxy(8),
|
<p style="margin-left:9%; margin-top: 1em">3proxy(8),
|
||||||
proxy(8), pop3p(8), socks(8), tcppm(8), udppm(8),
|
proxy(8), pop3p(8), socks(8), tcppm(8), udppm(8),
|
||||||
syslogd(8), <br>
|
syslogd(8), <br>
|
||||||
https://3proxy.org/</p>
|
https://3proxy.org/</p>
|
||||||
@@ -250,7 +248,7 @@ https://3proxy.org/</p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">3proxy is
|
<p style="margin-left:9%; margin-top: 1em">3proxy is
|
||||||
designed by Vladimir Dubrovin <vlad@3proxy.org></p>
|
designed by Vladimir Dubrovin <vlad@3proxy.org></p>
|
||||||
<hr>
|
<hr>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
+65
-67
@@ -1,4 +1,4 @@
|
|||||||
<!-- Creator : groff version 1.24.1 -->
|
<!-- Creator : groff version 1.23.0 -->
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>imapp</b> -
|
<p style="margin-left:9%; margin-top: 1em"><b>imapp</b> -
|
||||||
IMAPv4 proxy gateway service</p>
|
IMAPv4 proxy gateway service</p>
|
||||||
|
|
||||||
<h2>SYNOPSIS
|
<h2>SYNOPSIS
|
||||||
@@ -32,7 +32,7 @@ IMAPv4 proxy gateway service</p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>imapp</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>imapp</b>
|
||||||
[<b>-d</b>] [<b>-l</b>[[<i>@</i>]<i>logfile</i>]]
|
[<b>-d</b>] [<b>-l</b>[[<i>@</i>]<i>logfile</i>]]
|
||||||
[<b>-p</b><i>port</i>] [<b>-i</b><i>internal_ip</i>]
|
[<b>-p</b><i>port</i>] [<b>-i</b><i>internal_ip</i>]
|
||||||
[<b>-e</b><i>external_ip</i>]
|
[<b>-e</b><i>external_ip</i>]
|
||||||
@@ -44,7 +44,7 @@ IMAPv4 proxy gateway service</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i><b>imapp</b></i>
|
<p style="margin-left:9%; margin-top: 1em"><i><b>imapp</b></i>
|
||||||
is IMAPv4 (IMAP4rev1) gateway service to allow internal
|
is IMAPv4 (IMAP4rev1) gateway service to allow internal
|
||||||
users to access external IMAP servers.</p>
|
users to access external IMAP servers.</p>
|
||||||
|
|
||||||
@@ -56,81 +56,80 @@ users to access external IMAP servers.</p>
|
|||||||
<table width="100%" border="0" rules="none" frame="void"
|
<table width="100%" border="0" rules="none" frame="void"
|
||||||
cellspacing="0" cellpadding="0">
|
cellspacing="0" cellpadding="0">
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-I</b></p></td>
|
<p style="margin-top: 1em"><b>-I</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Inetd mode. Standalone service
|
<p style="margin-top: 1em">Inetd mode. Standalone service
|
||||||
only.</p> </td></tr>
|
only.</p> </td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-d</b></p></td>
|
<p><b>-d</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Daemonize. Detach service from
|
<p>Daemonize. Detach service from console and run in the
|
||||||
console and run in the background.</p></td></tr>
|
background.</p> </td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-t</b></p></td>
|
<p><b>-t</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Be silenT. Do not log
|
<p>Be silenT. Do not log start/stop/accept error
|
||||||
start/stop/accept error records.</p></td></tr>
|
records.</p> </td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-u</b></p></td>
|
<p><b>-u</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Never look for username
|
<p>Never look for username authentication.</p></td></tr>
|
||||||
authentication.</p> </td></tr>
|
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-e</b></p></td>
|
<p><b>-e</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">External address. IP address of
|
<p>External address. IP address of the interface the proxy
|
||||||
the interface the proxy should initiate connections from. By
|
should initiate connections from. By default, the system
|
||||||
default, the system will decide which address to use in
|
will decide which address to use in accordance with the
|
||||||
accordance with the routing table.</p></td></tr>
|
routing table.</p></td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>-ni</b><i>PATH</i></p>
|
<p style="margin-left:9%;"><b>-ni</b><i>PATH</i></p>
|
||||||
|
|
||||||
<p style="margin-left:15%;">(Linux only) Switch to the
|
<p style="margin-left:18%;">(Linux only) Switch to the
|
||||||
network namespace identified by <i>PATH</i> before opening
|
network namespace identified by <i>PATH</i> before opening
|
||||||
the listening socket. The current namespace is saved and
|
the listening socket. The current namespace is saved and
|
||||||
restored immediately after binding, so outgoing connections
|
restored immediately after binding, so outgoing connections
|
||||||
run in the original namespace unless <b>-ne</b> is also
|
run in the original namespace unless <b>-ne</b> is also
|
||||||
given.</p>
|
given.</p>
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>-ne</b><i>PATH</i></p>
|
<p style="margin-left:9%;"><b>-ne</b><i>PATH</i></p>
|
||||||
|
|
||||||
<p style="margin-left:15%;">(Linux only) Switch to the
|
<p style="margin-left:18%;">(Linux only) Switch to the
|
||||||
network namespace identified by <i>PATH</i> after the
|
network namespace identified by <i>PATH</i> after the
|
||||||
listening socket has been bound (and after restoring from
|
listening socket has been bound (and after restoring from
|
||||||
<b>-ni</b> if applicable). Both options accept any namespace
|
<b>-ni</b> if applicable). Both options accept any namespace
|
||||||
@@ -141,13 +140,13 @@ file path (e.g. <i>/var/run/netns/myns</i> or
|
|||||||
<table width="100%" border="0" rules="none" frame="void"
|
<table width="100%" border="0" rules="none" frame="void"
|
||||||
cellspacing="0" cellpadding="0">
|
cellspacing="0" cellpadding="0">
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p><b>-i</b></p></td>
|
<p><b>-i</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p>Internal address. IP address the proxy accepts
|
<p>Internal address. IP address the proxy accepts
|
||||||
@@ -157,69 +156,68 @@ be specified with <i>-iunix:/path/to/socket</i> syntax
|
|||||||
(e.g., -iunix:/var/run/imapp.sock). On Linux, abstract
|
(e.g., -iunix:/var/run/imapp.sock). On Linux, abstract
|
||||||
sockets use <i>-iunix:@socketname</i> syntax.</p></td></tr>
|
sockets use <i>-iunix:@socketname</i> syntax.</p></td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-p</b></p></td>
|
<p><b>-p</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Port. Port proxy listens for
|
<p>Port. Port proxy listens for incoming connections.
|
||||||
incoming connections. Default is 143.</p></td></tr>
|
Default is 143.</p></td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-h</b></p></td>
|
<p><b>-h</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Default destination. It’s
|
<p>Default destination. It’s used if the target
|
||||||
used if the target address is not specified by the user.</p></td></tr>
|
address is not specified by the user.</p></td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-x</b></p></td>
|
<p><b>-x</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Disable STARTTLS support.
|
<p>Disable STARTTLS support. STARTTLS is not announced in
|
||||||
STARTTLS is not announced in the CAPABILITY response and the
|
the CAPABILITY response and the STARTTLS command is not
|
||||||
STARTTLS command is not accepted.</p></td></tr>
|
accepted.</p> </td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-l</b></p></td>
|
<p><b>-l</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Log. By default logging is to
|
<p>Log. By default logging is to stdout. If <i>logfile</i>
|
||||||
stdout. If <i>logfile</i> is specified logging is to file.
|
is specified logging is to file. Under Unix, if
|
||||||
Under Unix, if ´<i>@</i>´ precedes
|
´<i>@</i>´ precedes <i>logfile</i>, syslog is
|
||||||
<i>logfile</i>, syslog is used for logging.</p></td></tr>
|
used for logging.</p></td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-S</b></p></td>
|
<p><b>-S</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Increase or decrease stack size.
|
<p>Increase or decrease stack size. You may want to try
|
||||||
You may want to try something like -S8192 if you experience
|
something like -S8192 if you experience 3proxy crashes.</p></td></tr>
|
||||||
3proxy crashes.</p></td></tr>
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<h2>CLIENTS
|
<h2>CLIENTS
|
||||||
@@ -227,7 +225,7 @@ You may want to try something like -S8192 if you experience
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">You can use any
|
<p style="margin-left:9%; margin-top: 1em">You can use any
|
||||||
MUA (Mail User Agent) with IMAPv4 support. Set the client to
|
MUA (Mail User Agent) with IMAPv4 support. Set the client to
|
||||||
use <i>internal_ip</i> and <i>port</i> as an IMAP server.
|
use <i>internal_ip</i> and <i>port</i> as an IMAP server.
|
||||||
The address of the real IMAP server must be configured as a
|
The address of the real IMAP server must be configured as a
|
||||||
@@ -262,7 +260,7 @@ fails.</p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Report all bugs
|
<p style="margin-left:9%; margin-top: 1em">Report all bugs
|
||||||
to <b>3proxy@3proxy.org</b></p>
|
to <b>3proxy@3proxy.org</b></p>
|
||||||
|
|
||||||
<h2>SEE ALSO
|
<h2>SEE ALSO
|
||||||
@@ -270,7 +268,7 @@ to <b>3proxy@3proxy.org</b></p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">3proxy(8),
|
<p style="margin-left:9%; margin-top: 1em">3proxy(8),
|
||||||
ftppr(8), pop3p(8), proxy(8), smtpp(8), socks(8), tcppm(8),
|
ftppr(8), pop3p(8), proxy(8), smtpp(8), socks(8), tcppm(8),
|
||||||
tlspr(8), udppm(8), syslogd(8), <br>
|
tlspr(8), udppm(8), syslogd(8), <br>
|
||||||
https://3proxy.org/</p>
|
https://3proxy.org/</p>
|
||||||
@@ -280,7 +278,7 @@ https://3proxy.org/</p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">3proxy is
|
<p style="margin-left:9%; margin-top: 1em">3proxy is
|
||||||
designed by Vladimir Dubrovin <vlad@3proxy.org></p>
|
designed by Vladimir Dubrovin <vlad@3proxy.org></p>
|
||||||
<hr>
|
<hr>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
+65
-67
@@ -1,4 +1,4 @@
|
|||||||
<!-- Creator : groff version 1.24.1 -->
|
<!-- Creator : groff version 1.23.0 -->
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>pop3p</b> -
|
<p style="margin-left:9%; margin-top: 1em"><b>pop3p</b> -
|
||||||
POP3 proxy gateway service</p>
|
POP3 proxy gateway service</p>
|
||||||
|
|
||||||
<h2>SYNOPSIS
|
<h2>SYNOPSIS
|
||||||
@@ -32,7 +32,7 @@ POP3 proxy gateway service</p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>pop3p</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>pop3p</b>
|
||||||
[<b>-d</b>] [<b>-l</b>[[<i>@</i>]<i>logfile</i>]]
|
[<b>-d</b>] [<b>-l</b>[[<i>@</i>]<i>logfile</i>]]
|
||||||
[<b>-p</b><i>port</i>] [<b>-i</b><i>internal_ip</i>]
|
[<b>-p</b><i>port</i>] [<b>-i</b><i>internal_ip</i>]
|
||||||
[<b>-e</b><i>external_ip</i>]
|
[<b>-e</b><i>external_ip</i>]
|
||||||
@@ -44,7 +44,7 @@ POP3 proxy gateway service</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i><b>pop3p</b></i>
|
<p style="margin-left:9%; margin-top: 1em"><i><b>pop3p</b></i>
|
||||||
is POP3 gateway service to allow internal users to access
|
is POP3 gateway service to allow internal users to access
|
||||||
external POP3 servers.</p>
|
external POP3 servers.</p>
|
||||||
|
|
||||||
@@ -56,81 +56,80 @@ external POP3 servers.</p>
|
|||||||
<table width="100%" border="0" rules="none" frame="void"
|
<table width="100%" border="0" rules="none" frame="void"
|
||||||
cellspacing="0" cellpadding="0">
|
cellspacing="0" cellpadding="0">
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-I</b></p></td>
|
<p style="margin-top: 1em"><b>-I</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Inetd mode. Standalone service
|
<p style="margin-top: 1em">Inetd mode. Standalone service
|
||||||
only.</p> </td></tr>
|
only.</p> </td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-d</b></p></td>
|
<p><b>-d</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Daemonize. Detach service from
|
<p>Daemonize. Detach service from console and run in the
|
||||||
console and run in the background.</p></td></tr>
|
background.</p> </td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-t</b></p></td>
|
<p><b>-t</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Be silenT. Do not log
|
<p>Be silenT. Do not log start/stop/accept error
|
||||||
start/stop/accept error records.</p></td></tr>
|
records.</p> </td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-u</b></p></td>
|
<p><b>-u</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Never look for username
|
<p>Never look for username authentication.</p></td></tr>
|
||||||
authentication.</p> </td></tr>
|
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-e</b></p></td>
|
<p><b>-e</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">External address. IP address of
|
<p>External address. IP address of the interface the proxy
|
||||||
the interface the proxy should initiate connections from. By
|
should initiate connections from. By default, the system
|
||||||
default, the system will decide which address to use in
|
will decide which address to use in accordance with the
|
||||||
accordance with the routing table.</p></td></tr>
|
routing table.</p></td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>-ni</b><i>PATH</i></p>
|
<p style="margin-left:9%;"><b>-ni</b><i>PATH</i></p>
|
||||||
|
|
||||||
<p style="margin-left:15%;">(Linux only) Switch to the
|
<p style="margin-left:18%;">(Linux only) Switch to the
|
||||||
network namespace identified by <i>PATH</i> before opening
|
network namespace identified by <i>PATH</i> before opening
|
||||||
the listening socket. The current namespace is saved and
|
the listening socket. The current namespace is saved and
|
||||||
restored immediately after binding, so outgoing connections
|
restored immediately after binding, so outgoing connections
|
||||||
run in the original namespace unless <b>-ne</b> is also
|
run in the original namespace unless <b>-ne</b> is also
|
||||||
given.</p>
|
given.</p>
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>-ne</b><i>PATH</i></p>
|
<p style="margin-left:9%;"><b>-ne</b><i>PATH</i></p>
|
||||||
|
|
||||||
<p style="margin-left:15%;">(Linux only) Switch to the
|
<p style="margin-left:18%;">(Linux only) Switch to the
|
||||||
network namespace identified by <i>PATH</i> after the
|
network namespace identified by <i>PATH</i> after the
|
||||||
listening socket has been bound (and after restoring from
|
listening socket has been bound (and after restoring from
|
||||||
<b>-ni</b> if applicable). Both options accept any namespace
|
<b>-ni</b> if applicable). Both options accept any namespace
|
||||||
@@ -141,13 +140,13 @@ file path (e.g. <i>/var/run/netns/myns</i> or
|
|||||||
<table width="100%" border="0" rules="none" frame="void"
|
<table width="100%" border="0" rules="none" frame="void"
|
||||||
cellspacing="0" cellpadding="0">
|
cellspacing="0" cellpadding="0">
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p><b>-i</b></p></td>
|
<p><b>-i</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p>Internal address. IP address the proxy accepts
|
<p>Internal address. IP address the proxy accepts
|
||||||
@@ -157,69 +156,68 @@ be specified with <i>-iunix:/path/to/socket</i> syntax
|
|||||||
(e.g., -iunix:/var/run/pop3p.sock). On Linux, abstract
|
(e.g., -iunix:/var/run/pop3p.sock). On Linux, abstract
|
||||||
sockets use <i>-iunix:@socketname</i> syntax.</p></td></tr>
|
sockets use <i>-iunix:@socketname</i> syntax.</p></td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-p</b></p></td>
|
<p><b>-p</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Port. Port proxy listens for
|
<p>Port. Port proxy listens for incoming connections.
|
||||||
incoming connections. Default is 110.</p></td></tr>
|
Default is 110.</p></td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-h</b></p></td>
|
<p><b>-h</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Default destination. It’s
|
<p>Default destination. It’s used if the target
|
||||||
used if the target address is not specified by the user.</p></td></tr>
|
address is not specified by the user.</p></td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-x</b></p></td>
|
<p><b>-x</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Disable STARTTLS (STLS) support.
|
<p>Disable STARTTLS (STLS) support. STLS is not announced
|
||||||
STLS is not announced in the CAPA response and the STLS
|
in the CAPA response and the STLS command is not
|
||||||
command is not accepted.</p></td></tr>
|
accepted.</p> </td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-l</b></p></td>
|
<p><b>-l</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Log. By default logging is to
|
<p>Log. By default logging is to stdout. If <i>logfile</i>
|
||||||
stdout. If <i>logfile</i> is specified logging is to file.
|
is specified logging is to file. Under Unix, if
|
||||||
Under Unix, if ´<i>@</i>´ precedes
|
´<i>@</i>´ precedes <i>logfile</i>, syslog is
|
||||||
<i>logfile</i>, syslog is used for logging.</p></td></tr>
|
used for logging.</p></td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-S</b></p></td>
|
<p><b>-S</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Increase or decrease stack size.
|
<p>Increase or decrease stack size. You may want to try
|
||||||
You may want to try something like -S8192 if you experience
|
something like -S8192 if you experience 3proxy crashes.</p></td></tr>
|
||||||
3proxy crashes.</p></td></tr>
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<h2>CLIENTS
|
<h2>CLIENTS
|
||||||
@@ -227,7 +225,7 @@ You may want to try something like -S8192 if you experience
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">You can use any
|
<p style="margin-left:9%; margin-top: 1em">You can use any
|
||||||
MUA (Mail User Agent) with POP3 support. Set the client to
|
MUA (Mail User Agent) with POP3 support. Set the client to
|
||||||
use <i>internal_ip</i> and <i>port</i> as a POP3 server. The
|
use <i>internal_ip</i> and <i>port</i> as a POP3 server. The
|
||||||
address of the real POP3 server must be configured as a part
|
address of the real POP3 server must be configured as a part
|
||||||
@@ -255,7 +253,7 @@ TLS handshake with the client fails.</p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Report all bugs
|
<p style="margin-left:9%; margin-top: 1em">Report all bugs
|
||||||
to <b>3proxy@3proxy.org</b></p>
|
to <b>3proxy@3proxy.org</b></p>
|
||||||
|
|
||||||
<h2>SEE ALSO
|
<h2>SEE ALSO
|
||||||
@@ -263,7 +261,7 @@ to <b>3proxy@3proxy.org</b></p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">3proxy(8),
|
<p style="margin-left:9%; margin-top: 1em">3proxy(8),
|
||||||
ftppr(8), proxy(8), socks(8), tcppm(8), udppm(8),
|
ftppr(8), proxy(8), socks(8), tcppm(8), udppm(8),
|
||||||
syslogd(8), <br>
|
syslogd(8), <br>
|
||||||
https://3proxy.org/</p>
|
https://3proxy.org/</p>
|
||||||
@@ -273,7 +271,7 @@ https://3proxy.org/</p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">3proxy is
|
<p style="margin-left:9%; margin-top: 1em">3proxy is
|
||||||
designed by Vladimir Dubrovin <vlad@3proxy.org></p>
|
designed by Vladimir Dubrovin <vlad@3proxy.org></p>
|
||||||
<hr>
|
<hr>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
+62
-66
@@ -1,4 +1,4 @@
|
|||||||
<!-- Creator : groff version 1.24.1 -->
|
<!-- Creator : groff version 1.23.0 -->
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>proxy</b> -
|
<p style="margin-left:9%; margin-top: 1em"><b>proxy</b> -
|
||||||
HTTP proxy gateway service</p>
|
HTTP proxy gateway service</p>
|
||||||
|
|
||||||
<h2>SYNOPSIS
|
<h2>SYNOPSIS
|
||||||
@@ -32,7 +32,7 @@ HTTP proxy gateway service</p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>proxy</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>proxy</b>
|
||||||
[<b>-d</b>][<b>-a</b>] [<b>-l</b>[[<i>@</i>]<i>logfile</i>]]
|
[<b>-d</b>][<b>-a</b>] [<b>-l</b>[[<i>@</i>]<i>logfile</i>]]
|
||||||
[<b>-p</b><i>port</i>] [<b>-i</b><i>internal_ip</i>]
|
[<b>-p</b><i>port</i>] [<b>-i</b><i>internal_ip</i>]
|
||||||
[<b>-e</b><i>external_ip</i>]</p>
|
[<b>-e</b><i>external_ip</i>]</p>
|
||||||
@@ -42,7 +42,7 @@ HTTP proxy gateway service</p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>proxy</b> is
|
<p style="margin-left:9%; margin-top: 1em"><b>proxy</b> is
|
||||||
HTTP gateway service with HTTPS and FTP over HTTPS
|
HTTP gateway service with HTTPS and FTP over HTTPS
|
||||||
support.</p>
|
support.</p>
|
||||||
|
|
||||||
@@ -54,81 +54,80 @@ support.</p>
|
|||||||
<table width="100%" border="0" rules="none" frame="void"
|
<table width="100%" border="0" rules="none" frame="void"
|
||||||
cellspacing="0" cellpadding="0">
|
cellspacing="0" cellpadding="0">
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-I</b></p></td>
|
<p style="margin-top: 1em"><b>-I</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Inetd mode. Standalone service
|
<p style="margin-top: 1em">Inetd mode. Standalone service
|
||||||
only.</p> </td></tr>
|
only.</p> </td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-d</b></p></td>
|
<p><b>-d</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Daemonize. Detach service from
|
<p>Daemonize. Detach service from console and run in the
|
||||||
console and run in the background.</p></td></tr>
|
background.</p> </td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-t</b></p></td>
|
<p><b>-t</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Be silenT. Do not log
|
<p>Be silenT. Do not log start/stop/accept error
|
||||||
start/stop/accept error records.</p></td></tr>
|
records.</p> </td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-u</b></p></td>
|
<p><b>-u</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Never ask for username
|
<p>Never ask for username authentication</p></td></tr>
|
||||||
authentication</p> </td></tr>
|
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-e</b></p></td>
|
<p><b>-e</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">External address. IP address of
|
<p>External address. IP address of the interface the proxy
|
||||||
the interface the proxy should initiate connections from. By
|
should initiate connections from. By default, the system
|
||||||
default, the system will decide which address to use in
|
will decide which address to use in accordance with the
|
||||||
accordance with the routing table.</p></td></tr>
|
routing table.</p></td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>-ni</b><i>PATH</i></p>
|
<p style="margin-left:9%;"><b>-ni</b><i>PATH</i></p>
|
||||||
|
|
||||||
<p style="margin-left:15%;">(Linux only) Switch to the
|
<p style="margin-left:18%;">(Linux only) Switch to the
|
||||||
network namespace identified by <i>PATH</i> before opening
|
network namespace identified by <i>PATH</i> before opening
|
||||||
the listening socket. The current namespace is saved and
|
the listening socket. The current namespace is saved and
|
||||||
restored immediately after binding, so outgoing connections
|
restored immediately after binding, so outgoing connections
|
||||||
run in the original namespace unless <b>-ne</b> is also
|
run in the original namespace unless <b>-ne</b> is also
|
||||||
given.</p>
|
given.</p>
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>-ne</b><i>PATH</i></p>
|
<p style="margin-left:9%;"><b>-ne</b><i>PATH</i></p>
|
||||||
|
|
||||||
<p style="margin-left:15%;">(Linux only) Switch to the
|
<p style="margin-left:18%;">(Linux only) Switch to the
|
||||||
network namespace identified by <i>PATH</i> after the
|
network namespace identified by <i>PATH</i> after the
|
||||||
listening socket has been bound (and after restoring from
|
listening socket has been bound (and after restoring from
|
||||||
<b>-ni</b> if applicable). Both options accept any namespace
|
<b>-ni</b> if applicable). Both options accept any namespace
|
||||||
@@ -139,13 +138,13 @@ file path (e.g. <i>/var/run/netns/myns</i> or
|
|||||||
<table width="100%" border="0" rules="none" frame="void"
|
<table width="100%" border="0" rules="none" frame="void"
|
||||||
cellspacing="0" cellpadding="0">
|
cellspacing="0" cellpadding="0">
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="4%">
|
<td width="4%">
|
||||||
|
|
||||||
|
|
||||||
<p><b>-i</b></p></td>
|
<p><b>-i</b></p></td>
|
||||||
<td width="5%"></td>
|
<td width="5%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p>Internal address. IP address the proxy accepts
|
<p>Internal address. IP address the proxy accepts
|
||||||
@@ -155,68 +154,65 @@ be specified with <i>-iunix:/path/to/socket</i> syntax
|
|||||||
(e.g., -iunix:/var/run/proxy.sock). On Linux, abstract
|
(e.g., -iunix:/var/run/proxy.sock). On Linux, abstract
|
||||||
sockets use <i>-iunix:@socketname</i> syntax.</p></td></tr>
|
sockets use <i>-iunix:@socketname</i> syntax.</p></td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="4%">
|
<td width="4%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-a</b></p></td>
|
<p><b>-a</b></p></td>
|
||||||
<td width="5%"></td>
|
<td width="5%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Anonymous. Hide information
|
<p>Anonymous. Hide information about client.</p></td></tr>
|
||||||
about client.</p></td></tr>
|
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="4%">
|
<td width="4%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-a1</b></p></td>
|
<p><b>-a1</b></p></td>
|
||||||
<td width="5%"></td>
|
<td width="5%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Anonymous. Show fake information
|
<p>Anonymous. Show fake information about client.</p></td></tr>
|
||||||
about client.</p></td></tr>
|
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="4%">
|
<td width="4%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-p</b></p></td>
|
<p><b>-p</b></p></td>
|
||||||
<td width="5%"></td>
|
<td width="5%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Port. Port proxy listens for
|
<p>Port. Port proxy listens for incoming connections.
|
||||||
incoming connections. Default is 3128.</p></td></tr>
|
Default is 3128.</p></td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="4%">
|
<td width="4%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-l</b></p></td>
|
<p><b>-l</b></p></td>
|
||||||
<td width="5%"></td>
|
<td width="5%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Log. By default logging is to
|
<p>Log. By default logging is to stdout. If <i>logfile</i>
|
||||||
stdout. If <i>logfile</i> is specified logging is to file.
|
is specified logging is to file. Under Unix, if
|
||||||
Under Unix, if ´<i>@</i>´ preceeds
|
´<i>@</i>´ preceeds <i>logfile</i>, syslog is
|
||||||
<i>logfile</i>, syslog is used for logging.</p></td></tr>
|
used for logging.</p></td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="4%">
|
<td width="4%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-S</b></p></td>
|
<p><b>-S</b></p></td>
|
||||||
<td width="5%"></td>
|
<td width="5%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Increase or decrease stack size.
|
<p>Increase or decrease stack size. You may want to try
|
||||||
You may want to try something like -S8192 if you experience
|
something like -S8192 if you experience 3proxy crashes.</p></td></tr>
|
||||||
3proxy crashes.</p></td></tr>
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<h2>CLIENTS
|
<h2>CLIENTS
|
||||||
@@ -224,7 +220,7 @@ You may want to try something like -S8192 if you experience
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">You should use a
|
<p style="margin-left:9%; margin-top: 1em">You should use a
|
||||||
client with HTTP proxy support or configure a router to
|
client with HTTP proxy support or configure a router to
|
||||||
redirect HTTP traffic to the proxy (transparent proxy).
|
redirect HTTP traffic to the proxy (transparent proxy).
|
||||||
Configure the client to connect to <i>internal_ip</i> and
|
Configure the client to connect to <i>internal_ip</i> and
|
||||||
@@ -237,7 +233,7 @@ TCP-based protocol. If you need to limit clients, use
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Report all bugs
|
<p style="margin-left:9%; margin-top: 1em">Report all bugs
|
||||||
to <b>3proxy@3proxy.org</b></p>
|
to <b>3proxy@3proxy.org</b></p>
|
||||||
|
|
||||||
<h2>SEE ALSO
|
<h2>SEE ALSO
|
||||||
@@ -245,7 +241,7 @@ to <b>3proxy@3proxy.org</b></p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">3proxy(8),
|
<p style="margin-left:9%; margin-top: 1em">3proxy(8),
|
||||||
ftppr(8), socks(8), pop3p(8), tcppm(8), udppm(8),
|
ftppr(8), socks(8), pop3p(8), tcppm(8), udppm(8),
|
||||||
syslogd(8), <br>
|
syslogd(8), <br>
|
||||||
https://3proxy.org/</p>
|
https://3proxy.org/</p>
|
||||||
@@ -255,7 +251,7 @@ https://3proxy.org/</p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">3proxy is
|
<p style="margin-left:9%; margin-top: 1em">3proxy is
|
||||||
designed by Vladimir Dubrovin <vlad@3proxy.org></p>
|
designed by Vladimir Dubrovin <vlad@3proxy.org></p>
|
||||||
<hr>
|
<hr>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
+65
-67
@@ -1,4 +1,4 @@
|
|||||||
<!-- Creator : groff version 1.24.1 -->
|
<!-- Creator : groff version 1.23.0 -->
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>smtpp</b> -
|
<p style="margin-left:9%; margin-top: 1em"><b>smtpp</b> -
|
||||||
SMTP proxy gateway service</p>
|
SMTP proxy gateway service</p>
|
||||||
|
|
||||||
<h2>SYNOPSIS
|
<h2>SYNOPSIS
|
||||||
@@ -32,7 +32,7 @@ SMTP proxy gateway service</p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>smtpp</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>smtpp</b>
|
||||||
[<b>-d</b>] [<b>-l</b>[[<i>@</i>]<i>logfile</i>]]
|
[<b>-d</b>] [<b>-l</b>[[<i>@</i>]<i>logfile</i>]]
|
||||||
[<b>-p</b><i>port</i>] [<b>-i</b><i>internal_ip</i>]
|
[<b>-p</b><i>port</i>] [<b>-i</b><i>internal_ip</i>]
|
||||||
[<b>-e</b><i>external_ip</i>]
|
[<b>-e</b><i>external_ip</i>]
|
||||||
@@ -44,7 +44,7 @@ SMTP proxy gateway service</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i><b>smtpp</b></i>
|
<p style="margin-left:9%; margin-top: 1em"><i><b>smtpp</b></i>
|
||||||
is SMTP gateway service to allow internal users to access
|
is SMTP gateway service to allow internal users to access
|
||||||
external SMTP servers.</p>
|
external SMTP servers.</p>
|
||||||
|
|
||||||
@@ -56,81 +56,80 @@ external SMTP servers.</p>
|
|||||||
<table width="100%" border="0" rules="none" frame="void"
|
<table width="100%" border="0" rules="none" frame="void"
|
||||||
cellspacing="0" cellpadding="0">
|
cellspacing="0" cellpadding="0">
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-I</b></p></td>
|
<p style="margin-top: 1em"><b>-I</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Inetd mode. Standalone service
|
<p style="margin-top: 1em">Inetd mode. Standalone service
|
||||||
only.</p> </td></tr>
|
only.</p> </td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-d</b></p></td>
|
<p><b>-d</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Daemonize. Detach service from
|
<p>Daemonize. Detach service from console and run in the
|
||||||
console and run in the background.</p></td></tr>
|
background.</p> </td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-t</b></p></td>
|
<p><b>-t</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Be silenT. Do not log
|
<p>Be silenT. Do not log start/stop/accept error
|
||||||
start/stop/accept error records.</p></td></tr>
|
records.</p> </td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-u</b></p></td>
|
<p><b>-u</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Never look for username
|
<p>Never look for username authentication.</p></td></tr>
|
||||||
authentication.</p> </td></tr>
|
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-e</b></p></td>
|
<p><b>-e</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">External address. IP address of
|
<p>External address. IP address of the interface the proxy
|
||||||
the interface the proxy should initiate connections from. By
|
should initiate connections from. By default, the system
|
||||||
default, the system will decide which address to use in
|
will decide which address to use in accordance with the
|
||||||
accordance with the routing table.</p></td></tr>
|
routing table.</p></td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>-ni</b><i>PATH</i></p>
|
<p style="margin-left:9%;"><b>-ni</b><i>PATH</i></p>
|
||||||
|
|
||||||
<p style="margin-left:15%;">(Linux only) Switch to the
|
<p style="margin-left:18%;">(Linux only) Switch to the
|
||||||
network namespace identified by <i>PATH</i> before opening
|
network namespace identified by <i>PATH</i> before opening
|
||||||
the listening socket. The current namespace is saved and
|
the listening socket. The current namespace is saved and
|
||||||
restored immediately after binding, so outgoing connections
|
restored immediately after binding, so outgoing connections
|
||||||
run in the original namespace unless <b>-ne</b> is also
|
run in the original namespace unless <b>-ne</b> is also
|
||||||
given.</p>
|
given.</p>
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>-ne</b><i>PATH</i></p>
|
<p style="margin-left:9%;"><b>-ne</b><i>PATH</i></p>
|
||||||
|
|
||||||
<p style="margin-left:15%;">(Linux only) Switch to the
|
<p style="margin-left:18%;">(Linux only) Switch to the
|
||||||
network namespace identified by <i>PATH</i> after the
|
network namespace identified by <i>PATH</i> after the
|
||||||
listening socket has been bound (and after restoring from
|
listening socket has been bound (and after restoring from
|
||||||
<b>-ni</b> if applicable). Both options accept any namespace
|
<b>-ni</b> if applicable). Both options accept any namespace
|
||||||
@@ -141,13 +140,13 @@ file path (e.g. <i>/var/run/netns/myns</i> or
|
|||||||
<table width="100%" border="0" rules="none" frame="void"
|
<table width="100%" border="0" rules="none" frame="void"
|
||||||
cellspacing="0" cellpadding="0">
|
cellspacing="0" cellpadding="0">
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p><b>-i</b></p></td>
|
<p><b>-i</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p>Internal address. IP address the proxy accepts
|
<p>Internal address. IP address the proxy accepts
|
||||||
@@ -157,69 +156,68 @@ be specified with <i>-iunix:/path/to/socket</i> syntax
|
|||||||
(e.g., -iunix:/var/run/smtpp.sock). On Linux, abstract
|
(e.g., -iunix:/var/run/smtpp.sock). On Linux, abstract
|
||||||
sockets use <i>-iunix:@socketname</i> syntax.</p></td></tr>
|
sockets use <i>-iunix:@socketname</i> syntax.</p></td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-p</b></p></td>
|
<p><b>-p</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Port. Port proxy listens for
|
<p>Port. Port proxy listens for incoming connections.
|
||||||
incoming connections. Default is 587.</p></td></tr>
|
Default is 587.</p></td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-h</b></p></td>
|
<p><b>-h</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Default destination. It’s
|
<p>Default destination. It’s used if the target
|
||||||
used if the target address is not specified by the user.</p></td></tr>
|
address is not specified by the user.</p></td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-x</b></p></td>
|
<p><b>-x</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Disable STARTTLS support.
|
<p>Disable STARTTLS support. STARTTLS is not announced in
|
||||||
STARTTLS is not announced in the EHLO response and the
|
the EHLO response and the STARTTLS command is not
|
||||||
STARTTLS command is not accepted.</p></td></tr>
|
accepted.</p> </td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-l</b></p></td>
|
<p><b>-l</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Log. By default logging is to
|
<p>Log. By default logging is to stdout. If <i>logfile</i>
|
||||||
stdout. If <i>logfile</i> is specified logging is to file.
|
is specified logging is to file. Under Unix, if
|
||||||
Under Unix, if ´<i>@</i>´ precedes
|
´<i>@</i>´ precedes <i>logfile</i>, syslog is
|
||||||
<i>logfile</i>, syslog is used for logging.</p></td></tr>
|
used for logging.</p></td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-S</b></p></td>
|
<p><b>-S</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Increase or decrease stack size.
|
<p>Increase or decrease stack size. You may want to try
|
||||||
You may want to try something like -S8192 if you experience
|
something like -S8192 if you experience 3proxy crashes.</p></td></tr>
|
||||||
3proxy crashes.</p></td></tr>
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<h2>CLIENTS
|
<h2>CLIENTS
|
||||||
@@ -227,7 +225,7 @@ You may want to try something like -S8192 if you experience
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">You can use any
|
<p style="margin-left:9%; margin-top: 1em">You can use any
|
||||||
MUA (Mail User Agent) with SMTP authentication support. Set
|
MUA (Mail User Agent) with SMTP authentication support. Set
|
||||||
the client to use <i>internal_ip</i> and <i>port</i> as an
|
the client to use <i>internal_ip</i> and <i>port</i> as an
|
||||||
SMTP server. The address of the real SMTP server must be
|
SMTP server. The address of the real SMTP server must be
|
||||||
@@ -256,7 +254,7 @@ fails.</p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Report all bugs
|
<p style="margin-left:9%; margin-top: 1em">Report all bugs
|
||||||
to <b>3proxy@3proxy.org</b></p>
|
to <b>3proxy@3proxy.org</b></p>
|
||||||
|
|
||||||
<h2>SEE ALSO
|
<h2>SEE ALSO
|
||||||
@@ -264,7 +262,7 @@ to <b>3proxy@3proxy.org</b></p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">3proxy(8),
|
<p style="margin-left:9%; margin-top: 1em">3proxy(8),
|
||||||
ftppr(8), proxy(8), socks(8), tcppm(8), udppm(8),
|
ftppr(8), proxy(8), socks(8), tcppm(8), udppm(8),
|
||||||
syslogd(8), <br>
|
syslogd(8), <br>
|
||||||
https://3proxy.org/</p>
|
https://3proxy.org/</p>
|
||||||
@@ -274,7 +272,7 @@ https://3proxy.org/</p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">3proxy is
|
<p style="margin-left:9%; margin-top: 1em">3proxy is
|
||||||
designed by Vladimir Dubrovin <vlad@3proxy.org></p>
|
designed by Vladimir Dubrovin <vlad@3proxy.org></p>
|
||||||
<hr>
|
<hr>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
+73
-76
@@ -1,4 +1,4 @@
|
|||||||
<!-- Creator : groff version 1.24.1 -->
|
<!-- Creator : groff version 1.23.0 -->
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>socks</b> -
|
<p style="margin-left:9%; margin-top: 1em"><b>socks</b> -
|
||||||
SOCKS 4/4.5/5 gateway service</p>
|
SOCKS 4/4.5/5 gateway service</p>
|
||||||
|
|
||||||
<h2>SYNOPSIS
|
<h2>SYNOPSIS
|
||||||
@@ -32,7 +32,7 @@ SOCKS 4/4.5/5 gateway service</p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>socks</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>socks</b>
|
||||||
[<b>-d</b>] [<b>-l</b>[[<i>@</i>]<i>logfile</i>]]
|
[<b>-d</b>] [<b>-l</b>[[<i>@</i>]<i>logfile</i>]]
|
||||||
[<b>-p</b><i>port</i>] [<b>-i</b><i>internal_ip</i>]
|
[<b>-p</b><i>port</i>] [<b>-i</b><i>internal_ip</i>]
|
||||||
[<b>-e</b><i>external_ip</i>]</p>
|
[<b>-e</b><i>external_ip</i>]</p>
|
||||||
@@ -42,7 +42,7 @@ SOCKS 4/4.5/5 gateway service</p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>socks</b> is
|
<p style="margin-left:9%; margin-top: 1em"><b>socks</b> is
|
||||||
SOCKS server. It supports SOCKSv4, SOCKSv4.5 (extension to
|
SOCKS server. It supports SOCKSv4, SOCKSv4.5 (extension to
|
||||||
v4 for server side name resolution) and SOCKSv5. SOCKSv5
|
v4 for server side name resolution) and SOCKSv5. SOCKSv5
|
||||||
specification allows both outgoing and reverse TCP
|
specification allows both outgoing and reverse TCP
|
||||||
@@ -56,82 +56,81 @@ connections and UDP portmapping.</p>
|
|||||||
<table width="100%" border="0" rules="none" frame="void"
|
<table width="100%" border="0" rules="none" frame="void"
|
||||||
cellspacing="0" cellpadding="0">
|
cellspacing="0" cellpadding="0">
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-I</b></p></td>
|
<p style="margin-top: 1em"><b>-I</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Inetd mode. Standalone service
|
<p style="margin-top: 1em">Inetd mode. Standalone service
|
||||||
only.</p> </td></tr>
|
only.</p> </td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-d</b></p></td>
|
<p><b>-d</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Daemonize. Detach service from
|
<p>Daemonize. Detach service from console and run in the
|
||||||
console and run in the background.</p></td></tr>
|
background.</p> </td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-t</b></p></td>
|
<p><b>-t</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Be silenT. Do not log
|
<p>Be silenT. Do not log start/stop/accept error
|
||||||
start/stop/accept error records.</p></td></tr>
|
records.</p> </td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-u</b></p></td>
|
<p><b>-u</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Never ask for username
|
<p>Never ask for username authentication</p></td></tr>
|
||||||
authentication</p> </td></tr>
|
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-e</b></p></td>
|
<p><b>-e</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">External address. IP address of
|
<p>External address. IP address of the interface the proxy
|
||||||
the interface the proxy should initiate connections from.
|
should initiate connections from. External IP must be
|
||||||
External IP must be specified if you need incoming
|
specified if you need incoming connections. By default, the
|
||||||
connections. By default, the system will decide which
|
system will decide which address to use in accordance with
|
||||||
address to use in accordance with the routing table.</p></td></tr>
|
the routing table.</p></td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>-ni</b><i>PATH</i></p>
|
<p style="margin-left:9%;"><b>-ni</b><i>PATH</i></p>
|
||||||
|
|
||||||
<p style="margin-left:15%;">(Linux only) Switch to the
|
<p style="margin-left:18%;">(Linux only) Switch to the
|
||||||
network namespace identified by <i>PATH</i> before opening
|
network namespace identified by <i>PATH</i> before opening
|
||||||
the listening socket. The current namespace is saved and
|
the listening socket. The current namespace is saved and
|
||||||
restored immediately after binding, so outgoing connections
|
restored immediately after binding, so outgoing connections
|
||||||
run in the original namespace unless <b>-ne</b> is also
|
run in the original namespace unless <b>-ne</b> is also
|
||||||
given.</p>
|
given.</p>
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>-ne</b><i>PATH</i></p>
|
<p style="margin-left:9%;"><b>-ne</b><i>PATH</i></p>
|
||||||
|
|
||||||
<p style="margin-left:15%;">(Linux only) Switch to the
|
<p style="margin-left:18%;">(Linux only) Switch to the
|
||||||
network namespace identified by <i>PATH</i> after the
|
network namespace identified by <i>PATH</i> after the
|
||||||
listening socket has been bound (and after restoring from
|
listening socket has been bound (and after restoring from
|
||||||
<b>-ni</b> if applicable). Both options accept any namespace
|
<b>-ni</b> if applicable). Both options accept any namespace
|
||||||
@@ -142,13 +141,13 @@ file path (e.g. <i>/var/run/netns/myns</i> or
|
|||||||
<table width="100%" border="0" rules="none" frame="void"
|
<table width="100%" border="0" rules="none" frame="void"
|
||||||
cellspacing="0" cellpadding="0">
|
cellspacing="0" cellpadding="0">
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="4%">
|
<td width="4%">
|
||||||
|
|
||||||
|
|
||||||
<p><b>-Ne</b></p></td>
|
<p><b>-Ne</b></p></td>
|
||||||
<td width="5%"></td>
|
<td width="5%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p>External NAT address 3proxy reports to client for
|
<p>External NAT address 3proxy reports to client for
|
||||||
@@ -157,77 +156,75 @@ and destination server. By default, the external address is
|
|||||||
reported. It’s only useful in the case of IP-IP NAT
|
reported. It’s only useful in the case of IP-IP NAT
|
||||||
and does not work with port translation.</p></td></tr>
|
and does not work with port translation.</p></td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="4%">
|
<td width="4%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-Ni</b></p></td>
|
<p><b>-Ni</b></p></td>
|
||||||
<td width="5%"></td>
|
<td width="5%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Internal NAT address 3proxy
|
<p>Internal NAT address 3proxy reports to client for
|
||||||
reports to client for UDPASSOC. This is external address of
|
UDPASSOC. This is external address of the NAT between 3proxy
|
||||||
the NAT between 3proxy and the client, client uses to
|
and the client, client uses to connect to 3proxy. By
|
||||||
connect to 3proxy. By default, the internal address is
|
default, the internal address is reported. It’s only
|
||||||
reported. It’s only useful in the case of IP-IP NAT
|
useful in the case of IP-IP NAT and does not work with port
|
||||||
and does not work with port translation.</p></td></tr>
|
translation.</p> </td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="4%">
|
<td width="4%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-i</b></p></td>
|
<p><b>-i</b></p></td>
|
||||||
<td width="5%"></td>
|
<td width="5%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Internal address. IP address the
|
<p>Internal address. IP address the proxy accepts
|
||||||
proxy accepts connections to. By default, connections to any
|
connections to. By default, connections to any interface are
|
||||||
interface are accepted. It´s usually unsafe. Unix
|
accepted. It´s usually unsafe. Unix domain sockets can
|
||||||
domain sockets can be specified with
|
be specified with <i>-iunix:/path/to/socket</i> syntax
|
||||||
<i>-iunix:/path/to/socket</i> syntax (e.g.,
|
(e.g., -iunix:/var/run/socks.sock). On Linux, abstract
|
||||||
-iunix:/var/run/socks.sock). On Linux, abstract sockets use
|
sockets use <i>-iunix:@socketname</i> syntax.</p></td></tr>
|
||||||
<i>-iunix:@socketname</i> syntax.</p></td></tr>
|
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="4%">
|
<td width="4%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-p</b></p></td>
|
<p><b>-p</b></p></td>
|
||||||
<td width="5%"></td>
|
<td width="5%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Port. Port proxy listens for
|
<p>Port. Port proxy listens for incoming connections.
|
||||||
incoming connections. Default is 1080.</p></td></tr>
|
Default is 1080.</p></td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="4%">
|
<td width="4%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-l</b></p></td>
|
<p><b>-l</b></p></td>
|
||||||
<td width="5%"></td>
|
<td width="5%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Log. By default logging is to
|
<p>Log. By default logging is to stdout. If <i>logfile</i>
|
||||||
stdout. If <i>logfile</i> is specified logging is to file.
|
is specified logging is to file. Under Unix, if
|
||||||
Under Unix, if ´<i>@</i>´ preceeds
|
´<i>@</i>´ preceeds <i>logfile</i>, syslog is
|
||||||
<i>logfile</i>, syslog is used for logging.</p></td></tr>
|
used for logging.</p></td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="4%">
|
<td width="4%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-S</b></p></td>
|
<p><b>-S</b></p></td>
|
||||||
<td width="5%"></td>
|
<td width="5%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Increase or decrease stack size.
|
<p>Increase or decrease stack size. You may want to try
|
||||||
You may want to try something like -S8192 if you experience
|
something like -S8192 if you experience 3proxy crashes.</p></td></tr>
|
||||||
3proxy crashes.</p></td></tr>
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<h2>CLIENTS
|
<h2>CLIENTS
|
||||||
@@ -235,7 +232,7 @@ You may want to try something like -S8192 if you experience
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">You should use a
|
<p style="margin-left:9%; margin-top: 1em">You should use a
|
||||||
client with SOCKS support or use some socksification support
|
client with SOCKS support or use some socksification support
|
||||||
(for example <i>SocksCAP</i> or <i>FreeCAP</i>). Configure
|
(for example <i>SocksCAP</i> or <i>FreeCAP</i>). Configure
|
||||||
client to use <i>internal_ip</i> and <i>port</i>. SOCKS
|
client to use <i>internal_ip</i> and <i>port</i>. SOCKS
|
||||||
@@ -250,7 +247,7 @@ privileges). If you need to control access, use
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Report all bugs
|
<p style="margin-left:9%; margin-top: 1em">Report all bugs
|
||||||
to <b>3proxy@3proxy.org</b></p>
|
to <b>3proxy@3proxy.org</b></p>
|
||||||
|
|
||||||
<h2>SEE ALSO
|
<h2>SEE ALSO
|
||||||
@@ -258,7 +255,7 @@ to <b>3proxy@3proxy.org</b></p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">3proxy(8),
|
<p style="margin-left:9%; margin-top: 1em">3proxy(8),
|
||||||
proxy(8), ftppr(8), pop3p(8), tcppm(8), udppm(8),
|
proxy(8), ftppr(8), pop3p(8), tcppm(8), udppm(8),
|
||||||
syslogd(8), <br>
|
syslogd(8), <br>
|
||||||
https://3proxy.org/</p>
|
https://3proxy.org/</p>
|
||||||
@@ -268,7 +265,7 @@ https://3proxy.org/</p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">3proxy is
|
<p style="margin-left:9%; margin-top: 1em">3proxy is
|
||||||
designed by Vladimir Dubrovin <vlad@3proxy.org></p>
|
designed by Vladimir Dubrovin <vlad@3proxy.org></p>
|
||||||
<hr>
|
<hr>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
+51
-52
@@ -1,4 +1,4 @@
|
|||||||
<!-- Creator : groff version 1.24.1 -->
|
<!-- Creator : groff version 1.23.0 -->
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>tcppm</b> -
|
<p style="margin-left:9%; margin-top: 1em"><b>tcppm</b> -
|
||||||
TCP port mapper</p>
|
TCP port mapper</p>
|
||||||
|
|
||||||
<h2>SYNOPSIS
|
<h2>SYNOPSIS
|
||||||
@@ -33,7 +33,7 @@ TCP port mapper</p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>tcppm</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>tcppm</b>
|
||||||
[<b>-d</b>] [<b>-l</b>[[<i>@</i>]<i>logfile</i>]]
|
[<b>-d</b>] [<b>-l</b>[[<i>@</i>]<i>logfile</i>]]
|
||||||
[<b>-i</b><i>internal_ip</i>] [<b>-e</b><i>external_ip</i>]
|
[<b>-i</b><i>internal_ip</i>] [<b>-e</b><i>external_ip</i>]
|
||||||
<i>local_port remote_host remote_port</i></p>
|
<i>local_port remote_host remote_port</i></p>
|
||||||
@@ -44,7 +44,7 @@ TCP port mapper</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i><b>tcppm</b></i>
|
<p style="margin-left:9%; margin-top: 1em"><i><b>tcppm</b></i>
|
||||||
forwards connections from local to remote TCP port</p>
|
forwards connections from local to remote TCP port</p>
|
||||||
|
|
||||||
<h2>OPTIONS
|
<h2>OPTIONS
|
||||||
@@ -55,69 +55,69 @@ forwards connections from local to remote TCP port</p>
|
|||||||
<table width="100%" border="0" rules="none" frame="void"
|
<table width="100%" border="0" rules="none" frame="void"
|
||||||
cellspacing="0" cellpadding="0">
|
cellspacing="0" cellpadding="0">
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-I</b></p></td>
|
<p style="margin-top: 1em"><b>-I</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Inetd mode. Standalone service
|
<p style="margin-top: 1em">Inetd mode. Standalone service
|
||||||
only.</p> </td></tr>
|
only.</p> </td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-d</b></p></td>
|
<p><b>-d</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Daemonize. Detach service from
|
<p>Daemonize. Detach service from console and run in the
|
||||||
console and run in the background.</p></td></tr>
|
background.</p> </td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-t</b></p></td>
|
<p><b>-t</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Be silenT. Do not log
|
<p>Be silenT. Do not log start/stop/accept error
|
||||||
start/stop/accept error records.</p></td></tr>
|
records.</p> </td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-e</b></p></td>
|
<p><b>-e</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">External address. IP address of
|
<p>External address. IP address of the interface the proxy
|
||||||
the interface the proxy should initiate connections from. By
|
should initiate connections from. By default, the system
|
||||||
default, the system will decide which address to use in
|
will decide which address to use in accordance with the
|
||||||
accordance with the routing table.</p></td></tr>
|
routing table.</p></td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>-ni</b><i>PATH</i></p>
|
<p style="margin-left:9%;"><b>-ni</b><i>PATH</i></p>
|
||||||
|
|
||||||
<p style="margin-left:15%;">(Linux only) Switch to the
|
<p style="margin-left:18%;">(Linux only) Switch to the
|
||||||
network namespace identified by <i>PATH</i> before opening
|
network namespace identified by <i>PATH</i> before opening
|
||||||
the listening socket. The current namespace is saved and
|
the listening socket. The current namespace is saved and
|
||||||
restored immediately after binding, so outgoing connections
|
restored immediately after binding, so outgoing connections
|
||||||
run in the original namespace unless <b>-ne</b> is also
|
run in the original namespace unless <b>-ne</b> is also
|
||||||
given.</p>
|
given.</p>
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>-ne</b><i>PATH</i></p>
|
<p style="margin-left:9%;"><b>-ne</b><i>PATH</i></p>
|
||||||
|
|
||||||
<p style="margin-left:15%;">(Linux only) Switch to the
|
<p style="margin-left:18%;">(Linux only) Switch to the
|
||||||
network namespace identified by <i>PATH</i> after the
|
network namespace identified by <i>PATH</i> after the
|
||||||
listening socket has been bound (and after restoring from
|
listening socket has been bound (and after restoring from
|
||||||
<b>-ni</b> if applicable). Both options accept any namespace
|
<b>-ni</b> if applicable). Both options accept any namespace
|
||||||
@@ -128,13 +128,13 @@ file path (e.g. <i>/var/run/netns/myns</i> or
|
|||||||
<table width="100%" border="0" rules="none" frame="void"
|
<table width="100%" border="0" rules="none" frame="void"
|
||||||
cellspacing="0" cellpadding="0">
|
cellspacing="0" cellpadding="0">
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p><b>-i</b></p></td>
|
<p><b>-i</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p>Internal address. IP address the proxy accepts
|
<p>Internal address. IP address the proxy accepts
|
||||||
@@ -144,32 +144,31 @@ be specified with <i>-iunix:/path/to/socket</i> syntax
|
|||||||
(e.g., -iunix:/var/run/tcppm.sock). On Linux, abstract
|
(e.g., -iunix:/var/run/tcppm.sock). On Linux, abstract
|
||||||
sockets use <i>-iunix:@socketname</i> syntax.</p></td></tr>
|
sockets use <i>-iunix:@socketname</i> syntax.</p></td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-l</b></p></td>
|
<p><b>-l</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Log. By default logging is to
|
<p>Log. By default logging is to stdout. If <i>logfile</i>
|
||||||
stdout. If <i>logfile</i> is specified logging is to file.
|
is specified logging is to file. Under Unix, if
|
||||||
Under Unix, if ´<i>@</i>´ precedes
|
´<i>@</i>´ precedes <i>logfile</i>, syslog is
|
||||||
<i>logfile</i>, syslog is used for logging.</p></td></tr>
|
used for logging.</p></td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-S</b></p></td>
|
<p><b>-S</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Increase or decrease stack size.
|
<p>Increase or decrease stack size. You may want to try
|
||||||
You may want to try something like -S8192 if you experience
|
something like -S8192 if you experience 3proxy crashes.</p></td></tr>
|
||||||
3proxy crashes.</p></td></tr>
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<h2>ARGUMENTS
|
<h2>ARGUMENTS
|
||||||
@@ -178,23 +177,23 @@ You may want to try something like -S8192 if you experience
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>local_port</i></p>
|
<p style="margin-left:9%; margin-top: 1em"><i>local_port</i></p>
|
||||||
|
|
||||||
<p style="margin-left:15%;">- port tcppm accepts
|
<p style="margin-left:18%;">- port tcppm accepts
|
||||||
connections on</p>
|
connections on</p>
|
||||||
|
|
||||||
<p style="margin-left:6%;"><i>remote_host</i></p>
|
<p style="margin-left:9%;"><i>remote_host</i></p>
|
||||||
|
|
||||||
<p style="margin-left:15%;">- IP address of the host the
|
<p style="margin-left:18%;">- IP address of the host the
|
||||||
connection is forwarded to. Unix domain sockets can be
|
connection is forwarded to. Unix domain sockets can be
|
||||||
specified with the syntax <i>unix:/path/to/socket</i> (e.g.,
|
specified with the syntax <i>unix:/path/to/socket</i> (e.g.,
|
||||||
unix:/var/run/app.sock). On Linux, abstract (fileless) Unix
|
unix:/var/run/app.sock). On Linux, abstract (fileless) Unix
|
||||||
sockets use the syntax <i>unix:@socketname</i> (e.g.,
|
sockets use the syntax <i>unix:@socketname</i> (e.g.,
|
||||||
unix:@app.socket).</p>
|
unix:@app.socket).</p>
|
||||||
|
|
||||||
<p style="margin-left:6%;"><i>remote_port</i></p>
|
<p style="margin-left:9%;"><i>remote_port</i></p>
|
||||||
|
|
||||||
<p style="margin-left:15%;">- remote port the connection is
|
<p style="margin-left:18%;">- remote port the connection is
|
||||||
forwarded to. Ignored when using Unix socket destination,
|
forwarded to. Ignored when using Unix socket destination,
|
||||||
but must be specified (use any positive value) for syntax
|
but must be specified (use any positive value) for syntax
|
||||||
compatibility.</p>
|
compatibility.</p>
|
||||||
@@ -204,7 +203,7 @@ compatibility.</p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Any TCP-based
|
<p style="margin-left:9%; margin-top: 1em">Any TCP-based
|
||||||
application can be used as a client. Use <i>internal_ip</i>
|
application can be used as a client. Use <i>internal_ip</i>
|
||||||
and <i>local_port</i> as the destination in the client
|
and <i>local_port</i> as the destination in the client
|
||||||
application. The connection is forwarded to
|
application. The connection is forwarded to
|
||||||
@@ -215,7 +214,7 @@ application. The connection is forwarded to
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Report all bugs
|
<p style="margin-left:9%; margin-top: 1em">Report all bugs
|
||||||
to <b>3proxy@3proxy.org</b></p>
|
to <b>3proxy@3proxy.org</b></p>
|
||||||
|
|
||||||
<h2>SEE ALSO
|
<h2>SEE ALSO
|
||||||
@@ -223,7 +222,7 @@ to <b>3proxy@3proxy.org</b></p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">3proxy(8),
|
<p style="margin-left:9%; margin-top: 1em">3proxy(8),
|
||||||
proxy(8), ftppr(8), socks(8), pop3p(8), udppm(8),
|
proxy(8), ftppr(8), socks(8), pop3p(8), udppm(8),
|
||||||
syslogd(8), <br>
|
syslogd(8), <br>
|
||||||
https://3proxy.org/</p>
|
https://3proxy.org/</p>
|
||||||
@@ -233,7 +232,7 @@ https://3proxy.org/</p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">3proxy is
|
<p style="margin-left:9%; margin-top: 1em">3proxy is
|
||||||
designed by Vladimir Dubrovin <vlad@3proxy.org></p>
|
designed by Vladimir Dubrovin <vlad@3proxy.org></p>
|
||||||
<hr>
|
<hr>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
+83
-88
@@ -1,4 +1,4 @@
|
|||||||
<!-- Creator : groff version 1.24.1 -->
|
<!-- Creator : groff version 1.23.0 -->
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>tlspr</b> -
|
<p style="margin-left:9%; margin-top: 1em"><b>tlspr</b> -
|
||||||
SNI proxy gateway service</p>
|
SNI proxy gateway service</p>
|
||||||
|
|
||||||
<h2>SYNOPSIS
|
<h2>SYNOPSIS
|
||||||
@@ -32,7 +32,7 @@ SNI proxy gateway service</p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>tlspr</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>tlspr</b>
|
||||||
[<b>-d</b>][<b>-a</b>] [<b>-l</b>[[<i>@</i>]<i>logfile</i>]]
|
[<b>-d</b>][<b>-a</b>] [<b>-l</b>[[<i>@</i>]<i>logfile</i>]]
|
||||||
[<b>-p</b><i>listening_port</i>]
|
[<b>-p</b><i>listening_port</i>]
|
||||||
[<b>-P</b><i>destination_port</i>]
|
[<b>-P</b><i>destination_port</i>]
|
||||||
@@ -45,7 +45,7 @@ SNI proxy gateway service</p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>tlspr</b> is
|
<p style="margin-left:9%; margin-top: 1em"><b>tlspr</b> is
|
||||||
an SNI gateway service (destination host is taken from TLS
|
an SNI gateway service (destination host is taken from TLS
|
||||||
handshake). The destination port must be specified via the
|
handshake). The destination port must be specified via the
|
||||||
-P option (or it may be detected with the Transparent
|
-P option (or it may be detected with the Transparent
|
||||||
@@ -61,81 +61,80 @@ access control is required.</p>
|
|||||||
<table width="100%" border="0" rules="none" frame="void"
|
<table width="100%" border="0" rules="none" frame="void"
|
||||||
cellspacing="0" cellpadding="0">
|
cellspacing="0" cellpadding="0">
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-I</b></p></td>
|
<p style="margin-top: 1em"><b>-I</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Inetd mode. Standalone service
|
<p style="margin-top: 1em">Inetd mode. Standalone service
|
||||||
only.</p> </td></tr>
|
only.</p> </td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-d</b></p></td>
|
<p><b>-d</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Daemonize. Detach service from
|
<p>Daemonize. Detach service from console and run in the
|
||||||
console and run in the background.</p></td></tr>
|
background.</p> </td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-t</b></p></td>
|
<p><b>-t</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Be silenT. Do not log
|
<p>Be silenT. Do not log start/stop/accept error
|
||||||
start/stop/accept error records.</p></td></tr>
|
records.</p> </td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-u</b></p></td>
|
<p><b>-u</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Never ask for username
|
<p>Never ask for username authentication</p></td></tr>
|
||||||
authentication</p> </td></tr>
|
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-e</b></p></td>
|
<p><b>-e</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">External address. IP address of
|
<p>External address. IP address of the interface the proxy
|
||||||
the interface the proxy should initiate connections from. By
|
should initiate connections from. By default, the system
|
||||||
default, the system will decide which address to use in
|
will decide which address to use in accordance with the
|
||||||
accordance with the routing table.</p></td></tr>
|
routing table.</p></td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>-ni</b><i>PATH</i></p>
|
<p style="margin-left:9%;"><b>-ni</b><i>PATH</i></p>
|
||||||
|
|
||||||
<p style="margin-left:15%;">(Linux only) Switch to the
|
<p style="margin-left:18%;">(Linux only) Switch to the
|
||||||
network namespace identified by <i>PATH</i> before opening
|
network namespace identified by <i>PATH</i> before opening
|
||||||
the listening socket. The current namespace is saved and
|
the listening socket. The current namespace is saved and
|
||||||
restored immediately after binding, so outgoing connections
|
restored immediately after binding, so outgoing connections
|
||||||
run in the original namespace unless <b>-ne</b> is also
|
run in the original namespace unless <b>-ne</b> is also
|
||||||
given.</p>
|
given.</p>
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>-ne</b><i>PATH</i></p>
|
<p style="margin-left:9%;"><b>-ne</b><i>PATH</i></p>
|
||||||
|
|
||||||
<p style="margin-left:15%;">(Linux only) Switch to the
|
<p style="margin-left:18%;">(Linux only) Switch to the
|
||||||
network namespace identified by <i>PATH</i> after the
|
network namespace identified by <i>PATH</i> after the
|
||||||
listening socket has been bound (and after restoring from
|
listening socket has been bound (and after restoring from
|
||||||
<b>-ni</b> if applicable). Both options accept any namespace
|
<b>-ni</b> if applicable). Both options accept any namespace
|
||||||
@@ -146,13 +145,13 @@ file path (e.g. <i>/var/run/netns/myns</i> or
|
|||||||
<table width="100%" border="0" rules="none" frame="void"
|
<table width="100%" border="0" rules="none" frame="void"
|
||||||
cellspacing="0" cellpadding="0">
|
cellspacing="0" cellpadding="0">
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="4%">
|
<td width="4%">
|
||||||
|
|
||||||
|
|
||||||
<p><b>-i</b></p></td>
|
<p><b>-i</b></p></td>
|
||||||
<td width="5%"></td>
|
<td width="5%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p>Internal address. IP address the proxy accepts
|
<p>Internal address. IP address the proxy accepts
|
||||||
@@ -162,93 +161,90 @@ be specified with <i>-iunix:/path/to/socket</i> syntax
|
|||||||
(e.g., -iunix:/var/run/tlspr.sock). On Linux, abstract
|
(e.g., -iunix:/var/run/tlspr.sock). On Linux, abstract
|
||||||
sockets use <i>-iunix:@socketname</i> syntax.</p></td></tr>
|
sockets use <i>-iunix:@socketname</i> syntax.</p></td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="4%">
|
<td width="4%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-a</b></p></td>
|
<p><b>-a</b></p></td>
|
||||||
<td width="5%"></td>
|
<td width="5%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Anonymous. Hide information
|
<p>Anonymous. Hide information about client.</p></td></tr>
|
||||||
about client.</p></td></tr>
|
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="4%">
|
<td width="4%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-a1</b></p></td>
|
<p><b>-a1</b></p></td>
|
||||||
<td width="5%"></td>
|
<td width="5%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Anonymous. Show fake information
|
<p>Anonymous. Show fake information about client.</p></td></tr>
|
||||||
about client.</p></td></tr>
|
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="4%">
|
<td width="4%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-p</b></p></td>
|
<p><b>-p</b></p></td>
|
||||||
<td width="5%"></td>
|
<td width="5%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">listening_port. Port proxy
|
<p>listening_port. Port proxy listens for incoming
|
||||||
listens for incoming connections. Default is 1443.</p></td></tr>
|
connections. Default is 1443.</p></td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="4%">
|
<td width="4%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-P</b></p></td>
|
<p><b>-P</b></p></td>
|
||||||
<td width="5%"></td>
|
<td width="5%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">destination_port. Port to
|
<p>destination_port. Port to establish outgoing
|
||||||
establish outgoing connections. Required unless the
|
connections. Required unless the Transparent plugin is used,
|
||||||
Transparent plugin is used, because the TLS handshake does
|
because the TLS handshake does not contain port information.
|
||||||
not contain port information. Default is 443.</p></td></tr>
|
Default is 443.</p></td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="4%">
|
<td width="4%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-c</b></p></td>
|
<p><b>-c</b></p></td>
|
||||||
<td width="5%"></td>
|
<td width="5%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">TLS_CHECK_LEVEL. 0 (default) -
|
<p>TLS_CHECK_LEVEL. 0 (default) - allow non-TLS traffic to
|
||||||
allow non-TLS traffic to pass, 1 - require TLS, only check
|
pass, 1 - require TLS, only check client HELLO packet, 2 -
|
||||||
client HELLO packet, 2 - require TLS, check both client and
|
require TLS, check both client and server HELLO, 3 - require
|
||||||
server HELLO, 3 - require TLS, check that the server sends a
|
TLS, check that the server sends a certificate (not
|
||||||
certificate (not compatible with TLS 1.3), 4 - require
|
compatible with TLS 1.3), 4 - require mutual TLS, check that
|
||||||
mutual TLS, check that the server sends a certificate
|
the server sends a certificate request and the client sends
|
||||||
request and the client sends a certificate (not compatible
|
a certificate (not compatible with TLS 1.3)</p></td></tr>
|
||||||
with TLS 1.3)</p></td></tr>
|
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="4%">
|
<td width="4%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-s</b></p></td>
|
<p><b>-s</b></p></td>
|
||||||
<td width="5%"></td>
|
<td width="5%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Split the TLS Client HELLO
|
<p>Split the TLS Client HELLO packet across multiple TCP
|
||||||
packet across multiple TCP segments to make SNI-based DPI
|
segments to make SNI-based DPI detection harder. An optional
|
||||||
detection harder. An optional numeric value can follow (e.g.
|
numeric value can follow (e.g. <b>-s1</b>) to control the
|
||||||
<b>-s1</b>) to control the splitting behaviour.</p></td></tr>
|
splitting behaviour.</p></td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>-Ximap | -Xpop3 |
|
<p style="margin-left:9%;"><b>-Ximap | -Xpop3 |
|
||||||
-Xsmtp</b></p>
|
-Xsmtp</b></p>
|
||||||
|
|
||||||
<p style="margin-left:15%;">STARTTLS mode for the given
|
<p style="margin-left:18%;">STARTTLS mode for the given
|
||||||
protocol. The proxy speaks the plaintext protocol with the
|
protocol. The proxy speaks the plaintext protocol with the
|
||||||
client (greeting, capability advertisement with STARTTLS
|
client (greeting, capability advertisement with STARTTLS
|
||||||
only, STARTTLS command), then, after the client issues
|
only, STARTTLS command), then, after the client issues
|
||||||
@@ -262,13 +258,13 @@ client fails.</p>
|
|||||||
<table width="100%" border="0" rules="none" frame="void"
|
<table width="100%" border="0" rules="none" frame="void"
|
||||||
cellspacing="0" cellpadding="0">
|
cellspacing="0" cellpadding="0">
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p><b>-l</b></p></td>
|
<p><b>-l</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p>Log. By default logging is to stdout. If <i>logfile</i>
|
<p>Log. By default logging is to stdout. If <i>logfile</i>
|
||||||
@@ -276,18 +272,17 @@ is specified logging is to file. Under Unix, if
|
|||||||
´<i>@</i>´ precedes <i>logfile</i>, syslog is
|
´<i>@</i>´ precedes <i>logfile</i>, syslog is
|
||||||
used for logging.</p></td></tr>
|
used for logging.</p></td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-S</b></p></td>
|
<p><b>-S</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Increase or decrease stack size.
|
<p>Increase or decrease stack size. You may want to try
|
||||||
You may want to try something like -S8192 if you experience
|
something like -S8192 if you experience 3proxy crashes.</p></td></tr>
|
||||||
3proxy crashes.</p></td></tr>
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<h2>CLIENTS
|
<h2>CLIENTS
|
||||||
@@ -295,7 +290,7 @@ You may want to try something like -S8192 if you experience
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">You should use a
|
<p style="margin-left:9%; margin-top: 1em">You should use a
|
||||||
client with TLS support or configure a router to redirect
|
client with TLS support or configure a router to redirect
|
||||||
TLS traffic to the proxy (transparent proxy). Configure the
|
TLS traffic to the proxy (transparent proxy). Configure the
|
||||||
client to connect to <i>internal_ip</i> and <i>port</i>. If
|
client to connect to <i>internal_ip</i> and <i>port</i>. If
|
||||||
@@ -306,7 +301,7 @@ you need to limit clients, use <b>3proxy</b>(8) instead.</p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Report all bugs
|
<p style="margin-left:9%; margin-top: 1em">Report all bugs
|
||||||
to <b>3proxy@3proxy.org</b></p>
|
to <b>3proxy@3proxy.org</b></p>
|
||||||
|
|
||||||
<h2>SEE ALSO
|
<h2>SEE ALSO
|
||||||
@@ -314,7 +309,7 @@ to <b>3proxy@3proxy.org</b></p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">3proxy(8),
|
<p style="margin-left:9%; margin-top: 1em">3proxy(8),
|
||||||
ftppr(8), proxy(8), socks(8), pop3p(8), smtpp(8), tcppm(8),
|
ftppr(8), proxy(8), socks(8), pop3p(8), smtpp(8), tcppm(8),
|
||||||
udppm(8), syslogd(8), <br>
|
udppm(8), syslogd(8), <br>
|
||||||
https://3proxy.org/</p>
|
https://3proxy.org/</p>
|
||||||
@@ -324,7 +319,7 @@ https://3proxy.org/</p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">3proxy is
|
<p style="margin-left:9%; margin-top: 1em">3proxy is
|
||||||
designed by Vladimir Dubrovin <vlad@3proxy.org></p>
|
designed by Vladimir Dubrovin <vlad@3proxy.org></p>
|
||||||
<hr>
|
<hr>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
+59
-61
@@ -1,4 +1,4 @@
|
|||||||
<!-- Creator : groff version 1.24.1 -->
|
<!-- Creator : groff version 1.23.0 -->
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>udppm</b> -
|
<p style="margin-left:9%; margin-top: 1em"><b>udppm</b> -
|
||||||
UDP port mapper</p>
|
UDP port mapper</p>
|
||||||
|
|
||||||
<h2>SYNOPSIS
|
<h2>SYNOPSIS
|
||||||
@@ -33,7 +33,7 @@ UDP port mapper</p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>udppm</b>
|
<p style="margin-left:9%; margin-top: 1em"><b>udppm</b>
|
||||||
[<b>-ds</b>] [<b>-l</b>[[<i>@</i>]<i>logfile</i>]]
|
[<b>-ds</b>] [<b>-l</b>[[<i>@</i>]<i>logfile</i>]]
|
||||||
[<b>-i</b><i>internal_ip</i>] [<b>-e</b><i>external_ip</i>]
|
[<b>-i</b><i>internal_ip</i>] [<b>-e</b><i>external_ip</i>]
|
||||||
<i>local_port remote_host remote_port</i></p>
|
<i>local_port remote_host remote_port</i></p>
|
||||||
@@ -44,7 +44,7 @@ UDP port mapper</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i><b>udppm</b></i>
|
<p style="margin-left:9%; margin-top: 1em"><i><b>udppm</b></i>
|
||||||
forwards datagrams from local to remote UDP port</p>
|
forwards datagrams from local to remote UDP port</p>
|
||||||
|
|
||||||
<h2>OPTIONS
|
<h2>OPTIONS
|
||||||
@@ -55,69 +55,69 @@ forwards datagrams from local to remote UDP port</p>
|
|||||||
<table width="100%" border="0" rules="none" frame="void"
|
<table width="100%" border="0" rules="none" frame="void"
|
||||||
cellspacing="0" cellpadding="0">
|
cellspacing="0" cellpadding="0">
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-I</b></p></td>
|
<p style="margin-top: 1em"><b>-I</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Inetd mode. Standalone service
|
<p style="margin-top: 1em">Inetd mode. Standalone service
|
||||||
only.</p> </td></tr>
|
only.</p> </td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-d</b></p></td>
|
<p><b>-d</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Daemonize. Detach service from
|
<p>Daemonize. Detach service from console and run in the
|
||||||
console and run in the background.</p></td></tr>
|
background.</p> </td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-t</b></p></td>
|
<p><b>-t</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Be silenT. Do not log
|
<p>Be silenT. Do not log start/stop/accept error
|
||||||
start/stop/accept error records.</p></td></tr>
|
records.</p> </td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-e</b></p></td>
|
<p><b>-e</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">External address. IP address of
|
<p>External address. IP address of the interface the proxy
|
||||||
the interface the proxy should initiate datagrams from. By
|
should initiate datagrams from. By default, the system will
|
||||||
default, the system will decide which address to use in
|
decide which address to use in accordance with the routing
|
||||||
accordance with the routing table.</p></td></tr>
|
table.</p> </td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>-ni</b><i>PATH</i></p>
|
<p style="margin-left:9%;"><b>-ni</b><i>PATH</i></p>
|
||||||
|
|
||||||
<p style="margin-left:15%;">(Linux only) Switch to the
|
<p style="margin-left:18%;">(Linux only) Switch to the
|
||||||
network namespace identified by <i>PATH</i> before opening
|
network namespace identified by <i>PATH</i> before opening
|
||||||
the listening socket. The current namespace is saved and
|
the listening socket. The current namespace is saved and
|
||||||
restored immediately after binding, so outgoing connections
|
restored immediately after binding, so outgoing connections
|
||||||
run in the original namespace unless <b>-ne</b> is also
|
run in the original namespace unless <b>-ne</b> is also
|
||||||
given.</p>
|
given.</p>
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>-ne</b><i>PATH</i></p>
|
<p style="margin-left:9%;"><b>-ne</b><i>PATH</i></p>
|
||||||
|
|
||||||
<p style="margin-left:15%;">(Linux only) Switch to the
|
<p style="margin-left:18%;">(Linux only) Switch to the
|
||||||
network namespace identified by <i>PATH</i> after the
|
network namespace identified by <i>PATH</i> after the
|
||||||
listening socket has been bound (and after restoring from
|
listening socket has been bound (and after restoring from
|
||||||
<b>-ni</b> if applicable). Both options accept any namespace
|
<b>-ni</b> if applicable). Both options accept any namespace
|
||||||
@@ -128,61 +128,59 @@ file path (e.g. <i>/var/run/netns/myns</i> or
|
|||||||
<table width="100%" border="0" rules="none" frame="void"
|
<table width="100%" border="0" rules="none" frame="void"
|
||||||
cellspacing="0" cellpadding="0">
|
cellspacing="0" cellpadding="0">
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p><b>-i</b></p></td>
|
<p><b>-i</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p>Internal address. IP address the proxy accepts datagrams
|
<p>Internal address. IP address the proxy accepts datagrams
|
||||||
to. By default, connections to any interface are accepted.
|
to. By default, connections to any interface are accepted.
|
||||||
It´s usually unsafe.</p></td></tr>
|
It´s usually unsafe.</p></td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-l</b></p></td>
|
<p><b>-l</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Log. By default logging is to
|
<p>Log. By default logging is to stdout. If <i>logfile</i>
|
||||||
stdout. If <i>logfile</i> is specified logging is to file.
|
is specified logging is to file. Under Unix, if
|
||||||
Under Unix, if ´<i>@</i>´ precedes
|
´<i>@</i>´ precedes <i>logfile</i>, syslog is
|
||||||
<i>logfile</i>, syslog is used for logging.</p></td></tr>
|
used for logging.</p></td></tr>
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-s</b></p></td>
|
<p><b>-s</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Single packet. By default, only
|
<p>Single packet. By default, only one client can use the
|
||||||
one client can use the udppm service, but if -s is
|
udppm service, but if -s is specified, only one packet will
|
||||||
specified, only one packet will be forwarded between client
|
be forwarded between client and server. This allows the
|
||||||
and server. This allows the service to be shared between
|
service to be shared between multiple clients for
|
||||||
multiple clients for single-packet services (for example,
|
single-packet services (for example, name lookups).</p></td></tr>
|
||||||
name lookups).</p></td></tr>
|
|
||||||
<tr valign="top" align="left">
|
<tr valign="top" align="left">
|
||||||
<td width="6%"></td>
|
<td width="9%"></td>
|
||||||
<td width="3%">
|
<td width="3%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-S</b></p></td>
|
<p><b>-S</b></p></td>
|
||||||
<td width="6%"></td>
|
<td width="6%"></td>
|
||||||
<td width="85%">
|
<td width="82%">
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Increase or decrease stack size.
|
<p>Increase or decrease stack size. You may want to try
|
||||||
You may want to try something like -S8192 if you experience
|
something like -S8192 if you experience 3proxy crashes.</p></td></tr>
|
||||||
3proxy crashes.</p></td></tr>
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<h2>ARGUMENTS
|
<h2>ARGUMENTS
|
||||||
@@ -191,19 +189,19 @@ You may want to try something like -S8192 if you experience
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>local_port</i></p>
|
<p style="margin-left:9%; margin-top: 1em"><i>local_port</i></p>
|
||||||
|
|
||||||
<p style="margin-left:15%;">- port udppm accepts datagrams
|
<p style="margin-left:18%;">- port udppm accepts datagrams
|
||||||
on</p>
|
on</p>
|
||||||
|
|
||||||
<p style="margin-left:6%;"><i>remote_host</i></p>
|
<p style="margin-left:9%;"><i>remote_host</i></p>
|
||||||
|
|
||||||
<p style="margin-left:15%;">- IP address of the host
|
<p style="margin-left:18%;">- IP address of the host
|
||||||
datagrams are forwarded to</p>
|
datagrams are forwarded to</p>
|
||||||
|
|
||||||
<p style="margin-left:6%;"><i>remote_port</i></p>
|
<p style="margin-left:9%;"><i>remote_port</i></p>
|
||||||
|
|
||||||
<p style="margin-left:15%;">- remote port datagrams are
|
<p style="margin-left:18%;">- remote port datagrams are
|
||||||
forwarded to</p>
|
forwarded to</p>
|
||||||
|
|
||||||
<h2>CLIENTS
|
<h2>CLIENTS
|
||||||
@@ -211,7 +209,7 @@ forwarded to</p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Any UDP-based
|
<p style="margin-left:9%; margin-top: 1em">Any UDP-based
|
||||||
application can be used as a client. Use <i>internal_ip</i>
|
application can be used as a client. Use <i>internal_ip</i>
|
||||||
and <i>local_port</i> as the destination in the client
|
and <i>local_port</i> as the destination in the client
|
||||||
application. All datagrams are forwarded to
|
application. All datagrams are forwarded to
|
||||||
@@ -222,7 +220,7 @@ application. All datagrams are forwarded to
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Report all bugs
|
<p style="margin-left:9%; margin-top: 1em">Report all bugs
|
||||||
to <b>3proxy@3proxy.org</b></p>
|
to <b>3proxy@3proxy.org</b></p>
|
||||||
|
|
||||||
<h2>SEE ALSO
|
<h2>SEE ALSO
|
||||||
@@ -230,7 +228,7 @@ to <b>3proxy@3proxy.org</b></p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">3proxy(8),
|
<p style="margin-left:9%; margin-top: 1em">3proxy(8),
|
||||||
proxy(8), ftppr(8), socks(8), pop3p(8), udppm(8),
|
proxy(8), ftppr(8), socks(8), pop3p(8), udppm(8),
|
||||||
syslogd(8), <br>
|
syslogd(8), <br>
|
||||||
https://3proxy.org/</p>
|
https://3proxy.org/</p>
|
||||||
@@ -240,7 +238,7 @@ https://3proxy.org/</p>
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">3proxy is
|
<p style="margin-left:9%; margin-top: 1em">3proxy is
|
||||||
designed by Vladimir Dubrovin <vlad@3proxy.org></p>
|
designed by Vladimir Dubrovin <vlad@3proxy.org></p>
|
||||||
<hr>
|
<hr>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -25,6 +25,26 @@ with an unreachable DNS server (because gethostbyname will block other threads).
|
|||||||
user requests can be logged.
|
user requests can be logged.
|
||||||
<li>Use -xyz+A character filtering sequences for 'logformat', especially with
|
<li>Use -xyz+A character filtering sequences for 'logformat', especially with
|
||||||
ODBC logging, to prevent SQL and log record injections.
|
ODBC logging, to prevent SQL and log record injections.
|
||||||
|
<li>With the 'cacheacl' authentication type the ACL result is cached and is not
|
||||||
|
re-evaluated on a cache hit, so every field the ACL limits must be a part of
|
||||||
|
the 'authcache' key. Any field the ACL limits but the key does not contain
|
||||||
|
makes the cached result apply to a request it was not computed for, and that
|
||||||
|
limitation is not enforced. Use 'user' and 'pass' for the userlist, 'ip' for
|
||||||
|
the sourcelist, 'dstaddr' and 'dsthost' for the targetlist, 'dstport' for the
|
||||||
|
targetportlist and 'dstoper' for the operationlist. Use plain 'cache' instead
|
||||||
|
of 'cacheacl' if ACLs may change during the cache lifetime; cache entries are
|
||||||
|
not invalidated by a configuration reload.
|
||||||
|
<li>'cacheacl' must not be used together with parent proxies. The ACL is not
|
||||||
|
walked on a cache hit, so no redirection is applied and the request is sent
|
||||||
|
directly instead of through the 'parent' proxy of the matching ACL entry,
|
||||||
|
without any error. If the parent proxy is the only sanctioned path to the
|
||||||
|
network, this silently bypasses it. Use 'cache' instead. 'parent ... extip'
|
||||||
|
is the only redirection which survives, and only if 'ext' is a part of the
|
||||||
|
'authcache' key.
|
||||||
|
<li>The destination of every datagram of a SOCKSv5 UDP association is
|
||||||
|
authorized, but only with the default '-U3' (or '-U2') of the 'socks' service.
|
||||||
|
With '-U0' or '-U1' only the first destination of an association is authorized,
|
||||||
|
so ACLs limiting the destination do not restrict the rest of the association.
|
||||||
<li>Immediately report all service crashes to the developers.
|
<li>Immediately report all service crashes to the developers.
|
||||||
<li>Participate in code audit :)
|
<li>Participate in code audit :)
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
+79
-3
@@ -199,6 +199,26 @@ is disabled even when built, because current Linux does not implement
|
|||||||
SPLICE_F_MOVE, so no real zero-copy takes place and the read/write path is faster
|
SPLICE_F_MOVE, so no real zero-copy takes place and the read/write path is faster
|
||||||
for most traffic. Rebuild with -DWITHSPLICE to make -s available, -s0 disables it
|
for most traffic. Rebuild with -DWITHSPLICE to make -s available, -s0 disables it
|
||||||
explicitly.
|
explicitly.
|
||||||
|
.br
|
||||||
|
.B -C
|
||||||
|
(for TCP services) a connection closed by any of the sides terminates the
|
||||||
|
session, buffered data is delivered before the sockets are closed. By default
|
||||||
|
the session is kept until both sides close the connection (TCP half-close).
|
||||||
|
Half-close is required for the protocols where one of the sides closes its
|
||||||
|
sending side and expects the answer, but it keeps the socket of the side which
|
||||||
|
has already closed the connection in CLOSE_WAIT state. Use -C to close both
|
||||||
|
sockets as soon as any of the sides closes the connection, -C1 to request
|
||||||
|
the default behaviour explicitly.
|
||||||
|
.br
|
||||||
|
.B -U\fI[MODE]\fR
|
||||||
|
(for socks) what to do when the destination changes within an UDP association:
|
||||||
|
\fB1\fR - log it, \fB2\fR - authorize it, \fB3\fR - both, the default,
|
||||||
|
\fB0\fR (same as bare \fB-U\fR) - neither. The destination of the first datagram
|
||||||
|
is always authorized and logged. With \fB-U0\fR and \fB-U1\fR the destination is
|
||||||
|
not authorized again, so ACLs limiting the destination only apply to the first
|
||||||
|
destination of the association, and the parent proxy and the external address
|
||||||
|
selected for it are kept for the whole association. Use \fB-U2\fR to keep the
|
||||||
|
authorization and to drop the per-destination log records only.
|
||||||
.br
|
.br
|
||||||
(for dnspr) simple, do not use resolver and 3proxy cache, always use external DNS server.
|
(for dnspr) simple, do not use resolver and 3proxy cache, always use external DNS server.
|
||||||
.br
|
.br
|
||||||
@@ -427,9 +447,9 @@ can use %A as produced archive name and %F as filename.
|
|||||||
|
|
||||||
.br
|
.br
|
||||||
.BR timeouts
|
.BR timeouts
|
||||||
\fI<BYTE_SHORT>\fR \fI<BYTE_LONG>\fR \fI<STRING_SHORT>\fR \fI<STRING_LONG>\fR \fI<CONNECTION_SHORT>\fR \fI<CONNECTION_LONG>\fR \fI<DNS>\fR \fI<CHAIN>\fR \fI<CONNECT>\fR \fI<CONNECTBACK>\fR
|
\fI<BYTE_SHORT>\fR \fI<BYTE_LONG>\fR \fI<STRING_SHORT>\fR \fI<STRING_LONG>\fR \fI<CONNECTION_SHORT>\fR \fI<CONNECTION_LONG>\fR \fI<DNS>\fR \fI<CHAIN>\fR \fI<CONNECT>\fR \fI<CONNECTBACK>\fR \fI<LINGER>\fR
|
||||||
.br
|
.br
|
||||||
Sets timeout values, defaults 1, 5, 30, 60, 180, 1800, 15, 60, 15, 5.
|
Sets timeout values, defaults 1, 5, 30, 60, 180, 1800, 15, 60, 15, 5, 5.
|
||||||
.br
|
.br
|
||||||
\fBBYTE_SHORT\fR short timeout for single byte, is usually used for receiving single byte from stream.
|
\fBBYTE_SHORT\fR short timeout for single byte, is usually used for receiving single byte from stream.
|
||||||
.br
|
.br
|
||||||
@@ -447,7 +467,12 @@ can use %A as produced archive name and %F as filename.
|
|||||||
.br
|
.br
|
||||||
\fBCHAIN\fR timeout for reading data from chained connection
|
\fBCHAIN\fR timeout for reading data from chained connection
|
||||||
.br
|
.br
|
||||||
default timeouts 1 5 30 60 180 1800 15 60 15 5
|
\fBLINGER\fR timeout to deliver buffered data after one of the sides has closed
|
||||||
|
its sending side, also used as SO_LINGER value on outgoing connections. Too small
|
||||||
|
value may cause the tail of the data to be lost on slow connections, too large one
|
||||||
|
delays release of the sockets.
|
||||||
|
.br
|
||||||
|
default timeouts 1 5 30 60 180 1800 15 60 15 5 5
|
||||||
|
|
||||||
.br
|
.br
|
||||||
.BR maxseg
|
.BR maxseg
|
||||||
@@ -623,6 +648,13 @@ SOCKSv5, FTP, POP3 and HTTP proxy.
|
|||||||
authorization result is also cached and not re-evaluated on each request. Faster
|
authorization result is also cached and not re-evaluated on each request. Faster
|
||||||
than \fBcache\fR, but ACL changes do not take effect for cached users until the
|
than \fBcache\fR, but ACL changes do not take effect for cached users until the
|
||||||
cache entry expires. Use \fBcache\fR if ACLs may change during the cache lifetime.
|
cache entry expires. Use \fBcache\fR if ACLs may change during the cache lifetime.
|
||||||
|
Because the ACL is not walked on a cache hit, no redirection is applied to a
|
||||||
|
request served from the cache: it is sent directly instead of through the
|
||||||
|
\fBparent\fR proxy of the matching ACL entry, with no error reported. Do not use
|
||||||
|
\fBcacheacl\fR together with parent proxies, use \fBcache\fR instead. The only
|
||||||
|
redirection type which survives is \fBextip\fR, and only if \fBext\fR is a part
|
||||||
|
of the \fBauthcache\fR key, because the external address is then restored from
|
||||||
|
the cache entry.
|
||||||
.br
|
.br
|
||||||
\fBradius\fR - authentication with RADIUS.
|
\fBradius\fR - authentication with RADIUS.
|
||||||
.br
|
.br
|
||||||
@@ -678,6 +710,17 @@ assigned to the same user without actual authentication.
|
|||||||
.br
|
.br
|
||||||
Multiple types can be combined (e.g. \fBip,user,dstaddr,dstport\fR).
|
Multiple types can be combined (e.g. \fBip,user,dstaddr,dstport\fR).
|
||||||
.br
|
.br
|
||||||
|
With \fBcacheacl\fR the ACL result is not re-evaluated on a cache hit, so every
|
||||||
|
field the ACL limits must be a part of the cache key, otherwise the result
|
||||||
|
cached for one request is applied to a different one: \fBuser\fR/\fBpass\fR
|
||||||
|
for the userlist, \fBip\fR for the sourcelist, \fBdstaddr\fR/\fBdsthost\fR
|
||||||
|
for the targetlist, \fBdstport\fR for the targetportlist and \fBdstoper\fR
|
||||||
|
for the operationlist. It is especially important for SOCKSv5 UDP traffic,
|
||||||
|
where the destination of every datagram is authorized: without \fBdstaddr\fR
|
||||||
|
and \fBdstport\fR in the key the result cached for one destination is applied
|
||||||
|
to any other destination and the destination is not checked at all, see
|
||||||
|
\fBallow\fR.
|
||||||
|
.br
|
||||||
Use auth type \fBcache\fR (or \fBcacheacl\fR) for cached authentication
|
Use auth type \fBcache\fR (or \fBcacheacl\fR) for cached authentication
|
||||||
|
|
||||||
.br
|
.br
|
||||||
@@ -762,6 +805,39 @@ non-privileged (1024-65535) ports on the remote side.
|
|||||||
.br
|
.br
|
||||||
Timeperiodlists is a list of time
|
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.
|
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.
|
||||||
|
.br
|
||||||
|
A SOCKSv5 UDP ASSOCIATE request carries no destination, the destination of
|
||||||
|
every datagram is taken from the datagram itself. 3proxy authorizes the
|
||||||
|
destination of every datagram, so ACLs limiting the destination address, the
|
||||||
|
destination host name or the destination port do apply to UDP traffic, unless
|
||||||
|
the \fB-U\fR option of the \fBsocks\fR service says otherwise.
|
||||||
|
.br
|
||||||
|
ACLs are only checked for the datagrams sent by the client. A datagram received
|
||||||
|
on the association is relayed to the client without an ACL check: with a parent
|
||||||
|
proxy only the datagrams from the parent are accepted, an association without a
|
||||||
|
parent accepts a datagram from any source. The source reported to the client is
|
||||||
|
the actual source of the datagram. The address in the log record is the destination the
|
||||||
|
client sent the datagrams to, the source of the datagrams received on the
|
||||||
|
association is not logged.
|
||||||
|
.br
|
||||||
|
A client may use a single association to reach many destinations. An ACL entry
|
||||||
|
which limits the destination silently drops the datagrams to every other
|
||||||
|
destination, so limiting the destination of UDP traffic can break such clients
|
||||||
|
in a way which is hard to diagnose. Limit it only when it is really required.
|
||||||
|
.br
|
||||||
|
Bandwidth limiters (\fBbandlimin\fR, \fBbandlimout\fR) and traffic counters
|
||||||
|
(\fBcountin\fR, \fBcountout\fR) which limit the destination are selected when
|
||||||
|
the destination is authorized, so within an UDP association they are selected
|
||||||
|
for the destination of the first datagram and are not re-selected for every
|
||||||
|
following destination. They can not be applied per destination to the incoming
|
||||||
|
UDP traffic at all, because an incoming datagram is not matched against any
|
||||||
|
destination.
|
||||||
|
.br
|
||||||
|
Only \fBsocks5\fR and \fBsocks5+\fR parents can be used for UDP. Because
|
||||||
|
every new destination is authorized, use \fBauthcache\fR, especially with
|
||||||
|
\'strong\', RADIUS or plugin authentication: \fBcacheacl\fR with the
|
||||||
|
destination in the cache key if no parent proxy is used, \fBcache\fR
|
||||||
|
otherwise, see \fBcacheacl\fR.
|
||||||
|
|
||||||
.br
|
.br
|
||||||
.BR parent
|
.BR parent
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
Name: 3proxy
|
Name: 3proxy
|
||||||
Version: 0.9.8
|
Version: 1.0.0
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: 3proxy tiny proxy server
|
Summary: 3proxy tiny proxy server
|
||||||
License: GPL/LGPL/Apache/BSD
|
License: GPL/LGPL/Apache/BSD
|
||||||
@@ -9,6 +9,9 @@ Prefix: %{_prefix}
|
|||||||
Packager: z3APA3A
|
Packager: z3APA3A
|
||||||
Source: https://github.com/%{packager}/%{name}/archive/%{version}.tar.gz
|
Source: https://github.com/%{packager}/%{name}/archive/%{version}.tar.gz
|
||||||
|
|
||||||
|
%global debug_package %{nil}
|
||||||
|
%global __requires_exclude ^/(usr/)?bin/3proxy$
|
||||||
|
|
||||||
%description
|
%description
|
||||||
3proxy is lightweight yet powerful proxy server
|
3proxy is lightweight yet powerful proxy server
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -298,7 +298,7 @@ void cyclestep(void){
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
dologname (tmpbuf, conf.logname, (conf.archiver)?conf.archiver[1]:NULL, conf.logtype, (conf.logtime - t * conf.rotate));
|
dologname (tmpbuf, conf.logname, (conf.archiver)?conf.archiver[1]:NULL, conf.logtype, (conf.logtime - (time_t)t * conf.rotate));
|
||||||
remove ((char *) tmpbuf);
|
remove ((char *) tmpbuf);
|
||||||
if(conf.archiver) {
|
if(conf.archiver) {
|
||||||
int i;
|
int i;
|
||||||
|
|||||||
@@ -36,6 +36,8 @@ int ACLmatches(struct ace* acentry, struct clientparam * param){
|
|||||||
struct hostname * hstentry=NULL;
|
struct hostname * hstentry=NULL;
|
||||||
int i;
|
int i;
|
||||||
int match = 0;
|
int match = 0;
|
||||||
|
int dstdep = 0;
|
||||||
|
int preauth = (param->preauth == 1 && acentry->action <= REDIRECT);
|
||||||
|
|
||||||
username = param->username?param->username:(unsigned char *)"-";
|
username = param->username?param->username:(unsigned char *)"-";
|
||||||
if(acentry->src) {
|
if(acentry->src) {
|
||||||
@@ -45,7 +47,10 @@ int ACLmatches(struct ace* acentry, struct clientparam * param){
|
|||||||
}
|
}
|
||||||
if(!ipentry) return 0;
|
if(!ipentry) return 0;
|
||||||
}
|
}
|
||||||
if((acentry->dst && (!SAISNULL(¶m->req) || param->operation==BIND)) || (acentry->dstnames && param->hostname)) {
|
if(preauth && (acentry->dst || acentry->dstnames)) {
|
||||||
|
dstdep = 1;
|
||||||
|
}
|
||||||
|
else if((acentry->dst && (!SAISNULL(¶m->req) || param->operation==BIND)) || (acentry->dstnames && param->hostname)) {
|
||||||
for(ipentry = acentry->dst; ipentry; ipentry = ipentry->next)
|
for(ipentry = acentry->dst; ipentry; ipentry = ipentry->next)
|
||||||
if(IPInentry((struct sockaddr *)¶m->req, ipentry)) {
|
if(IPInentry((struct sockaddr *)¶m->req, ipentry)) {
|
||||||
break;
|
break;
|
||||||
@@ -93,7 +98,10 @@ int ACLmatches(struct ace* acentry, struct clientparam * param){
|
|||||||
}
|
}
|
||||||
if(!ipentry && !hstentry) return 0;
|
if(!ipentry && !hstentry) return 0;
|
||||||
}
|
}
|
||||||
if(acentry->ports && (*SAPORT(¶m->req) || param->operation == BIND)) {
|
if(preauth && acentry->ports) {
|
||||||
|
dstdep = 1;
|
||||||
|
}
|
||||||
|
else if(acentry->ports && (*SAPORT(¶m->req) || param->operation == BIND)) {
|
||||||
for (portentry = acentry->ports; portentry; portentry = portentry->next)
|
for (portentry = acentry->ports; portentry; portentry = portentry->next)
|
||||||
if(ntohs(*SAPORT(¶m->req)) >= portentry->startport &&
|
if(ntohs(*SAPORT(¶m->req)) >= portentry->startport &&
|
||||||
ntohs(*SAPORT(¶m->req)) <= portentry->endport) {
|
ntohs(*SAPORT(¶m->req)) <= portentry->endport) {
|
||||||
@@ -125,6 +133,10 @@ int ACLmatches(struct ace* acentry, struct clientparam * param){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(acentry->weight && (acentry->weight < param->weight)) return 0;
|
if(acentry->weight && (acentry->weight < param->weight)) return 0;
|
||||||
|
if(dstdep) {
|
||||||
|
param->dstindep = 0;
|
||||||
|
return acentry->action != DENY;
|
||||||
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -132,6 +144,7 @@ int ACLmatches(struct ace* acentry, struct clientparam * param){
|
|||||||
int checkACL(struct clientparam * param){
|
int checkACL(struct clientparam * param){
|
||||||
struct ace* acentry;
|
struct ace* acentry;
|
||||||
|
|
||||||
|
if(param->preauth == 1) param->dstindep = 1;
|
||||||
if(!param->srv->acl) {
|
if(!param->srv->acl) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -150,7 +163,9 @@ int checkACL(struct clientparam * param){
|
|||||||
if(param->redirected && acentry->chains && SAISNULL(&acentry->chains->addr) && !*SAPORT(&acentry->chains->addr)) {
|
if(param->redirected && acentry->chains && SAISNULL(&acentry->chains->addr) && !*SAPORT(&acentry->chains->addr)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if(param->remsock != INVALID_SOCKET && (param->operation != UDPASSOC || param->ctrlsocksrv != INVALID_SOCKET)) {
|
param->lastace = acentry;
|
||||||
|
if(param->preauth) return 2;
|
||||||
|
if((param->operation == UDPASSOC)? (param->ctrlsocksrv != INVALID_SOCKET) : (param->remsock != INVALID_SOCKET)) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
for(; i < conf.parentretries; i++){
|
for(; i < conf.parentretries; i++){
|
||||||
@@ -159,9 +174,14 @@ int checkACL(struct clientparam * param){
|
|||||||
if(!res) break;
|
if(!res) break;
|
||||||
if(param->remsock != INVALID_SOCKET) param->srv->so._closesocket(param->sostate, param->remsock);
|
if(param->remsock != INVALID_SOCKET) param->srv->so._closesocket(param->sostate, param->remsock);
|
||||||
param->remsock = INVALID_SOCKET;
|
param->remsock = INVALID_SOCKET;
|
||||||
|
if(param->ctrlsocksrv != INVALID_SOCKET) {
|
||||||
|
param->srv->so._closesocket(param->sostate, param->ctrlsocksrv);
|
||||||
|
param->ctrlsocksrv = INVALID_SOCKET;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
param->lastace = acentry;
|
||||||
return acentry->action;
|
return acentry->action;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-1
@@ -102,6 +102,7 @@ int cacheauth(struct clientparam * param){
|
|||||||
*(SAFAMILY(¶m->sinsl)) = ac.sinsl_family;
|
*(SAFAMILY(¶m->sinsl)) = ac.sinsl_family;
|
||||||
memcpy(SAADDR(¶m->sinsl), ac.sinsl_addr, SAADDRLEN(¶m->sinsl));
|
memcpy(SAADDR(¶m->sinsl), ac.sinsl_addr, SAADDRLEN(¶m->sinsl));
|
||||||
}
|
}
|
||||||
|
if(param->preauth == 1 && param->srv->acl) param->dstindep = 0;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -110,6 +111,7 @@ int doauth(struct clientparam * param){
|
|||||||
struct auth *authfuncs;
|
struct auth *authfuncs;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
|
if(param->preauth == 1 && !param->srv->acl) param->dstindep = 1;
|
||||||
for(authfuncs=param->srv->authfuncs; authfuncs; authfuncs=authfuncs->next){
|
for(authfuncs=param->srv->authfuncs; authfuncs; authfuncs=authfuncs->next){
|
||||||
res = authfuncs->authenticate?(*authfuncs->authenticate)(param):0;
|
res = authfuncs->authenticate?(*authfuncs->authenticate)(param):0;
|
||||||
if(!res) {
|
if(!res) {
|
||||||
@@ -148,7 +150,7 @@ int doauth(struct clientparam * param){
|
|||||||
if(ret > 9) return ret;
|
if(ret > 9) return ret;
|
||||||
}
|
}
|
||||||
if(!res){
|
if(!res){
|
||||||
ret = alwaysauth(param);
|
ret = (param->preauth == 2)? 0 : alwaysauth(param);
|
||||||
if (param->afterauthfilters){
|
if (param->afterauthfilters){
|
||||||
FILTER_ACTION action;
|
FILTER_ACTION action;
|
||||||
|
|
||||||
|
|||||||
+9
-2
@@ -6,6 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <limits.h>
|
||||||
|
|
||||||
static const unsigned char base64digits[] =
|
static const unsigned char base64digits[] =
|
||||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
||||||
@@ -23,8 +24,10 @@ static const unsigned char base64val[] = {
|
|||||||
};
|
};
|
||||||
#define DECODE64(c) ((c > 32 && c<127)? base64val[(int)c] : BAD)
|
#define DECODE64(c) ((c > 32 && c<127)? base64val[(int)c] : BAD)
|
||||||
|
|
||||||
unsigned char* en64 (const unsigned char *in, unsigned char *out, int inlen)
|
unsigned char* en64 (const unsigned char *in, unsigned char *out, int inlen, int outsize)
|
||||||
{
|
{
|
||||||
|
if (inlen < 0 || inlen > (INT_MAX - 2) || outsize < 1) return NULL;
|
||||||
|
if (((inlen + 2) / 3) > ((outsize - 1) / 4)) return NULL;
|
||||||
for (; inlen > 0; inlen -= 3, in+=3)
|
for (; inlen > 0; inlen -= 3, in+=3)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -42,6 +45,7 @@ int de64 (const char *in, char *out, int maxlen)
|
|||||||
int len = 0;
|
int len = 0;
|
||||||
register unsigned char digit1, digit2, digit3, digit4;
|
register unsigned char digit1, digit2, digit3, digit4;
|
||||||
|
|
||||||
|
if (maxlen < 0) return(-1);
|
||||||
if (in[0] == '+' && in[1] == ' ')
|
if (in[0] == '+' && in[1] == ' ')
|
||||||
in += 2;
|
in += 2;
|
||||||
if (*in == '\r')
|
if (*in == '\r')
|
||||||
@@ -61,20 +65,23 @@ int de64 (const char *in, char *out, int maxlen)
|
|||||||
if (digit4 != '=' && DECODE64(digit4) == BAD)
|
if (digit4 != '=' && DECODE64(digit4) == BAD)
|
||||||
return(-1);
|
return(-1);
|
||||||
in += 4;
|
in += 4;
|
||||||
|
if (len >= maxlen) return (len);
|
||||||
*out++ = (DECODE64(digit1) << 2) | (DECODE64(digit2) >> 4);
|
*out++ = (DECODE64(digit1) << 2) | (DECODE64(digit2) >> 4);
|
||||||
++len;
|
++len;
|
||||||
if (digit3 != '=')
|
if (digit3 != '=')
|
||||||
{
|
{
|
||||||
|
if (len >= maxlen) return (len);
|
||||||
*out++ = ((DECODE64(digit2) << 4) & 0xf0) | (DECODE64(digit3) >> 2);
|
*out++ = ((DECODE64(digit2) << 4) & 0xf0) | (DECODE64(digit3) >> 2);
|
||||||
++len;
|
++len;
|
||||||
if (digit4 != '=')
|
if (digit4 != '=')
|
||||||
{
|
{
|
||||||
|
if (len >= maxlen) return (len);
|
||||||
*out++ = ((DECODE64(digit3) << 6) & 0xc0) | DECODE64(digit4);
|
*out++ = ((DECODE64(digit3) << 6) & 0xc0) | DECODE64(digit4);
|
||||||
++len;
|
++len;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} while
|
} while
|
||||||
(*in && *in != '\r' && digit4 != '=' && (maxlen-=4) >= 4);
|
(*in && *in != '\r' && digit4 != '=');
|
||||||
|
|
||||||
return (len);
|
return (len);
|
||||||
}
|
}
|
||||||
|
|||||||
+45
-2
@@ -9,6 +9,48 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "proxy.h"
|
#include "proxy.h"
|
||||||
|
/* returns 0 on success, 1 if atyp is not supported for family, 2 if the
|
||||||
|
address is null. The address is set in both the 0 and the 2 case. */
|
||||||
|
int socks5_setaddr(int family, int atyp, const unsigned char *addr, PROXYSOCKADDRTYPE *sa){
|
||||||
|
int i, len = 4;
|
||||||
|
|
||||||
|
memset(sa, 0, sizeof(*sa));
|
||||||
|
if(atyp == 4){
|
||||||
|
#ifdef NOIPV6
|
||||||
|
return 1;
|
||||||
|
#else
|
||||||
|
if(family == 4) return 1;
|
||||||
|
len = 16;
|
||||||
|
*SAFAMILY(sa) = AF_INET6;
|
||||||
|
memcpy(SAADDR(sa), addr, 16);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
#ifndef NOIPV6
|
||||||
|
else if(family == 6){
|
||||||
|
unsigned char prefix[12] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255};
|
||||||
|
|
||||||
|
*SAFAMILY(sa) = AF_INET6;
|
||||||
|
memcpy(SAADDR(sa), prefix, 12);
|
||||||
|
memcpy(12 + (unsigned char *)SAADDR(sa), addr, 4);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
else {
|
||||||
|
*SAFAMILY(sa) = AF_INET;
|
||||||
|
memcpy(SAADDR(sa), addr, 4);
|
||||||
|
}
|
||||||
|
for(i = 0; i < len && !addr[i]; i++);
|
||||||
|
return (i == len)? 2 : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef __linux__
|
||||||
|
#include <sched.h>
|
||||||
|
|
||||||
|
int switch_ns(struct srvparam *srv, int target_fd) {
|
||||||
|
if(target_fd < 0) return 0;
|
||||||
|
if(srv->saved_nsfd >= 0 && setns(srv->saved_nsfd, CLONE_NEWNET)) return -1;
|
||||||
|
return setns(target_fd, CLONE_NEWNET);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
char * copyright = COPYRIGHT;
|
char * copyright = COPYRIGHT;
|
||||||
@@ -130,7 +172,7 @@ int timeouts[12] = {
|
|||||||
60, /* CHAIN_TO */
|
60, /* CHAIN_TO */
|
||||||
15, /* CONNECT_TO */
|
15, /* CONNECT_TO */
|
||||||
5, /* CONNBACK_TO */
|
5, /* CONNBACK_TO */
|
||||||
0,
|
5, /* LINGER_TO */
|
||||||
0
|
0
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -644,13 +686,14 @@ int doconnect(struct clientparam * param){
|
|||||||
|
|
||||||
if (param->operation == ADMIN || (( param->operation == DNSRESOLVE || param->operation == BIND || param->operation == UDPASSOC) && !param->redirected))
|
if (param->operation == ADMIN || (( param->operation == DNSRESOLVE || param->operation == BIND || param->operation == UDPASSOC) && !param->redirected))
|
||||||
return 0;
|
return 0;
|
||||||
|
if (param->operation == UDPASSOC && param->ctrlsocksrv != INVALID_SOCKET) return 0;
|
||||||
if (param->remsock != INVALID_SOCKET){
|
if (param->remsock != INVALID_SOCKET){
|
||||||
if(param->operation == UDPASSOC) return 0;
|
if(param->operation == UDPASSOC) return 0;
|
||||||
size = sizeof(param->sinsr);
|
size = sizeof(param->sinsr);
|
||||||
if(param->srv->so._getpeername(param->sostate, param->remsock, (struct sockaddr *)¶m->sinsr, &size)==-1) {return (14);}
|
if(param->srv->so._getpeername(param->sostate, param->remsock, (struct sockaddr *)¶m->sinsr, &size)==-1) {return (14);}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
struct linger lg = {1,conf.timeouts[SINGLEBYTE_S]};
|
struct linger lg = {1,conf.timeouts[LINGER_TO]};
|
||||||
|
|
||||||
if(SAISNULL(¶m->sinsr)){
|
if(SAISNULL(¶m->sinsr)){
|
||||||
if(SAISNULL(¶m->req)) {
|
if(SAISNULL(¶m->req)) {
|
||||||
|
|||||||
+18
@@ -839,6 +839,24 @@ static int h_parent(int argc, unsigned char **argv){
|
|||||||
chains->cidr = atoi(cidr + 1);
|
chains->cidr = atoi(cidr + 1);
|
||||||
}
|
}
|
||||||
*SAPORT(&chains->addr) = htons((uint16_t)atoi((char *)argv[4]));
|
*SAPORT(&chains->addr) = htons((uint16_t)atoi((char *)argv[4]));
|
||||||
|
switch(chains->type){
|
||||||
|
case R_POP3:
|
||||||
|
case R_SMTP:
|
||||||
|
case R_FTP:
|
||||||
|
case R_ADMIN:
|
||||||
|
case R_TLS:
|
||||||
|
case R_DNS:
|
||||||
|
case R_HA:
|
||||||
|
if(!SAISNULL(&chains->addr) || *SAPORT(&chains->addr)){
|
||||||
|
fprintf(stderr, "Chaining error: chain type (%s) is a local redirection, it requires 0.0.0.0 as address and 0 as port on line %d\n", argv[2], linenum);
|
||||||
|
free(chains->exthost);
|
||||||
|
free(chains);
|
||||||
|
return(4);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
if(argc > 5) chains->extuser = (unsigned char *)strdup((char *)argv[5]);
|
if(argc > 5) chains->extuser = (unsigned char *)strdup((char *)argv[5]);
|
||||||
if(argc > 6) chains->extpass = (unsigned char *)strdup((char *)argv[6]);
|
if(argc > 6) chains->extpass = (unsigned char *)strdup((char *)argv[6]);
|
||||||
if(!acl->chains) {
|
if(!acl->chains) {
|
||||||
|
|||||||
+6
-6
@@ -70,9 +70,9 @@ int inithashtable(struct hashtable *ht, unsigned tablesize, unsigned poolsize, u
|
|||||||
_3proxy_mutex_init(&ht->hash_mutex);
|
_3proxy_mutex_init(&ht->hash_mutex);
|
||||||
_3proxy_mutex_lock(&ht->hash_mutex);
|
_3proxy_mutex_lock(&ht->hash_mutex);
|
||||||
}
|
}
|
||||||
if(!(ht->ihashtable = malloc(tablesize * sizeof(uint32_t)))
|
if(!(ht->ihashtable = malloc((size_t)tablesize * sizeof(uint32_t)))
|
||||||
|| !(ht->hashvalues = malloc(poolsize * (sizeof(struct hashentry) + ht->recsize - 4)))
|
|| !(ht->hashvalues = malloc((size_t)poolsize * (sizeof(struct hashentry) + ht->recsize - 4)))
|
||||||
|| !(ht->hashhashvalues = malloc(poolsize * ht->hash_size))
|
|| !(ht->hashhashvalues = malloc((size_t)poolsize * ht->hash_size))
|
||||||
){
|
){
|
||||||
free(ht->ihashtable);
|
free(ht->ihashtable);
|
||||||
ht->ihashtable = NULL;
|
ht->ihashtable = NULL;
|
||||||
@@ -126,13 +126,13 @@ static void hashgrow(struct hashtable *ht){
|
|||||||
if(ht->ihashempty) return;
|
if(ht->ihashempty) return;
|
||||||
if(ht->poolsize >= ht->growlimit) return;
|
if(ht->poolsize >= ht->growlimit) return;
|
||||||
if(newsize > ht->growlimit) newsize = ht->growlimit;
|
if(newsize > ht->growlimit) newsize = ht->growlimit;
|
||||||
newvalues = realloc(ht->hashvalues, newsize * (sizeof(struct hashentry) + ht->recsize - 4));
|
newvalues = realloc(ht->hashvalues, (size_t)newsize * (sizeof(struct hashentry) + ht->recsize - 4));
|
||||||
if(!newvalues) return;
|
if(!newvalues) return;
|
||||||
ht->hashvalues = newvalues;
|
ht->hashvalues = newvalues;
|
||||||
newvalues = realloc(ht->hashhashvalues, newsize * ht->hash_size);
|
newvalues = realloc(ht->hashhashvalues, (size_t)newsize * ht->hash_size);
|
||||||
if(!newvalues) return;
|
if(!newvalues) return;
|
||||||
ht->hashhashvalues = newvalues;
|
ht->hashhashvalues = newvalues;
|
||||||
memset(ht->hashvalues + (ht->poolsize * (sizeof(struct hashentry) + ht->recsize - 4)), 0, (newsize - ht->poolsize) * (sizeof(struct hashentry) + ht->recsize - 4));
|
memset(ht->hashvalues + ((size_t)ht->poolsize * (sizeof(struct hashentry) + ht->recsize - 4)), 0, (size_t)(newsize - ht->poolsize) * (sizeof(struct hashentry) + ht->recsize - 4));
|
||||||
for(i = ht->poolsize + 1; i < newsize; i++) {
|
for(i = ht->poolsize + 1; i < newsize; i++) {
|
||||||
hvalue(ht,i)->inext = i+1;
|
hvalue(ht,i)->inext = i+1;
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-6
@@ -182,12 +182,12 @@ void * imappchild(struct clientparam* param) {
|
|||||||
if(method == CL_PLAIN){
|
if(method == CL_PLAIN){
|
||||||
i = (int)strlen((char *)param->extusername);
|
i = (int)strlen((char *)param->extusername);
|
||||||
res = (int)strlen((char *)pb);
|
res = (int)strlen((char *)pb);
|
||||||
if(((i + res + 4) / 3) * 4 + 1 > (int)sizeof(srvbuf)) {RETURN(693);}
|
if(i + res + 2 > (int)sizeof(ibuf)) {RETURN(693);}
|
||||||
ibuf[0] = 0;
|
ibuf[0] = 0;
|
||||||
memcpy(ibuf + 1, param->extusername, i);
|
memcpy(ibuf + 1, param->extusername, i);
|
||||||
ibuf[i + 1] = 0;
|
ibuf[i + 1] = 0;
|
||||||
memcpy(ibuf + i + 2, pb, res);
|
memcpy(ibuf + i + 2, pb, res);
|
||||||
en64(ibuf, srvbuf, i + res + 2);
|
if(!en64(ibuf, srvbuf, i + res + 2, (int)sizeof(srvbuf))) {RETURN(693);}
|
||||||
if( socksend(param, param->remsock, tag, (int)strlen((char *)tag), conf.timeouts[STRING_S]) <= 0 ||
|
if( socksend(param, param->remsock, tag, (int)strlen((char *)tag), conf.timeouts[STRING_S]) <= 0 ||
|
||||||
socksend(param, param->remsock, (unsigned char *)" AUTHENTICATE PLAIN ", 20, conf.timeouts[STRING_S])!= 20 ||
|
socksend(param, param->remsock, (unsigned char *)" AUTHENTICATE PLAIN ", 20, conf.timeouts[STRING_S])!= 20 ||
|
||||||
socksend(param, param->remsock, srvbuf, (int)strlen((char *)srvbuf), conf.timeouts[STRING_S]) <= 0 ||
|
socksend(param, param->remsock, srvbuf, (int)strlen((char *)srvbuf), conf.timeouts[STRING_S]) <= 0 ||
|
||||||
@@ -200,15 +200,13 @@ void * imappchild(struct clientparam* param) {
|
|||||||
{RETURN(699);}
|
{RETURN(699);}
|
||||||
i = sockgetlinebuf(param, SERVER, srvbuf, sizeof(srvbuf) - 1, '\n', conf.timeouts[STRING_L]);
|
i = sockgetlinebuf(param, SERVER, srvbuf, sizeof(srvbuf) - 1, '\n', conf.timeouts[STRING_L]);
|
||||||
if(i < 1 || *srvbuf != '+') {RETURN(699);}
|
if(i < 1 || *srvbuf != '+') {RETURN(699);}
|
||||||
if(((int)strlen((char *)param->extusername) + 2) / 3 * 4 + 1 > (int)sizeof(ibuf) - 3) {RETURN(693);}
|
if(!en64(param->extusername, ibuf, (int)strlen((char *)param->extusername), (int)sizeof(ibuf))) {RETURN(693);}
|
||||||
en64(param->extusername, ibuf, (int)strlen((char *)param->extusername));
|
|
||||||
if( socksend(param, param->remsock, ibuf, (int)strlen((char *)ibuf), conf.timeouts[STRING_S]) <= 0 ||
|
if( socksend(param, param->remsock, ibuf, (int)strlen((char *)ibuf), conf.timeouts[STRING_S]) <= 0 ||
|
||||||
socksend(param, param->remsock, (unsigned char *)"\r\n", 2, conf.timeouts[STRING_S])!=2)
|
socksend(param, param->remsock, (unsigned char *)"\r\n", 2, conf.timeouts[STRING_S])!=2)
|
||||||
{RETURN(699);}
|
{RETURN(699);}
|
||||||
i = sockgetlinebuf(param, SERVER, srvbuf, sizeof(srvbuf) - 1, '\n', conf.timeouts[STRING_L]);
|
i = sockgetlinebuf(param, SERVER, srvbuf, sizeof(srvbuf) - 1, '\n', conf.timeouts[STRING_L]);
|
||||||
if(i < 1 || *srvbuf != '+') {RETURN(699);}
|
if(i < 1 || *srvbuf != '+') {RETURN(699);}
|
||||||
if(((int)strlen((char *)pb) + 2) / 3 * 4 + 1 > (int)sizeof(ibuf) - 3) {RETURN(693);}
|
if(!en64(pb, ibuf, (int)strlen((char *)pb), (int)sizeof(ibuf))) {RETURN(693);}
|
||||||
en64(pb, ibuf, (int)strlen((char *)pb));
|
|
||||||
if( socksend(param, param->remsock, ibuf, (int)strlen((char *)ibuf), conf.timeouts[STRING_S]) <= 0 ||
|
if( socksend(param, param->remsock, ibuf, (int)strlen((char *)ibuf), conf.timeouts[STRING_S]) <= 0 ||
|
||||||
socksend(param, param->remsock, (unsigned char *)"\r\n", 2, conf.timeouts[STRING_S])!=2)
|
socksend(param, param->remsock, (unsigned char *)"\r\n", 2, conf.timeouts[STRING_S])!=2)
|
||||||
{RETURN(699);}
|
{RETURN(699);}
|
||||||
|
|||||||
@@ -109,15 +109,17 @@ struct sockfuncs sso;
|
|||||||
|
|
||||||
static void genpaths(struct fp_stream *fps){
|
static void genpaths(struct fp_stream *fps){
|
||||||
|
|
||||||
|
size_t len = strlen(path) + 32;
|
||||||
|
|
||||||
if(fps->what & (FP_CLIDATA|FP_CLIHEADER)){
|
if(fps->what & (FP_CLIDATA|FP_CLIHEADER)){
|
||||||
if(fps->fpd.path_cli) free(fps->fpd.path_cli);
|
if(fps->fpd.path_cli) free(fps->fpd.path_cli);
|
||||||
fps->fpd.path_cli = malloc(strlen(path) + 10);
|
fps->fpd.path_cli = malloc(len);
|
||||||
sprintf(fps->fpd.path_cli, path, counter++);
|
if(fps->fpd.path_cli) sprintf(fps->fpd.path_cli, "%s%07d.tmp", path, counter++);
|
||||||
}
|
}
|
||||||
if(fps->what & (FP_SRVDATA|FP_SRVHEADER)){
|
if(fps->what & (FP_SRVDATA|FP_SRVHEADER)){
|
||||||
if(fps->fpd.path_srv) free(fps->fpd.path_srv);
|
if(fps->fpd.path_srv) free(fps->fpd.path_srv);
|
||||||
fps->fpd.path_srv = malloc(strlen(path) + 10);
|
fps->fpd.path_srv = malloc(len);
|
||||||
sprintf(fps->fpd.path_srv, path, counter++);
|
if(fps->fpd.path_srv) sprintf(fps->fpd.path_srv, "%s%07d.tmp", path, counter++);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -139,6 +141,7 @@ static
|
|||||||
return fps->fpd.h_cli;
|
return fps->fpd.h_cli;
|
||||||
#else
|
#else
|
||||||
if(fps->fpd.fd_cli != -1) close(fps->fpd.fd_cli);
|
if(fps->fpd.fd_cli != -1) close(fps->fpd.fd_cli);
|
||||||
|
if(!fps->fpd.path_cli) return (fps->fpd.fd_cli = -1);
|
||||||
fps->fpd.fd_cli = open(fps->fpd.path_cli, O_BINARY|O_RDWR|O_CREAT|O_TRUNC, 0600);
|
fps->fpd.fd_cli = open(fps->fpd.path_cli, O_BINARY|O_RDWR|O_CREAT|O_TRUNC, 0600);
|
||||||
return fps->fpd.fd_cli;
|
return fps->fpd.fd_cli;
|
||||||
#endif
|
#endif
|
||||||
@@ -160,6 +163,7 @@ static
|
|||||||
return fps->fpd.h_srv;
|
return fps->fpd.h_srv;
|
||||||
#else
|
#else
|
||||||
if(fps->fpd.fd_srv != -1) close(fps->fpd.fd_srv);
|
if(fps->fpd.fd_srv != -1) close(fps->fpd.fd_srv);
|
||||||
|
if(!fps->fpd.path_srv) return (fps->fpd.fd_srv = -1);
|
||||||
fps->fpd.fd_srv = open(fps->fpd.path_srv, O_BINARY|O_RDWR|O_CREAT|O_TRUNC, 0600);
|
fps->fpd.fd_srv = open(fps->fpd.path_srv, O_BINARY|O_RDWR|O_CREAT|O_TRUNC, 0600);
|
||||||
return fps->fpd.fd_srv;
|
return fps->fpd.fd_srv;
|
||||||
#endif
|
#endif
|
||||||
@@ -871,17 +875,17 @@ static int h_cachedir(int argc, unsigned char **argv){
|
|||||||
size_t len;
|
size_t len;
|
||||||
|
|
||||||
dirp = (argc > 1)? (char *)argv[1] : getenv("TEMP");
|
dirp = (argc > 1)? (char *)argv[1] : getenv("TEMP");
|
||||||
len = strlen(dirp);
|
len = dirp? strlen(dirp) : 0;
|
||||||
if(!dirp || !len || len > 200 || strchr(dirp, '%')) {
|
if(!dirp || !len || len > 200 || strchr(dirp, '%')) {
|
||||||
fprintf(stderr, "FilePlugin: invalid directory path: %s\n", dirp);
|
fprintf(stderr, "FilePlugin: invalid directory path: %s\n", dirp);
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
if(dirp[len-1] == '\\') dirp[len-1] = 0;
|
if(dirp[len-1] == '\\') dirp[len-1] = 0;
|
||||||
sprintf(path, "%.256s\\%%07d.tmp", dirp);
|
sprintf(path, "%.256s\\", dirp);
|
||||||
#else
|
#else
|
||||||
if(dirp[len-1] == '/') dirp[len-1] = 0;
|
if(dirp[len-1] == '/') dirp[len-1] = 0;
|
||||||
sprintf(path, "%.256s/%%07d.tmp", dirp);
|
sprintf(path, "%.256s/", dirp);
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
+11
-2
@@ -831,12 +831,20 @@ for(;;){
|
|||||||
send_st(param, 9);
|
send_st(param, 9);
|
||||||
}
|
}
|
||||||
if((unsigned)socksend(param, param->clisock, buf, inbuf, conf.timeouts[STRING_S]) != inbuf){
|
if((unsigned)socksend(param, param->clisock, buf, inbuf, conf.timeouts[STRING_S]) != inbuf){
|
||||||
|
param->srv->so._closesocket(param->sostate, ftps);
|
||||||
|
ftps = INVALID_SOCKET;
|
||||||
|
param->remsock = s;
|
||||||
RETURN(781);
|
RETURN(781);
|
||||||
}
|
}
|
||||||
inbuf = 0;
|
inbuf = 0;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(!(newbuf = realloc(buf, bufsize + BUFSIZE))){RETURN (21);}
|
if(!(newbuf = realloc(buf, bufsize + BUFSIZE))){
|
||||||
|
param->srv->so._closesocket(param->sostate, ftps);
|
||||||
|
ftps = INVALID_SOCKET;
|
||||||
|
param->remsock = s;
|
||||||
|
RETURN (21);
|
||||||
|
}
|
||||||
buf = newbuf;
|
buf = newbuf;
|
||||||
bufsize += BUFSIZE;
|
bufsize += BUFSIZE;
|
||||||
}
|
}
|
||||||
@@ -929,7 +937,8 @@ for(;;){
|
|||||||
if(param->extusername){
|
if(param->extusername){
|
||||||
hlen += sprintf((char*)buf + hlen, "%s: Basic ", (redirect)?"Proxy-Authorization":"Authorization");
|
hlen += sprintf((char*)buf + hlen, "%s: Basic ", (redirect)?"Proxy-Authorization":"Authorization");
|
||||||
sprintf((char*)username, "%.128s:%.128s", param->extusername, param->extpassword?param->extpassword:(unsigned char*)"");
|
sprintf((char*)username, "%.128s:%.128s", param->extusername, param->extpassword?param->extpassword:(unsigned char*)"");
|
||||||
hlen = (int)(en64(username, buf + hlen, (int)strlen((char *)username)) - buf);
|
if(!(sb = en64(username, buf + hlen, (int)strlen((char *)username), bufsize - hlen))) {RETURN(21);}
|
||||||
|
hlen = (int)(sb - buf);
|
||||||
hlen += sprintf((char*)buf + hlen, "\r\n");
|
hlen += sprintf((char*)buf + hlen, "\r\n");
|
||||||
}
|
}
|
||||||
hlen += sprintf((char*)buf + hlen, "\r\n");
|
hlen += sprintf((char*)buf + hlen, "\r\n");
|
||||||
|
|||||||
+6
-1
@@ -204,6 +204,11 @@ extern int timeouts[12];
|
|||||||
|
|
||||||
int sockmap(struct clientparam * param, int timeo, int usesplice);
|
int sockmap(struct clientparam * param, int timeo, int usesplice);
|
||||||
int udpsockmap(struct clientparam * param, int timeo);
|
int udpsockmap(struct clientparam * param, int timeo);
|
||||||
|
int udpbind(struct clientparam * param);
|
||||||
|
int socks5_setaddr(int family, int atyp, const unsigned char *addr, PROXYSOCKADDRTYPE *sa);
|
||||||
|
#ifdef __linux__
|
||||||
|
int switch_ns(struct srvparam *srv, int target_fd);
|
||||||
|
#endif
|
||||||
int socksend(struct clientparam *param, SOCKET sock, unsigned char * buf, int bufsize, int to);
|
int socksend(struct clientparam *param, SOCKET sock, unsigned char * buf, int bufsize, int to);
|
||||||
int socksendto(struct clientparam *param, SOCKET sock, struct sockaddr * sin, unsigned char * buf, int bufsize, int to);
|
int socksendto(struct clientparam *param, SOCKET sock, struct sockaddr * sin, unsigned char * buf, int bufsize, int to);
|
||||||
int sockrecvfrom(struct clientparam *param, SOCKET sock, struct sockaddr * sin, unsigned char * buf, int bufsize, int to);
|
int sockrecvfrom(struct clientparam *param, SOCKET sock, struct sockaddr * sin, unsigned char * buf, int bufsize, int to);
|
||||||
@@ -271,7 +276,7 @@ extern int demon;
|
|||||||
unsigned char * mycrypt(const unsigned char *key, const unsigned char *salt, unsigned char *buf);
|
unsigned char * mycrypt(const unsigned char *key, const unsigned char *salt, unsigned char *buf);
|
||||||
unsigned char * ntpwdhash (unsigned char *szHash, const unsigned char *szPassword, int tohex);
|
unsigned char * ntpwdhash (unsigned char *szHash, const unsigned char *szPassword, int tohex);
|
||||||
int de64 (const unsigned char *in, unsigned char *out, int maxlen);
|
int de64 (const unsigned char *in, unsigned char *out, int maxlen);
|
||||||
unsigned char* en64 (const unsigned char *in, unsigned char *out, int inlen);
|
unsigned char* en64 (const unsigned char *in, unsigned char *out, int inlen, int outsize);
|
||||||
void tohex(unsigned char *in, unsigned char *out, int len);
|
void tohex(unsigned char *in, unsigned char *out, int len);
|
||||||
void fromhex(unsigned char *in, unsigned char *out, int len);
|
void fromhex(unsigned char *in, unsigned char *out, int len);
|
||||||
|
|
||||||
|
|||||||
+15
-3
@@ -329,6 +329,11 @@ int MODULEMAINFUNC (int argc, char** argv){
|
|||||||
#endif
|
#endif
|
||||||
#ifdef WITHSPLICE
|
#ifdef WITHSPLICE
|
||||||
" -s Use splice() - no filtering for data, off by default\n"
|
" -s Use splice() - no filtering for data, off by default\n"
|
||||||
|
" -C connection closed by any of the sides terminates the session, by default\n"
|
||||||
|
" the session is kept until both sides close it (TCP half-close)\n"
|
||||||
|
" -U(0-3) (for socks) what to do when the destination changes within an UDP\n"
|
||||||
|
" association: 1 - log, 2 - authorize, 3 - both (default), 0 (same as -U) -\n"
|
||||||
|
" neither. The first destination is always authorized and logged\n"
|
||||||
#endif
|
#endif
|
||||||
"-g(GRACE_TRAFF,GRACE_NUM,GRACE_DELAY) - delay GRACE_DELAY milliseconds before polling if average polling size below GRACE_TRAFF bytes and GRACE_NUM read operations in single directions are detected within 1 second to minimize polling\n"
|
"-g(GRACE_TRAFF,GRACE_NUM,GRACE_DELAY) - delay GRACE_DELAY milliseconds before polling if average polling size below GRACE_TRAFF bytes and GRACE_NUM read operations in single directions are detected within 1 second to minimize polling\n"
|
||||||
" -fFORMAT logging format (see documentation)\n"
|
" -fFORMAT logging format (see documentation)\n"
|
||||||
@@ -500,8 +505,8 @@ int MODULEMAINFUNC (int argc, char** argv){
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'N':
|
case 'N':
|
||||||
if(argv[i][3] == 'e') getip46(46, (unsigned char *)argv[i]+3, (struct sockaddr *)&srv.extNat);
|
if(argv[i][2] == 'e') getip46(46, (unsigned char *)argv[i]+3, (struct sockaddr *)&srv.extNat);
|
||||||
else if(argv[i][3] == 'i') getip46(46, (unsigned char *)argv[i]+3, (struct sockaddr *)&srv.intNat);
|
else if(argv[i][2] == 'i') getip46(46, (unsigned char *)argv[i]+3, (struct sockaddr *)&srv.intNat);
|
||||||
else getip46(46, (unsigned char *)argv[i]+2, (struct sockaddr *)&srv.extNat);
|
else getip46(46, (unsigned char *)argv[i]+2, (struct sockaddr *)&srv.extNat);
|
||||||
break;
|
break;
|
||||||
case 'n':
|
case 'n':
|
||||||
@@ -596,6 +601,12 @@ int MODULEMAINFUNC (int argc, char** argv){
|
|||||||
case 'g':
|
case 'g':
|
||||||
sscanf(argv[i]+2, "%d,%d,%d", &srv.gracetraf, &srv.gracenum, &srv.gracedelay);
|
sscanf(argv[i]+2, "%d,%d,%d", &srv.gracetraf, &srv.gracenum, &srv.gracedelay);
|
||||||
break;
|
break;
|
||||||
|
case 'C':
|
||||||
|
srv.halfclose = *(argv[i]+2)? atoi(argv[i]+2) : 0;
|
||||||
|
break;
|
||||||
|
case 'U':
|
||||||
|
srv.udpauth = *(argv[i]+2)? atoi(argv[i]+2) : 0;
|
||||||
|
break;
|
||||||
case 's':
|
case 's':
|
||||||
#ifdef WITHSPLICE
|
#ifdef WITHSPLICE
|
||||||
if(isudp || srv.service == S_ADMIN)
|
if(isudp || srv.service == S_ADMIN)
|
||||||
@@ -1247,6 +1258,8 @@ void srvinit(struct srvparam * srv, struct clientparam *param){
|
|||||||
#ifdef WITHSPLICE
|
#ifdef WITHSPLICE
|
||||||
srv->usesplice = 0;
|
srv->usesplice = 0;
|
||||||
#endif
|
#endif
|
||||||
|
srv->halfclose = 1;
|
||||||
|
srv->udpauth = 3;
|
||||||
memset(param, 0, sizeof(struct clientparam));
|
memset(param, 0, sizeof(struct clientparam));
|
||||||
param->srv = srv;
|
param->srv = srv;
|
||||||
param->version = srv->version;
|
param->version = srv->version;
|
||||||
@@ -1349,7 +1362,6 @@ void srvfree(struct srvparam * srv){
|
|||||||
|
|
||||||
|
|
||||||
void freeparam(struct clientparam * param) {
|
void freeparam(struct clientparam * param) {
|
||||||
if(param->res == 2) return;
|
|
||||||
if(param->srv){
|
if(param->srv){
|
||||||
if(param->srv->so.freefunc) param->srv->so.freefunc(param->sostate);
|
if(param->srv->so.freefunc) param->srv->so.freefunc(param->sostate);
|
||||||
_3proxy_mutex_lock(¶m->srv->counter_mutex);
|
_3proxy_mutex_lock(¶m->srv->counter_mutex);
|
||||||
|
|||||||
+4
-4
@@ -70,7 +70,7 @@ int clientnegotiate(struct chain * redir, struct clientparam * param, struct soc
|
|||||||
if(user){
|
if(user){
|
||||||
len += sprintf((char *)buf + len, "Proxy-Authorization: Basic ");
|
len += sprintf((char *)buf + len, "Proxy-Authorization: Basic ");
|
||||||
sprintf((char *)username, "%.128s:%.128s", user, pass?pass:(unsigned char *)"");
|
sprintf((char *)username, "%.128s:%.128s", user, pass?pass:(unsigned char *)"");
|
||||||
en64(username, buf+len, (int)strlen((char *)username));
|
if(!en64(username, buf+len, (int)strlen((char *)username), 2048 - len)) return 21;
|
||||||
len = (int)strlen((char *)buf);
|
len = (int)strlen((char *)buf);
|
||||||
len += sprintf((char *)buf + len, "\r\n");
|
len += sprintf((char *)buf + len, "\r\n");
|
||||||
}
|
}
|
||||||
@@ -270,8 +270,6 @@ int handleredirect(struct clientparam * param, struct ace * acentry){
|
|||||||
int r2;
|
int r2;
|
||||||
int saved = 0;
|
int saved = 0;
|
||||||
|
|
||||||
if(param->remsock != INVALID_SOCKET && param->operation != UDPASSOC) {
|
|
||||||
}
|
|
||||||
if((SAISNULL(¶m->req) || !*SAPORT(¶m->req)) && param->operation != UDPASSOC) {
|
if((SAISNULL(¶m->req) || !*SAPORT(¶m->req)) && param->operation != UDPASSOC) {
|
||||||
return 100;
|
return 100;
|
||||||
}
|
}
|
||||||
@@ -287,7 +285,7 @@ int handleredirect(struct clientparam * param, struct ace * acentry){
|
|||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
param->redirected++;
|
if(cur->type != R_EXTIP && cur->type != R_HA) param->redirected++;
|
||||||
done = 1;
|
done = 1;
|
||||||
if(weight <= 0) {
|
if(weight <= 0) {
|
||||||
weight += 1000;
|
weight += 1000;
|
||||||
@@ -342,6 +340,7 @@ int handleredirect(struct clientparam * param, struct ace * acentry){
|
|||||||
}
|
}
|
||||||
if(cur->next)continue;
|
if(cur->next)continue;
|
||||||
if(!ha) return 0;
|
if(!ha) return 0;
|
||||||
|
if(param->operation == UDPASSOC) return 0;
|
||||||
}
|
}
|
||||||
else if(!*SAPORT(&cur->addr) && !SAISNULL(&cur->addr)) {
|
else if(!*SAPORT(&cur->addr) && !SAISNULL(&cur->addr)) {
|
||||||
uint16_t port = *SAPORT(¶m->sinsr);
|
uint16_t port = *SAPORT(¶m->sinsr);
|
||||||
@@ -354,6 +353,7 @@ int handleredirect(struct clientparam * param, struct ace * acentry){
|
|||||||
}
|
}
|
||||||
if(param->operation == UDPASSOC){
|
if(param->operation == UDPASSOC){
|
||||||
SOCKET s;
|
SOCKET s;
|
||||||
|
if(cur->type != R_SOCKS5 && cur->type != R_SOCKS5P) return 70;
|
||||||
s = param->remsock;
|
s = param->remsock;
|
||||||
param->remsock = INVALID_SOCKET;
|
param->remsock = INVALID_SOCKET;
|
||||||
param->ctrlsocksrv = s;
|
param->ctrlsocksrv = s;
|
||||||
|
|||||||
+42
-12
@@ -3,6 +3,19 @@
|
|||||||
struct nserver nservers[MAXNSERVERS] = {{{0},0}, {{0},0}, {{0},0}, {{0},0}, {{0},0}};
|
struct nserver nservers[MAXNSERVERS] = {{{0},0}, {{0},0}, {{0},0}, {{0},0}, {{0},0}};
|
||||||
struct nserver authnserver;
|
struct nserver authnserver;
|
||||||
|
|
||||||
|
static int dnsqmatch(const unsigned char *a, const unsigned char *b, int len){
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for(i = 0; i < len; i++){
|
||||||
|
unsigned char c1 = a[i], c2 = b[i];
|
||||||
|
|
||||||
|
if(c1 >= 'A' && c1 <= 'Z') c1 += 'a' - 'A';
|
||||||
|
if(c2 >= 'A' && c2 <= 'Z') c2 += 'a' - 'A';
|
||||||
|
if(c1 != c2) return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
uint32_t udpresolve(int af, unsigned char * name, unsigned char * value, uint32_t *retttl, struct clientparam* param, int makeauth){
|
uint32_t udpresolve(int af, unsigned char * name, unsigned char * value, uint32_t *retttl, struct clientparam* param, int makeauth){
|
||||||
|
|
||||||
@@ -23,9 +36,12 @@ uint32_t udpresolve(int af, unsigned char * name, unsigned char * value, uint32_
|
|||||||
SOCKET sock;
|
SOCKET sock;
|
||||||
uint32_t ttl;
|
uint32_t ttl;
|
||||||
PROXYSOCKADDRTYPE addr;
|
PROXYSOCKADDRTYPE addr;
|
||||||
|
PROXYSOCKADDRTYPE from;
|
||||||
PROXYSOCKADDRTYPE *sinsr, *sinsl;
|
PROXYSOCKADDRTYPE *sinsr, *sinsl;
|
||||||
int usetcp = 0;
|
int usetcp = 0;
|
||||||
unsigned short serial = 1;
|
unsigned short serial = 1;
|
||||||
|
unsigned char qbuf[300];
|
||||||
|
int qlen;
|
||||||
|
|
||||||
buf = b+2;
|
buf = b+2;
|
||||||
|
|
||||||
@@ -92,6 +108,9 @@ uint32_t udpresolve(int af, unsigned char * name, unsigned char * value, uint32_
|
|||||||
buf[len++] = (makeauth == 1)? 0x0c : (af==AF_INET6? 0x1c:0x01);/* PTR:host address */
|
buf[len++] = (makeauth == 1)? 0x0c : (af==AF_INET6? 0x1c:0x01);/* PTR:host address */
|
||||||
buf[len++] = 0;
|
buf[len++] = 0;
|
||||||
buf[len++] = 1; /* INET */
|
buf[len++] = 1; /* INET */
|
||||||
|
qlen = len - 12;
|
||||||
|
memcpy(qbuf, buf + 12, qlen);
|
||||||
|
|
||||||
if(usetcp){
|
if(usetcp){
|
||||||
buf-=2;
|
buf-=2;
|
||||||
*(unsigned short*)buf = htons(len);
|
*(unsigned short*)buf = htons(len);
|
||||||
@@ -104,30 +123,41 @@ uint32_t udpresolve(int af, unsigned char * name, unsigned char * value, uint32_
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if(param) param->statscli64 += len;
|
if(param) param->statscli64 += len;
|
||||||
len = sockrecvfrom(NULL, sock, (struct sockaddr *)sinsr, buf, 4096, conf.timeouts[DNS_TO]*1000);
|
len = sockrecvfrom(NULL, sock, (struct sockaddr *)&from, buf, 4096, conf.timeouts[DNS_TO]*1000);
|
||||||
|
if(len > 13 && usetcp){
|
||||||
|
unsigned short us;
|
||||||
|
us = ntohs(*(unsigned short*)buf);
|
||||||
|
len-=2;
|
||||||
|
buf+=2;
|
||||||
|
if(us > 4096 || us < len) len = 0;
|
||||||
|
else if(us > len){
|
||||||
|
if(sockrecvfrom(NULL, sock, (struct sockaddr *)&from, buf+len, us-len, conf.timeouts[DNS_TO]*1000) != us-len) len = 0;
|
||||||
|
else len = us;
|
||||||
|
}
|
||||||
|
}
|
||||||
so._shutdown(so.state, sock, SHUT_RDWR);
|
so._shutdown(so.state, sock, SHUT_RDWR);
|
||||||
so._closesocket(so.state, sock);
|
so._closesocket(so.state, sock);
|
||||||
if(len <= 13) {
|
if(len <= 13) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if(param) param->statssrv64 += len;
|
if(param) param->statssrv64 += len;
|
||||||
if(usetcp){
|
if(!usetcp && (*SAFAMILY(&from) != *SAFAMILY(sinsr) ||
|
||||||
unsigned short us;
|
memcmp(SAADDR(&from), SAADDR(sinsr), SAADDRLEN(sinsr)) ||
|
||||||
us = ntohs(*(unsigned short*)buf);
|
*SAPORT(&from) != *SAPORT(sinsr))) {
|
||||||
len-=2;
|
continue; /* not from the server we asked */
|
||||||
buf+=2;
|
|
||||||
if(us > 4096 || us < len || (us > len && sockrecvfrom(NULL, sock, (struct sockaddr *)sinsr, buf+len, us-len, conf.timeouts[DNS_TO]*1000) != us-len)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if(*(unsigned short *)buf != serial)continue;
|
if(*(unsigned short *)buf != serial)continue;
|
||||||
if((na = buf[7] + (((unsigned short)buf[6])<<8)) < 1) {
|
if(!(buf[2] & 0x80)) continue; /* not a response */
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
nq = buf[5] + (((unsigned short)buf[4])<<8);
|
nq = buf[5] + (((unsigned short)buf[4])<<8);
|
||||||
if (nq != 1) {
|
if (nq != 1) {
|
||||||
continue; /* we did only 1 request */
|
continue; /* we did only 1 request */
|
||||||
}
|
}
|
||||||
|
if(len < 12 + qlen || dnsqmatch(buf + 12, qbuf, qlen)) {
|
||||||
|
continue; /* question does not match the query */
|
||||||
|
}
|
||||||
|
if((na = buf[7] + (((unsigned short)buf[6])<<8)) < 1) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
for(k = 13; k<len && buf[k]; k++) {
|
for(k = 13; k<len && buf[k]; k++) {
|
||||||
}
|
}
|
||||||
k++;
|
k++;
|
||||||
|
|||||||
+4
-4
@@ -237,14 +237,14 @@ void * smtppchild(struct clientparam* param) {
|
|||||||
param->nwrites++;
|
param->nwrites++;
|
||||||
i = sockgetlinebuf(param, SERVER, buf, sizeof(buf) - 1, '\n', conf.timeouts[STRING_L]);
|
i = sockgetlinebuf(param, SERVER, buf, sizeof(buf) - 1, '\n', conf.timeouts[STRING_L]);
|
||||||
if(i<4 || strncasecmp((char *)buf, "334", 3)) {RETURN(680);}
|
if(i<4 || strncasecmp((char *)buf, "334", 3)) {RETURN(680);}
|
||||||
en64(param->extusername, buf, (int)strlen((char *)param->extusername));
|
if(!en64(param->extusername, buf, (int)strlen((char *)param->extusername), (int)sizeof(buf))) {RETURN(683);}
|
||||||
socksend(param, param->remsock, buf, (int)strlen((char *)buf), conf.timeouts[STRING_S]);
|
socksend(param, param->remsock, buf, (int)strlen((char *)buf), conf.timeouts[STRING_S]);
|
||||||
socksend(param, param->remsock, (unsigned char *)"\r\n", 2, conf.timeouts[STRING_S]);
|
socksend(param, param->remsock, (unsigned char *)"\r\n", 2, conf.timeouts[STRING_S]);
|
||||||
param->statscli64+=(i+2);
|
param->statscli64+=(i+2);
|
||||||
param->nwrites+=2;
|
param->nwrites+=2;
|
||||||
i = sockgetlinebuf(param, SERVER, buf, sizeof(buf) - 1, '\n', conf.timeouts[STRING_L]);
|
i = sockgetlinebuf(param, SERVER, buf, sizeof(buf) - 1, '\n', conf.timeouts[STRING_L]);
|
||||||
if(i<4 || strncasecmp((char *)buf, "334", 3)) {RETURN(681);}
|
if(i<4 || strncasecmp((char *)buf, "334", 3)) {RETURN(681);}
|
||||||
en64(param->extpassword, buf, (int)strlen((char *)param->extpassword));
|
if(!en64(param->extpassword, buf, (int)strlen((char *)param->extpassword), (int)sizeof(buf))) {RETURN(683);}
|
||||||
socksend(param, param->remsock, buf, (int)strlen((char *)buf), conf.timeouts[STRING_S]);
|
socksend(param, param->remsock, buf, (int)strlen((char *)buf), conf.timeouts[STRING_S]);
|
||||||
socksend(param, param->remsock, (unsigned char *)"\r\n", 2, conf.timeouts[STRING_S]);
|
socksend(param, param->remsock, (unsigned char *)"\r\n", 2, conf.timeouts[STRING_S]);
|
||||||
param->statscli64+=(i+2);
|
param->statscli64+=(i+2);
|
||||||
@@ -259,12 +259,12 @@ void * smtppchild(struct clientparam* param) {
|
|||||||
*username = 0;
|
*username = 0;
|
||||||
i = (int)strlen((char *)param->extusername) + 1;
|
i = (int)strlen((char *)param->extusername) + 1;
|
||||||
res = (int)strlen((char *)param->extpassword);
|
res = (int)strlen((char *)param->extpassword);
|
||||||
if(i + 1 + res >= (int)sizeof(username) || ((i + 1 + res + 2) / 3) * 4 + 1 > (int)sizeof(buf)) {RETURN(683);}
|
if(i + 1 + res >= (int)sizeof(username)) {RETURN(683);}
|
||||||
memcpy(username+1, param->extusername, i);
|
memcpy(username+1, param->extusername, i);
|
||||||
i++;
|
i++;
|
||||||
memcpy(username + i, param->extpassword, res);
|
memcpy(username + i, param->extpassword, res);
|
||||||
i+=res;
|
i+=res;
|
||||||
en64(username, buf, i);
|
if(!en64(username, buf, i, (int)sizeof(buf))) {RETURN(683);}
|
||||||
i = (int)strlen((char *)buf);
|
i = (int)strlen((char *)buf);
|
||||||
socksend(param, param->remsock, buf, i, conf.timeouts[STRING_S]);
|
socksend(param, param->remsock, buf, i, conf.timeouts[STRING_S]);
|
||||||
socksend(param, param->remsock, (unsigned char *)"\r\n", 2, conf.timeouts[STRING_S]);
|
socksend(param, param->remsock, (unsigned char *)"\r\n", 2, conf.timeouts[STRING_S]);
|
||||||
|
|||||||
+3
-2
@@ -171,12 +171,13 @@ int sockgetlinebuf(struct clientparam * param, DIRECTION which, unsigned char *
|
|||||||
if(delim != EOF){
|
if(delim != EOF){
|
||||||
unsigned char *d = (unsigned char *)memchr(base + *offp, delim, n);
|
unsigned char *d = (unsigned char *)memchr(base + *offp, delim, n);
|
||||||
if(d) n = (int)(d - (base + *offp)) + 1;
|
if(d) n = (int)(d - (base + *offp)) + 1;
|
||||||
memcpy(buf + i, base + *offp, n);
|
/* caller may use param->srvbuf / param->clibuf as buf */
|
||||||
|
memmove(buf + i, base + *offp, n);
|
||||||
i += n; *offp += n;
|
i += n; *offp += n;
|
||||||
if(d || i >= bufsize) return i;
|
if(d || i >= bufsize) return i;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
memcpy(buf + i, base + *offp, n);
|
memmove(buf + i, base + *offp, n);
|
||||||
i += n; *offp += n;
|
i += n; *offp += n;
|
||||||
if(i >= bufsize) return i;
|
if(i >= bufsize) return i;
|
||||||
}
|
}
|
||||||
|
|||||||
+18
-9
@@ -44,7 +44,13 @@ ssize_t splice(int fd_in, loff_t *off_in, int fd_out, loff_t *off_out, size_t le
|
|||||||
#define MIN(a,b) ((a>b)?b:a)
|
#define MIN(a,b) ((a>b)?b:a)
|
||||||
#define RETURN(xxx) { res = xxx; goto CLEANRET; }
|
#define RETURN(xxx) { res = xxx; goto CLEANRET; }
|
||||||
|
|
||||||
|
/* Unless half-close is requested for the service, a connection closed by any
|
||||||
|
of the sides terminates the session, remaining buffered data is delivered
|
||||||
|
before the sockets are closed. */
|
||||||
|
#define SESSIONEND (!halfclose && (CLIENTTERMREAD || SERVERTERMREAD))
|
||||||
|
|
||||||
int sockmap(struct clientparam * param, int timeo, int usesplice){
|
int sockmap(struct clientparam * param, int timeo, int usesplice){
|
||||||
|
int halfclose = param->srv->halfclose;
|
||||||
uint64_t fromclient=0x7fffffffffffffff, fromserver =0x7fffffffffffffff;
|
uint64_t fromclient=0x7fffffffffffffff, fromserver =0x7fffffffffffffff;
|
||||||
uint64_t inclientbuf = 0, inserverbuf = 0;
|
uint64_t inclientbuf = 0, inserverbuf = 0;
|
||||||
int FROMCLIENT = 1, TOCLIENTBUF = 1, TOSERVER = 1,
|
int FROMCLIENT = 1, TOCLIENTBUF = 1, TOSERVER = 1,
|
||||||
@@ -129,13 +135,13 @@ int sockmap(struct clientparam * param, int timeo, int usesplice){
|
|||||||
#ifdef WITHSPLICE
|
#ifdef WITHSPLICE
|
||||||
|| inserverpipe
|
|| inserverpipe
|
||||||
#endif
|
#endif
|
||||||
|| (!SERVERTERMREAD )))
|
|| (!SERVERTERMREAD && !SESSIONEND)))
|
||||||
||
|
||
|
||||||
((!SERVERTERMWRITE) && fromclient && (inclientbuf
|
((!SERVERTERMWRITE) && fromclient && (inclientbuf
|
||||||
#ifdef WITHSPLICE
|
#ifdef WITHSPLICE
|
||||||
|| inclientpipe
|
|| inclientpipe
|
||||||
#endif
|
#endif
|
||||||
|| (!CLIENTTERMREAD )))
|
|| (!CLIENTTERMREAD && !SESSIONEND)))
|
||||||
){
|
){
|
||||||
|
|
||||||
|
|
||||||
@@ -354,7 +360,7 @@ log(logbuf);
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(fromclient>inclientpipe && FROMCLIENT && TOCLIENTPIPE){
|
if(fromclient>inclientpipe && FROMCLIENT && TOCLIENTPIPE && !SESSIONEND){
|
||||||
int error;
|
int error;
|
||||||
socklen_t len=sizeof(error);
|
socklen_t len=sizeof(error);
|
||||||
#ifdef WITHLOG
|
#ifdef WITHLOG
|
||||||
@@ -396,7 +402,7 @@ log("done read from client to pipe");
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(fromserver > inserverpipe && FROMSERVER && TOSERVERPIPE){
|
if(fromserver > inserverpipe && FROMSERVER && TOSERVERPIPE && !SESSIONEND){
|
||||||
int error;
|
int error;
|
||||||
socklen_t len=sizeof(error);
|
socklen_t len=sizeof(error);
|
||||||
errno = 0;
|
errno = 0;
|
||||||
@@ -449,7 +455,7 @@ log("done read from server to pipe\n");
|
|||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
if(fromclient > inclientbuf && FROMCLIENT && TOCLIENTBUF){
|
if(fromclient > inclientbuf && FROMCLIENT && TOCLIENTBUF && !SESSIONEND){
|
||||||
#ifdef WITHLOG
|
#ifdef WITHLOG
|
||||||
log("read from client to buf");
|
log("read from client to buf");
|
||||||
#endif
|
#endif
|
||||||
@@ -482,7 +488,7 @@ log("done read from client to buf");
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(fromserver > inserverbuf && FROMSERVER && TOSERVERBUF){
|
if(fromserver > inserverbuf && FROMSERVER && TOSERVERBUF && !SESSIONEND){
|
||||||
#ifdef WITHLOG
|
#ifdef WITHLOG
|
||||||
log("read from server to buf");
|
log("read from server to buf");
|
||||||
#endif
|
#endif
|
||||||
@@ -547,7 +553,7 @@ log("done read from server to buf");
|
|||||||
// if(!CLIENTTERMREAD || !CLIENTTERMWRITE){
|
// if(!CLIENTTERMREAD || !CLIENTTERMWRITE){
|
||||||
if(!after){
|
if(!after){
|
||||||
fds[fdsc].fd = param->clisock;
|
fds[fdsc].fd = param->clisock;
|
||||||
if(fromclient && !CLIENTTERMREAD && !FROMCLIENT && ((
|
if(fromclient && !CLIENTTERMREAD && !FROMCLIENT && !SESSIONEND && ((
|
||||||
#ifdef WITHSPLICE
|
#ifdef WITHSPLICE
|
||||||
!usesplice &&
|
!usesplice &&
|
||||||
#endif
|
#endif
|
||||||
@@ -607,7 +613,7 @@ log("ready to write to client");
|
|||||||
// if(!SERVERTERMREAD || !SERVERTERMWRITE){
|
// if(!SERVERTERMREAD || !SERVERTERMWRITE){
|
||||||
if(!after){
|
if(!after){
|
||||||
fds[fdsc].fd = param->remsock;
|
fds[fdsc].fd = param->remsock;
|
||||||
if(fromserver && !SERVERTERMREAD && !FROMSERVER && ((
|
if(fromserver && !SERVERTERMREAD && !FROMSERVER && !SESSIONEND && ((
|
||||||
#ifdef WITHSPLICE
|
#ifdef WITHSPLICE
|
||||||
!usesplice &&
|
!usesplice &&
|
||||||
#endif
|
#endif
|
||||||
@@ -780,7 +786,9 @@ log("ready reading from server pipe");
|
|||||||
#ifdef WITHLOG
|
#ifdef WITHLOG
|
||||||
log("entering poll");
|
log("entering poll");
|
||||||
#endif
|
#endif
|
||||||
res = param->srv->so._poll(param->sostate, fds, fdsc, timeo*1000);
|
res = param->srv->so._poll(param->sostate, fds, fdsc,
|
||||||
|
((CLIENTTERMREAD || SERVERTERMREAD)?
|
||||||
|
MIN(timeo, conf.timeouts[LINGER_TO]) : timeo) * 1000);
|
||||||
#ifdef WITHLOG
|
#ifdef WITHLOG
|
||||||
log("leaving poll");
|
log("leaving poll");
|
||||||
#endif
|
#endif
|
||||||
@@ -825,3 +833,4 @@ CLEANRET:
|
|||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
#undef SESSIONEND
|
||||||
+15
-47
@@ -7,15 +7,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "proxy.h"
|
#include "proxy.h"
|
||||||
#ifdef __linux__
|
|
||||||
#include <sched.h>
|
|
||||||
|
|
||||||
static int switch_ns(struct srvparam *srv, int target_fd) {
|
|
||||||
if(target_fd < 0) return 0;
|
|
||||||
if(srv->saved_nsfd >= 0 && setns(srv->saved_nsfd, CLONE_NEWNET)) return -1;
|
|
||||||
return setns(target_fd, CLONE_NEWNET);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define RETURN(xxx) { param->res = xxx; goto CLEANRET; }
|
#define RETURN(xxx) { param->res = xxx; goto CLEANRET; }
|
||||||
|
|
||||||
@@ -116,38 +107,20 @@ void * sockschild(struct clientparam* param) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
size = 4;
|
size = 4;
|
||||||
*SAFAMILY(¶m->sinsr) = *SAFAMILY(¶m->req) = AF_INET;
|
|
||||||
switch(c) {
|
switch(c) {
|
||||||
#ifndef NOIPV6
|
#ifndef NOIPV6
|
||||||
case 4:
|
case 4:
|
||||||
if(param->srv->family == 4) RETURN(997);
|
|
||||||
size = 16;
|
size = 16;
|
||||||
*SAFAMILY(¶m->sinsr) = *SAFAMILY(¶m->req) = AF_INET6;
|
|
||||||
#endif
|
#endif
|
||||||
case 1:
|
case 1:
|
||||||
for (i = 0; i<size; i++){
|
for (i = 0; i<size; i++){
|
||||||
if ((res = sockgetcharcli(param, conf.timeouts[SINGLEBYTE_S], 0)) == EOF) {RETURN(441);}
|
if ((res = sockgetcharcli(param, conf.timeouts[SINGLEBYTE_S], 0)) == EOF) {RETURN(441);}
|
||||||
buf[i] = (unsigned char)res;
|
buf[i] = (unsigned char)res;
|
||||||
}
|
}
|
||||||
#ifndef NOIPV6
|
res = socks5_setaddr(param->srv->family, c, buf, ¶m->req);
|
||||||
if (c == 1 && param->srv->family==6){
|
if(res == 1) {RETURN(997);}
|
||||||
char prefix[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255};
|
if(res == 2 && command == 1) {RETURN(431);}
|
||||||
*SAFAMILY(¶m->sinsr) = *SAFAMILY(¶m->req) = AF_INET6;
|
param->sinsr = param->req;
|
||||||
memcpy(SAADDR(¶m->sinsr), prefix, 12);
|
|
||||||
memcpy(12 + (char *)SAADDR(¶m->sinsr), buf, 4);
|
|
||||||
memcpy(SAADDR(¶m->req), prefix, 12);
|
|
||||||
memcpy(12 + (char *)SAADDR(¶m->req), buf, 4);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
#endif
|
|
||||||
memcpy(SAADDR(¶m->sinsr), buf, size);
|
|
||||||
memcpy(SAADDR(¶m->req), buf, size);
|
|
||||||
#ifndef NOIPV6
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
if(command == 1 && SAISNULL(¶m->req)) {
|
|
||||||
RETURN(431);
|
|
||||||
}
|
|
||||||
myinet_ntop(*SAFAMILY(¶m->sinsr), SAADDR(¶m->sinsr), (char *)buf, 64);
|
myinet_ntop(*SAFAMILY(¶m->sinsr), SAADDR(¶m->sinsr), (char *)buf, 64);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
@@ -219,7 +192,11 @@ void * sockschild(struct clientparam* param) {
|
|||||||
RETURN(997);
|
RETURN(997);
|
||||||
}
|
}
|
||||||
|
|
||||||
if((res = (*param->srv->authfunc)(param))) {
|
if(command == 3) param->preauth = 1;
|
||||||
|
res = (*param->srv->authfunc)(param);
|
||||||
|
param->preauth = 0;
|
||||||
|
if(command == 3 && res == 2) res = 0;
|
||||||
|
if(res) {
|
||||||
RETURN(res);
|
RETURN(res);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -238,18 +215,9 @@ void * sockschild(struct clientparam* param) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(command == 3) {
|
if(command == 3) {
|
||||||
#ifdef __linux__
|
if((res = udpbind(param))) {RETURN(res);}
|
||||||
if(switch_ns(param->srv, param->srv->o_nsfd)) {RETURN(11);}
|
|
||||||
#endif
|
|
||||||
if ((param->remsock=param->srv->so._socket(param->sostate, SASOCK(¶m->req), SOCK_DGRAM, IPPROTO_UDP)) == INVALID_SOCKET) {RETURN (11);}
|
|
||||||
#ifdef _WIN32
|
|
||||||
{ unsigned long ul = 1; ioctlsocket(param->remsock, FIONBIO, &ul); }
|
|
||||||
#else
|
|
||||||
fcntl(param->remsock, F_SETFL, O_NONBLOCK | fcntl(param->remsock, F_GETFL));
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
else if(command == 2) {
|
||||||
if(command > 1) {
|
|
||||||
if(param->srv->so._bind(param->sostate, param->remsock,(struct sockaddr *)¶m->sinsl,SASIZE(¶m->sinsl))) {
|
if(param->srv->so._bind(param->sostate, param->remsock,(struct sockaddr *)¶m->sinsl,SASIZE(¶m->sinsl))) {
|
||||||
*SAPORT(¶m->sinsl) = 0;
|
*SAPORT(¶m->sinsl) = 0;
|
||||||
if(param->srv->so._bind(param->sostate, param->remsock,(struct sockaddr *)¶m->sinsl,SASIZE(¶m->sinsl)))RETURN (12);
|
if(param->srv->so._bind(param->sostate, param->remsock,(struct sockaddr *)¶m->sinsl,SASIZE(¶m->sinsl)))RETURN (12);
|
||||||
@@ -260,7 +228,8 @@ fflush(stderr);
|
|||||||
}
|
}
|
||||||
sasize = SASIZE(¶m->sinsl);
|
sasize = SASIZE(¶m->sinsl);
|
||||||
param->srv->so._getsockname(param->sostate, param->remsock, (struct sockaddr *)¶m->sinsl, &sasize);
|
param->srv->so._getsockname(param->sostate, param->remsock, (struct sockaddr *)¶m->sinsl, &sasize);
|
||||||
if(command == 3) {
|
}
|
||||||
|
if(command == 3) {
|
||||||
param->ctrlsock = param->clisock;
|
param->ctrlsock = param->clisock;
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
if(switch_ns(param->srv, param->srv->i_nsfd)) {RETURN(11);}
|
if(switch_ns(param->srv, param->srv->i_nsfd)) {RETURN(11);}
|
||||||
@@ -283,7 +252,6 @@ fprintf(stderr, "%hu binded to communicate with client\n",
|
|||||||
);
|
);
|
||||||
fflush(stderr);
|
fflush(stderr);
|
||||||
#endif
|
#endif
|
||||||
}
|
|
||||||
}
|
}
|
||||||
param->res = 0;
|
param->res = 0;
|
||||||
|
|
||||||
@@ -299,7 +267,7 @@ CLEANRET:
|
|||||||
|
|
||||||
sasize = sizeof(sin);
|
sasize = sizeof(sin);
|
||||||
if(command != 3 && param->remsock != INVALID_SOCKET) param->srv->so._getsockname(param->sostate, param->remsock, (struct sockaddr *)&sin, &sasize);
|
if(command != 3 && param->remsock != INVALID_SOCKET) param->srv->so._getsockname(param->sostate, param->remsock, (struct sockaddr *)&sin, &sasize);
|
||||||
if(!SAISNULL(¶m->srv->extNat)){
|
if(command != 3 && !SAISNULL(¶m->srv->extNat)){
|
||||||
uint16_t port;
|
uint16_t port;
|
||||||
port = *SAPORT(&sin);
|
port = *SAPORT(&sin);
|
||||||
sin = param->srv->extNat;
|
sin = param->srv->extNat;
|
||||||
@@ -307,7 +275,7 @@ CLEANRET:
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
param->srv->so._getsockname(param->sostate, param->clisock, (struct sockaddr *)&sin, &sasize);
|
param->srv->so._getsockname(param->sostate, param->clisock, (struct sockaddr *)&sin, &sasize);
|
||||||
if(!SAISNULL(¶m->srv->intNat)){
|
if(command == 3 && !SAISNULL(¶m->srv->intNat)){
|
||||||
uint16_t port;
|
uint16_t port;
|
||||||
port = *SAPORT(&sin);
|
port = *SAPORT(&sin);
|
||||||
sin = param->srv->intNat;
|
sin = param->srv->intNat;
|
||||||
|
|||||||
+9
-3
@@ -551,6 +551,8 @@ struct srvparam {
|
|||||||
#ifdef WITHSPLICE
|
#ifdef WITHSPLICE
|
||||||
int usesplice;
|
int usesplice;
|
||||||
#endif
|
#endif
|
||||||
|
int halfclose;
|
||||||
|
int udpauth;
|
||||||
unsigned bufsize;
|
unsigned bufsize;
|
||||||
unsigned authcachetype, authcachetime;
|
unsigned authcachetype, authcachetime;
|
||||||
unsigned logdumpsrv, logdumpcli;
|
unsigned logdumpsrv, logdumpcli;
|
||||||
@@ -643,7 +645,9 @@ struct clientparam {
|
|||||||
paused,
|
paused,
|
||||||
version,
|
version,
|
||||||
connlim,
|
connlim,
|
||||||
predatdone;
|
predatdone,
|
||||||
|
preauth,
|
||||||
|
dstindep;
|
||||||
|
|
||||||
unsigned char *hostname,
|
unsigned char *hostname,
|
||||||
*username,
|
*username,
|
||||||
@@ -678,6 +682,7 @@ struct clientparam {
|
|||||||
|
|
||||||
PROXYSOCKADDRTYPE udp_relay[3];
|
PROXYSOCKADDRTYPE udp_relay[3];
|
||||||
int udp_nhops;
|
int udp_nhops;
|
||||||
|
struct ace *lastace;
|
||||||
time_t time_start;
|
time_t time_start;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -832,7 +837,7 @@ struct pluginlink {
|
|||||||
int (*ACLMatches)(struct ace* acentry, struct clientparam * param);
|
int (*ACLMatches)(struct ace* acentry, struct clientparam * param);
|
||||||
int (*alwaysauth)(struct clientparam * param);
|
int (*alwaysauth)(struct clientparam * param);
|
||||||
int (*checkACL)(struct clientparam * param);
|
int (*checkACL)(struct clientparam * param);
|
||||||
unsigned char* (*en64)(const unsigned char *in, unsigned char *out, int inlen);
|
unsigned char* (*en64)(const unsigned char *in, unsigned char *out, int inlen, int outsize);
|
||||||
int (*de64)(const unsigned char *in, unsigned char *out, int maxlen);
|
int (*de64)(const unsigned char *in, unsigned char *out, int maxlen);
|
||||||
void (*tohex)(unsigned char *in, unsigned char *out, int len);
|
void (*tohex)(unsigned char *in, unsigned char *out, int len);
|
||||||
void (*fromhex)(unsigned char *in, unsigned char *out, int len);
|
void (*fromhex)(unsigned char *in, unsigned char *out, int len);
|
||||||
@@ -882,7 +887,8 @@ typedef enum {
|
|||||||
DNS_TO,
|
DNS_TO,
|
||||||
CHAIN_TO,
|
CHAIN_TO,
|
||||||
CONNECT_TO,
|
CONNECT_TO,
|
||||||
CONNBACK_TO
|
CONNBACK_TO,
|
||||||
|
LINGER_TO
|
||||||
}TIMEOUT;
|
}TIMEOUT;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
|||||||
+5
-12
@@ -36,26 +36,19 @@ void * udppmchild(struct clientparam* param) {
|
|||||||
int i;
|
int i;
|
||||||
int len = 0;
|
int len = 0;
|
||||||
|
|
||||||
if(parsehostname((char *)param->srv->target, param, ntohs(param->srv->targetport))) { RETURN(201) }
|
if(parsehostname((char *)param->srv->target, param, ntohs(param->srv->targetport))) { RETURN(100) }
|
||||||
|
|
||||||
#ifndef NOIPV6
|
#ifndef NOIPV6
|
||||||
memcpy(¶m->sinsl, *SAFAMILY(¶m->req) == AF_INET6 ? (struct sockaddr *)¶m->srv->extsa6 : (struct sockaddr *)¶m->srv->extsa, SASIZE(¶m->req));
|
param->sinsl = *SAFAMILY(¶m->req) == AF_INET6? param->srv->extsa6 : param->srv->extsa;
|
||||||
#else
|
#else
|
||||||
memcpy(¶m->sinsl, (struct sockaddr *)¶m->srv->extsa, SASIZE(¶m->req));
|
param->sinsl = param->srv->extsa;
|
||||||
#endif
|
#endif
|
||||||
*SAPORT(¶m->sinsl) = 0;
|
*SAPORT(¶m->sinsl) = 0;
|
||||||
param->remsock = param->srv->so._socket(param->srv->so.state, SASOCK(¶m->sinsl), SOCK_DGRAM, IPPROTO_UDP);
|
param->sinsr = param->req;
|
||||||
if(param->remsock == INVALID_SOCKET) { RETURN(202); }
|
|
||||||
if(param->srv->so._bind(param->srv->so.state, param->remsock, (struct sockaddr *)¶m->sinsl, SASIZE(¶m->sinsl))) { RETURN(203); }
|
|
||||||
#ifdef _WIN32
|
|
||||||
{ unsigned long ul2 = 1; ioctlsocket(param->remsock, FIONBIO, &ul2); }
|
|
||||||
#else
|
|
||||||
fcntl(param->remsock, F_SETFL, O_NONBLOCK | fcntl(param->remsock, F_GETFL));
|
|
||||||
#endif
|
|
||||||
memcpy(¶m->sinsr, ¶m->req, sizeof(param->req));
|
|
||||||
param->operation = UDPASSOC;
|
param->operation = UDPASSOC;
|
||||||
authres = (*param->srv->authfunc)(param);
|
authres = (*param->srv->authfunc)(param);
|
||||||
if(authres) { RETURN(authres); }
|
if(authres) { RETURN(authres); }
|
||||||
|
if((authres = udpbind(param))) { RETURN(authres); }
|
||||||
if(!param->srv->s_option)hashadd(&udp_table, param, ¶m, MAX_COUNTER_TIME);
|
if(!param->srv->s_option)hashadd(&udp_table, param, ¶m, MAX_COUNTER_TIME);
|
||||||
if(!param->srvbuf){
|
if(!param->srvbuf){
|
||||||
if(!(param->srvbuf = malloc(UDPBUFSIZE)))RETURN(11);
|
if(!(param->srvbuf = malloc(UDPBUFSIZE)))RETURN(11);
|
||||||
|
|||||||
+270
-83
@@ -8,6 +8,10 @@
|
|||||||
|
|
||||||
#include "proxy.h"
|
#include "proxy.h"
|
||||||
|
|
||||||
|
/* space reserved in front of the received datagram to prepend the headers
|
||||||
|
of the second and the third hop of a SOCKS5 UDP chain */
|
||||||
|
#define UDPHDROFF 48
|
||||||
|
|
||||||
int socks5_udp_build_hdr(unsigned char *buf, PROXYSOCKADDRTYPE *addr)
|
int socks5_udp_build_hdr(unsigned char *buf, PROXYSOCKADDRTYPE *addr)
|
||||||
{
|
{
|
||||||
buf[0] = buf[1] = buf[2] = 0;
|
buf[0] = buf[1] = buf[2] = 0;
|
||||||
@@ -48,69 +52,192 @@ static int socks5_udp_skip_hdr(unsigned char *buf, int len)
|
|||||||
* param->srv->s_option non-zero: return after first datagram sent to client
|
* param->srv->s_option non-zero: return after first datagram sent to client
|
||||||
* param->ctrlsock TCP control socket from the client; INVALID_SOCKET if none.
|
* param->ctrlsock TCP control socket from the client; INVALID_SOCKET if none.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
struct udppoll {
|
||||||
|
struct pollfd fds[4];
|
||||||
|
int nfds;
|
||||||
|
int cli, ctrl, ctrlsrv;
|
||||||
|
};
|
||||||
|
|
||||||
|
static void udpfds(struct clientparam *param, struct udppoll *p)
|
||||||
|
{
|
||||||
|
memset(p->fds, 0, sizeof(p->fds));
|
||||||
|
p->nfds = 0;
|
||||||
|
p->cli = p->ctrl = p->ctrlsrv = -1;
|
||||||
|
|
||||||
|
p->fds[p->nfds].fd = param->remsock; /* always index 0 */
|
||||||
|
p->fds[p->nfds].events = POLLIN;
|
||||||
|
p->nfds++;
|
||||||
|
|
||||||
|
if (!param->waitserver64) {
|
||||||
|
p->fds[p->nfds].fd = param->clisock;
|
||||||
|
p->fds[p->nfds].events = POLLIN;
|
||||||
|
p->cli = p->nfds++;
|
||||||
|
}
|
||||||
|
if (param->ctrlsock != INVALID_SOCKET) {
|
||||||
|
p->fds[p->nfds].fd = param->ctrlsock;
|
||||||
|
p->fds[p->nfds].events = POLLIN;
|
||||||
|
p->ctrl = p->nfds++;
|
||||||
|
}
|
||||||
|
if (param->ctrlsocksrv != INVALID_SOCKET) {
|
||||||
|
p->fds[p->nfds].fd = param->ctrlsocksrv;
|
||||||
|
p->fds[p->nfds].events = POLLIN;
|
||||||
|
p->ctrlsrv = p->nfds++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void udplog(struct clientparam *param)
|
||||||
|
{
|
||||||
|
unsigned char buf[400];
|
||||||
|
int len;
|
||||||
|
|
||||||
|
if(!param->srv->logfunc) return;
|
||||||
|
len = sprintf((char *)buf, "UDPMAP ");
|
||||||
|
if(param->hostname) len += sprintf((char *)buf + len, "%.256s", param->hostname);
|
||||||
|
else len += myinet_ntop(*SAFAMILY(¶m->req), SAADDR(¶m->req), (char *)buf + len, 64);
|
||||||
|
sprintf((char *)buf + len, ":%hu", ntohs(*SAPORT(¶m->req)));
|
||||||
|
param->srv->logfunc(param, buf);
|
||||||
|
}
|
||||||
|
|
||||||
|
int udpbind(struct clientparam *param)
|
||||||
|
{
|
||||||
|
SOCKET s;
|
||||||
|
SASIZETYPE sasize;
|
||||||
|
|
||||||
|
#ifdef __linux__
|
||||||
|
if (switch_ns(param->srv, param->srv->o_nsfd)) return 11;
|
||||||
|
#endif
|
||||||
|
s = param->srv->so._socket(param->sostate, SASOCK(¶m->sinsl), SOCK_DGRAM, IPPROTO_UDP);
|
||||||
|
#ifdef __linux__
|
||||||
|
if (switch_ns(param->srv, param->srv->i_nsfd)) {
|
||||||
|
if (s != INVALID_SOCKET) param->srv->so._closesocket(param->sostate, s);
|
||||||
|
return 11;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
if (s == INVALID_SOCKET) return 11;
|
||||||
|
#ifdef _WIN32
|
||||||
|
{ unsigned long ul = 1; ioctlsocket(s, FIONBIO, &ul); }
|
||||||
|
#else
|
||||||
|
fcntl(s, F_SETFL, O_NONBLOCK | fcntl(s, F_GETFL));
|
||||||
|
#endif
|
||||||
|
param->remsock = s;
|
||||||
|
if (param->srv->so._bind(param->sostate, param->remsock,
|
||||||
|
(struct sockaddr *)¶m->sinsl, SASIZE(¶m->sinsl))) {
|
||||||
|
*SAPORT(¶m->sinsl) = 0;
|
||||||
|
if (param->srv->so._bind(param->sostate, param->remsock,
|
||||||
|
(struct sockaddr *)¶m->sinsl, SASIZE(¶m->sinsl))) {
|
||||||
|
param->srv->so._closesocket(param->sostate, param->remsock);
|
||||||
|
param->remsock = INVALID_SOCKET;
|
||||||
|
return 12;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
sasize = SASIZE(¶m->sinsl);
|
||||||
|
param->srv->so._getsockname(param->sostate, param->remsock,
|
||||||
|
(struct sockaddr *)¶m->sinsl, &sasize);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void udpreset(struct clientparam *param)
|
||||||
|
{
|
||||||
|
param->redirected = 0;
|
||||||
|
param->udp_nhops = 0;
|
||||||
|
memset(param->udp_relay, 0, sizeof(param->udp_relay));
|
||||||
|
#ifndef NOIPV6
|
||||||
|
param->sinsl = *SAFAMILY(¶m->req) == AF_INET6? param->srv->extsa6 : param->srv->extsa;
|
||||||
|
#else
|
||||||
|
param->sinsl = param->srv->extsa;
|
||||||
|
#endif
|
||||||
|
param->sinsr = param->req;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Authorize param->req and (re)build the server side of the association:
|
||||||
|
* a parent proxy chain and/or an external address may be selected by the ACL.
|
||||||
|
* Returns the authorization result. param->remsock is INVALID_SOCKET if the
|
||||||
|
* socket can not be created, in this case the association can not continue.
|
||||||
|
*/
|
||||||
|
static int udpreconnect(struct clientparam *param)
|
||||||
|
{
|
||||||
|
int res;
|
||||||
|
|
||||||
|
if (param->ctrlsocksrv != INVALID_SOCKET) {
|
||||||
|
param->srv->so._closesocket(param->sostate, param->ctrlsocksrv);
|
||||||
|
param->ctrlsocksrv = INVALID_SOCKET;
|
||||||
|
}
|
||||||
|
if (param->remsock != INVALID_SOCKET) {
|
||||||
|
param->srv->so._closesocket(param->sostate, param->remsock);
|
||||||
|
param->remsock = INVALID_SOCKET;
|
||||||
|
}
|
||||||
|
udpreset(param);
|
||||||
|
res = (*param->srv->authfunc)(param);
|
||||||
|
if (res) {
|
||||||
|
if (param->ctrlsocksrv != INVALID_SOCKET) {
|
||||||
|
param->srv->so._closesocket(param->sostate, param->ctrlsocksrv);
|
||||||
|
param->ctrlsocksrv = INVALID_SOCKET;
|
||||||
|
}
|
||||||
|
if (param->remsock != INVALID_SOCKET) {
|
||||||
|
param->srv->so._closesocket(param->sostate, param->remsock);
|
||||||
|
param->remsock = INVALID_SOCKET;
|
||||||
|
}
|
||||||
|
udpreset(param);
|
||||||
|
}
|
||||||
|
if (udpbind(param)) return res? res : 11;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
int udpsockmap(struct clientparam *param, int timeo)
|
int udpsockmap(struct clientparam *param, int timeo)
|
||||||
{
|
{
|
||||||
PROXYSOCKADDRTYPE sin;
|
PROXYSOCKADDRTYPE sin;
|
||||||
|
PROXYSOCKADDRTYPE cliaddr;
|
||||||
PROXYSOCKADDRTYPE from;
|
PROXYSOCKADDRTYPE from;
|
||||||
struct pollfd fds[4];
|
PROXYSOCKADDRTYPE lastdst;
|
||||||
|
struct udppoll p;
|
||||||
SASIZETYPE sasize;
|
SASIZETYPE sasize;
|
||||||
int len, res, nfds;
|
int len, res, nhops;
|
||||||
int nhops = param->udp_nhops;
|
|
||||||
int clisock_idx = -1, ctrlsock_idx = -1, ctrlsocksrv_idx = -1;
|
|
||||||
int firstpacket = 1;
|
int firstpacket = 1;
|
||||||
|
int havedst = 0, lastres = 0;
|
||||||
|
char lastname[256] = "";
|
||||||
|
struct ace *lastace = NULL;
|
||||||
|
|
||||||
if(param->srv->service == S_UDPPM) nhops++;
|
|
||||||
if (param->srvbufsize < UDPBUFSIZE) {
|
if (param->srvbufsize < UDPBUFSIZE) {
|
||||||
unsigned char *newbuf = realloc(param->srvbuf, UDPBUFSIZE);
|
unsigned char *newbuf = realloc(param->srvbuf, UDPBUFSIZE);
|
||||||
if (!newbuf) return 21;
|
if (!newbuf) return 21;
|
||||||
param->srvbuf = newbuf;
|
param->srvbuf = newbuf;
|
||||||
param->srvbufsize = UDPBUFSIZE;
|
param->srvbufsize = UDPBUFSIZE;
|
||||||
}
|
}
|
||||||
sin = param->sincr;
|
cliaddr = param->sincr;
|
||||||
|
if(param->ctrlsock != INVALID_SOCKET){
|
||||||
/* Build poll array once — sockets don't change across iterations */
|
sasize = sizeof(cliaddr);
|
||||||
nfds = 0;
|
param->srv->so._getpeername(param->sostate, param->ctrlsock, (struct sockaddr *)&cliaddr, &sasize);
|
||||||
fds[nfds].fd = param->remsock; /* always index 0 */
|
|
||||||
fds[nfds].events = POLLIN;
|
|
||||||
nfds++;
|
|
||||||
|
|
||||||
if (!param->waitserver64) {
|
|
||||||
fds[nfds].fd = param->clisock;
|
|
||||||
fds[nfds].events = POLLIN;
|
|
||||||
clisock_idx = nfds++;
|
|
||||||
}
|
}
|
||||||
|
sin = cliaddr;
|
||||||
|
|
||||||
if (param->ctrlsock != INVALID_SOCKET) {
|
nhops = param->udp_nhops;
|
||||||
fds[nfds].fd = param->ctrlsock;
|
if(param->srv->service == S_UDPPM) nhops++;
|
||||||
fds[nfds].events = POLLIN;
|
udpfds(param, &p);
|
||||||
ctrlsock_idx = nfds++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (param->ctrlsocksrv != INVALID_SOCKET) {
|
|
||||||
fds[nfds].fd = param->ctrlsocksrv;
|
|
||||||
fds[nfds].events = POLLIN;
|
|
||||||
ctrlsocksrv_idx = nfds++;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
res = param->srv->so._poll(param->sostate, fds, nfds, timeo * 1000);
|
res = param->srv->so._poll(param->sostate, p.fds, p.nfds, timeo * 1000);
|
||||||
if (res < 0) return 481;
|
if (res < 0) return 481;
|
||||||
if (res == 0) return 92;
|
if (res == 0) return 92;
|
||||||
|
|
||||||
/* datagram from client */
|
/* datagram from client */
|
||||||
if (clisock_idx >= 0 && fds[clisock_idx].revents) {
|
if (p.cli >= 0 && p.fds[p.cli].revents) {
|
||||||
int recvoff = 0, k;
|
unsigned char *base = param->srvbuf + UDPHDROFF;
|
||||||
|
PROXYSOCKADDRTYPE dst;
|
||||||
|
char dstnamebuf[256];
|
||||||
|
char *dstname = NULL;
|
||||||
|
int i, k, w, off;
|
||||||
|
|
||||||
sasize = sizeof(sin);
|
sasize = sizeof(sin);
|
||||||
for (k = 1; k < nhops; k++)
|
|
||||||
recvoff += 4 + (int)SAADDRLEN(¶m->udp_relay[k]) + 2;
|
|
||||||
len = param->srv->so._recvfrom(param->sostate, param->clisock,
|
len = param->srv->so._recvfrom(param->sostate, param->clisock,
|
||||||
(char *)param->srvbuf + recvoff, UDPBUFSIZE - recvoff,
|
(char *)base, UDPBUFSIZE - UDPHDROFF,
|
||||||
0, (struct sockaddr *)&sin, &sasize);
|
0, (struct sockaddr *)&sin, &sasize);
|
||||||
if (len < 0 && (errno == EAGAIN || errno == EINTR)) continue;
|
if (len < 0 && (errno == EAGAIN || errno == EINTR)) continue;
|
||||||
if (len <= 0) return 482;
|
if (len <= 0) return 482;
|
||||||
|
|
||||||
if (SAADDRLEN(&sin) != SAADDRLEN(¶m->sincr) ||
|
if (SAADDRLEN(&sin) != SAADDRLEN(&cliaddr) ||
|
||||||
memcmp(SAADDR(&sin), SAADDR(¶m->sincr), SAADDRLEN(&sin)))
|
memcmp(SAADDR(&sin), SAADDR(&cliaddr), SAADDRLEN(&sin)))
|
||||||
continue;
|
continue;
|
||||||
if (firstpacket) {
|
if (firstpacket) {
|
||||||
if (!SAISNULL(¶m->req) && *SAPORT(¶m->req) &&
|
if (!SAISNULL(¶m->req) && *SAPORT(¶m->req) &&
|
||||||
@@ -118,70 +245,130 @@ int udpsockmap(struct clientparam *param, int timeo)
|
|||||||
!memcmp(SAADDR(¶m->req), SAADDR(&sin), SAADDRLEN(¶m->req)) &&
|
!memcmp(SAADDR(¶m->req), SAADDR(&sin), SAADDRLEN(¶m->req)) &&
|
||||||
memcmp(SAPORT(¶m->req), SAPORT(&sin), 2))
|
memcmp(SAPORT(¶m->req), SAPORT(&sin), 2))
|
||||||
continue;
|
continue;
|
||||||
param->sincr = sin;
|
cliaddr = sin;
|
||||||
firstpacket = 0;
|
firstpacket = 0;
|
||||||
} else if (memcmp(SAPORT(&sin), SAPORT(¶m->sincr), 2)) {
|
} else if (memcmp(SAPORT(&sin), SAPORT(&cliaddr), 2)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(param->bandlimfunc && (*param->bandlimfunc)(param, 0, len)) continue;
|
if(param->bandlimfunc && (*param->bandlimfunc)(param, 0, len)) continue;
|
||||||
|
|
||||||
if (nhops == 0) {
|
if (len < 10 || base[0] || base[1] || base[2]) return 483;
|
||||||
int i;
|
memset(&dst, 0, sizeof(dst));
|
||||||
if (len < 10 || param->srvbuf[0] || param->srvbuf[1] || param->srvbuf[2])
|
switch (base[3]) {
|
||||||
return 483;
|
case 1:
|
||||||
switch (param->srvbuf[3]) {
|
if (socks5_setaddr(param->srv->family, 1, base + 4, &dst)) continue;
|
||||||
case 1:
|
i = 8;
|
||||||
*SAFAMILY(¶m->sinsr) = AF_INET;
|
break;
|
||||||
memcpy(SAADDR(¶m->sinsr), param->srvbuf + 4, 4);
|
#ifndef NOIPV6
|
||||||
i = 8;
|
case 4:
|
||||||
break;
|
if (len < 22) return 484;
|
||||||
case 4:
|
if (socks5_setaddr(param->srv->family, 4, base + 4, &dst)) continue;
|
||||||
if (len < 22) return 484;
|
i = 20;
|
||||||
*SAFAMILY(¶m->sinsr) = AF_INET6;
|
break;
|
||||||
memcpy(SAADDR(¶m->sinsr), param->srvbuf + 4, 16);
|
#endif
|
||||||
i = 20;
|
case 3: {
|
||||||
break;
|
int sz = base[4];
|
||||||
case 3: {
|
if (len < 7 + sz) return 485;
|
||||||
int sz = param->srvbuf[4], j;
|
memcpy(dstnamebuf, base + 5, sz);
|
||||||
if (len < 7 + sz) return 485;
|
dstnamebuf[sz] = 0;
|
||||||
for (j = 4; j < 4 + sz; j++) param->srvbuf[j] = param->srvbuf[j + 1];
|
dstname = dstnamebuf;
|
||||||
param->srvbuf[4 + sz] = 0;
|
i = 5 + sz;
|
||||||
i = 5 + sz;
|
if (!getip46(param->srv->family, (unsigned char *)dstnamebuf,
|
||||||
if (!getip46(param->srv->family, param->srvbuf + 4,
|
(struct sockaddr *)&dst)) {
|
||||||
(struct sockaddr *)¶m->sinsr))
|
if (!nhops) return 100;
|
||||||
return 100;
|
memset(&dst, 0, sizeof(dst));
|
||||||
break;
|
*SAFAMILY(&dst) = AF_INET;
|
||||||
}
|
}
|
||||||
default: return 997;
|
break;
|
||||||
|
}
|
||||||
|
default: return 997;
|
||||||
|
}
|
||||||
|
memcpy(SAPORT(&dst), base + i, 2);
|
||||||
|
i += 2;
|
||||||
|
|
||||||
|
if (!havedst
|
||||||
|
|| SAADDRLEN(&lastdst) != SAADDRLEN(&dst)
|
||||||
|
|| memcmp(SAADDR(&lastdst), SAADDR(&dst), SAADDRLEN(&dst))
|
||||||
|
|| memcmp(SAPORT(&lastdst), SAPORT(&dst), 2)
|
||||||
|
|| strncmp(lastname, dstname? dstname : "", sizeof(lastname) - 1)) {
|
||||||
|
int ares = 0, reconnect = 0;
|
||||||
|
|
||||||
|
if ((param->srv->udpauth & 1) && havedst && !lastres) {
|
||||||
|
PROXYSOCKADDRTYPE newdst = dst;
|
||||||
|
|
||||||
|
param->req = lastdst;
|
||||||
|
if (param->hostname) free(param->hostname);
|
||||||
|
param->hostname = *lastname? (unsigned char *)strdup(lastname) : NULL;
|
||||||
|
udplog(param);
|
||||||
|
dst = newdst;
|
||||||
}
|
}
|
||||||
memcpy(SAPORT(¶m->sinsr), param->srvbuf + i, 2);
|
if (param->hostname) free(param->hostname);
|
||||||
i += 2;
|
param->hostname = dstname? (unsigned char *)strdup(dstname) : NULL;
|
||||||
|
param->req = dst;
|
||||||
|
if (!nhops) param->sinsr = dst;
|
||||||
|
|
||||||
|
if (!havedst) reconnect = 1;
|
||||||
|
else if (!nhops && *SAFAMILY(&dst) != *SAFAMILY(¶m->sinsl)) reconnect = 1;
|
||||||
|
if (havedst && (param->srv->udpauth & 2) && !param->dstindep) {
|
||||||
|
param->preauth = 2;
|
||||||
|
ares = (*param->srv->authfunc)(param);
|
||||||
|
param->preauth = 0;
|
||||||
|
if (ares == 2) {
|
||||||
|
if (param->lastace != lastace) reconnect = 1;
|
||||||
|
ares = 0;
|
||||||
|
}
|
||||||
|
else if (!ares && (param->redirected ||
|
||||||
|
(lastace && lastace->chains))) reconnect = 1;
|
||||||
|
}
|
||||||
|
if (reconnect) {
|
||||||
|
ares = udpreconnect(param);
|
||||||
|
if (param->remsock == INVALID_SOCKET) return ares;
|
||||||
|
nhops = param->udp_nhops;
|
||||||
|
if(param->srv->service == S_UDPPM) nhops++;
|
||||||
|
udpfds(param, &p);
|
||||||
|
}
|
||||||
|
lastres = ares;
|
||||||
|
lastdst = dst;
|
||||||
|
strncpy(lastname, dstname? dstname : "", sizeof(lastname) - 1);
|
||||||
|
lastname[sizeof(lastname) - 1] = 0;
|
||||||
|
havedst = 1;
|
||||||
|
if (!ares) lastace = param->lastace;
|
||||||
|
else if (param->srv->udpauth & 1) {
|
||||||
|
param->res = ares;
|
||||||
|
udplog(param);
|
||||||
|
param->res = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lastres) continue;
|
||||||
|
|
||||||
|
if (!nhops) {
|
||||||
if (len > i) {
|
if (len > i) {
|
||||||
param->srv->so._sendto(param->sostate, param->remsock,
|
param->srv->so._sendto(param->sostate, param->remsock,
|
||||||
(char *)param->srvbuf + i, len - i, 0,
|
(char *)base + i, len - i, 0,
|
||||||
(struct sockaddr *)¶m->sinsr, SASIZE(¶m->sinsr));
|
(struct sockaddr *)¶m->sinsr, SASIZE(¶m->sinsr));
|
||||||
param->statscli64 += (len - i);
|
param->statscli64 += (len - i);
|
||||||
param->nwrites++;
|
param->nwrites++;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
int off = 0;
|
off = 0;
|
||||||
for (k = 1; k < nhops; k++)
|
for (k = 1; k < nhops; k++)
|
||||||
off += socks5_udp_build_hdr(param->srvbuf + off, ¶m->udp_relay[k]);
|
off += 4 + (int)SAADDRLEN(¶m->udp_relay[k]) + 2;
|
||||||
|
for (k = 1, w = UDPHDROFF - off; k < nhops; k++)
|
||||||
|
w += socks5_udp_build_hdr(param->srvbuf + w, ¶m->udp_relay[k]);
|
||||||
param->srv->so._sendto(param->sostate, param->remsock,
|
param->srv->so._sendto(param->sostate, param->remsock,
|
||||||
(char *)param->srvbuf, off + len, 0,
|
(char *)param->srvbuf + (UDPHDROFF - off), off + len, 0,
|
||||||
(struct sockaddr *)¶m->udp_relay[0], SASIZE(¶m->udp_relay[0]));
|
(struct sockaddr *)¶m->udp_relay[0], SASIZE(¶m->udp_relay[0]));
|
||||||
param->statscli64 += len;
|
param->statscli64 += len;
|
||||||
param->nwrites++;
|
param->nwrites++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* datagram from server / parent relay */
|
/* datagram from server / parent relay */
|
||||||
if (fds[0].revents) {
|
if (p.fds[0].revents) {
|
||||||
int hdrsize = (nhops == 0) ? 4 + (int)SAADDRLEN(¶m->sinsr) + 2 : 0;
|
int hdrsize = (nhops == 0) ? 4 + (int)SAADDRLEN(¶m->sinsl) + 2 : 0;
|
||||||
int sendoff = 0, sendlen;
|
int sendoff = 0, sendlen;
|
||||||
sasize = sizeof(from);
|
sasize = sizeof(from);
|
||||||
if (hdrsize > UDPBUFSIZE) return 468;
|
|
||||||
len = param->srv->so._recvfrom(param->sostate, param->remsock,
|
len = param->srv->so._recvfrom(param->sostate, param->remsock,
|
||||||
(char *)param->srvbuf + hdrsize, UDPBUFSIZE - hdrsize, 0,
|
(char *)param->srvbuf + hdrsize, UDPBUFSIZE - hdrsize, 0,
|
||||||
(struct sockaddr *)&from, &sasize);
|
(struct sockaddr *)&from, &sasize);
|
||||||
@@ -201,9 +388,9 @@ int udpsockmap(struct clientparam *param, int timeo)
|
|||||||
sendlen = len;
|
sendlen = len;
|
||||||
if (nhops == 0) {
|
if (nhops == 0) {
|
||||||
param->srvbuf[0] = param->srvbuf[1] = param->srvbuf[2] = 0;
|
param->srvbuf[0] = param->srvbuf[1] = param->srvbuf[2] = 0;
|
||||||
param->srvbuf[3] = (*SAFAMILY(¶m->sinsr) == AF_INET) ? 1 : 4;
|
param->srvbuf[3] = (*SAFAMILY(&from) == AF_INET) ? 1 : 4;
|
||||||
memcpy(param->srvbuf + 4, SAADDR(¶m->sinsr), SAADDRLEN(¶m->sinsr));
|
memcpy(param->srvbuf + 4, SAADDR(&from), SAADDRLEN(¶m->sinsl));
|
||||||
memcpy(param->srvbuf + 4 + SAADDRLEN(¶m->sinsr), SAPORT(¶m->sinsr), 2);
|
memcpy(param->srvbuf + 4 + SAADDRLEN(¶m->sinsl), SAPORT(&from), 2);
|
||||||
sendlen = len + hdrsize;
|
sendlen = len + hdrsize;
|
||||||
} else if (nhops >= 2) {
|
} else if (nhops >= 2) {
|
||||||
int off = 0, k;
|
int off = 0, k;
|
||||||
@@ -219,13 +406,13 @@ int udpsockmap(struct clientparam *param, int timeo)
|
|||||||
}
|
}
|
||||||
if (sendlen > 0)
|
if (sendlen > 0)
|
||||||
param->srv->so._sendto(param->sostate, param->clisock,
|
param->srv->so._sendto(param->sostate, param->clisock,
|
||||||
(char *)param->srvbuf + sendoff, sendlen, 0,
|
(char *)param->srvbuf + sendoff, sendlen, 0,
|
||||||
(struct sockaddr *)&sin, SASIZE(&sin));
|
(struct sockaddr *)&sin, SASIZE(&sin));
|
||||||
if (param->srv->s_option && param->srv->service == S_UDPPM) return 0;
|
if (param->srv->s_option && param->srv->service == S_UDPPM) return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((ctrlsock_idx >= 0 && fds[ctrlsock_idx].revents) ||
|
if ((p.ctrl >= 0 && p.fds[p.ctrl].revents) ||
|
||||||
(ctrlsocksrv_idx >= 0 && fds[ctrlsocksrv_idx].revents)) return 0;
|
(p.ctrlsrv >= 0 && p.fds[p.ctrlsrv].revents)) return 0;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
+6
-6
@@ -1,14 +1,14 @@
|
|||||||
#ifndef VERSION
|
#ifndef VERSION
|
||||||
#define VERSION "3proxy-0.9.8"
|
#define VERSION "3proxy-1.0.0"
|
||||||
#endif
|
#endif
|
||||||
#ifndef BUILDDATE
|
#ifndef BUILDDATE
|
||||||
#define BUILDDATE ""
|
#define BUILDDATE "260822121300"
|
||||||
#endif
|
#endif
|
||||||
#define MAJOR3PROXY 0
|
#define MAJOR3PROXY 1
|
||||||
#define SUBMAJOR3PROXY 9
|
#define SUBMAJOR3PROXY 0
|
||||||
#define MINOR3PROXY 8
|
#define MINOR3PROXY 0
|
||||||
#define SUBMINOR3PROXY 0
|
#define SUBMINOR3PROXY 0
|
||||||
#define RELEASE3PROXY "3proxy-0.9.8(" BUILDDATE ")\0"
|
#define RELEASE3PROXY "3proxy-1.0.0(" BUILDDATE ")\0"
|
||||||
#ifndef YEAR3PROXY
|
#ifndef YEAR3PROXY
|
||||||
#define YEAR3PROXY "2026"
|
#define YEAR3PROXY "2026"
|
||||||
#endif
|
#endif
|
||||||
Reference in new issue
Block a user