mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-26 23:59:41 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
19cacf0bd9 | ||
|
|
27d5d8d102 | ||
|
|
6b944f3fa9 | ||
|
|
4f99443750 | ||
|
|
c462963d8e | ||
|
|
e41ab58b2c | ||
|
|
8f13582329 | ||
|
|
af9f23ece7 | ||
|
|
d77dc00fd1 | ||
|
|
101125de36 | ||
|
|
1dfe9e718b | ||
|
|
84879cc0ba | ||
|
|
757ad916ec | ||
|
|
fbc3ed5a18 | ||
|
|
69862b67cb | ||
|
|
fd7b25bf06 | ||
|
|
ab11e6c4a3 | ||
|
|
74d5b67ef4 | ||
|
|
6d8643b70e | ||
|
|
9e7246e864 | ||
|
|
c5affd2db4 | ||
|
|
794f667eea | ||
|
|
0259b58b95 | ||
|
|
9734b54f56 | ||
|
|
fe2b2fd544 | ||
|
|
086d4cbd6a | ||
|
|
2695d83847 | ||
|
|
dd5fe3994e | ||
|
|
5ab63a0b68 | ||
|
|
254112cfde | ||
|
|
5cae5dc866 | ||
|
|
56fdbd6e8a | ||
|
|
997671ee16 | ||
|
|
34e9c453fa | ||
|
|
3dde2de498 | ||
|
|
bdf9946fe5 | ||
|
|
eab5758b51 | ||
|
|
1772295a36 | ||
|
|
f0a672b16a | ||
|
|
01dad546b7 | ||
|
|
30aaccc155 | ||
|
|
2cb6297968 | ||
|
|
d66311a045 | ||
|
|
905e3d3152 | ||
|
|
7c08432a70 | ||
|
|
d4554cfabd | ||
|
|
1aecfa7995 | ||
|
|
289d2f5211 | ||
|
|
94efc7f7a6 | ||
|
|
d34c036eb7 | ||
|
|
4bf1f3990b | ||
|
|
a639bcb017 | ||
|
|
bed3977575 | ||
|
|
16af910f3a | ||
|
|
7c1bc48c85 | ||
|
|
05c4832c6c | ||
|
|
381ef993a7 | ||
|
|
1de06c5059 | ||
|
|
aaa04116a8 | ||
|
|
5fdd4a4d6f | ||
|
|
7871279fae | ||
|
|
ff15a8d480 | ||
|
|
95029e9e41 | ||
|
|
6286bfcd6e | ||
|
|
b1d21cbdca | ||
|
|
978f351560 | ||
|
|
41d1fa8b00 | ||
|
|
8c638fcaff | ||
|
|
6963af7614 | ||
|
|
f8c22d5f91 | ||
|
|
c104203765 | ||
|
|
45c3b89484 | ||
|
|
0d7f05b05b | ||
|
|
750bb38907 | ||
|
|
46cff56cf4 | ||
|
|
d0d3b90226 | ||
|
|
7a139e59a5 | ||
|
|
ff7f4b8ea6 | ||
|
|
ec48b7f30e | ||
|
|
88a09bc3ff | ||
|
|
0e13f57139 | ||
|
|
cbab76fe41 | ||
|
|
fb9337c030 | ||
|
|
ef9386e29d | ||
|
|
334de0658c | ||
|
|
ec469fa2a6 | ||
|
|
fbd1788f4c | ||
|
|
830b2d39d1 | ||
|
|
a338a0c689 | ||
|
|
af8a6e0b91 | ||
|
|
2997533287 | ||
|
|
5f06879843 | ||
|
|
da8a8615f4 | ||
|
|
51a82613a6 | ||
|
|
b87e998e4d | ||
|
|
4068a6955f | ||
|
|
07c1dc1462 | ||
|
|
acce67a512 | ||
|
|
e986f8a747 | ||
|
|
314503d8df | ||
|
|
8107f03062 | ||
|
|
a3fb7aff07 | ||
|
|
b1ac46da79 | ||
|
|
d125261e8c | ||
|
|
a4527783d6 | ||
|
|
fb70d06d3e | ||
|
|
57d687fcb8 | ||
|
|
ada24a98ec | ||
|
|
ba2584cebf | ||
|
|
05096c222a | ||
|
|
6c3c5f31a2 | ||
|
|
319a74de06 | ||
|
|
e088a5d7f9 | ||
|
|
f01c8bfee9 | ||
|
|
a7cdfa578d | ||
|
|
d52701518d | ||
|
|
7ddea44ffd | ||
|
|
760a521df8 | ||
|
|
62ceb36157 | ||
|
|
62be3c7b5b | ||
|
|
85c431b96e | ||
|
|
90c312f4cd | ||
|
|
451b3d180c | ||
|
|
f63a83f554 | ||
|
|
6b61cfde4c | ||
|
|
e6c3427cab | ||
|
|
4f0f3c81e1 | ||
|
|
bfbbf1f446 | ||
|
|
b79906da02 | ||
|
|
68ef9dcc59 | ||
|
|
3957210609 | ||
|
|
ee00956b74 | ||
|
|
083a70393f | ||
|
|
d9b1493260 | ||
|
|
7102afe856 | ||
|
|
a3729354b8 | ||
|
|
45796f66c7 | ||
|
|
260cbf7a3d | ||
|
|
bba9871ed8 | ||
|
|
f1af44f3a9 | ||
|
|
4ee7f71fb9 | ||
|
|
98604b5421 | ||
|
|
a0d580b36d | ||
|
|
4c0e3a1bac | ||
|
|
454f5e1d54 | ||
|
|
c4ac696919 | ||
|
|
afbdad0ac7 | ||
|
|
a1a65c3fd5 | ||
|
|
2fd536781f | ||
|
|
878a432481 | ||
|
|
3f92dc7355 | ||
|
|
bae96b0823 | ||
|
|
f77f65ac4e | ||
|
|
2d6eeff5f3 | ||
|
|
c206349ee2 | ||
|
|
77b0dc3397 | ||
|
|
a2641cb103 | ||
|
|
98f8ec1464 | ||
|
|
238ed094dd | ||
|
|
c853ea5b9e | ||
|
|
825563ad85 | ||
|
|
0c8be907e9 | ||
|
|
840dd5dbdf | ||
|
|
71d676eb58 | ||
|
|
8cb8be1be8 | ||
|
|
0381461495 | ||
|
|
483542b914 | ||
|
|
855c04d8f6 | ||
|
|
ab852c6860 | ||
|
|
a54b773fac | ||
|
|
4d7d2cab6e | ||
|
|
05e5fbe274 | ||
|
|
de40d1839d | ||
|
|
d8161e94b5 | ||
|
|
30c3764c90 | ||
|
|
ceb4912172 | ||
|
|
ce104a5b3c | ||
|
|
d8d3d8cc1b | ||
|
|
44c86236cd | ||
|
|
3ee78a3195 | ||
|
|
9b06edb4f6 | ||
|
|
9d314a5fba | ||
|
|
be40871276 | ||
|
|
35993dfaaf | ||
|
|
3d9d76fcf5 | ||
|
|
c6eddc69a1 | ||
|
|
758c290092 | ||
|
|
1a753da70d | ||
|
|
2e534c7794 | ||
|
|
237fa15e36 | ||
|
|
6f1bb65841 | ||
|
|
238b314c90 | ||
|
|
e12b061148 | ||
|
|
5e92822900 | ||
|
|
0252f4978c | ||
|
|
7299bcc0e2 | ||
|
|
416e30ed0d | ||
|
|
7c25c23325 | ||
|
|
c34d29b7dd | ||
|
|
1d515af787 | ||
|
|
499c4240ad | ||
|
|
23b9e698e0 | ||
|
|
a5fce1a2f6 | ||
|
|
c05023ab6d | ||
|
|
1e8130cae8 | ||
|
|
28724187fb | ||
|
|
35db214b78 | ||
|
|
1ba0008055 | ||
|
|
92f170fca2 | ||
|
|
71c58e0c77 | ||
|
|
00d2ecbc31 | ||
|
|
662603f9d8 | ||
|
|
8292ec21a7 | ||
|
|
ef318bff67 | ||
|
|
128386723a | ||
|
|
acc6db59a3 | ||
|
|
251660940e | ||
|
|
7e4504997e | ||
|
|
8d8ee23385 | ||
|
|
7e47d5bd92 | ||
|
|
7fce892391 | ||
|
|
23551e53bf | ||
|
|
35406e6b61 | ||
|
|
26534e9cbd | ||
|
|
2cd0a34fd5 | ||
|
|
d67a052aa8 | ||
|
|
7d04915d3d | ||
|
|
280c7c8976 | ||
|
|
bc7e9b2ac6 | ||
|
|
5355af3112 | ||
|
|
2cfad638a7 | ||
|
|
cfc9c30bd2 | ||
|
|
7b4e8b6d6b | ||
|
|
e945890613 | ||
|
|
5c7cc3c9b2 | ||
|
|
6e55af7f48 | ||
|
|
4ec2226d3e | ||
|
|
8d744e16fb | ||
|
|
af25cb460f | ||
|
|
2508b89d96 | ||
|
|
09a3ddeeac | ||
|
|
66bdd86c6b | ||
|
|
b624da443a | ||
|
|
3c51af3737 | ||
|
|
7e7a0d4336 | ||
|
|
e373d84717 | ||
|
|
68ff2373b4 | ||
|
|
8d58e2618e | ||
|
|
1bfa64303a | ||
|
|
81224b6708 | ||
|
|
6944a012d9 | ||
|
|
7652a9bba1 | ||
|
|
cb368e0792 | ||
|
|
e20584cb2e | ||
|
|
f23fc4fc44 | ||
|
|
3668634781 | ||
|
|
46a230ebd3 | ||
|
|
e8e1bdfbf1 | ||
|
|
a5f1f08b60 | ||
|
|
926ef71ba0 | ||
|
|
bc92819572 | ||
|
|
a76dd93e86 | ||
|
|
2900b80d88 | ||
|
|
d7b0061626 | ||
|
|
74134db09e | ||
|
|
878025598b | ||
|
|
6387bed4f2 | ||
|
|
cb6a4166b7 | ||
|
|
cf6946cc8b | ||
|
|
ab8db00b1f | ||
|
|
94dfa195db | ||
|
|
fb4ab5d07f | ||
|
|
57f11d8a0f | ||
|
|
013d4bc333 | ||
|
|
29ef226b3c | ||
|
|
d347f0a058 | ||
|
|
a316622a85 | ||
|
|
d87241c487 | ||
|
|
144af547fb | ||
|
|
35d1de6f5e | ||
|
|
a592f07783 | ||
|
|
161cbbd452 | ||
|
|
067fdd7f95 | ||
|
|
d77e528847 | ||
|
|
2b4d8e67e4 | ||
|
|
375e3a74d0 | ||
|
|
6dc145b16b | ||
|
|
d162ad5c38 | ||
|
|
8198db8617 | ||
|
|
d83c1f47f8 | ||
|
|
20a929ca53 | ||
|
|
a80bef9ecf | ||
|
|
687ebafb1b | ||
|
|
5e2b2a399e | ||
|
|
5f341806b7 | ||
|
|
00513a7d28 | ||
|
|
dc7e098e6b | ||
|
|
8b57982a09 | ||
|
|
cebb45c095 | ||
|
|
13979b5df4 | ||
|
|
782878b5b4 | ||
|
|
6532163f01 | ||
|
|
862405bdfd | ||
|
|
c716c67da2 | ||
|
|
b94e1fc01f | ||
|
|
cc0fd518bd | ||
|
|
9a6908e623 | ||
|
|
65e57a251d | ||
|
|
25c375a78a | ||
|
|
a22e2be77b | ||
|
|
8a160dd188 | ||
|
|
fb56b7d307 | ||
|
|
5165a4d5bd | ||
|
|
bac19c9ae6 | ||
|
|
c98621aeef | ||
|
|
3dc698eccd | ||
|
|
c1beceb24b | ||
|
|
4ad05d1565 | ||
|
|
55d1bbe155 | ||
|
|
8a8622b30f | ||
|
|
1cf169b7ae | ||
|
|
d20e76bbc9 | ||
|
|
468124f55c | ||
|
|
17f07f2053 | ||
|
|
6d77141ecc | ||
|
|
7e681bbacd | ||
|
|
266e62644c | ||
|
|
f53b0eb985 | ||
|
|
bd1dcacf73 | ||
|
|
e1448b9eb1 | ||
|
|
70b14394b0 | ||
|
|
6c1b711fc9 | ||
|
|
34c4162cea | ||
|
|
461fae12e7 | ||
|
|
e8203ac3a5 | ||
|
|
beaa8777bb | ||
|
|
9254688d07 | ||
|
|
daa2b74354 | ||
|
|
bec6e589fb | ||
|
|
f9347c2f8b | ||
|
|
0d47a1eee3 | ||
|
|
58cf0d8def | ||
|
|
5fa261e91e | ||
|
|
b15d5bf681 | ||
|
|
e1b4e50242 | ||
|
|
346880eb2e | ||
|
|
e607c8b5d0 | ||
|
|
1fca6ada82 | ||
|
|
d7eb9fb82f | ||
|
|
1bd6eff0e6 | ||
|
|
e642100271 | ||
|
|
aac5c9fff9 | ||
|
|
e235ada0de | ||
|
|
7335bc2fb6 | ||
|
|
3f4c267a25 | ||
|
|
6279e86086 | ||
|
|
cc2979ee5b | ||
|
|
bad85a3d51 | ||
|
|
36f16fb899 | ||
|
|
5f550c9107 | ||
|
|
47c1640223 | ||
|
|
681182b1e5 | ||
|
|
9fae0082a3 | ||
|
|
c30065256f | ||
|
|
cbe0c2f511 | ||
|
|
1f2bdd7b80 | ||
|
|
0c902525e5 | ||
|
|
129d26475e | ||
|
|
29f8867a9e | ||
|
|
252c4cb36b | ||
|
|
07603ceea7 | ||
|
|
8ec14c131d | ||
|
|
1225dbced7 | ||
|
|
3cd9bdffcb | ||
|
|
336a4acd46 | ||
|
|
c5abe51e26 | ||
|
|
31062bdc3c | ||
|
|
8943099dfb | ||
|
|
09f007e741 | ||
|
|
4487fd4a73 | ||
|
|
5498a79115 | ||
|
|
9c7fc9fddc | ||
|
|
4d63f957c2 | ||
|
|
828e00e668 | ||
|
|
3ba16310c5 | ||
|
|
7aaa9c18dd | ||
|
|
72923879a3 | ||
|
|
b1cc2c7c70 | ||
|
|
d88c927ba9 | ||
|
|
cf58e62baa | ||
|
|
daf4a56665 | ||
|
|
05bc297ea7 | ||
|
|
7ea9ec89be | ||
|
|
f23b6b0d96 | ||
|
|
d2dcf4bb69 | ||
|
|
1ff0fabf15 | ||
|
|
e013cc2ab8 | ||
|
|
99a744abda | ||
|
|
062d60e9d6 | ||
|
|
b777ffec66 | ||
|
|
8a2050e7fa | ||
|
|
9fbb88238e | ||
|
|
36f8cde2fb | ||
|
|
f64cd475af | ||
|
|
a29d2ab66b |
No files matched your search
@@ -0,0 +1,11 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: github-actions
|
||||
directory: /
|
||||
schedule:
|
||||
interval: weekly
|
||||
|
||||
- package-ecosystem: docker
|
||||
directory: /
|
||||
schedule:
|
||||
interval: weekly
|
||||
@@ -0,0 +1,86 @@
|
||||
name: RPM/DEB build aarch64
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
name: "${{ matrix.target }}"
|
||||
strategy:
|
||||
matrix:
|
||||
target:
|
||||
- ubuntu-24.04-arm
|
||||
runs-on: ${{ matrix.target }}
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
- name: env
|
||||
run: |
|
||||
pwd
|
||||
echo "RELEASE=$(cat RELEASE)" >> $GITHUB_ENV
|
||||
echo "VERSION=$(date +%y%m%d%H%M%S)" >> $GITHUB_ENV
|
||||
echo "MAJOR=$(cat RELEASE | cut -d "-" -f 1)" >> $GITHUB_ENV
|
||||
echo "SUBMAJOR=$(cat RELEASE | cut -d "-" -f 2)" >> $GITHUB_ENV
|
||||
echo "MINOR=$(cat RELEASE | cut -d "-" -f 3)" >> $GITHUB_ENV
|
||||
- name: echo env
|
||||
run: echo "release $RELEASE version $VERSION major $MAJOR submajor $SUBMAJOR minor $MINOR"
|
||||
- name: Linux libraries
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install libssl-dev libpam-dev libpcre2-dev rpm build-essential debhelper
|
||||
- name: configure rpm env
|
||||
run: |
|
||||
mkdir ~/debian
|
||||
mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
|
||||
tar -czf ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz --transform "s,^,3proxy-$RELEASE/," .
|
||||
ln -s ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz ~/rpmbuild/SOURCES/$RELEASE.tar.gz
|
||||
cp scripts/rh/3proxy.spec ~/rpmbuild/SPECS/3proxy-$RELEASE.spec
|
||||
cp ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz ~/debian/3proxy_$RELEASE.orig.tar.gz
|
||||
- name: rpmbuild
|
||||
run: |
|
||||
ret=`pwd`
|
||||
cd ~/rpmbuild/SPECS
|
||||
rpmbuild -ba 3proxy-$RELEASE.spec
|
||||
cd $ret
|
||||
mv ~/rpmbuild/RPMS/aarch64/3proxy-$RELEASE-1.aarch64.rpm 3proxy-$RELEASE.arm64.rpm
|
||||
- name: Get artifact rpm
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: "3proxy-${{ env.RELEASE }}-arm64.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
|
||||
run: |
|
||||
ret=`pwd`
|
||||
cd ~/debian/
|
||||
tar xzf 3proxy_$RELEASE.orig.tar.gz
|
||||
cd 3proxy-$RELEASE
|
||||
echo "3proxy ($RELEASE-$VERSION) buster; urgency=medium" >debian/changelog
|
||||
echo " " >>debian/changelog
|
||||
echo " *3proxy $RELEASE build" >>debian/changelog
|
||||
echo " " >>debian/changelog
|
||||
echo " -- z3APA3A <3apa3a@3proxy.org> "`date "+%a, %d %b %Y %H:%M:%S %z"` >>debian/changelog
|
||||
echo "">>debian/changelog
|
||||
dpkg-buildpackage
|
||||
cd $ret
|
||||
cp ~/debian/3proxy_$RELEASE-"$VERSION"_arm64.deb ./3proxy-$RELEASE.arm64.deb
|
||||
- name: Get artifact deb
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: "3proxy-${{ env.RELEASE }}-arm64.deb"
|
||||
path: "*.deb"
|
||||
- name: Upload deb 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.deb
|
||||
@@ -0,0 +1,119 @@
|
||||
name: RPM/DEB build armhf
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
name: "${{ matrix.target }}"
|
||||
strategy:
|
||||
matrix:
|
||||
target:
|
||||
- ubuntu-latest
|
||||
runs-on: ${{ matrix.target }}
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
- name: env
|
||||
run: |
|
||||
pwd
|
||||
echo "RELEASE=$(cat RELEASE)" >> $GITHUB_ENV
|
||||
echo "VERSION=$(date +%y%m%d%H%M%S)" >> $GITHUB_ENV
|
||||
echo "MAJOR=$(cat RELEASE | cut -d "-" -f 1)" >> $GITHUB_ENV
|
||||
echo "SUBMAJOR=$(cat RELEASE | cut -d "-" -f 2)" >> $GITHUB_ENV
|
||||
echo "MINOR=$(cat RELEASE | cut -d "-" -f 3)" >> $GITHUB_ENV
|
||||
- name: Linux libraries
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo dpkg --add-architecture armhf
|
||||
echo "Types: deb" > ~/ubuntu.sources
|
||||
echo "URIs: http://archive.ubuntu.com/ubuntu/" >> ~/ubuntu.sources
|
||||
echo "Suites: noble noble-updates noble-backports" >> ~/ubuntu.sources
|
||||
echo "Components: main restricted universe multiverse" >> ~/ubuntu.sources
|
||||
echo "Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg" >> ~/ubuntu.sources
|
||||
echo "Architectures: amd64" >> ~/ubuntu.sources
|
||||
echo "" >> ~/ubuntu.sources
|
||||
echo "Types: deb" >> ~/ubuntu.sources
|
||||
echo "URIs: http://security.ubuntu.com/ubuntu/" >> ~/ubuntu.sources
|
||||
echo "Suites: noble-security" >> ~/ubuntu.sources
|
||||
echo "Components: main restricted universe multiverse" >> ~/ubuntu.sources
|
||||
echo "Architectures: amd64" >> ~/ubuntu.sources
|
||||
echo "Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg" >> ~/ubuntu.sources
|
||||
echo "" >> ~/ubuntu.sources
|
||||
echo "Types: deb" >>~/ubuntu.sources
|
||||
echo "URIs: http://ports.ubuntu.com/ubuntu-ports/" >>~/ubuntu.sources
|
||||
echo "Suites: noble noble-updates" >>~/ubuntu.sources
|
||||
echo "Components: main restricted universe multiverse" >>~/ubuntu.sources
|
||||
echo "Architectures: armhf" >>~/ubuntu.sources
|
||||
echo "Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg" >>~/ubuntu.sources
|
||||
sudo cp ~/ubuntu.sources /etc/apt/sources.list.d/ubuntu.sources
|
||||
sudo apt update
|
||||
sudo apt install libssl3t64:armhf openssl:armhf libssl-dev:armhf libpam0g:armhf libpam0g-dev:armhf libpcre2-dev:armhf rpm crossbuild-essential-armhf build-essential debhelper
|
||||
- name: configure rpm env
|
||||
run: |
|
||||
mkdir ~/debian
|
||||
mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
|
||||
tar -czf ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz --transform "s,^,3proxy-$RELEASE/," .
|
||||
ln -s ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz ~/rpmbuild/SOURCES/$RELEASE.tar.gz
|
||||
cp scripts/rh/3proxy.spec ~/rpmbuild/SPECS/3proxy-$RELEASE.spec
|
||||
cp ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz ~/debian/3proxy_$RELEASE.orig.tar.gz
|
||||
- name: rpmbuild
|
||||
run: |
|
||||
ret=`pwd`
|
||||
cd ~/rpmbuild/SPECS
|
||||
PATH=/usr/arm-linux-gnueabihf/bin:$PATH
|
||||
export PATH=$PATH
|
||||
CC=arm-linux-gnueabihf-gcc
|
||||
export CC=$CC
|
||||
export RPATH=/usr/arm-linux-gnueabihf/lib:$RPATH
|
||||
export LD_LIBRARY_PATH=/usr/arm-linux-gnueabihf/lib:$LD_LIBRARY_PATH
|
||||
rpmbuild -ba --define "PAMLIB pam0g" --define "_arch arm" --define "cross yes" --target=arm-linux-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
|
||||
run: |
|
||||
ret=`pwd`
|
||||
cd ~/debian/
|
||||
tar xzf 3proxy_$RELEASE.orig.tar.gz
|
||||
cd 3proxy-$RELEASE
|
||||
echo "3proxy ($RELEASE-$VERSION) buster; urgency=medium" >debian/changelog
|
||||
echo " " >>debian/changelog
|
||||
echo " *3proxy $RELEASE build" >>debian/changelog
|
||||
echo " " >>debian/changelog
|
||||
echo " -- z3APA3A <3apa3a@3proxy.org> "`date "+%a, %d %b %Y %H:%M:%S %z"` >>debian/changelog
|
||||
echo "">>debian/changelog
|
||||
PATH=/usr/arm-linux-gnueabihf/bin:$PATH
|
||||
export PATH=$PATH
|
||||
CC=arm-linux-gnueabihf-gcc
|
||||
export CC=$CC
|
||||
export RPATH=/usr/arm-linux-gnueabihf/lib:$RPATH
|
||||
export LD_LIBRARY_PATH=/usr/arm-linux-gnueabihf/lib:$LD_LIBRARY_PATH
|
||||
dpkg-buildpackage
|
||||
cd $ret
|
||||
cp ~/debian/3proxy_$RELEASE-"$VERSION"_armhf.deb ./3proxy-$RELEASE.arm.deb
|
||||
- name: Get artifact deb
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: "3proxy-${{ env.RELEASE }}-arm.deb"
|
||||
path: "*.deb"
|
||||
- name: Upload deb 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.deb
|
||||
@@ -0,0 +1,87 @@
|
||||
name: RPM/DEB build x86-64
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
name: "${{ matrix.target }}"
|
||||
strategy:
|
||||
matrix:
|
||||
target:
|
||||
- ubuntu-latest
|
||||
runs-on: ${{ matrix.target }}
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
- name: env
|
||||
run: |
|
||||
pwd
|
||||
echo "RELEASE=$(cat RELEASE)" >> $GITHUB_ENV
|
||||
echo "VERSION=$(date +%y%m%d%H%M%S)" >> $GITHUB_ENV
|
||||
echo "MAJOR=$(cat RELEASE | cut -d "-" -f 1)" >> $GITHUB_ENV
|
||||
echo "SUBMAJOR=$(cat RELEASE | cut -d "-" -f 2)" >> $GITHUB_ENV
|
||||
echo "MINOR=$(cat RELEASE | cut -d "-" -f 3)" >> $GITHUB_ENV
|
||||
- name: echo env
|
||||
run: echo "release $RELEASE version $VERSION major $MAJOR submajor $SUBMAJOR minor $MINOR"
|
||||
- name: Linux libraries
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install libssl-dev libpam-dev libpcre2-dev rpm build-essential debhelper
|
||||
- name: configure rpm/deb env
|
||||
run: |
|
||||
mkdir ~/debian
|
||||
mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
|
||||
tar -czf ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz --transform "s,^,3proxy-$RELEASE/," .
|
||||
ln -s ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz ~/rpmbuild/SOURCES/$RELEASE.tar.gz
|
||||
cp scripts/rh/3proxy.spec ~/rpmbuild/SPECS/3proxy-$RELEASE.spec
|
||||
cp ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz ~/debian/3proxy_$RELEASE.orig.tar.gz
|
||||
- name: rpmbuild
|
||||
run: |
|
||||
ret=`pwd`
|
||||
cd ~/rpmbuild/SPECS
|
||||
rpmbuild -ba 3proxy-$RELEASE.spec
|
||||
cd $ret
|
||||
mv ~/rpmbuild/RPMS/x86_64/3proxy-$RELEASE-1.x86_64.rpm 3proxy-$RELEASE.x86_64.rpm
|
||||
- name: Get artifact rpm
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: "3proxy-${{ env.RELEASE }}-x86_64.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
|
||||
run: |
|
||||
ret=`pwd`
|
||||
cd ~/debian/
|
||||
tar xzf 3proxy_$RELEASE.orig.tar.gz
|
||||
cd 3proxy-$RELEASE
|
||||
echo "3proxy ($RELEASE-$VERSION) buster; urgency=medium" >debian/changelog
|
||||
echo " " >>debian/changelog
|
||||
echo " *3proxy $RELEASE build" >>debian/changelog
|
||||
echo " " >>debian/changelog
|
||||
echo " -- z3APA3A <3apa3a@3proxy.org> "`date "+%a, %d %b %Y %H:%M:%S %z"` >>debian/changelog
|
||||
echo "">>debian/changelog
|
||||
dpkg-buildpackage
|
||||
cd $ret
|
||||
cp ~/debian/3proxy_$RELEASE-"$VERSION"_amd64.deb ./3proxy-$RELEASE.x86_64.deb
|
||||
- name: Get artifact deb
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: "3proxy-${{ env.RELEASE }}-x86_64.deb"
|
||||
path: "*.deb"
|
||||
- name: Upload deb 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.deb
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
name: Build Win32 3proxy-lite with Watcom
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
name: "${{ matrix.target }}"
|
||||
strategy:
|
||||
matrix:
|
||||
target:
|
||||
- windows-2022
|
||||
runs-on: ${{ matrix.target }}
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
# - name: configure
|
||||
# run: ./configure
|
||||
- name: Setup Open Watcom
|
||||
uses: open-watcom/setup-watcom@v1
|
||||
- name: set date
|
||||
run: |
|
||||
$NOW = Get-Date -Format "yyMMddHHmmss"
|
||||
echo "now: $NOW"
|
||||
$RELEASE = Get-Content -Path "RELEASE" -Raw
|
||||
echo "release: $RELEASE"
|
||||
echo "RELEASE=$RELEASE" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
echo "VERSION=/D `"VERSION=\`"3proxy-$RELEASE\`"`"" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
echo "BUILDDATE=/D `"BUILDDATE=\`"$NOW\`"`"" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
- name: make Watcom
|
||||
shell: cmd
|
||||
run: |
|
||||
echo "volatile char VerSion[]=^"3APA3A-3proxy-Internal-Build: 3proxy-%RELEASE%-%NOW%\r\nCode certificate: https://3proxy.org/3proxy.cer\r\n^";" >>src/3proxy.c
|
||||
nmake /F Makefile.watcom
|
||||
- name: Decode Certificate
|
||||
shell: pwsh
|
||||
run: |
|
||||
$pfx_cert_byte = [System.Convert]::FromBase64String("${{ secrets.WINDOWS_CERTIFICATE }}")
|
||||
[System.IO.File]::WriteAllBytes("${{ github.workspace }}\cert.pfx", $pfx_cert_byte)
|
||||
- name: Sign
|
||||
shell: pwsh
|
||||
run: |
|
||||
$signtool = (Get-ChildItem "C:\Program Files (x86)\Windows Kits\10\bin\*\x64\signtool.exe" | Sort-Object { [version]$_.Directory.Parent.Name } -Descending | Select-Object -First 1).FullName
|
||||
& $signtool sign /f "${{ github.workspace }}\cert.pfx" /p "${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }}" /tr http://timestamp.digicert.com /td sha256 /fd sha256 "bin\3proxy.exe"
|
||||
& $signtool sign /f "${{ github.workspace }}\cert.pfx" /p "${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }}" /tr http://timestamp.digicert.com /td sha256 /fd sha256 "bin\3proxy_crypt.exe"
|
||||
- name: make dist dir
|
||||
shell: cmd
|
||||
run: |
|
||||
mkdir dist
|
||||
mkdir dist\3proxy
|
||||
mkdir dist\3proxy\bin
|
||||
mkdir dist\3proxy\cfg
|
||||
mkdir dist\3proxy\cfg\sql
|
||||
mkdir dist\3proxy\doc
|
||||
mkdir dist\3proxy\doc\ru
|
||||
mkdir dist\3proxy\doc\html
|
||||
mkdir dist\3proxy\doc\html\plugins
|
||||
mkdir dist\3proxy\doc\html\man5
|
||||
mkdir dist\3proxy\doc\html\man8
|
||||
mkdir dist\3proxy\doc\html\devel
|
||||
copy bin\3proxy.exe dist\3proxy\bin\
|
||||
copy bin\*.dll dist\3proxy\bin\
|
||||
copy bin\3proxy_crypt.exe dist\3proxy\bin\
|
||||
copy cfg\*.* dist\3proxy\cfg\
|
||||
copy cfg\sql\*.* dist\3proxy\cfg\sql\
|
||||
copy doc\ru\*.* dist\3proxy\doc\ru\
|
||||
copy doc\html\*.* dist\3proxy\doc\html\
|
||||
copy doc\html\plugins\*.* dist\3proxy\doc\html\plugins\
|
||||
copy doc\html\man8\*.* dist\3proxy\doc\html\man8\
|
||||
copy doc\html\man5\*.* dist\3proxy\doc\html\man5\
|
||||
copy doc\html\devel\*.* dist\3proxy\doc\html\devel\
|
||||
copy copying dist\3proxy\
|
||||
copy authors dist\3proxy\
|
||||
copy README.md dist\3proxy\
|
||||
copy rus.3ps dist\3proxy\
|
||||
- name: Get artifact
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: "3proxy-${{ env.RELEASE }}-lite"
|
||||
path: dist/
|
||||
- name: Create zip
|
||||
if: github.event_name == 'release'
|
||||
shell: pwsh
|
||||
run: Compress-Archive -Path dist/* -DestinationPath 3proxy-${{ env.RELEASE }}-lite.zip
|
||||
- name: Upload 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 }}-lite.zip
|
||||
@@ -0,0 +1,109 @@
|
||||
name: Build Win32 3proxy with MSVC
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
name: "${{ matrix.target }}"
|
||||
strategy:
|
||||
matrix:
|
||||
target:
|
||||
- windows-2022
|
||||
runs-on: ${{ matrix.target }}
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
# - name: configure
|
||||
# run: ./configure
|
||||
- name: set date
|
||||
run: |
|
||||
$NOW = Get-Date -Format "yyMMddHHmmss"
|
||||
$RELEASE = Get-Content -Path "RELEASE" -Raw
|
||||
echo "RELEASE=$RELEASE" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
echo "VERSION=/D `"VERSION=\`"3proxy-$RELEASE\`"`"" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
echo "BUILDDATE=/D `"BUILDDATE=\`"$NOW\`"`"" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
- name: install packages
|
||||
run: vcpkg install pcre2:x86-windows-static openssl:x86-windows-static
|
||||
- name: Add msbuild to PATH
|
||||
uses: microsoft/setup-msbuild@v3
|
||||
- name: make Windows MSVC
|
||||
if: ${{ startsWith(matrix.target, 'windows') }}
|
||||
shell: cmd
|
||||
run: |
|
||||
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars32.bat"
|
||||
D:
|
||||
cd "D:/a/3proxy/3proxy"
|
||||
set "LIB=%LIB%;c:/vcpkg/installed/x86-windows-static/lib"
|
||||
set "INCLUDE=%INCLUDE%;c:/vcpkg/installed/x86-windows-static/include"
|
||||
echo "volatile char VerSion[]=^"3APA3A-3proxy-Internal-Build: 3proxy-%RELEASE%-%NOW%\r\nCode certificate: https://3proxy.org/3proxy.cer\r\n^";" >>src/3proxy.c
|
||||
nmake /F Makefile.msvc
|
||||
- name: Decode Certificate
|
||||
shell: pwsh
|
||||
run: |
|
||||
$pfx_cert_byte = [System.Convert]::FromBase64String("${{ secrets.WINDOWS_CERTIFICATE }}")
|
||||
[System.IO.File]::WriteAllBytes("${{ github.workspace }}\cert.pfx", $pfx_cert_byte)
|
||||
- name: Extract public certificate
|
||||
shell: pwsh
|
||||
env:
|
||||
CERT_PASSWORD: ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }}
|
||||
run: |
|
||||
$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2("${{ github.workspace }}\cert.pfx", "$env:CERT_PASSWORD")
|
||||
[System.IO.File]::WriteAllBytes("${{ github.workspace }}\3proxy.crt", $cert.Export("Cert"))
|
||||
- name: Sign
|
||||
shell: pwsh
|
||||
env:
|
||||
CERT_PASSWORD: ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }}
|
||||
run: |
|
||||
$signtool = (Get-ChildItem "C:\Program Files (x86)\Windows Kits\10\bin\*\x64\signtool.exe" | Sort-Object { [version]$_.Directory.Parent.Name } -Descending | Select-Object -First 1).FullName
|
||||
Get-ChildItem bin\*.exe, bin\*.dll | ForEach-Object { & $signtool sign /f "${{ github.workspace }}\cert.pfx" /p "$env:CERT_PASSWORD" /tr http://timestamp.digicert.com /td sha256 /fd sha256 $_.FullName }
|
||||
- name: make dist dir
|
||||
shell: cmd
|
||||
run: |
|
||||
mkdir dist
|
||||
mkdir dist\3proxy
|
||||
mkdir dist\3proxy\bin
|
||||
mkdir dist\3proxy\cfg
|
||||
mkdir dist\3proxy\cfg\sql
|
||||
mkdir dist\3proxy\doc
|
||||
mkdir dist\3proxy\doc\ru
|
||||
mkdir dist\3proxy\doc\html
|
||||
mkdir dist\3proxy\doc\html\plugins
|
||||
mkdir dist\3proxy\doc\html\man5
|
||||
mkdir dist\3proxy\doc\html\man8
|
||||
mkdir dist\3proxy\doc\html\devel
|
||||
copy bin\3proxy.exe dist\3proxy\bin\
|
||||
copy bin\*.dll dist\3proxy\bin\
|
||||
copy bin\3proxy_crypt.exe dist\3proxy\bin\
|
||||
copy cfg\*.* dist\3proxy\cfg\
|
||||
copy cfg\sql\*.* dist\3proxy\cfg\sql\
|
||||
copy doc\ru\*.* dist\3proxy\doc\ru\
|
||||
copy doc\html\*.* dist\3proxy\doc\html\
|
||||
copy doc\html\plugins\*.* dist\3proxy\doc\html\plugins\
|
||||
copy doc\html\man8\*.* dist\3proxy\doc\html\man8\
|
||||
copy doc\html\man5\*.* dist\3proxy\doc\html\man5\
|
||||
copy doc\html\devel\*.* dist\3proxy\doc\html\devel\
|
||||
copy copying dist\3proxy\
|
||||
copy authors dist\3proxy\
|
||||
copy README.md dist\3proxy\
|
||||
copy rus.3ps dist\3proxy\
|
||||
copy 3proxy.crt dist\3proxy\
|
||||
- name: Get artifact
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: "3proxy-${{ env.RELEASE }}"
|
||||
path: dist/
|
||||
- name: Create zip
|
||||
if: github.event_name == 'release'
|
||||
shell: pwsh
|
||||
run: Compress-Archive -Path dist/* -DestinationPath 3proxy-${{ env.RELEASE }}-x86.zip
|
||||
- name: Upload 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.zip
|
||||
@@ -0,0 +1,110 @@
|
||||
name: Build Win64 3proxy with MSVC
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
name: "${{ matrix.target }}"
|
||||
strategy:
|
||||
matrix:
|
||||
target:
|
||||
- windows-2022
|
||||
runs-on: ${{ matrix.target }}
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
# - name: configure
|
||||
# run: ./configure
|
||||
- name: set date
|
||||
run: |
|
||||
$NOW = Get-Date -Format "yyMMddHHmmss"
|
||||
$RELEASE = Get-Content -Path "RELEASE" -Raw
|
||||
echo "NOW=$NOW" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
echo "RELEASE=$RELEASE" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
echo "VERSION=/D `"VERSION=\`"3proxy-$RELEASE\`"`"" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
echo "BUILDDATE=/D `"BUILDDATE=\`"$NOW\`"`"" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
- name: install packages
|
||||
run: vcpkg install pcre2:x64-windows-static openssl:x64-windows-static
|
||||
- name: Add msbuild to PATH
|
||||
uses: microsoft/setup-msbuild@v3
|
||||
- name: make Windows MSVC
|
||||
shell: cmd
|
||||
run: |
|
||||
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
|
||||
D:
|
||||
cd "D:/a/3proxy/3proxy"
|
||||
set "LIB=%LIB%;c:/vcpkg/installed/x64-windows-static/lib"
|
||||
set "INCLUDE=%INCLUDE%;c:/vcpkg/installed/x64-windows-static/include"
|
||||
echo "volatile char VerSion[]=^"3APA3A-3proxy-Internal-Build: 3proxy-%RELEASE%-%NOW%\r\nCode certificate: https://3proxy.org/3proxy.cer\r\n^";" >>src/3proxy.c
|
||||
echo %NOW% / %RELEASE% / %BUILDDATE% / %VERSION%
|
||||
nmake /F Makefile.msvc
|
||||
- name: Decode Certificate
|
||||
shell: pwsh
|
||||
run: |
|
||||
$pfx_cert_byte = [System.Convert]::FromBase64String("${{ secrets.WINDOWS_CERTIFICATE }}")
|
||||
[System.IO.File]::WriteAllBytes("${{ github.workspace }}\cert.pfx", $pfx_cert_byte)
|
||||
- name: Extract public certificate
|
||||
shell: pwsh
|
||||
env:
|
||||
CERT_PASSWORD: ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }}
|
||||
run: |
|
||||
$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2("${{ github.workspace }}\cert.pfx", "$env:CERT_PASSWORD")
|
||||
[System.IO.File]::WriteAllBytes("${{ github.workspace }}\3proxy.crt", $cert.Export("Cert"))
|
||||
- name: Sign
|
||||
shell: pwsh
|
||||
env:
|
||||
CERT_PASSWORD: ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }}
|
||||
run: |
|
||||
$signtool = (Get-ChildItem "C:\Program Files (x86)\Windows Kits\10\bin\*\x64\signtool.exe" | Sort-Object { [version]$_.Directory.Parent.Name } -Descending | Select-Object -First 1).FullName
|
||||
Get-ChildItem bin\*.exe, bin\*.dll | ForEach-Object { & $signtool sign /f "${{ github.workspace }}\cert.pfx" /p "$env:CERT_PASSWORD" /tr http://timestamp.digicert.com /td sha256 /fd sha256 $_.FullName }
|
||||
- name: make dist dir
|
||||
shell: cmd
|
||||
run: |
|
||||
mkdir dist
|
||||
mkdir dist\3proxy
|
||||
mkdir dist\3proxy\bin64
|
||||
mkdir dist\3proxy\cfg
|
||||
mkdir dist\3proxy\cfg\sql
|
||||
mkdir dist\3proxy\doc
|
||||
mkdir dist\3proxy\doc\ru
|
||||
mkdir dist\3proxy\doc\html
|
||||
mkdir dist\3proxy\doc\html\plugins
|
||||
mkdir dist\3proxy\doc\html\man5
|
||||
mkdir dist\3proxy\doc\html\man8
|
||||
mkdir dist\3proxy\doc\html\devel
|
||||
copy bin\3proxy.exe dist\3proxy\bin64\
|
||||
copy bin\*.dll dist\3proxy\bin64\
|
||||
copy bin\3proxy_crypt.exe dist\3proxy\bin64\
|
||||
copy cfg\*.* dist\3proxy\cfg\
|
||||
copy cfg\sql\*.* dist\3proxy\cfg\sql\
|
||||
copy doc\ru\*.* dist\3proxy\doc\ru\
|
||||
copy doc\html\*.* dist\3proxy\doc\html\
|
||||
copy doc\html\plugins\*.* dist\3proxy\doc\html\plugins\
|
||||
copy doc\html\man8\*.* dist\3proxy\doc\html\man8\
|
||||
copy doc\html\man5\*.* dist\3proxy\doc\html\man5\
|
||||
copy doc\html\devel\*.* dist\3proxy\doc\html\devel\
|
||||
copy copying dist\3proxy\
|
||||
copy authors dist\3proxy\
|
||||
copy README.md dist\3proxy\
|
||||
copy rus.3ps dist\3proxy\
|
||||
copy 3proxy.crt dist\3proxy\
|
||||
- name: Get artifact
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: "3proxy-${{ env.RELEASE }}-x64"
|
||||
path: dist/
|
||||
- name: Create zip
|
||||
if: github.event_name == 'release'
|
||||
shell: pwsh
|
||||
run: Compress-Archive -Path dist/* -DestinationPath 3proxy-${{ env.RELEASE }}-x64.zip
|
||||
- name: Upload 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 }}-x64.zip
|
||||
@@ -0,0 +1,109 @@
|
||||
name: Build Win-arm64 3proxy with MSVC
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
name: "${{ matrix.target }}"
|
||||
strategy:
|
||||
matrix:
|
||||
target:
|
||||
- windows-2022
|
||||
runs-on: ${{ matrix.target }}
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
# - name: configure
|
||||
# run: ./configure
|
||||
- name: set date
|
||||
run: |
|
||||
$NOW = Get-Date -Format "yyMMddHHmmss"
|
||||
$RELEASE = Get-Content -Path "RELEASE" -Raw
|
||||
echo "RELEASE=$RELEASE" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
echo "VERSION=/D `"VERSION=\`"3proxy-$RELEASE\`"`"" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
echo "BUILDDATE=/D `"BUILDDATE=\`"$NOW\`"`"" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
- name: install packages
|
||||
run: vcpkg install pcre2:arm64-windows-static openssl:arm64-windows-static
|
||||
- name: Add msbuild to PATH
|
||||
uses: microsoft/setup-msbuild@v3
|
||||
- name: make Windows MSVC
|
||||
if: ${{ startsWith(matrix.target, 'windows') }}
|
||||
shell: cmd
|
||||
run: |
|
||||
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsx86_arm64.bat"
|
||||
D:
|
||||
cd "D:/a/3proxy/3proxy"
|
||||
set "LIB=%LIB%;c:/vcpkg/installed/arm64-windows-static/lib"
|
||||
set "INCLUDE=%INCLUDE%;c:/vcpkg/installed/arm64-windows-static/include"
|
||||
echo "volatile char VerSion[]=^"3APA3A-3proxy-Internal-Build: 3proxy-%RELEASE%-%NOW%\r\nCode certificate: https://3proxy.org/3proxy.cer\r\n^";" >>src/3proxy.c
|
||||
nmake /F Makefile.msvc
|
||||
- name: Decode Certificate
|
||||
shell: pwsh
|
||||
run: |
|
||||
$pfx_cert_byte = [System.Convert]::FromBase64String("${{ secrets.WINDOWS_CERTIFICATE }}")
|
||||
[System.IO.File]::WriteAllBytes("${{ github.workspace }}\cert.pfx", $pfx_cert_byte)
|
||||
- name: Extract public certificate
|
||||
shell: pwsh
|
||||
env:
|
||||
CERT_PASSWORD: ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }}
|
||||
run: |
|
||||
$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2("${{ github.workspace }}\cert.pfx", "$env:CERT_PASSWORD")
|
||||
[System.IO.File]::WriteAllBytes("${{ github.workspace }}\3proxy.crt", $cert.Export("Cert"))
|
||||
- name: Sign
|
||||
shell: pwsh
|
||||
env:
|
||||
CERT_PASSWORD: ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }}
|
||||
run: |
|
||||
$signtool = (Get-ChildItem "C:\Program Files (x86)\Windows Kits\10\bin\*\x64\signtool.exe" | Sort-Object { [version]$_.Directory.Parent.Name } -Descending | Select-Object -First 1).FullName
|
||||
Get-ChildItem bin\*.exe, bin\*.dll | ForEach-Object { & $signtool sign /f "${{ github.workspace }}\cert.pfx" /p "$env:CERT_PASSWORD" /tr http://timestamp.digicert.com /td sha256 /fd sha256 $_.FullName }
|
||||
- name: make dist dir
|
||||
shell: cmd
|
||||
run: |
|
||||
mkdir dist
|
||||
mkdir dist\3proxy
|
||||
mkdir dist\3proxy\bin64
|
||||
mkdir dist\3proxy\cfg
|
||||
mkdir dist\3proxy\cfg\sql
|
||||
mkdir dist\3proxy\doc
|
||||
mkdir dist\3proxy\doc\ru
|
||||
mkdir dist\3proxy\doc\html
|
||||
mkdir dist\3proxy\doc\html\plugins
|
||||
mkdir dist\3proxy\doc\html\man5
|
||||
mkdir dist\3proxy\doc\html\man8
|
||||
mkdir dist\3proxy\doc\html\devel
|
||||
copy bin\3proxy.exe dist\3proxy\bin64\
|
||||
copy bin\*.dll dist\3proxy\bin64\
|
||||
copy bin\3proxy_crypt.exe dist\3proxy\bin64\
|
||||
copy cfg\*.* dist\3proxy\cfg\
|
||||
copy cfg\sql\*.* dist\3proxy\cfg\sql\
|
||||
copy doc\ru\*.* dist\3proxy\doc\ru\
|
||||
copy doc\html\*.* dist\3proxy\doc\html\
|
||||
copy doc\html\plugins\*.* dist\3proxy\doc\html\plugins\
|
||||
copy doc\html\man8\*.* dist\3proxy\doc\html\man8\
|
||||
copy doc\html\man5\*.* dist\3proxy\doc\html\man5\
|
||||
copy doc\html\devel\*.* dist\3proxy\doc\html\devel\
|
||||
copy copying dist\3proxy\
|
||||
copy authors dist\3proxy\
|
||||
copy README.md dist\3proxy\
|
||||
copy rus.3ps dist\3proxy\
|
||||
copy 3proxy.crt dist\3proxy\
|
||||
- name: Get artifact
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: "3proxy-${{ env.RELEASE }}-arm64"
|
||||
path: dist/
|
||||
- name: Create zip
|
||||
if: github.event_name == 'release'
|
||||
shell: pwsh
|
||||
run: Compress-Archive -Path dist/* -DestinationPath 3proxy-${{ env.RELEASE }}-arm64.zip
|
||||
- name: Upload 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.zip
|
||||
@@ -0,0 +1,36 @@
|
||||
name: C/C++ CI Linux
|
||||
|
||||
on:
|
||||
push:
|
||||
paths: [ '**.c', '**.h', 'Makefile.Linux', '.github/configs', '.github/workflows/c-cpp-Linux.yml' ]
|
||||
pull_request:
|
||||
paths: [ "**.c", "**.h", "Makefile.Linux", ".github/configs", ".github/workflows/c-cpp-Linux.yml" ]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
name: "${{ matrix.target }}"
|
||||
strategy:
|
||||
matrix:
|
||||
target:
|
||||
- ubuntu-latest
|
||||
- ubuntu-24.04-arm
|
||||
runs-on: ${{ matrix.target }}
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
# - name: configure
|
||||
# run: ./configure
|
||||
- name: Linux libraries
|
||||
if: ${{ startsWith(matrix.target, 'ubuntu') }}
|
||||
run: sudo apt install libssl-dev libpam-dev libpcre2-dev
|
||||
- name: make
|
||||
run: make -f Makefile.Linux
|
||||
- name: mkdir
|
||||
run: mkdir ~/3proxy
|
||||
- name: make install
|
||||
run: make -f Makefile.Linux DESTDIR=~/3proxy install
|
||||
- name: make clean Linux
|
||||
run: make -f Makefile.Linux clean
|
||||
@@ -0,0 +1,33 @@
|
||||
name: C/C++ CI MacOS
|
||||
|
||||
on:
|
||||
push:
|
||||
paths: [ '**.c', '**.h', 'Makefile.FreeBSD', '.github/configs', '.github/workflows/c-cpp-MacOS.yml' ]
|
||||
pull_request:
|
||||
paths: [ "**.c", "**.h", "Makefile.FreeBSD", ".github/configs", ".github/workflows/c-cpp-MacOS.yml" ]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
name: "${{ matrix.target }}"
|
||||
strategy:
|
||||
matrix:
|
||||
target:
|
||||
- macos-15
|
||||
runs-on: ${{ matrix.target }}
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
# - name: configure
|
||||
# run: ./configure
|
||||
- name: Mac libraries
|
||||
run: brew install pcre2
|
||||
- name: make MacOS
|
||||
run: make -f Makefile.FreeBSD
|
||||
env:
|
||||
LDFLAGS: "-L/usr/local/lib -L/opt/homebrew/lib -L/opt/homebrew/opt/openssl/lib"
|
||||
CFLAGS: "-I/usr/local/include -I/opt/homebrew/include -I/usr/local/opt/openssl/include -I/opt/homebrew/opt/openssl/include"
|
||||
- name: make clean MacOS
|
||||
run: make -f Makefile.FreeBSD clean
|
||||
@@ -0,0 +1,43 @@
|
||||
name: C/C++ CI Windows
|
||||
|
||||
on:
|
||||
push:
|
||||
paths: [ '**.c', '**.h', 'Makefile.msvc', '.github/configs', '.github/workflows/c-cpp-Windows.yml' ]
|
||||
pull_request:
|
||||
paths: [ "**.c", "**.h", "Makefile.msvc", ".github/configs", ".github/workflows/c-cpp-Windows.yml" ]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
name: "${{ matrix.target }}"
|
||||
strategy:
|
||||
matrix:
|
||||
target:
|
||||
- windows-2022
|
||||
runs-on: ${{ matrix.target }}
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
- name: install Windows libraries
|
||||
run: vcpkg install pcre2:x64-windows && c:\msys64\usr\bin\pacman.exe -S --noconfirm mingw-w64-x86_64-pcre2 mingw-w64-x86_64-openssl
|
||||
- name: make Windows
|
||||
run: make -f Makefile.win
|
||||
env:
|
||||
LDFLAGS: '-L "c:/msys64/mingw64/lib"'
|
||||
CFLAGS: '-I "c:/msys64/mingw64/include"'
|
||||
- name: make clean Windows
|
||||
run: make -f Makefile.win clean
|
||||
- name: Add msbuild to PATH
|
||||
uses: microsoft/setup-msbuild@v3
|
||||
- name: make Windows MSVC
|
||||
shell: cmd
|
||||
run: |
|
||||
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
|
||||
D:
|
||||
cd "D:/a/3proxy/3proxy"
|
||||
set "LIB=%LIB%;c:/program files/openssl/lib/VC/x64/MT;c:/vcpkg/installed/x64-windows/lib"
|
||||
set "INCLUDE=%INCLUDE%;c:/program files/openssl/include;c:/vcpkg/installed/x64-windows/include"
|
||||
nmake /F Makefile.msvc
|
||||
nmake /F Makefile.msvc clean
|
||||
@@ -0,0 +1,59 @@
|
||||
name: C/C++ CI cmake
|
||||
|
||||
on:
|
||||
push:
|
||||
paths: [ '**.c', '**.h', '**.cmake', 'CMakeLists.txt', '.github/configs', '.github/workflows/c-cpp-cmake.yml' ]
|
||||
pull_request:
|
||||
paths: [ "**.c", "**.h", "**.cmake", "CMakeLists.txt", ".github/configs", ".github/workflows/c-cpp-cmake.yml" ]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
name: "${{ matrix.target }}"
|
||||
strategy:
|
||||
matrix:
|
||||
target:
|
||||
- ubuntu-latest
|
||||
- ubuntu-24.04-arm
|
||||
- macos-15
|
||||
- windows-2022
|
||||
runs-on: ${{ matrix.target }}
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
# - name: configure
|
||||
# run: ./configure
|
||||
- name: Linux libraries
|
||||
if: ${{ startsWith(matrix.target, 'ubuntu') }}
|
||||
run: sudo apt install libssl-dev libpam-dev libpcre2-dev
|
||||
- name: Mac libraries
|
||||
if: ${{ startsWith(matrix.target, 'macos') }}
|
||||
run: brew install pcre2
|
||||
- name: install Windows libraries
|
||||
if: ${{ startsWith(matrix.target, 'windows') }}
|
||||
run: vcpkg install pcre2:x64-windows
|
||||
- name: make with CMake POSIX
|
||||
if: ${{ ! startsWith(matrix.target, 'windows') }}
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
cmake --build .
|
||||
mkdir ~/3proxy
|
||||
DESTDIR=~/3proxy cmake --install .
|
||||
cd .. && rm -rf build/
|
||||
- name: make with CMake Win
|
||||
if: ${{ startsWith(matrix.target, 'windows') }}
|
||||
shell: cmd
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
set "LIB=%LIB%;c:/program files/openssl/lib/VC/x64/MT;c:/vcpkg/installed/x64-windows/lib"
|
||||
set "INCLUDE=%INCLUDE%;c:/program files/openssl/include;c:/vcpkg/installed/x64-windows/include"
|
||||
cmake ..
|
||||
dir
|
||||
cmake --build .
|
||||
cd ..
|
||||
rmdir /s /q build
|
||||
@@ -0,0 +1,99 @@
|
||||
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
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
name: Build Docker images (Docker Hub)
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
|
||||
env:
|
||||
REGISTRY: docker.io
|
||||
IMAGE_NAME: 3proxy/3proxy
|
||||
|
||||
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 }}
|
||||
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
|
||||
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 Docker Hub
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@v4
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_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
|
||||
+23
-3
@@ -11,6 +11,17 @@
|
||||
*.lib
|
||||
*.key
|
||||
*.pem
|
||||
*.so
|
||||
bin/3proxy
|
||||
bin/proxy
|
||||
bin/socks
|
||||
bin/tcppm
|
||||
bin/udppm
|
||||
bin/pop3p
|
||||
bin/smtpp
|
||||
bin/ftppr
|
||||
bin/mycrypt
|
||||
bin/tlspr
|
||||
bin64/
|
||||
dll/
|
||||
tmp/
|
||||
@@ -41,11 +52,9 @@ src/mycrypt
|
||||
src/dighosts
|
||||
*.ld.so
|
||||
*.dSYM
|
||||
doc/html/man3/
|
||||
doc/html/man8/
|
||||
*.var
|
||||
verfile.sh
|
||||
Makefile
|
||||
/Makefile
|
||||
copytgz.sh
|
||||
*~.nib
|
||||
local.properties
|
||||
@@ -248,3 +257,14 @@ pip-log.txt
|
||||
|
||||
#Mr Developer
|
||||
.mr.developer.cfg
|
||||
CLAUDE.md
|
||||
bin/3proxy_crypt
|
||||
bin/3proxy_ftppr
|
||||
bin/3proxy_pop3p
|
||||
bin/3proxy_proxy
|
||||
bin/3proxy_smtpp
|
||||
bin/3proxy_socks
|
||||
bin/3proxy_tcppm
|
||||
bin/3proxy_tlspr
|
||||
bin/3proxy_udppm
|
||||
build*/*
|
||||
@@ -0,0 +1,25 @@
|
||||
3proxy-0.9.7 Released July, 4 2026
|
||||
|
||||
+ PCRE2 and SSL/TLS code moved from plugins into main 3proxy binary; dynamic linking with ssl/pcre by default, STATIC/LIBSTATIC options for static linking
|
||||
+ Unix sockets support for parent proxies, tcppm, internal listeners and -i option; abstract (fileless) unix sockets on Linux
|
||||
+ ssl_client_mode = 3 to use 'secure' parent types: https, tcps, socks5s, connect+s, etc.
|
||||
+ New authcache types: cacheacl, dstaddr, dstport, dsthost, dstoper, srvaddr, srvport; authcache is now configurable per service
|
||||
+ Hashtables for password lists and authcache, faster password lookups
|
||||
+ 3proxy_crypt: new internal password hashing replacing mycrypt
|
||||
+ udppm switched to hashtables and supports multiple connections
|
||||
+ SOCKSv5 UDP parent support; -Ne/-Ni NAT options
|
||||
+ Docker images for more platforms, signed; DLLs signed; public cert added to build
|
||||
+ Grace sleep and linger on connection close; correctly process half-closed connections
|
||||
+ Allow setting internal/external network namespaces on Linux
|
||||
- icqpr/OSCAR code removed
|
||||
! Fix: invalid error in SSL server handshake could break service state
|
||||
! Fix: invalid offset in datafilters
|
||||
! Fix: invalid socket in poll() could break sockmap() on Windows
|
||||
! Fix: deadlock in ftppr
|
||||
! Fix: crash on standalone services
|
||||
! Fix: non-initialized mutex crash under Windows
|
||||
! Fix: socks v5 parent with no auth
|
||||
! Fix: hanging connections in sockmap; unneeded poll in sockmap
|
||||
! Fix: symbols collision with OpenSSL could lead to crash
|
||||
! Fix: compatibility with older SSL versions and older Windows (7 and below)
|
||||
! Multiple minor bugfixes and code cleanup
|
||||
@@ -0,0 +1,25 @@
|
||||
3proxy-0.9.7 Вышел 4 Июля 2026
|
||||
|
||||
+ Код PCRE2 и SSL/TLS перенесён из плагинов в основной бинарный файл 3proxy; по умолчанию динамическое связывание с ssl/pcre, опции STATIC/LIBSTATIC для статического связывания
|
||||
+ Поддержка unix-сокетов для родительских прокси, tcppm, внутренних слушателей и опции -i; абстрактные (безфайловые) unix-сокеты в Linux
|
||||
+ ssl_client_mode = 3 для использования «безопасных» типов родителя: https, tcps, socks5s, connect+s и т.д.
|
||||
+ Новые типы authcache: cacheacl, dstaddr, dstport, dsthost, dstoper, srvaddr, srvport; authcache настраивается для каждого сервиса
|
||||
+ Хеш-таблицы для списков паролей и authcache, более быстрый поиск паролей
|
||||
+ 3proxy_crypt: новое внутреннее хеширование паролей, заменяющее mycrypt
|
||||
+ udppm переведён на хеш-таблицы и поддерживает множество соединений
|
||||
+ Поддержка UDP-родителя для SOCKSv5; опции NAT -Ne/-Ni
|
||||
+ Docker-образы для большего числа платформ, подписанные; подписанные DLL; публичный сертификат добавлен в сборку
|
||||
+ Grace sleep и linger при закрытии соединения; корректная обработка полузакрытых соединений
|
||||
+ Разрешено задавать внутренние/внешние сетевые пространства имён (network namespaces) в Linux
|
||||
- Код icqpr/OSCAR удалён
|
||||
! Исправление: некорректная ошибка в SSL server handshake могла ломать состояние сервиса
|
||||
! Исправление: некорректное смещение в datafilters
|
||||
! Исправление: некорректный сокет в poll() мог ломать sockmap() в Windows
|
||||
! Исправление: взаимоблокировка (deadlock) в ftppr
|
||||
! Исправление: падение на standalone-сервисах
|
||||
! Исправление: падение из-за неинициализированного mutex в Windows
|
||||
! Исправление: родитель socks v5 без аутентификации
|
||||
! Исправление: зависающие соединения в sockmap; лишний poll в sockmap
|
||||
! Исправление: конфликт символов с OpenSSL мог приводить к падению
|
||||
! Исправление: совместимость со старыми версиями SSL и старыми версиями Windows (7 и ниже)
|
||||
! Множество мелких исправлений и очистка кода
|
||||
+869
@@ -0,0 +1,869 @@
|
||||
#
|
||||
# 3proxy CMake build system
|
||||
#
|
||||
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
# Read version from RELEASE file
|
||||
file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/RELEASE" PROJECT_VERSION LIMIT_COUNT 1)
|
||||
|
||||
project(3proxy
|
||||
VERSION ${PROJECT_VERSION}
|
||||
LANGUAGES C
|
||||
DESCRIPTION "3proxy - tiny free proxy server"
|
||||
)
|
||||
|
||||
# Include GNUInstallDirs for standard installation directories
|
||||
include(GNUInstallDirs)
|
||||
|
||||
# Add cmake module path
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
||||
|
||||
# Detect compiler
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "Clang" OR CMAKE_C_COMPILER_ID STREQUAL "AppleClang")
|
||||
set(COMPILER_IS_CLANG TRUE)
|
||||
if(WIN32 AND CMAKE_C_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC")
|
||||
set(COMPILER_IS_CLANG_CL TRUE)
|
||||
else()
|
||||
set(COMPILER_IS_CLANG_CL FALSE)
|
||||
endif()
|
||||
else()
|
||||
set(COMPILER_IS_CLANG FALSE)
|
||||
set(COMPILER_IS_CLANG_CL FALSE)
|
||||
endif()
|
||||
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
||||
set(COMPILER_IS_GCC TRUE)
|
||||
else()
|
||||
set(COMPILER_IS_GCC FALSE)
|
||||
endif()
|
||||
|
||||
if(MSVC AND NOT COMPILER_IS_CLANG_CL)
|
||||
set(COMPILER_IS_MSVC TRUE)
|
||||
else()
|
||||
set(COMPILER_IS_MSVC FALSE)
|
||||
endif()
|
||||
|
||||
# Options
|
||||
option(3PROXY_BUILD_SHARED "Build shared libraries for plugins" ON)
|
||||
option(3PROXY_USE_OPENSSL "Enable TLS/SSL support (requires OpenSSL)" ON)
|
||||
option(3PROXY_USE_PCRE2 "Enable PCRE2 regex filtering" ON)
|
||||
option(3PROXY_USE_PAM "Enable PAM/PamAuth" ON)
|
||||
option(3PROXY_USE_ODBC "Enable ODBC support (Unix only, always ON on Windows)" OFF)
|
||||
option(3PROXY_USE_SPLICE "Use Linux splice() for zero-copy (Linux only)" ON)
|
||||
option(3PROXY_USE_POLL "Use poll() instead of select() (Unix only)" ON)
|
||||
option(3PROXY_USE_WSAPOLL "Use WSAPoll instead of select() (Windows only)" ON)
|
||||
option(3PROXY_USE_NETFILTER "Enable Linux netfilter support (Linux only)" ON)
|
||||
option(3PROXY_USE_UNIX_SOCKETS "Enable Unix domain socket support (Unix only)" ON)
|
||||
|
||||
if(NOT WIN32 AND NOT APPLE)
|
||||
option(3PROXY_STATIC_LINK "Statically link libraries using -Wl,-Bstatic (Linux/Unix only)" OFF)
|
||||
endif()
|
||||
|
||||
# Binary name prefix for standalone modules and crypt (default: 3proxy_)
|
||||
# For crypt: if prefix is empty, "my" is used instead (→ mycrypt)
|
||||
set(3PROXY_BINARY_PREFIX "3proxy_" CACHE STRING "Prefix for standalone module and crypt binary names")
|
||||
|
||||
# Standalone module build options (ON by default)
|
||||
option(3PROXY_BUILD_NONE "Do not build standalone binaries" OFF)
|
||||
option(3PROXY_BUILD_PROXY "Build standalone proxy binary" ON)
|
||||
option(3PROXY_BUILD_SOCKS "Build standalone socks binary" ON)
|
||||
option(3PROXY_BUILD_POP3P "Build standalone pop3p binary" ON)
|
||||
option(3PROXY_BUILD_SMTPP "Build standalone smtpp binary" ON)
|
||||
option(3PROXY_BUILD_FTPPR "Build standalone ftppr binary" ON)
|
||||
option(3PROXY_BUILD_TCPPM "Build standalone tcppm binary" ON)
|
||||
option(3PROXY_BUILD_UDPPM "Build standalone udppm binary" ON)
|
||||
option(3PROXY_BUILD_TLSPR "Build standalone tlspr binary" ON)
|
||||
|
||||
if(3PROXY_BUILD_NONE)
|
||||
foreach(_M PROXY SOCKS POP3P SMTPP FTPPR TCPPM UDPPM TLSPR)
|
||||
set(3PROXY_BUILD_${_M} OFF)
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
# Output directory
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||
|
||||
# Find threads library (cross-platform pthread equivalent)
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
# Set default build type if not specified
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type" FORCE)
|
||||
endif()
|
||||
|
||||
# Platform-independent position independent code for shared libraries
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
# Platform detection and configuration
|
||||
if(WIN32)
|
||||
# Windows-specific configuration
|
||||
add_compile_definitions(
|
||||
WIN32
|
||||
_WIN32
|
||||
_MBCS
|
||||
_CONSOLE
|
||||
)
|
||||
|
||||
if(COMPILER_IS_MSVC)
|
||||
# MSVC-specific settings
|
||||
add_compile_definitions(
|
||||
MSVC
|
||||
)
|
||||
# Use static runtime library
|
||||
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
# MSVC compiler options
|
||||
add_compile_options(
|
||||
/W3 # Warning level 3
|
||||
/GS # Buffer security check
|
||||
/GA # Optimize for Windows applications
|
||||
/GF # Enable string pooling
|
||||
)
|
||||
# Optimization flags per build type
|
||||
set(CMAKE_C_FLAGS_RELEASE "/O2")
|
||||
|
||||
elseif(COMPILER_IS_CLANG_CL)
|
||||
# clang-cl (Clang with MSVC frontend)
|
||||
add_compile_definitions(
|
||||
MSVC
|
||||
)
|
||||
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
add_compile_options(
|
||||
-W3
|
||||
-fno-strict-aliasing
|
||||
)
|
||||
|
||||
elseif(COMPILER_IS_CLANG OR COMPILER_IS_GCC)
|
||||
# Clang or GCC on Windows (MinGW-like)
|
||||
add_compile_definitions(WITH_STD_MALLOC)
|
||||
add_compile_options(-fno-strict-aliasing)
|
||||
|
||||
elseif(WATCOM)
|
||||
# OpenWatcom-specific flags
|
||||
add_compile_definitions(
|
||||
WATCOM
|
||||
MSVC
|
||||
NOIPV6
|
||||
NODEBUG
|
||||
NORADIUS
|
||||
)
|
||||
endif()
|
||||
|
||||
# Windows libraries
|
||||
set(WINDOWS_LIBS ws2_32 advapi32 user32 kernel32 gdi32 crypt32)
|
||||
|
||||
# Windows plugins (always built)
|
||||
set(DEFAULT_PLUGINS
|
||||
utf8tocp1251
|
||||
WindowsAuthentication
|
||||
TrafficPlugin
|
||||
StringsPlugin
|
||||
FilePlugin
|
||||
)
|
||||
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
# Linux-specific configuration
|
||||
add_compile_definitions(
|
||||
_GNU_SOURCE
|
||||
GETHOSTBYNAME_R
|
||||
_THREAD_SAFE
|
||||
_REENTRANT
|
||||
)
|
||||
|
||||
if(COMPILER_IS_CLANG OR COMPILER_IS_GCC)
|
||||
# Clang/GCC on Linux
|
||||
add_compile_options(-fno-strict-aliasing)
|
||||
endif()
|
||||
|
||||
if(3PROXY_USE_SPLICE)
|
||||
add_compile_definitions(WITHSPLICE)
|
||||
endif()
|
||||
|
||||
if(3PROXY_USE_NETFILTER)
|
||||
add_compile_definitions(WITH_NETFILTER)
|
||||
endif()
|
||||
|
||||
if(3PROXY_USE_UNIX_SOCKETS)
|
||||
add_compile_definitions(WITH_UN)
|
||||
endif()
|
||||
|
||||
set(DEFAULT_PLUGINS
|
||||
StringsPlugin
|
||||
TrafficPlugin
|
||||
TransparentPlugin
|
||||
FilePlugin
|
||||
)
|
||||
|
||||
elseif(CMAKE_SYSTEM_NAME MATCHES "FreeBSD|Darwin|OpenBSD|NetBSD")
|
||||
# BSD/macOS-specific configuration
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
# macOS-specific
|
||||
add_compile_definitions(_DARWIN_UNLIMITED_SELECT)
|
||||
endif()
|
||||
|
||||
if(COMPILER_IS_CLANG OR COMPILER_IS_GCC)
|
||||
add_compile_options(-fno-strict-aliasing)
|
||||
endif()
|
||||
|
||||
if(3PROXY_USE_UNIX_SOCKETS)
|
||||
add_compile_definitions(WITH_UN)
|
||||
endif()
|
||||
|
||||
set(DEFAULT_PLUGINS
|
||||
StringsPlugin
|
||||
TrafficPlugin
|
||||
TransparentPlugin
|
||||
FilePlugin
|
||||
)
|
||||
|
||||
else()
|
||||
# Generic Unix configuration
|
||||
if(COMPILER_IS_CLANG OR COMPILER_IS_GCC)
|
||||
add_compile_options(-fno-strict-aliasing)
|
||||
endif()
|
||||
|
||||
if(3PROXY_USE_UNIX_SOCKETS)
|
||||
add_compile_definitions(WITH_UN)
|
||||
endif()
|
||||
|
||||
set(DEFAULT_PLUGINS
|
||||
StringsPlugin
|
||||
TrafficPlugin
|
||||
TransparentPlugin
|
||||
FilePlugin
|
||||
)
|
||||
endif()
|
||||
|
||||
# Common definitions
|
||||
if(WIN32)
|
||||
# Windows: use WSAPOLL
|
||||
if(3PROXY_USE_WSAPOLL)
|
||||
add_compile_definitions(WITH_WSAPOLL)
|
||||
else()
|
||||
add_compile_definitions(FD_SETSIZE=4096)
|
||||
endif()
|
||||
else()
|
||||
# Unix: use poll
|
||||
if(3PROXY_USE_POLL)
|
||||
add_compile_definitions(WITH_POLL)
|
||||
else()
|
||||
add_compile_definitions(FD_SETSIZE=4096)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Find dependencies
|
||||
|
||||
# OpenSSL
|
||||
set(OPENSSL_FOUND FALSE)
|
||||
if(3PROXY_USE_OPENSSL)
|
||||
find_package(OpenSSL REQUIRED)
|
||||
if(OpenSSL_FOUND)
|
||||
set(OPENSSL_FOUND TRUE)
|
||||
add_compile_definitions(WITH_SSL)
|
||||
message(STATUS "OpenSSL found: ${OPENSSL_VERSION}")
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "OpenSSL disabled by user request")
|
||||
endif()
|
||||
|
||||
# PCRE2
|
||||
set(PCRE2_FOUND FALSE)
|
||||
if(3PROXY_USE_PCRE2)
|
||||
find_package(PCRE2 QUIET)
|
||||
if(PCRE2_FOUND)
|
||||
add_compile_definitions(WITH_PCRE)
|
||||
message(STATUS "PCRE2 found: ${PCRE2_VERSION}")
|
||||
else()
|
||||
message(STATUS "PCRE2 not found, PCRE support will not be built")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# PAM (Unix only)
|
||||
set(PAM_FOUND FALSE)
|
||||
if(3PROXY_USE_PAM AND NOT WIN32)
|
||||
find_package(PAM QUIET)
|
||||
if(PAM_FOUND)
|
||||
message(STATUS "PAM found")
|
||||
else()
|
||||
message(STATUS "PAM not found, PamAuth will not be built")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# ODBC (always enabled on Windows)
|
||||
set(ODBC_FOUND FALSE)
|
||||
if(WIN32 OR 3PROXY_USE_ODBC)
|
||||
find_package(ODBC QUIET)
|
||||
if(ODBC_FOUND)
|
||||
message(STATUS "ODBC found")
|
||||
else()
|
||||
message(STATUS "ODBC not found, building without ODBC support")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Define WITH_ODBC when ODBC is available
|
||||
if(ODBC_FOUND)
|
||||
add_compile_definitions(WITH_ODBC)
|
||||
endif()
|
||||
|
||||
# Set NORADIUS if OpenSSL is not available (RADIUS requires MD5 from OpenSSL)
|
||||
if(NOT OPENSSL_FOUND)
|
||||
add_compile_definitions(NORADIUS)
|
||||
endif()
|
||||
|
||||
# Source files for 3proxy core
|
||||
set(3PROXY_CORE_SOURCES
|
||||
src/3proxy.c
|
||||
src/auth.c
|
||||
src/acl.c
|
||||
src/limiter.c
|
||||
src/redirect.c
|
||||
src/authradius.c
|
||||
src/hash.c
|
||||
src/hashtables.c
|
||||
src/resolve.c
|
||||
src/sql.c
|
||||
src/conf.c
|
||||
src/datatypes.c
|
||||
src/plugins.c
|
||||
src/stringtable.c
|
||||
)
|
||||
|
||||
# BLAKE2 source for 3proxy_crypt
|
||||
set(MD_SOURCES
|
||||
src/libs/blake2b-ref.c
|
||||
)
|
||||
|
||||
# ============================================================================
|
||||
# Object libraries for common sources (shared between executables)
|
||||
# ============================================================================
|
||||
|
||||
# Common object library (sockmap, sockgetchar, common, log)
|
||||
add_library(common_obj OBJECT
|
||||
src/sockmap.c
|
||||
src/sockgetchar.c
|
||||
src/common.c
|
||||
src/log.c
|
||||
)
|
||||
target_include_directories(common_obj PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src)
|
||||
|
||||
# base64 object library
|
||||
add_library(base64_obj OBJECT src/base64.c)
|
||||
target_include_directories(base64_obj PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src)
|
||||
|
||||
# ============================================================================
|
||||
# Object libraries for 3proxy (compiled WITHOUT WITHMAIN)
|
||||
# These are used by the main 3proxy executable
|
||||
# ============================================================================
|
||||
|
||||
# Server modules object library (without WITHMAIN, without UDP)
|
||||
add_library(srv_modules OBJECT
|
||||
src/proxy.c
|
||||
src/pop3p.c
|
||||
src/smtpp.c
|
||||
src/ftppr.c
|
||||
src/tcppm.c
|
||||
src/tlspr.c
|
||||
src/auto.c
|
||||
src/socks.c
|
||||
src/webadmin.c
|
||||
src/dnspr.c
|
||||
)
|
||||
|
||||
target_include_directories(srv_modules PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||
)
|
||||
# UDP port mapper server module (without WITHMAIN)
|
||||
add_library(srvudppm_obj OBJECT src/udppm.c)
|
||||
target_include_directories(srvudppm_obj PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||
)
|
||||
|
||||
# UDP socket relay (used by 3proxy, socks, udppm)
|
||||
add_library(udpsockmap_obj OBJECT src/udpsockmap.c)
|
||||
target_include_directories(udpsockmap_obj PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src)
|
||||
|
||||
# mainfunc object (proxymain.c compiled with MODULEMAINFUNC=mainfunc for 3proxy)
|
||||
add_library(mainfunc OBJECT src/proxymain.c)
|
||||
target_include_directories(mainfunc PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src)
|
||||
target_compile_definitions(mainfunc PRIVATE MODULEMAINFUNC=mainfunc)
|
||||
|
||||
# ftp object (used only by 3proxy and ftppr)
|
||||
add_library(ftp_obj OBJECT src/ftp.c)
|
||||
target_include_directories(ftp_obj PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src)
|
||||
|
||||
# 3proxy_crypt object for 3proxy (without WITHMAIN)
|
||||
add_library(3proxy_crypt_obj OBJECT src/3proxy_crypt.c)
|
||||
target_include_directories(3proxy_crypt_obj PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src)
|
||||
if(OpenSSL_FOUND)
|
||||
target_include_directories(3proxy_crypt_obj PRIVATE ${OPENSSL_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
# ============================================================================
|
||||
# Main 3proxy executable
|
||||
# Uses srv_* object files (without WITHMAIN)
|
||||
# ============================================================================
|
||||
|
||||
add_executable(3proxy
|
||||
${3PROXY_CORE_SOURCES}
|
||||
$<TARGET_OBJECTS:srv_modules>
|
||||
$<TARGET_OBJECTS:srvudppm_obj>
|
||||
$<TARGET_OBJECTS:mainfunc>
|
||||
$<TARGET_OBJECTS:common_obj>
|
||||
$<TARGET_OBJECTS:udpsockmap_obj>
|
||||
$<TARGET_OBJECTS:base64_obj>
|
||||
$<TARGET_OBJECTS:ftp_obj>
|
||||
$<TARGET_OBJECTS:3proxy_crypt_obj>
|
||||
)
|
||||
target_sources(3proxy PRIVATE ${MD_SOURCES})
|
||||
|
||||
if(OpenSSL_FOUND)
|
||||
target_sources(3proxy PRIVATE src/ssllib.c src/ssl.c)
|
||||
endif()
|
||||
|
||||
if(PCRE2_FOUND)
|
||||
target_sources(3proxy PRIVATE src/pcre.c)
|
||||
endif()
|
||||
|
||||
target_include_directories(3proxy PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/libs
|
||||
)
|
||||
if(OpenSSL_FOUND)
|
||||
target_include_directories(3proxy PRIVATE ${OPENSSL_INCLUDE_DIR})
|
||||
endif()
|
||||
if(PCRE2_FOUND)
|
||||
target_include_directories(3proxy PRIVATE ${PCRE2_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
target_link_libraries(3proxy PRIVATE Threads::Threads)
|
||||
|
||||
if(ODBC_FOUND)
|
||||
if(TARGET ODBC::ODBC)
|
||||
target_link_libraries(3proxy PRIVATE ODBC::ODBC)
|
||||
else()
|
||||
target_link_libraries(3proxy PRIVATE ${ODBC_LIBRARIES})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# OpenSSL linking
|
||||
if(OpenSSL_FOUND)
|
||||
if(3PROXY_STATIC_LINK)
|
||||
# Will be linked statically below (if static libraries are found)
|
||||
else()
|
||||
target_link_libraries(3proxy PRIVATE OpenSSL::SSL OpenSSL::Crypto)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# PCRE2 linking
|
||||
if(PCRE2_FOUND)
|
||||
if(3PROXY_STATIC_LINK)
|
||||
# Will be linked statically below (if static libraries are found)
|
||||
elseif(TARGET PCRE2::PCRE2)
|
||||
target_link_libraries(3proxy PRIVATE PCRE2::PCRE2)
|
||||
else()
|
||||
target_link_libraries(3proxy PRIVATE ${PCRE2_LIBRARIES})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Static linking of OpenSSL and PCRE2 (when option is enabled)
|
||||
if(3PROXY_STATIC_LINK AND (OpenSSL_FOUND OR PCRE2_FOUND))
|
||||
set(_saved_cmake_find_library_suffixes ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
|
||||
|
||||
set(_static_libs "")
|
||||
|
||||
if(OpenSSL_FOUND)
|
||||
find_library(_ssl_static_lib ssl)
|
||||
find_library(_crypto_static_lib crypto)
|
||||
if(_ssl_static_lib AND _crypto_static_lib)
|
||||
list(APPEND _static_libs ${_ssl_static_lib} ${_crypto_static_lib})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(PCRE2_FOUND)
|
||||
find_library(_pcre2_static_lib NAMES pcre2-8)
|
||||
if(_pcre2_static_lib)
|
||||
list(APPEND _static_libs ${_pcre2_static_lib})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_saved_cmake_find_library_suffixes})
|
||||
|
||||
if(_static_libs)
|
||||
target_link_libraries(3proxy PRIVATE -Wl,-Bstatic ${_static_libs} -Wl,-Bdynamic)
|
||||
message(STATUS "Static linking enabled for OpenSSL/PCRE2")
|
||||
else()
|
||||
message(WARNING "3PROXY_STATIC_LINK is ON but static libraries not found, falling back to dynamic")
|
||||
if(OpenSSL_FOUND)
|
||||
target_link_libraries(3proxy PRIVATE OpenSSL::SSL OpenSSL::Crypto)
|
||||
endif()
|
||||
if(PCRE2_FOUND)
|
||||
if(TARGET PCRE2::PCRE2)
|
||||
target_link_libraries(3proxy PRIVATE PCRE2::PCRE2)
|
||||
else()
|
||||
target_link_libraries(3proxy PRIVATE ${PCRE2_LIBRARIES})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
target_link_libraries(3proxy PRIVATE ${WINDOWS_LIBS})
|
||||
if(COMPILER_IS_MSVC AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/3proxy.rc)
|
||||
target_sources(3proxy PRIVATE 3proxy.rc)
|
||||
endif()
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
target_link_libraries(3proxy PRIVATE dl)
|
||||
endif()
|
||||
|
||||
# Build 3proxy_crypt utility
|
||||
add_executable(3proxy_crypt
|
||||
src/3proxy_crypt.c
|
||||
$<TARGET_OBJECTS:base64_obj>
|
||||
)
|
||||
target_sources(3proxy_crypt PRIVATE ${MD_SOURCES})
|
||||
target_compile_definitions(3proxy_crypt PRIVATE WITHMAIN)
|
||||
target_include_directories(3proxy_crypt PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/libs
|
||||
)
|
||||
if(OpenSSL_FOUND)
|
||||
target_include_directories(3proxy_crypt PRIVATE ${OPENSSL_INCLUDE_DIR})
|
||||
endif()
|
||||
target_link_libraries(3proxy_crypt PRIVATE Threads::Threads)
|
||||
if(OpenSSL_FOUND)
|
||||
if(3PROXY_STATIC_LINK)
|
||||
set(_saved_cmake_find_library_suffixes ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
|
||||
find_library(_ssl_static_lib ssl)
|
||||
find_library(_crypto_static_lib crypto)
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_saved_cmake_find_library_suffixes})
|
||||
if(_ssl_static_lib AND _crypto_static_lib)
|
||||
target_link_libraries(3proxy_crypt PRIVATE -Wl,-Bstatic ${_ssl_static_lib} ${_crypto_static_lib} -Wl,-Bdynamic)
|
||||
message(STATUS "3proxy_crypt: static OpenSSL")
|
||||
else()
|
||||
message(WARNING "3PROXY_STATIC_LINK is ON but static OpenSSL not found, using dynamic")
|
||||
target_link_libraries(3proxy_crypt PRIVATE OpenSSL::SSL OpenSSL::Crypto)
|
||||
endif()
|
||||
else()
|
||||
target_link_libraries(3proxy_crypt PRIVATE OpenSSL::SSL OpenSSL::Crypto)
|
||||
endif()
|
||||
endif()
|
||||
if("${3PROXY_BINARY_PREFIX}" STREQUAL "")
|
||||
set_target_properties(3proxy_crypt PROPERTIES OUTPUT_NAME "mycrypt")
|
||||
else()
|
||||
set_target_properties(3proxy_crypt PROPERTIES OUTPUT_NAME "${3PROXY_BINARY_PREFIX}crypt")
|
||||
endif()
|
||||
|
||||
# Build standalone proxy executables
|
||||
foreach(PROXY_NAME proxy socks pop3p smtpp ftppr tcppm udppm tlspr)
|
||||
string(TOUPPER "${PROXY_NAME}" _MODULE_OPT)
|
||||
if(NOT 3PROXY_BUILD_${_MODULE_OPT})
|
||||
continue()
|
||||
endif()
|
||||
|
||||
if(PROXY_NAME STREQUAL "ftppr" OR PROXY_NAME STREQUAL "proxy")
|
||||
# ftppr and proxy use ftp_obj
|
||||
add_executable(${PROXY_NAME}
|
||||
src/${PROXY_NAME}.c
|
||||
$<TARGET_OBJECTS:common_obj>
|
||||
$<TARGET_OBJECTS:ftp_obj>
|
||||
)
|
||||
else()
|
||||
add_executable(${PROXY_NAME}
|
||||
src/${PROXY_NAME}.c
|
||||
$<TARGET_OBJECTS:common_obj>
|
||||
)
|
||||
endif()
|
||||
|
||||
set_target_properties(${PROXY_NAME} PROPERTIES
|
||||
OUTPUT_NAME "${3PROXY_BINARY_PREFIX}${PROXY_NAME}"
|
||||
)
|
||||
|
||||
target_include_directories(${PROXY_NAME} PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||
)
|
||||
|
||||
target_compile_definitions(${PROXY_NAME} PRIVATE
|
||||
WITHMAIN
|
||||
NOPORTMAP
|
||||
)
|
||||
|
||||
if(NOT PROXY_NAME STREQUAL "udppm")
|
||||
target_compile_definitions(${PROXY_NAME} PRIVATE NOUDPMAIN)
|
||||
endif()
|
||||
|
||||
target_link_libraries(${PROXY_NAME} PRIVATE Threads::Threads)
|
||||
|
||||
if(PROXY_NAME STREQUAL "proxy")
|
||||
target_compile_definitions(${PROXY_NAME} PRIVATE ANONYMOUS)
|
||||
endif()
|
||||
|
||||
if(PROXY_NAME STREQUAL "tcppm" OR PROXY_NAME STREQUAL "udppm" OR PROXY_NAME STREQUAL "tlspr")
|
||||
target_compile_definitions(${PROXY_NAME} PRIVATE PORTMAP)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
target_link_libraries(${PROXY_NAME} PRIVATE ${WINDOWS_LIBS})
|
||||
endif()
|
||||
|
||||
if(PROXY_NAME STREQUAL "proxy" OR PROXY_NAME STREQUAL "smtpp")
|
||||
target_sources(${PROXY_NAME} PRIVATE $<TARGET_OBJECTS:base64_obj>)
|
||||
endif()
|
||||
|
||||
if(PROXY_NAME STREQUAL "udppm")
|
||||
target_sources(${PROXY_NAME} PRIVATE src/hash.c)
|
||||
endif()
|
||||
|
||||
if(PROXY_NAME STREQUAL "socks" OR PROXY_NAME STREQUAL "udppm")
|
||||
target_sources(${PROXY_NAME} PRIVATE src/udpsockmap.c)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# Plugin output directory
|
||||
set(PLUGIN_OUTPUT_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
|
||||
if(WIN32)
|
||||
set(PLUGIN_SUFFIX ".dll")
|
||||
else()
|
||||
set(PLUGIN_SUFFIX ".ld.so")
|
||||
endif()
|
||||
|
||||
# Include plugin definitions
|
||||
include(cmake/plugins.cmake)
|
||||
|
||||
# Build plugins
|
||||
foreach(PLUGIN ${DEFAULT_PLUGINS})
|
||||
add_subdirectory(src/plugins/${PLUGIN})
|
||||
endforeach()
|
||||
|
||||
if(PAM_FOUND)
|
||||
add_subdirectory(src/plugins/PamAuth)
|
||||
endif()
|
||||
|
||||
# Build full list of plugins to be built
|
||||
set(ALL_PLUGINS ${DEFAULT_PLUGINS})
|
||||
if(PAM_FOUND)
|
||||
list(APPEND ALL_PLUGINS PamAuth)
|
||||
endif()
|
||||
|
||||
# Installation rules
|
||||
install(TARGETS 3proxy 3proxy_crypt
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
)
|
||||
|
||||
foreach(PROXY_NAME proxy socks pop3p smtpp ftppr tcppm udppm tlspr)
|
||||
string(TOUPPER "${PROXY_NAME}" _MODULE_OPT)
|
||||
if(3PROXY_BUILD_${_MODULE_OPT})
|
||||
install(TARGETS ${PROXY_NAME}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# Install plugins
|
||||
file(GLOB PLUGINFILES "${PLUGIN_OUTPUT_DIR}/*${PLUGIN_SUFFIX}")
|
||||
if(WIN32)
|
||||
install(FILES
|
||||
${PLUGINFILES}
|
||||
DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
)
|
||||
else()
|
||||
install(FILES
|
||||
${PLUGINFILES}
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/3proxy
|
||||
)
|
||||
endif()
|
||||
|
||||
# Install configuration files
|
||||
if(NOT WIN32)
|
||||
set(CRYPT_PREFIX "${3PROXY_BINARY_PREFIX}")
|
||||
set(3PROXY_CONFDIR "${CMAKE_INSTALL_FULL_SYSCONFDIR}/3proxy/conf")
|
||||
set(3PROXY_COUNTERDIR "/opt/3proxy")
|
||||
install(DIRECTORY DESTINATION /opt/3proxy)
|
||||
configure_file(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/scripts/3proxy.cfg.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/3proxy.cfg
|
||||
@ONLY
|
||||
)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/3proxy.cfg DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/3proxy)
|
||||
configure_file(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/scripts/add3proxyuser.sh.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/add3proxyuser
|
||||
@ONLY
|
||||
)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/add3proxyuser
|
||||
DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
|
||||
)
|
||||
endif()
|
||||
|
||||
# Install service files (systemd, launchd, init.d, or rc.d)
|
||||
if(NOT WIN32)
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
# macOS - install launchd plist
|
||||
configure_file(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/scripts/org.3proxy.3proxy.plist.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/org.3proxy.3proxy.plist
|
||||
@ONLY
|
||||
)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.3proxy.3proxy.plist
|
||||
DESTINATION /Library/LaunchDaemons
|
||||
)
|
||||
|
||||
message(STATUS " launchd: YES (/Library/LaunchDaemons)")
|
||||
elseif(CMAKE_SYSTEM_NAME MATCHES "FreeBSD|OpenBSD|NetBSD")
|
||||
# BSD - install rc.d script
|
||||
set(RCD_DIR "/usr/local/etc/rc.d")
|
||||
|
||||
configure_file(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/scripts/rc.d/3proxy.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/3proxy.rc
|
||||
@ONLY
|
||||
)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/3proxy.rc
|
||||
DESTINATION ${RCD_DIR}
|
||||
RENAME 3proxy
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
|
||||
)
|
||||
|
||||
message(STATUS " rc.d: YES (${RCD_DIR})")
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
# Linux - check for systemd
|
||||
find_package(PkgConfig QUIET)
|
||||
if(PkgConfig_FOUND)
|
||||
pkg_check_modules(SYSTEMD QUIET systemd)
|
||||
endif()
|
||||
|
||||
if(SYSTEMD_FOUND)
|
||||
# systemd is available - install systemd service
|
||||
# Get systemd unit directory
|
||||
pkg_get_variable(SYSTEMD_UNIT_DIR systemd systemdsystemunitdir)
|
||||
if(NOT SYSTEMD_UNIT_DIR)
|
||||
# Fallback to common location
|
||||
set(SYSTEMD_UNIT_DIR "/lib/systemd/system")
|
||||
endif()
|
||||
|
||||
# Configure and install systemd service file
|
||||
configure_file(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/scripts/3proxy.service.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/3proxy.service
|
||||
@ONLY
|
||||
)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/3proxy.service
|
||||
DESTINATION ${SYSTEMD_UNIT_DIR}
|
||||
)
|
||||
|
||||
message(STATUS " systemd: YES (${SYSTEMD_UNIT_DIR})")
|
||||
else()
|
||||
# No systemd - install init.d script
|
||||
configure_file(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/scripts/init.d/3proxy.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/3proxy.init
|
||||
@ONLY
|
||||
)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/3proxy.init
|
||||
DESTINATION /etc/init.d
|
||||
RENAME 3proxy
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
|
||||
)
|
||||
|
||||
message(STATUS " systemd: NO (using init.d)")
|
||||
endif()
|
||||
else()
|
||||
# Other Unix - install init.d script
|
||||
configure_file(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/scripts/init.d/3proxy.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/3proxy.init
|
||||
@ONLY
|
||||
)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/3proxy.init
|
||||
DESTINATION /etc/init.d
|
||||
RENAME 3proxy
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
|
||||
)
|
||||
|
||||
message(STATUS " init.d: YES (/etc/init.d)")
|
||||
endif()
|
||||
|
||||
# Run postinstall only for direct installs (no DESTDIR)
|
||||
install(CODE "
|
||||
if(\"\$ENV{DESTDIR}\" STREQUAL \"\")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E env sh ${CMAKE_CURRENT_SOURCE_DIR}/scripts/postinstall.sh ${CMAKE_INSTALL_PREFIX}
|
||||
RESULT_VARIABLE POSTINSTALL_RESULT
|
||||
)
|
||||
endif()
|
||||
")
|
||||
endif()
|
||||
|
||||
# Install man pages
|
||||
if(NOT WIN32)
|
||||
# Config man page (section 5) — no prefix
|
||||
file(GLOB MAN5_FILES "${CMAKE_CURRENT_SOURCE_DIR}/man/*.5")
|
||||
install(FILES ${MAN5_FILES} DESTINATION ${CMAKE_INSTALL_MANDIR}/man5)
|
||||
# Main 3proxy man page — no prefix
|
||||
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/man/3proxy.8"
|
||||
DESTINATION ${CMAKE_INSTALL_MANDIR}/man8
|
||||
)
|
||||
# 3proxy_crypt man page — no prefix (already has 3proxy_)
|
||||
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/man/3proxy_crypt.8")
|
||||
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/man/3proxy_crypt.8"
|
||||
DESTINATION ${CMAKE_INSTALL_MANDIR}/man8
|
||||
)
|
||||
endif()
|
||||
# Module man pages — installed with binary prefix only if module is built
|
||||
foreach(_MAN proxy socks pop3p smtpp ftppr tcppm udppm tlspr)
|
||||
string(TOUPPER "${_MAN}" _MODULE_OPT)
|
||||
if(3PROXY_BUILD_${_MODULE_OPT})
|
||||
set(_MAN_SRC "${CMAKE_CURRENT_SOURCE_DIR}/man/${_MAN}.8")
|
||||
if(EXISTS "${_MAN_SRC}")
|
||||
install(FILES "${_MAN_SRC}"
|
||||
DESTINATION ${CMAKE_INSTALL_MANDIR}/man8
|
||||
RENAME "${3PROXY_BINARY_PREFIX}${_MAN}.8"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
# Summary
|
||||
message(STATUS "")
|
||||
message(STATUS "3proxy configuration summary:")
|
||||
message(STATUS " Version: ${PROJECT_VERSION}")
|
||||
message(STATUS " Platform: ${CMAKE_SYSTEM_NAME}")
|
||||
message(STATUS " Compiler: ${CMAKE_C_COMPILER_ID} ${CMAKE_C_COMPILER_VERSION}")
|
||||
message(STATUS " Build type: ${CMAKE_BUILD_TYPE}")
|
||||
message(STATUS "")
|
||||
message(STATUS " Options:")
|
||||
message(STATUS " BUILD_SHARED: ${3PROXY_BUILD_SHARED}")
|
||||
message(STATUS " USE_OPENSSL: ${3PROXY_USE_OPENSSL}")
|
||||
message(STATUS " USE_PCRE2: ${3PROXY_USE_PCRE2}")
|
||||
message(STATUS " USE_PAM: ${3PROXY_USE_PAM}")
|
||||
message(STATUS " USE_ODBC: ${3PROXY_USE_ODBC}")
|
||||
message(STATUS " USE_POLL: ${3PROXY_USE_POLL}")
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
message(STATUS " USE_SPLICE: ${3PROXY_USE_SPLICE}")
|
||||
message(STATUS " USE_NETFILTER: ${3PROXY_USE_NETFILTER}")
|
||||
endif()
|
||||
if(NOT WIN32 AND NOT APPLE)
|
||||
message(STATUS " STATIC_LINK: ${3PROXY_STATIC_LINK}")
|
||||
endif()
|
||||
if(WIN32)
|
||||
message(STATUS " USE_WSAPOLL: ${3PROXY_USE_WSAPOLL}")
|
||||
endif()
|
||||
message(STATUS "")
|
||||
message(STATUS " Libraries found:")
|
||||
message(STATUS " OpenSSL: ${OPENSSL_FOUND}")
|
||||
message(STATUS " PCRE2: ${PCRE2_FOUND}")
|
||||
message(STATUS " PAM: ${PAM_FOUND}")
|
||||
message(STATUS " ODBC: ${ODBC_FOUND}")
|
||||
message(STATUS "")
|
||||
message(STATUS " Plugins to build: ${ALL_PLUGINS}")
|
||||
message(STATUS "")
|
||||
message(STATUS " Standalone modules:")
|
||||
message(STATUS " Binary prefix: \"${3PROXY_BINARY_PREFIX}\"")
|
||||
foreach(_M proxy socks pop3p smtpp ftppr tcppm udppm tlspr)
|
||||
string(TOUPPER "${_M}" _MO)
|
||||
message(STATUS " BUILD_${_MO}: ${3PROXY_BUILD_${_MO}}")
|
||||
endforeach()
|
||||
message(STATUS "")
|
||||
@@ -0,0 +1,52 @@
|
||||
# 3proxy.full is fully functional 3proxy build based on busybox:glibc
|
||||
#
|
||||
# Examples are for podman, for docker change 'podman' to 'docker'
|
||||
#
|
||||
#to build:
|
||||
# podman build -f Dockerfile.busybox -t 3proxy.busybox .
|
||||
#to run:
|
||||
#
|
||||
# echo nserver 8.8.8.8 >/path/to/local/config/directory/3proxy.cfg
|
||||
# echo proxy -p3129 >>/path/to/local/config/directory/3proxy.cfg
|
||||
# podman run --read-only -p 3129:3129 -v /path/to/local/config/directory:/etc/3proxy --name 3proxy.busybox 3proxy.busybox
|
||||
#
|
||||
# use "log" without pathname in config to log to stdout.
|
||||
# plugins are located in /usr/local/3proxy/libexec (/libexec for chroot config)
|
||||
# symlinked as /lib and /lib64 in both root and chroot configurations, so no need
|
||||
# to specify full path to plugin.
|
||||
#
|
||||
# Since 0.9.6 image is distroless, no reason to use chroot, chroot
|
||||
# configuration is supported for compatibility only.
|
||||
|
||||
|
||||
FROM docker.io/gcc AS buildenv
|
||||
COPY . 3proxy
|
||||
RUN cd 3proxy &&\
|
||||
apt --assume-yes update && apt --assume-yes install libssl-dev libpcre2-dev &&\
|
||||
make -f Makefile.Linux LIBSTATIC=true PAM_CHECK=false &&\
|
||||
strip bin/3proxy &&\
|
||||
strip bin/*so &&\
|
||||
mkdir /dist &&\
|
||||
mkdir /dist/etc &&\
|
||||
mkdir /dist/etc/3proxy &&\
|
||||
mkdir /dist/bin &&\
|
||||
mkdir /dist/usr &&\
|
||||
mkdir /dist/usr/local &&\
|
||||
mkdir /dist/usr/local/3proxy &&\
|
||||
mkdir /dist/usr/local/3proxy/conf &&\
|
||||
mkdir /dist/usr/local/3proxy/libexec &&\
|
||||
cp bin/3proxy /dist/bin &&\
|
||||
cp bin/*.so /dist/usr/local/3proxy/libexec &&\
|
||||
cp scripts/3proxy.cfg.inchroot /dist/etc/3proxy/3proxy.cfg
|
||||
RUN cd /dist &&\
|
||||
ln -s /lib lib64 &&\
|
||||
ln -s /lib usr/lib &&\
|
||||
ln -s /lib usr/lib64
|
||||
RUN cp /lib/ld-*.so.* /dist/usr/local/3proxy/libexec || true
|
||||
RUN cp /lib64/ld-*.so.* /dist/usr/local/3proxy/libexec || true
|
||||
RUN cp "/lib/`gcc -dumpmachine`"/libdl.so.* /dist/usr/local/3proxy/libexec
|
||||
|
||||
FROM docker.io/busybox:glibc
|
||||
COPY --from=buildenv /dist /
|
||||
RUN ln -sf /usr/local/3proxy/libexec/* /lib/ && cd /usr/local/3proxy/ && ln -s libexec lib && ln -s libexec lib64 && mkdir usr && ln -s libexec usr/lib && ln -s libexec usr//lib64
|
||||
CMD ["/bin/3proxy", "/etc/3proxy/3proxy.cfg"]
|
||||
@@ -0,0 +1,61 @@
|
||||
# 3proxy.full is fully functional distroless 3proxy build
|
||||
#
|
||||
# Examples are for podman, for docker change 'podman' to 'docker'
|
||||
#
|
||||
#to build:
|
||||
# podman build -f Dockerfile.full -t 3proxy.full .
|
||||
#to run:
|
||||
#
|
||||
# echo nserver 8.8.8.8 >/path/to/local/config/directory/3proxy.cfg
|
||||
# echo proxy -p3129 >>/path/to/local/config/directory/3proxy.cfg
|
||||
# podman run --read-only -p 3129:3129 -v /path/to/local/config/directory:/etc/3proxy --name 3proxy.full 3proxy.full
|
||||
#
|
||||
# use "log" without pathname in config to log to stdout.
|
||||
# plugins are located in /usr/local/3proxy/libexec (/libexec for chroot config)
|
||||
# symlinked as /lib and /lib64 in both root and chroot configurations, so no need
|
||||
# to specify full path to plugin.
|
||||
#
|
||||
# Since 0.9.6 image is distroless, no reason to use chroot, chroot
|
||||
# configuration is supported for compatibility only.
|
||||
|
||||
|
||||
FROM docker.io/gcc AS buildenv
|
||||
COPY . 3proxy
|
||||
RUN cd 3proxy &&\
|
||||
apt --assume-yes update && apt --assume-yes install libssl-dev libpcre2-dev &&\
|
||||
make -f Makefile.Linux LIBSTATIC=true PAM_CHECK=false &&\
|
||||
strip bin/3proxy &&\
|
||||
mkdir /dist &&\
|
||||
mkdir /dist/etc &&\
|
||||
mkdir /dist/etc/3proxy &&\
|
||||
mkdir /dist/bin &&\
|
||||
mkdir /dist/usr &&\
|
||||
mkdir /dist/usr/local &&\
|
||||
mkdir /dist/usr/local/3proxy &&\
|
||||
mkdir /dist/usr/local/3proxy/libexec &&\
|
||||
mkdir /dist/usr/local/3proxy/conf &&\
|
||||
cp bin/3proxy /dist/bin &&\
|
||||
cp bin/*.so /dist/usr/local/3proxy/libexec &&\
|
||||
cp scripts/3proxy.cfg.inchroot /dist/etc/3proxy/3proxy.cfg
|
||||
RUN cd /dist &&\
|
||||
ln -s /usr/local/3proxy/libexec lib64 &&\
|
||||
ln -s /usr/local/3proxy/libexec lib &&\
|
||||
ln -s /usr/local/3proxy/libexec usr/lib &&\
|
||||
ln -s /usr/local/3proxy/libexec usr/lib64 &&\
|
||||
ln -s /usr/local/3proxy/libexec /dist/usr/local/3proxy/libexec/`gcc -dumpmachine`
|
||||
RUN cp /lib/ld-*.so.* /dist/usr/local/3proxy/libexec || true
|
||||
RUN cp /lib64/ld-*.so.* /dist/usr/local/3proxy/libexec || true
|
||||
RUN cp "/lib/`gcc -dumpmachine`"/libc.so.* /dist/usr/local/3proxy/libexec &&\
|
||||
cp "/lib/`gcc -dumpmachine`"/libdl.so.* /dist/usr/local/3proxy/libexec
|
||||
RUN cd /dist/usr/local/3proxy/ &&\
|
||||
ln -s libexec lib &&\
|
||||
ln -s libexec lib64 &&\
|
||||
mkdir usr
|
||||
RUN cd /dist/usr/local/3proxy/usr &&\
|
||||
ln -s ../libexec lib &&\
|
||||
ln -s ../libexec lib64 &&\
|
||||
strip /dist/usr/local/3proxy/libexec/*.so
|
||||
|
||||
FROM scratch
|
||||
COPY --from=buildenv /dist /
|
||||
CMD ["/bin/3proxy", "/etc/3proxy/3proxy.cfg"]
|
||||
@@ -0,0 +1,36 @@
|
||||
# dockerfile for "interactive" minimal 3proxy execution, no configuration mounting is required, configuration
|
||||
# is accepted from stdin. Use "end" command to indicate the end of configuration. Use "log" for stdout logging.
|
||||
#
|
||||
# Examples are for podman. For docker change 'podman' to 'docker'.
|
||||
#
|
||||
# This is busybox based docker with only 3proxy static executable.
|
||||
#
|
||||
# Limitations for minimal version:
|
||||
# no support for plugins and system resolver.
|
||||
# 'nserver' or 'fakeresolve' are mandatory in configuration.
|
||||
#
|
||||
# Build:
|
||||
#
|
||||
# podman build -f Dockerfile.minimal -t 3proxy.minimal .
|
||||
#
|
||||
# Run example:
|
||||
#
|
||||
# podman run --read-only -i -p 3129:3129 --name 3proxy 3proxy.minimal
|
||||
#or
|
||||
# podman start -ai 3proxy
|
||||
#<nserver 8.8.8.8
|
||||
#<nscache 65535
|
||||
#<log
|
||||
#<proxy -p3129
|
||||
#<end
|
||||
#
|
||||
|
||||
FROM docker.io/gcc AS buildenv
|
||||
COPY . 3proxy
|
||||
RUN cd 3proxy &&\
|
||||
make -f Makefile.Linux STATIC=true &&\
|
||||
strip bin/3proxy
|
||||
|
||||
FROM scratch
|
||||
COPY --from=buildenv 3proxy/bin/3proxy /bin/3proxy
|
||||
CMD ["/bin/3proxy"]
|
||||
+78
-27
@@ -1,25 +1,27 @@
|
||||
#
|
||||
# 3 proxy Makefile for GCC/Unix
|
||||
#
|
||||
# You can try to remove -DWITH_STD_MALLOC to CFLAGS to use optimized malloc
|
||||
# libraries
|
||||
#
|
||||
# remove -DNOODBC from CFLAGS and add -lodbc to LDFLAGS to compile with ODBC
|
||||
# add -DWITH_ODBC to CFLAGS and -lodbc to LDFLAGS to compile with ODBC
|
||||
# library support. Add -DSAFESQL for poorely written ODBC library / drivers.
|
||||
|
||||
BUILDDIR = ../bin/
|
||||
CC ?= gcc
|
||||
PREFIX ?= 3proxy_
|
||||
CRYPT_PREFIX ?= $(PREFIX)
|
||||
MANDIR ?= /usr/share/man
|
||||
CC ?= cc
|
||||
|
||||
CFLAGS = -c -O -fno-strict-aliasing -DNOODBC -DWITH_STD_MALLOC -DFD_SETSIZE=4096 -DWITH_POLL
|
||||
CFLAGS ?= -O3 -flto
|
||||
CFLAGS += -c -fno-strict-aliasing -DFD_SETSIZE=4096 -DWITH_POLL -DWITH_UN
|
||||
COUT = -o
|
||||
LN ?= ${CC}
|
||||
LDFLAGS = -pthread -O -fno-strict-aliasing
|
||||
# -lpthreads may be reuqired on some platforms instead of -pthreads
|
||||
LDFLAGS ?= -O3 -flto
|
||||
LDFLAGS += -pthread -fno-strict-aliasing
|
||||
# -lpthreads may be reuiured on some platforms instead of -pthreads
|
||||
# -ldl or -lld may be required for some platforms
|
||||
DCFLAGS = -fPIC
|
||||
DLFLAGS = -shared
|
||||
DCFLAGS ?= -fPIC
|
||||
DLFLAGS ?= -shared
|
||||
DLSUFFICS = .so
|
||||
LIBS =
|
||||
LIBS ?=
|
||||
LIBSPREFIX = -l
|
||||
LIBSSUFFIX =
|
||||
LNOUT = -o
|
||||
@@ -28,30 +30,79 @@ OBJSUFFICS = .o
|
||||
DEFINEOPTION = -D
|
||||
COMPFILES = *~
|
||||
REMOVECOMMAND = rm -f
|
||||
AFTERCLEAN = (find . -type f -name "*.o" -delete && find src/ -type f -name "Makefile.var" -delete && find bin/ -type f -perm +111 -delete) || true
|
||||
TYPECOMMAND = cat
|
||||
COMPATLIBS =
|
||||
MAKEFILE = Makefile.FreeBSD
|
||||
PLUGINS = StringsPlugin TrafficPlugin PCREPlugin PamAuth TransparentPlugin
|
||||
PLUGINS ?= StringsPlugin TrafficPlugin TransparentPlugin FilePlugin
|
||||
ifeq ($(STATIC), true)
|
||||
LDFLAGS += -static
|
||||
CFLAGS += -DNOPLUGINS -DNOSTDRESOLVE -DNOCRYPT
|
||||
ZLIB = -lz -lzstd
|
||||
PLUGINS =
|
||||
PAM_CHECK = false
|
||||
endif
|
||||
ifeq ($(LIBSTATIC), true)
|
||||
STATIC_PREFIX = -Wl,-Bstatic
|
||||
STATIC_SUFFIX = -Wl,-Bdynamic
|
||||
ZLIB = -lz -lzstd
|
||||
endif
|
||||
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)
|
||||
ifeq ($(OPENSSL_CHECK), true)
|
||||
LIBS += $(STATIC_PREFIX) $(ZLIB) -l crypto -l ssl $(STATIC_SUFFIX)
|
||||
CFLAGS += -DWITH_SSL
|
||||
SSL_OBJS = ssllib$(OBJSUFFICS) ssl$(OBJSUFFICS)
|
||||
else
|
||||
ZLIB :=
|
||||
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)
|
||||
ifeq ($(PCRE_CHECK), true)
|
||||
CFLAGS += -DWITH_PCRE
|
||||
PCRE_OBJS = pcre$(OBJSUFFICS)
|
||||
PCRE_LIBS = $(STATIC_PREFIX) -lpcre2-8 $(STATIC_SUFFIX)
|
||||
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)
|
||||
ifeq ($(PAM_CHECK), true)
|
||||
PLUGINS += PamAuth
|
||||
endif
|
||||
|
||||
include Makefile.inc
|
||||
|
||||
DESTDIR ?=
|
||||
prefix ?= /usr/local
|
||||
BINPREFIX ?= $(prefix)/bin
|
||||
|
||||
install: all
|
||||
if [ ! -d /usr/local/3proxy/bin ]; then mkdir -p /usr/local/3proxy/bin/; fi
|
||||
install bin/3proxy /usr/local/3proxy/bin/3proxy
|
||||
install bin/mycrypt /usr/local/3proxy/bin/mycrypt
|
||||
install scripts/add3proxyuser.sh /usr/local/3proxy/bin/
|
||||
if [ -s /usr/local/etc/3proxy/3proxy.cfg ]; then
|
||||
echo /usr/local/3proxy/3proxy.cfg already exists
|
||||
else
|
||||
install scripts/3proxy.cfg /usr/local/etc/3proxy/
|
||||
if [ ! -d /var/log/3proxy/ ]; then
|
||||
mkdir /var/log/3proxy/
|
||||
fi
|
||||
touch /usr/local/3proxy/passwd
|
||||
touch /usr/local/3proxy/counters
|
||||
touch /usr/local/3proxy/bandlimiters
|
||||
echo Run /usr/local/3proxy/bin/add3proxyuser.sh to add \'admin\' user
|
||||
if [ ! -d "$(DESTDIR)$(BINPREFIX)" ]; then mkdir -p $(DESTDIR)$(BINPREFIX)/; fi
|
||||
install bin/3proxy $(DESTDIR)$(BINPREFIX)/3proxy
|
||||
install bin/$(CRYPT_PREFIX)crypt $(DESTDIR)$(BINPREFIX)/$(CRYPT_PREFIX)crypt
|
||||
for f in proxy socks pop3p smtpp ftppr tcppm udppm tlspr; do \
|
||||
if [ -f bin/$(PREFIX)$$f ]; then install bin/$(PREFIX)$$f $(DESTDIR)$(BINPREFIX)/$(PREFIX)$$f; fi; \
|
||||
done
|
||||
install -d $(DESTDIR)$(prefix)/etc/3proxy/conf
|
||||
install -d $(DESTDIR)$(prefix)/etc/rc.d/
|
||||
sed -e 's|@CMAKE_INSTALL_FULL_BINDIR@|$(BINPREFIX)|g' -e 's|@CMAKE_INSTALL_FULL_SYSCONFDIR@|$(prefix)/etc|g' scripts/rc.d/3proxy.in > $(DESTDIR)$(prefix)/etc/rc.d/3proxy
|
||||
chmod 755 $(DESTDIR)$(prefix)/etc/rc.d/3proxy
|
||||
sed -e 's|@CMAKE_INSTALL_FULL_BINDIR@|$(BINPREFIX)|g' -e 's|@3PROXY_CONFDIR@|$(prefix)/etc/3proxy/conf|g' -e 's|@CRYPT_PREFIX@|$(CRYPT_PREFIX)|g' scripts/add3proxyuser.sh.in > $(DESTDIR)$(BINPREFIX)/add3proxyuser
|
||||
chmod 755 $(DESTDIR)$(BINPREFIX)/add3proxyuser
|
||||
if [ -s $(DESTDIR)$(prefix)/etc/3proxy/3proxy.cfg ]; then echo $(prefix)/etc/3proxy/3proxy.cfg already exists; else sed -e 's|@CMAKE_INSTALL_FULL_SYSCONFDIR@|$(prefix)/etc|g' -e 's|@3PROXY_CONFDIR@|$(prefix)/etc/3proxy/conf|g' -e 's|@3PROXY_COUNTERDIR@|/opt/3proxy|g' scripts/3proxy.cfg.in > $(DESTDIR)$(prefix)/etc/3proxy/3proxy.cfg; chmod 640 $(DESTDIR)$(prefix)/etc/3proxy/3proxy.cfg; fi
|
||||
if [ ! -d $(DESTDIR)/var/log/3proxy/ ]; then mkdir -p $(DESTDIR)/var/log/3proxy/; fi
|
||||
mkdir -p $(DESTDIR)/opt/3proxy
|
||||
touch $(DESTDIR)$(prefix)/etc/3proxy/conf/passwd
|
||||
touch $(DESTDIR)$(prefix)/etc/3proxy/conf/counters
|
||||
touch $(DESTDIR)$(prefix)/etc/3proxy/conf/bandlimiters
|
||||
install -d $(DESTDIR)$(MANDIR)/man8
|
||||
install -m 644 man/3proxy.8 $(DESTDIR)$(MANDIR)/man8/3proxy.8
|
||||
for f in proxy socks pop3p smtpp ftppr tcppm udppm tlspr; do \
|
||||
if [ -f man/$$f.8 ]; then install -m 644 man/$$f.8 $(DESTDIR)$(MANDIR)/man8/$(PREFIX)$$f.8; fi; \
|
||||
done
|
||||
install -m 644 man/3proxy_crypt.8 $(DESTDIR)$(MANDIR)/man8/$(CRYPT_PREFIX)crypt.8
|
||||
install -d $(DESTDIR)$(MANDIR)/man5
|
||||
install -m 644 man/3proxy.cfg.5 $(DESTDIR)$(MANDIR)/man5/3proxy.cfg.5
|
||||
@if [ "$(DESTDIR)" = "" ]; then \
|
||||
sh scripts/postinstall.sh $(prefix); \
|
||||
fi
|
||||
echo Run $(BINPREFIX)/add3proxyuser to add \'admin\' user
|
||||
|
||||
allplugins:
|
||||
@list='$(PLUGINS)'; for p in $$list; do cp Makefile Makefile.var plugins/$$p; cd plugins/$$p ; make ; cd ../.. ; done
|
||||
+79
-48
@@ -1,21 +1,22 @@
|
||||
#
|
||||
# 3 proxy Makefile for GCC/Linux/Cygwin
|
||||
#
|
||||
# You can try to remove -DWITH_STD_MALLOC to CFLAGS to use optimized malloc
|
||||
# libraries
|
||||
#
|
||||
# remove -DNOODBC from CFLAGS and add -lodbc to LIBS to compile with ODBC
|
||||
# add -DWITH_ODBC to CFLAGS and -lodbc to LIBS to compile with ODBC
|
||||
# library support. Add -DSAFESQL for poorely written ODBC library / drivers.
|
||||
|
||||
BUILDDIR = ../bin/
|
||||
CC = gcc
|
||||
PREFIX ?= 3proxy_
|
||||
CRYPT_PREFIX ?= $(PREFIX)
|
||||
CC ?= gcc
|
||||
|
||||
CFLAGS = -g -fPIC -O2 -fno-strict-aliasing -c -pthread -DWITHSPLICE -D_GNU_SOURCE -DGETHOSTBYNAME_R -D_THREAD_SAFE -D_REENTRANT -DNOODBC -DWITH_STD_MALLOC -DFD_SETSIZE=4096 -DWITH_POLL -DWITH_NETFILTER
|
||||
CFLAGS ?= -O3 -flto -fPIC
|
||||
CFLAGS += -fno-strict-aliasing -c -pthread -DWITHSPLICE -D_GNU_SOURCE -DGETHOSTBYNAME_R -D_THREAD_SAFE -D_REENTRANT -DFD_SETSIZE=4096 -DWITH_POLL -DWITH_NETFILTER -D WITH_UN
|
||||
COUT = -o
|
||||
LN = gcc
|
||||
DCFLAGS =
|
||||
LDFLAGS = -fPIE -O2 -fno-strict-aliasing -pthread
|
||||
DLFLAGS = -shared
|
||||
LN ?= ${CC}
|
||||
DCFLAGS ?=
|
||||
LDFLAGS ?= -O3 -flto -fPIC
|
||||
LDFLAGS += -fno-strict-aliasing -pthread
|
||||
DLFLAGS ?= -shared
|
||||
DLSUFFICS = .ld.so
|
||||
# -lpthreads may be reuqired on some platforms instead of -pthreads
|
||||
LIBSPREFIX = -l
|
||||
@@ -26,59 +27,89 @@ OBJSUFFICS = .o
|
||||
DEFINEOPTION = -D
|
||||
COMPFILES = *~
|
||||
REMOVECOMMAND = rm -f
|
||||
AFTERCLEAN = (find . -type f -name "*.o" -delete && find src/ -type f -name "Makefile.var" -delete && find bin/ -type f -executable -delete) || true
|
||||
TYPECOMMAND = cat
|
||||
COMPATLIBS =
|
||||
MAKEFILE = Makefile.Linux
|
||||
# PamAuth requires libpam, you may require pam-devel package to be installed
|
||||
# SSLPlugin requires -lcrypto -lssl
|
||||
#LIBS = -lcrypto -lssl -ldl
|
||||
LIBS = -ldl
|
||||
#PLUGINS = SSLPlugin StringsPlugin TrafficPlugin PCREPlugin TransparentPlugin PamAuth
|
||||
PLUGINS = StringsPlugin TrafficPlugin PCREPlugin TransparentPlugin
|
||||
PLUGINS ?= StringsPlugin TrafficPlugin TransparentPlugin FilePlugin
|
||||
ifeq ($(STATIC), true)
|
||||
LDFLAGS += -static
|
||||
CFLAGS += -DNOPLUGINS -DNOSTDRESOLVE -DNOCRYPT
|
||||
ZLIB = -lz -lzstd
|
||||
PLUGINS =
|
||||
PAM_CHECK = false
|
||||
else
|
||||
LIBS += -ldl
|
||||
endif
|
||||
ifeq ($(LIBSTATIC), true)
|
||||
STATIC_PREFIX = -Wl,-Bstatic
|
||||
STATIC_SUFFIX = -Wl,-Bdynamic
|
||||
ZLIB = -lz -lzstd
|
||||
endif
|
||||
|
||||
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)
|
||||
ifeq ($(OPENSSL_CHECK), true)
|
||||
LIBS += $(STATIC_PREFIX) $(ZLIB) -lcrypto -lssl $(STATIC_SUFFIX)
|
||||
CFLAGS += -DWITH_SSL
|
||||
SSL_OBJS = ssllib$(OBJSUFFICS) ssl$(OBJSUFFICS)
|
||||
else
|
||||
ZLIB :=
|
||||
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)
|
||||
ifeq ($(PCRE_CHECK), true)
|
||||
CFLAGS += -DWITH_PCRE
|
||||
PCRE_OBJS = pcre$(OBJSUFFICS)
|
||||
PCRE_LIBS = $(STATIC_PREFIX) -lpcre2-8 $(STATIC_SUFFIX)
|
||||
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)
|
||||
ifeq ($(PAM_CHECK), true)
|
||||
PLUGINS += PamAuth
|
||||
endif
|
||||
include Makefile.inc
|
||||
|
||||
allplugins:
|
||||
@list='$(PLUGINS)'; for p in $$list; do cp Makefile Makefile.var plugins/$$p; cd plugins/$$p ; make ; cd ../.. ; done
|
||||
|
||||
DESTDIR =
|
||||
prefix =
|
||||
exec_prefix = $(prefix)
|
||||
man_prefix = /usr/share
|
||||
chroot_prefix = /usr/local
|
||||
DESTDIR ?=
|
||||
prefix ?=
|
||||
exec_prefix ?= $(prefix)
|
||||
man_prefix ?= /usr/share
|
||||
chroot_prefix ?= /usr/local
|
||||
|
||||
INSTALL = /usr/bin/install
|
||||
INSTALL ?= /usr/bin/install
|
||||
INSTALL_BIN = $(INSTALL) -m 755
|
||||
INSTALL_DATA = $(INSTALL) -m 644
|
||||
INSTALL_OBJS = bin/3proxy \
|
||||
bin/ftppr \
|
||||
bin/mycrypt \
|
||||
bin/pop3p \
|
||||
bin/proxy \
|
||||
bin/socks \
|
||||
bin/tcppm \
|
||||
bin/udppm
|
||||
bin/$(CRYPT_PREFIX)crypt \
|
||||
bin/$(PREFIX)ftppr \
|
||||
bin/$(PREFIX)pop3p \
|
||||
bin/$(PREFIX)proxy \
|
||||
bin/$(PREFIX)smtpp \
|
||||
bin/$(PREFIX)socks \
|
||||
bin/$(PREFIX)tcppm \
|
||||
bin/$(PREFIX)tlspr \
|
||||
bin/$(PREFIX)udppm
|
||||
|
||||
|
||||
INSTALL_CFG = scripts/3proxy.cfg.chroot
|
||||
INSTALL_CFG_OBJS = scripts/3proxy.cfg \
|
||||
scripts/add3proxyuser.sh
|
||||
INSTALL_CFG_INCHROOT = scripts/3proxy.cfg.inchroot
|
||||
|
||||
INSTALL_CFG_OBJS2 = counters bandlimiters
|
||||
|
||||
INSTALL_INITD_SCRIPT = scripts/init.d/3proxy.sh
|
||||
INSTALL_SYSTEMD_SCRIPT = scripts/3proxy.service
|
||||
INSTALL_INITD_SCRIPT = scripts/init.d/3proxy.in
|
||||
INSTALL_SYSTEMD_SCRIPT = scripts/3proxy.service.in
|
||||
|
||||
CHROOTDIR = $(DESTDIR)$(chroot_prefix)/3proxy
|
||||
CHROOTREL = ../..$(chroot_prefix)/3proxy
|
||||
MANDIR1 = $(DESTDIR)$(man_prefix)/man/man1
|
||||
MANDIR3 = $(DESTDIR)$(man_prefix)/man/man3
|
||||
MANDIR5 = $(DESTDIR)$(man_prefix)/man/man5
|
||||
MANDIR8 = $(DESTDIR)$(man_prefix)/man/man8
|
||||
BINDIR = $(DESTDIR)$(exec_prefix)/bin
|
||||
ETCDIR = $(DESTDIR)/etc/3proxy
|
||||
INITDDIR = $(DESTDIR)/etc/init.d
|
||||
RUNBASE = $(DESTDIR)/var/run
|
||||
RUNDIR = $(RUNBASE)/3proxy
|
||||
LOGBASE = $(DESTDIR)/var/log
|
||||
LOGDIR = $(LOGBASE)/3proxy
|
||||
INSTALL_CFG_DEST = $(ETCDIR)/conf
|
||||
@@ -88,7 +119,7 @@ install-bin:
|
||||
$(INSTALL_BIN) -d $(BINDIR)
|
||||
$(INSTALL_BIN) -s $(INSTALL_OBJS) $(BINDIR)
|
||||
$(INSTALL_BIN) -s bin/*.ld.so $(CHROOTDIR)/libexec
|
||||
chmod -R a-w $(CHROOTDIR)/libexec
|
||||
$(INSTALL_BIN) scripts/add3proxyuser.sh.in $(BINDIR)/add3proxyuser
|
||||
|
||||
install-etc-dir:
|
||||
$(INSTALL_BIN) -d $(ETCDIR)
|
||||
@@ -99,13 +130,12 @@ install-chroot-dir:
|
||||
$(INSTALL_BIN) -d $(CHROOTDIR)/logs
|
||||
$(INSTALL_BIN) -d $(CHROOTDIR)/count
|
||||
$(INSTALL_BIN) -d $(CHROOTDIR)/libexec
|
||||
chmod -R o-rwx $(CHROOTDIR)
|
||||
|
||||
install-etc-default-config:
|
||||
install-etc-default-config: install-chroot-dir
|
||||
if [ ! -d $(INSTALL_CFG_DEST) ]; then \
|
||||
ln -s $(CHROOTREL)/conf $(INSTALL_CFG_DEST); \
|
||||
$(INSTALL_BIN) $(INSTALL_CFG) $(ETCDIR)/3proxy.cfg; \
|
||||
$(INSTALL_BIN) $(INSTALL_CFG_OBJS) $(INSTALL_CFG_DEST); \
|
||||
$(INSTALL_BIN) $(INSTALL_CFG_INCHROOT) $(INSTALL_CFG_DEST)/3proxy.cfg; \
|
||||
fi
|
||||
|
||||
install-etc: install-etc-dir install-etc-default-config
|
||||
@@ -115,19 +145,20 @@ install-etc: install-etc-dir install-etc-default-config
|
||||
done;
|
||||
|
||||
install-man:
|
||||
$(INSTALL_BIN) -d $(MANDIR3)
|
||||
$(INSTALL_BIN) -d $(MANDIR5)
|
||||
$(INSTALL_BIN) -d $(MANDIR8)
|
||||
$(INSTALL_DATA) man/*.3 $(MANDIR3)
|
||||
$(INSTALL_DATA) man/*.8 $(MANDIR8)
|
||||
$(INSTALL_DATA) man/3proxy.cfg.5 $(MANDIR5)
|
||||
$(INSTALL_DATA) man/3proxy.8 $(MANDIR8)
|
||||
for f in proxy socks pop3p smtpp ftppr tcppm udppm tlspr; do \
|
||||
if [ -f man/$$f.8 ]; then $(INSTALL_DATA) man/$$f.8 $(MANDIR8)/$(PREFIX)$$f.8; fi; \
|
||||
done
|
||||
$(INSTALL_DATA) man/3proxy_crypt.8 $(MANDIR8)/$(CRYPT_PREFIX)crypt.8
|
||||
|
||||
install-init:
|
||||
$(INSTALL_BIN) -d $(SYSTEMDDIR)
|
||||
sed -e 's|@CMAKE_INSTALL_FULL_BINDIR@|$(exec_prefix)/bin|g' -e 's|@CMAKE_INSTALL_FULL_SYSCONFDIR@|/etc|g' $(INSTALL_SYSTEMD_SCRIPT) > $(SYSTEMDDIR)/3proxy.service
|
||||
$(INSTALL_BIN) -d $(INITDDIR)
|
||||
$(INSTALL_BIN) $(INSTALL_INITD_SCRIPT) $(INITDDIR)/3proxy
|
||||
$(INSTALL_BIN) -d $(SYSTEMDDIR)
|
||||
$(INSTALL_DATA) $(INSTALL_SYSTEMD_SCRIPT) $(SYSTEMDDIR)
|
||||
|
||||
install-run:
|
||||
$(INSTALL_BIN) -d $(RUNDIR)
|
||||
|
||||
install-log:
|
||||
$(INSTALL_BIN) -d $(LOGBASE)
|
||||
@@ -135,8 +166,8 @@ install-log:
|
||||
ln -s $(CHROOTREL)/logs $(LOGDIR);\
|
||||
fi
|
||||
|
||||
install: install-chroot-dir install-bin install-etc install-log install-man install-run install-init
|
||||
install: install-chroot-dir install-bin install-etc install-log install-man install-init
|
||||
@if [ "$(DESTDIR)" = "" ]; then \
|
||||
sh scripts/debian/preinst; \
|
||||
sh scripts/debian/postinst; \
|
||||
sh debian/preinst; \
|
||||
sh debian/postinst; \
|
||||
fi
|
||||
+21
-7
@@ -1,17 +1,17 @@
|
||||
#
|
||||
# 3 proxy Makefile for Solaris/SunCC
|
||||
#
|
||||
# You can try to remove -DWITH_STD_MALLOC to CFLAGS to use optimized malloc
|
||||
# libraries
|
||||
#
|
||||
# remove -DNOODBC from CFLAGS and add -lodbc to LDFLAGS to compile with ODBC
|
||||
# add -DWITH_ODBC to CFLAGS and -lodbc to LDFLAGS to compile with ODBC
|
||||
# library support. Add -DSAFESQL for poorely written ODBC library / drivers.
|
||||
|
||||
BUILDDIR = ../bin/
|
||||
CC = cc
|
||||
CFLAGS = -xO3 -c -D_SOLARIS -D_THREAD_SAFE -DGETHOSTBYNAME_R -D_REENTRANT -DNOODBC -DWITH_STD_MALLOC -DFD_SETSIZE=4096 -DWITH_POLL
|
||||
PREFIX ?= 3proxy_
|
||||
CRYPT_PREFIX ?= $(PREFIX)
|
||||
CC ?= cc
|
||||
CFLAGS = -xO3 -c -D_SOLARIS -D_THREAD_SAFE -DGETHOSTBYNAME_R -D_REENTRANT -DFD_SETSIZE=4096 -DWITH_POLL
|
||||
COUT = -o ./
|
||||
LN = cc
|
||||
LN = $(CC)
|
||||
LDFLAGS = -xO3
|
||||
DCFLAGS = -fPIC
|
||||
DLFLAGS = -shared
|
||||
@@ -25,10 +25,24 @@ OBJSUFFICS = .o
|
||||
DEFINEOPTION = -D
|
||||
COMPFILES = *~
|
||||
REMOVECOMMAND = rm -f
|
||||
AFTERCLEAN = (find . -type f -name "*.o" -delete && find src/ -type f -name "Makefile.var" -delete && find bin/ -type f -executable -delete) || true
|
||||
TYPECOMMAND = cat
|
||||
COMPATLIBS =
|
||||
MAKEFILE = Makefile.Solaris
|
||||
PLUGINS = StringsPlugin TrafficPlugin PCREPlugin TransparentPlugin
|
||||
PLUGINS = StringsPlugin TrafficPlugin TransparentPlugin FilePlugin
|
||||
|
||||
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)
|
||||
ifeq ($(OPENSSL_CHECK), true)
|
||||
LIBS += -l crypto -l ssl
|
||||
CFLAGS += -DWITH_SSL
|
||||
SSL_OBJS = ssllib$(OBJSUFFICS) ssl$(OBJSUFFICS)
|
||||
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)
|
||||
ifeq ($(PCRE_CHECK), true)
|
||||
CFLAGS += -DWITH_PCRE
|
||||
PCRE_OBJS = pcre$(OBJSUFFICS)
|
||||
PCRE_LIBS = -Wl,-Bstatic -lpcre2-8 -Wl,-Bdynamic
|
||||
endif
|
||||
|
||||
include Makefile.inc
|
||||
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
#
|
||||
# 3 proxy Makefile for Solaris/gcc
|
||||
#
|
||||
# You can try to remove -DWITH_STD_MALLOC to CFLAGS to use optimized malloc
|
||||
# libraries
|
||||
#
|
||||
# remove -DNOODBC from CFLAGS and add -lodbc to LDFLAGS to compile with ODBC
|
||||
# library support. Add -DSAFESQL for poorely written ODBC library / drivers.
|
||||
|
||||
|
||||
BUILDDIR = ../bin/
|
||||
CC = gcc
|
||||
CFLAGS = -O2 -fno-strict-aliasing -c -D_SOLARIS -D_THREAD_SAFE -DGETHOSTBYNAME_R -D_REENTRANT -DNOODBC -DWITH_STD_MALLOC -DFD_SETSIZE=4096 -DWITH_POLL
|
||||
COUT = -o ./
|
||||
LN = gcc
|
||||
LDFLAGS = -O3
|
||||
DCFLAGS = -fPIC
|
||||
DLFLAGS = -shared
|
||||
DLSUFFICS = .ld.so
|
||||
LIBS = -lpthread -lsocket -lnsl -lresolv -ldl
|
||||
LIBSPREFIX = -l
|
||||
LIBSSUFFIX =
|
||||
LNOUT = -o ./
|
||||
EXESUFFICS =
|
||||
OBJSUFFICS = .o
|
||||
DEFINEOPTION = -D
|
||||
COMPFILES = *~
|
||||
REMOVECOMMAND = rm -f
|
||||
TYPECOMMAND = cat
|
||||
COMPATLIBS =
|
||||
MAKEFILE = Makefile.Solaris-gcc
|
||||
PLUGINS = StringsPlugin TrafficPlugin PCREPlugin
|
||||
|
||||
include Makefile.inc
|
||||
|
||||
allplugins:
|
||||
@list='$(PLUGINS)'; for p in $$list; do cp Makefile Makefile.var plugins/$$p; cd plugins/$$p ; make ; cd ../.. ; done
|
||||
@@ -1,2 +0,0 @@
|
||||
SUBDIRS = src man
|
||||
EXTRA_DIST = doc cfg
|
||||
@@ -1,26 +0,0 @@
|
||||
#
|
||||
# 3 proxy Makefile for Microsoft Visual C compiler (for both make and nmake)
|
||||
#
|
||||
# You can try to add /D "WITH_STD_MALLOC" to CFLAGS to use standard malloc
|
||||
# libraries
|
||||
|
||||
BUILDDIR = ../bin/
|
||||
CC = cl
|
||||
CFLAGS = /FD /MDd /nologo /W3 /ZI /Wp64 /GS /Gs /RTCsu /EHs- /GA /GF /DEBUG /D "WITH_STD_MALLOC" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_WIN32" /c
|
||||
COUT = /Fo
|
||||
LN = link
|
||||
LDFLAGS = /nologo /subsystem:console /machine:I386 /DEBUG
|
||||
LIBS = ws2_32.lib advapi32.lib odbc32.lib user32.lib
|
||||
LNOUT = /out:
|
||||
EXESUFFICS = .exe
|
||||
OBJSUFFICS = .obj
|
||||
DEFINEOPTION = /D
|
||||
COMPFILES = *.pch *.idb
|
||||
REMOVECOMMAND = del 2>NUL >NUL
|
||||
TYPECOMMAND = type
|
||||
COMPATLIBS =
|
||||
MAKEFILE = Makefile.debug
|
||||
|
||||
include Makefile.inc
|
||||
|
||||
allplugins:
|
||||
+4
-3
@@ -3,10 +3,11 @@
|
||||
#
|
||||
|
||||
all:
|
||||
$(TYPECOMMAND) $(MAKEFILE) > src/Makefile.var
|
||||
@$(TYPECOMMAND) $(MAKEFILE) > src/Makefile.var
|
||||
@cd src && $(MAKE)
|
||||
|
||||
clean:
|
||||
@$(REMOVECOMMAND) *$(OBJSUFFICS) $(COMPFILES)
|
||||
@cd src && $(MAKE) clean
|
||||
@cd src && $(REMOVECOMMAND) *$(OBJSUFFICS) $(COMPFILES) && cd ..
|
||||
@$(AFTERCLEAN)
|
||||
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
#
|
||||
# 3 proxy Makefile for Intel C compiler for Windows (for both make and nmake)
|
||||
#
|
||||
# You can try to remove -DWITH_STD_MALLOC to CFLAGS to use optimized malloc
|
||||
# libraries
|
||||
#
|
||||
# Add /DSAFESQL to CFLAGS if you are using poorely written/tested ODBC driver
|
||||
|
||||
|
||||
BUILDDIR = ../bin/
|
||||
CC = icl
|
||||
CFLAGS = /nologo /MD /W3 /G6 /GX /O2 /D "WITH_STD_MALLOC" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_WIN32" /Fp"proxy.pch" /YX /FD /c
|
||||
COUT = /Fo
|
||||
LN = xilink
|
||||
LDFLAGS = /nologo /subsystem:console /incremental:no /machine:I386
|
||||
LIBS = ws2_32.lib advapi32.lib odbc32.lib user32.lib
|
||||
DLFLAGS = /DLL
|
||||
DLSUFFICS = .dll
|
||||
LNOUT = /out:
|
||||
EXESUFFICS = .exe
|
||||
OBJSUFFICS = .obj
|
||||
DEFINEOPTION = /D
|
||||
COMPFILES = *.pch *.idb
|
||||
REMOVECOMMAND = del 2>NUL
|
||||
TYPECOMMAND = type
|
||||
COMPATLIBS =
|
||||
MAKEFILE = Makefile.intl
|
||||
PLUGINS = WindowsAuthentication TrafficPlugin PCREPlugin
|
||||
|
||||
include Makefile.inc
|
||||
|
||||
allplugins:
|
||||
for /D %%i in ($(PLUGINS)) do (copy Makefile Makefile.var plugins\%%i && cd plugins\%%i && nmake && del *.obj *.idb &&cd ..\..)
|
||||
@@ -1,36 +0,0 @@
|
||||
#
|
||||
# 3 proxy Makefile for GCC/windows
|
||||
#
|
||||
# You can try to remove -DWITH_STD_MALLOC to CFLAGS to use optimized malloc
|
||||
# libraries
|
||||
#
|
||||
# remove -DNOODBC from CFLAGS and add -lodbc to LDFLAGS to compile with ODBC
|
||||
# library support
|
||||
|
||||
|
||||
BUILDDIR = ../bin/
|
||||
CC = clang
|
||||
CFLAGS = -O2 -fno-strict-aliasing -c -pthread -static -DWITH_STD_MALLOC -DNOIPV6
|
||||
COUT = -o
|
||||
LN = clang
|
||||
LDFLAGS = -O2 -fno-strict-aliasing -static -s
|
||||
DLFLAGS = -shared
|
||||
DLSUFFICS = .dll
|
||||
LIBS = -lws2_32 -lodbc32 -ladvapi32
|
||||
LIBSPREFIX = -l
|
||||
LIBSSUFFIX =
|
||||
LNOUT = -o
|
||||
EXESUFFICS = .exe
|
||||
OBJSUFFICS = .o
|
||||
DEFINEOPTION = -D
|
||||
COMPFILES = *.tmp
|
||||
REMOVECOMMAND = rm -f
|
||||
TYPECOMMAND = cat
|
||||
COMPATLIBS =
|
||||
MAKEFILE = Makefile.win
|
||||
PLUGINS = utf8tocp1251 WindowsAuthentication TrafficPlugin StringsPlugin PCREPlugin
|
||||
|
||||
include Makefile.inc
|
||||
|
||||
allplugins:
|
||||
for /D %%i in ($(PLUGINS)) do (copy Makefile plugins\%%i && copy Makefile.var plugins\%%i && cd plugins\%%i && nmake && del *.o &&cd ..\..)
|
||||
+20
-20
@@ -1,46 +1,46 @@
|
||||
#
|
||||
# 3 proxy Makefile for Microsoft Visual C compiler (for both make and nmake)
|
||||
#
|
||||
# You can try to remove -DWITH_STD_MALLOC to CFLAGS to use optimized malloc
|
||||
# libraries
|
||||
#
|
||||
# ODBC support is enabled by default on Windows (/D WITH_ODBC, odbc32.lib)
|
||||
# Add /DSAFESQL to CFLAGS if you are using poorely written/tested ODBC driver
|
||||
|
||||
BUILDDIR = ../bin/
|
||||
PREFIX = 3proxy_
|
||||
CRYPT_PREFIX = 3proxy_
|
||||
CC = cl
|
||||
CFLAGS = /nologo /MT /W3 /Ox /GS /EHs- /GA /GF /D "MSVC" /D "WITH_STD_MALLOC" /D "WITH_WSAPOLL" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_WIN32" /D "PRINTF_INT64_MODIFIER=\"I64\"" /Fp"proxy.pch" /FD /c $(VERSION) $(BUILDDATE)
|
||||
VERSION = $(VERSION)
|
||||
BUILDDATE = $(BUILDDATE)
|
||||
CFLAGS = /nologo /MT /W3 /Ox /GS /EHs- /GA /GF /D "MSVC" /D "WITH_WSAPOLL" /D "NDEBUG" /D "WIN32" /D "WITH_SSL" /D "WITH_PCRE" /D "WITH_ODBC" /D "_CONSOLE" /D "_MBCS" /D "_WIN32" /Fp"proxy.pch" /FD /c $(BUILDDATE) $(VERSION)
|
||||
COUT = /Fo
|
||||
LN = link
|
||||
LDFLAGS = /nologo /subsystem:console /incremental:no /machine:I386
|
||||
LDFLAGS = /nologo /subsystem:console /incremental:no
|
||||
DLFLAGS = /DLL
|
||||
DLSUFFICS = .dll
|
||||
LIBS = ws2_32.lib advapi32.lib odbc32.lib user32.lib kernel32.lib Gdi32.lib libeay32.lib ssleay32.lib
|
||||
LIBSOLD = libeay32MT.lib ssleay32MT.lib
|
||||
LIBSPREFIX =
|
||||
LIBS = ws2_32.lib advapi32.lib odbc32.lib user32.lib kernel32.lib Gdi32.lib Crypt32.lib libcrypto.lib libssl.lib pcre2-8.lib
|
||||
LIBSPREFIX =
|
||||
LIBSSUFFIX = .lib
|
||||
LIBEXT = .lib
|
||||
LIBEXT = .lib
|
||||
LNOUT = /out:
|
||||
EXESUFFICS = .exe
|
||||
OBJSUFFICS = .obj
|
||||
DEFINEOPTION = /D
|
||||
DEFINEOPTION = /D
|
||||
COMPFILES = *.pch *.idb
|
||||
REMOVECOMMAND = del 2>NUL >NUL
|
||||
REMOVECOMMAND = del
|
||||
TYPECOMMAND = type
|
||||
COMPATLIBS =
|
||||
MAKEFILE = Makefile.msvc
|
||||
PLUGINS = utf8tocp1251 WindowsAuthentication TrafficPlugin StringsPlugin PCREPlugin FilePlugin SSLPlugin
|
||||
VERFILE = $(VERFILE)
|
||||
VERSION = $(VERSION)
|
||||
BUILDDATE = $(BUILDDATE)
|
||||
|
||||
PLUGINS = utf8tocp1251 WindowsAuthentication TrafficPlugin StringsPlugin FilePlugin
|
||||
SSL_OBJS = ssllib$(OBJSUFFICS) ssl$(OBJSUFFICS)
|
||||
PCRE_OBJS = pcre$(OBJSUFFICS)
|
||||
VERFILE = 3proxy.res $(VERFILE)
|
||||
VERSIONDEP = 3proxy.res $(VERSIONDEP)
|
||||
AFTERCLEAN = if exist src\*.res (del src\*.res) && if exist src\*.err (del src\*.err)
|
||||
|
||||
include Makefile.inc
|
||||
|
||||
../3proxy.res:
|
||||
rc /fo../3proxy.res ../3proxy.rc $(VERSION) $(BUILDDATE)
|
||||
|
||||
3proxyres.obj: ../3proxy.res
|
||||
cvtres /out:3proxyres.obj /MACHINE:I386 ../3proxy.res
|
||||
3proxy.res:
|
||||
rc 3proxy.rc
|
||||
|
||||
allplugins:
|
||||
for /D %%i in ($(PLUGINS)) do (copy Makefile plugins\%%i && copy Makefile.var plugins\%%i && cd plugins\%%i && nmake && del *.obj *.idb &&cd ..\..)
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
#
|
||||
# 3 proxy Makefile for Microsoft Visual C compiler (for both make and nmake)
|
||||
#
|
||||
# You can try to remove -DWITH_STD_MALLOC to CFLAGS to use optimized malloc
|
||||
# libraries
|
||||
#
|
||||
# Add /DSAFESQL to CFLAGS if you are using poorely written/tested ODBC driver
|
||||
|
||||
BUILDDIR = ../bin64/
|
||||
CC = cl
|
||||
CFLAGS = /nologo /MT /W3 /Ox /EHs- /GS /GA /GF /D "MSVC" /D "WITH_STD_MALLOC" /D "WITH_WSAPOLL" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_WIN32" /D "PRINTF_INT64_MODIFIER=\"I64\"" /Fp"proxy.pch" /FD /c $(VERSION) $(BUILDDATE)
|
||||
COUT = /Fo
|
||||
LN = link
|
||||
LDFLAGS = /nologo /subsystem:console /incremental:no /machine:x64
|
||||
DLFLAGS = /DLL
|
||||
DLSUFFICS = .dll
|
||||
LIBS = ws2_32.lib advapi32.lib odbc32.lib user32.lib kernel32.lib Gdi32.lib libeay32.lib ssleay32.lib
|
||||
LIBSOLD = libeay32.lib ssleay32.lib
|
||||
LIBSPREFIX =
|
||||
LIBSSUFFIX = .lib
|
||||
LIBEXT = .lib
|
||||
LNOUT = /out:
|
||||
EXESUFFICS = .exe
|
||||
OBJSUFFICS = .obj
|
||||
DEFINEOPTION = /D
|
||||
COMPFILES = *.pch *.idb
|
||||
REMOVECOMMAND = del 2>NUL >NUL
|
||||
TYPECOMMAND = type
|
||||
COMPATLIBS =
|
||||
MAKEFILE = Makefile.msvc64
|
||||
PLUGINS = utf8tocp1251 WindowsAuthentication TrafficPlugin StringsPlugin PCREPlugin FilePlugin SSLPlugin
|
||||
VERFILE = $(VERFILE)
|
||||
|
||||
#../3proxy.res:
|
||||
# rc /fo../3proxy.res ../3proxy.rc
|
||||
|
||||
#3proxyres.obj: ../3proxy.res
|
||||
# cvtres /out:3proxyres.obj /MACHINE:X64 ../3proxy.res
|
||||
|
||||
include Makefile.inc
|
||||
|
||||
../3proxy.res:
|
||||
rc /fo../3proxy.res ../3proxy.rc $(VERSION) $(BUILDDATE)
|
||||
|
||||
3proxyres.obj: ../3proxy.res
|
||||
cvtres /out:3proxyres.obj /machine:x64 ../3proxy.res
|
||||
|
||||
|
||||
allplugins:
|
||||
for /D %%i in ($(PLUGINS)) do (copy Makefile plugins\%%i && copy Makefile.var plugins\%%i && cd plugins\%%i && nmake && del *.obj *.idb &&cd ..\..)
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
#
|
||||
# 3 proxy Makefile for Microsoft Visual C compiler (for both make and nmake)
|
||||
#
|
||||
# You can try to remove -DWITH_STD_MALLOC to CFLAGS to use optimized malloc
|
||||
# libraries
|
||||
#
|
||||
# Add /DSAFESQL to CFLAGS if you are using poorely written/tested ODBC driver
|
||||
|
||||
BUILDDIR = ../bin64/
|
||||
CC = cl
|
||||
CFLAGS = /nologo /MT /W3 /Ox /EHs- /GS /GA /GF /D "MSVC" /D "WITH_STD_MALLOC" /D "WITH_WSAPOLL" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_WIN32" /D "PRINTF_INT64_MODIFIER=\"I64\"" /Fp"proxy.pch" /FD /c $(VERSION) $(BUILDDATE)
|
||||
COUT = /Fo
|
||||
LN = link
|
||||
LDFLAGS = /nologo /subsystem:console /incremental:no /machine:arm64
|
||||
DLFLAGS = /DLL
|
||||
DLSUFFICS = .dll
|
||||
LIBS = ws2_32.lib advapi32.lib odbc32.lib user32.lib kernel32.lib Gdi32.lib
|
||||
LIBSOLD =
|
||||
LIBSPREFIX =
|
||||
LIBSSUFFIX = .lib
|
||||
LIBEXT = .lib
|
||||
LNOUT = /out:
|
||||
EXESUFFICS = .exe
|
||||
OBJSUFFICS = .obj
|
||||
DEFINEOPTION = /D
|
||||
COMPFILES = *.pch *.idb
|
||||
REMOVECOMMAND = del 2>NUL >NUL
|
||||
TYPECOMMAND = type
|
||||
COMPATLIBS =
|
||||
MAKEFILE = Makefile.msvcARM64
|
||||
PLUGINS = utf8tocp1251 WindowsAuthentication TrafficPlugin StringsPlugin PCREPlugin FilePlugin
|
||||
VERFILE = $(VERFILE)
|
||||
|
||||
#../3proxy.res:
|
||||
# rc /fo../3proxy.res ../3proxy.rc
|
||||
|
||||
#3proxyres.obj: ../3proxy.res
|
||||
# cvtres /out:3proxyres.obj /MACHINE:X64 ../3proxy.res
|
||||
|
||||
include Makefile.inc
|
||||
|
||||
../3proxy.res:
|
||||
rc /fo../3proxy.res ../3proxy.rc $(VERSION) $(BUILDDATE)
|
||||
|
||||
3proxyres.obj: ../3proxy.res
|
||||
cvtres /out:3proxyres.obj /machine:x64 ../3proxy.res
|
||||
|
||||
|
||||
allplugins:
|
||||
for /D %%i in ($(PLUGINS)) do (copy Makefile plugins\%%i && copy Makefile.var plugins\%%i && cd plugins\%%i && nmake && del *.obj *.idb &&cd ..\..)
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
#
|
||||
# 3 proxy Makefile for Microsoft Visual C compiler (for both make and nmake)
|
||||
#
|
||||
# You can try to remove -DWITH_STD_MALLOC to CFLAGS to use optimized malloc
|
||||
# libraries
|
||||
#
|
||||
# Add /DSAFESQL to CFLAGS if you are using poorely written/tested ODBC driver
|
||||
|
||||
BUILDDIR = ../bin/
|
||||
CC = cl
|
||||
CFLAGS = /DARM /D "NOODBC" /nologo /MT /W3 /Wp64 /Ox /GS /EHs- /GA /GF /D "MSVC" /D "_WINCE" /D "WITH_STD_MALLOC" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_WIN32" /D "PRINTF_INT64_MODIFIER=\"I64\"" /Fp"proxy.pch" /FD /c
|
||||
COUT = /Fo
|
||||
LN = link
|
||||
LDFLAGS = /nologo /subsystem:console /incremental:no
|
||||
DLFLAGS = /DLL
|
||||
DLSUFFICS = .dll
|
||||
LIBS = ws2_32.lib advapi32.lib odbc32.lib user32.lib
|
||||
LIBEXT = .lib
|
||||
LNOUT = /out:
|
||||
EXESUFFICS = .exe
|
||||
OBJSUFFICS = .obj
|
||||
DEFINEOPTION = /D
|
||||
COMPFILES = *.pch *.idb
|
||||
REMOVECOMMAND = del 2>NUL >NUL
|
||||
TYPECOMMAND = type
|
||||
COMPATLIBS =
|
||||
MAKEFILE = Makefile.msvc
|
||||
PLUGINS = WindowsAuthentication TrafficPlugin StringsPlugin PCREPlugin
|
||||
|
||||
|
||||
include Makefile.inc
|
||||
|
||||
allplugins:
|
||||
for /D %%i in ($(PLUGINS)) do (copy Makefile plugins\%%i && copy Makefile.var plugins\%%i && cd plugins\%%i && nmake && del *.obj *.idb &&cd ..\..)
|
||||
|
||||
@@ -1,101 +0,0 @@
|
||||
#
|
||||
# 3 proxy Makefile for GCC/Linux/Cygwin
|
||||
#
|
||||
# You can try to remove -DWITH_STD_MALLOC to CFLAGS to use optimized malloc
|
||||
# libraries
|
||||
#
|
||||
# remove -DNOODBC from CFLAGS and add -lodbc to LIBS to compile with ODBC
|
||||
# library support. Add -DSAFESQL for poorely written ODBC library / drivers.
|
||||
|
||||
BUILDDIR = ../bin/
|
||||
CC = mips-openwrt-linux-gcc
|
||||
|
||||
CFLAGS = -g -O2 -fno-strict-aliasing -c -pthread -DGETHOSTBYNAME_R -D_THREAD_SAFE -D_REENTRANT -DNOODBC -DWITH_STD_MALLOC -DFD_SETSIZE=4096 -DWITH_POLL -DWITH_NETFILTER
|
||||
COUT = -o
|
||||
LN = mips-openwrt-linux-gcc
|
||||
DCFLAGS = -fPIC
|
||||
LDFLAGS = -O2 -fno-strict-aliasing -pthread -s
|
||||
DLFLAGS = -shared
|
||||
DLSUFFICS = .ld.so
|
||||
# -lpthreads may be reuqired on some platforms instead of -pthreads
|
||||
LIBSPREFIX = -l
|
||||
LIBSSUFFIX =
|
||||
LNOUT = -o
|
||||
EXESUFFICS =
|
||||
OBJSUFFICS = .o
|
||||
DEFINEOPTION = -D
|
||||
COMPFILES = *~
|
||||
REMOVECOMMAND = rm -f
|
||||
TYPECOMMAND = cat
|
||||
COMPATLIBS =
|
||||
MAKEFILE = Makefile.openwrt-mips
|
||||
# PamAuth requires libpam, you may require pam-devel package to be installed
|
||||
# SSLPlugin requires -lcrypto -lssl
|
||||
#LIBS = -lcrypto -lssl -ldl
|
||||
LIBS = -ldl
|
||||
#PLUGINS = SSLPlugin StringsPlugin TrafficPlugin PCREPlugin TransparentPlugin PamAuth
|
||||
PLUGINS = StringsPlugin TrafficPlugin PCREPlugin TransparentPlugin
|
||||
|
||||
include Makefile.inc
|
||||
|
||||
allplugins:
|
||||
@list='$(PLUGINS)'; for p in $$list; do cp Makefile Makefile.var plugins/$$p; cd plugins/$$p ; make ; cd ../.. ; done
|
||||
|
||||
DESTDIR =
|
||||
prefix = /usr/local
|
||||
exec_prefix = $(prefix)
|
||||
man_prefix = $(prefix)/share
|
||||
|
||||
INSTALL = /usr/bin/install
|
||||
INSTALL_BIN = $(INSTALL) -m 755
|
||||
INSTALL_DATA = $(INSTALL) -m 644
|
||||
INSTALL_OBJS = src/3proxy \
|
||||
src/ftppr \
|
||||
src/mycrypt \
|
||||
src/pop3p \
|
||||
src/proxy \
|
||||
src/socks \
|
||||
src/tcppm \
|
||||
src/udppm
|
||||
|
||||
|
||||
INSTALL_CFG_OBJS = scripts/3proxy.cfg \
|
||||
scripts/add3proxyuser.sh
|
||||
INSTALL_CFG_DEST = config
|
||||
|
||||
INSTALL_CFG_OBJS2 = passwd counters bandlimiters
|
||||
|
||||
MANDIR1 = $(DESTDIR)$(man_prefix)/man/man1
|
||||
MANDIR3 = $(DESTDIR)$(man_prefix)/man/man3
|
||||
MANDIR8 = $(DESTDIR)$(man_prefix)/man/man8
|
||||
BINDIR = $(DESTDIR)$(exec_prefix)/bin
|
||||
ETCDIR = $(DESTDIR)$(prefix)/etc/3proxy
|
||||
|
||||
install-bin:
|
||||
$(INSTALL_BIN) -d $(BINDIR)
|
||||
$(INSTALL_BIN) -s $(INSTALL_OBJS) $(BINDIR)
|
||||
|
||||
install-etc-dir:
|
||||
$(INSTALL_BIN) -d $(ETCDIR)
|
||||
|
||||
install-etc-default-config:
|
||||
if [ -f $(ETCDIR)/$(INSTALL_CFG_DEST) ]; then \
|
||||
: ; \
|
||||
else \
|
||||
$(INSTALL_DATA) $(INSTALL_CFG_OBJS) $(ETCDIR)/$(INSTALL_CFG_DEST) \
|
||||
fi
|
||||
|
||||
install-etc: install-etc-dir
|
||||
for file in $(INSTALL_CFG_OBJS2); \
|
||||
do \
|
||||
touch $(ETCDIR)/$$file; chmod 0600 $(ETCDIR)/$$file; \
|
||||
done;
|
||||
|
||||
install-man:
|
||||
$(INSTALL_BIN) -d $(MANDIR3)
|
||||
$(INSTALL_BIN) -d $(MANDIR8)
|
||||
$(INSTALL_DATA) man/*.3 $(MANDIR3)
|
||||
$(INSTALL_DATA) man/*.8 $(MANDIR8)
|
||||
|
||||
install: install-bin install-etc install-man
|
||||
|
||||
+81
-30
@@ -1,59 +1,110 @@
|
||||
#
|
||||
# 3 proxy Makefile for GCC/Unix
|
||||
#
|
||||
# You can try to remove -DWITH_STD_MALLOC to CFLAGS to use optimized malloc
|
||||
# libraries
|
||||
#
|
||||
# remove -DNOODBC from CFLAGS and add -lodbc to LDFLAGS to compile with ODBC
|
||||
# add -DWITH_ODBC to CFLAGS and -lodbc to LDFLAGS to compile with ODBC
|
||||
# library support. Add -DSAFESQL for poorely written ODBC library / drivers.
|
||||
|
||||
BUILDDIR = ../bin/
|
||||
CC = gcc
|
||||
PREFIX ?= 3proxy_
|
||||
CRYPT_PREFIX ?= $(PREFIX)
|
||||
MANDIR ?= /usr/share/man
|
||||
CC ?= gcc
|
||||
|
||||
# you may need -L/usr/pkg/lib for older NetBSD versions
|
||||
CFLAGS = -g -O2 -fno-strict-aliasing -c -pthread -D_THREAD_SAFE -D_REENTRANT -DNOODBC -DWITH_STD_MALLOC -DFD_SETSIZE=4096 -DWITH_POLL
|
||||
CFLAGS ?= -O3 -flto
|
||||
CFLAGS += -fno-strict-aliasing -c -pthread -D_THREAD_SAFE -D_REENTRANT -DFD_SETSIZE=4096 -DWITH_POLL -DWITH_UN
|
||||
COUT = -o
|
||||
LN = gcc
|
||||
LDFLAGS = -O2 -fno-strict-aliasing -pthread
|
||||
LN ?= $(CC)
|
||||
LDFLAGS ?= -O3 -flto
|
||||
LDFLAGS += -pthread -fno-strict-aliasing
|
||||
# -lpthreads may be reuqired on some platforms instead of -pthreads
|
||||
# -ldl or -lld may be required for some platforms
|
||||
DCFLAGS = -fPIC
|
||||
DLFLAGS = -shared
|
||||
DLSUFFICS = .ld.so
|
||||
LIBS =
|
||||
LIBSPREFIX = -l
|
||||
LIBSSUFFIX =
|
||||
DCFLAGS ?= -fPIC
|
||||
DLFLAGS ?= -shared
|
||||
DLSUFFICS ?= .ld.so
|
||||
LIBS ?=
|
||||
LIBSPREFIX ?= -l
|
||||
LIBSSUFFIX ?=
|
||||
LNOUT = -o
|
||||
EXESUFFICS =
|
||||
OBJSUFFICS = .o
|
||||
DEFINEOPTION = -D
|
||||
COMPFILES = *~
|
||||
REMOVECOMMAND = rm -f
|
||||
AFTERCLEAN = (find . -type f -name "*.o" -delete && find src/ -type f -name "Makefile.var" -delete && find bin/ -type f -executable -delete) || true
|
||||
TYPECOMMAND = cat
|
||||
COMPATLIBS =
|
||||
MAKEFILE = Makefile.unix
|
||||
PLUGINS = StringsPlugin TrafficPlugin PCREPlugin PamAuth TransparentPlugin
|
||||
PLUGINS ?= StringsPlugin TrafficPlugin TransparentPlugin FilePlugin
|
||||
ifeq ($(STATIC), true)
|
||||
LDFLAGS += -static
|
||||
CFLAGS += -DNOPLUGINS -DNOSTDRESOLVE -DNOCRYPT
|
||||
ZLIB = -lz -lzstd
|
||||
PLUGINS =
|
||||
PAM_CHECK = false
|
||||
endif
|
||||
ifeq ($(LIBSTATIC), true)
|
||||
STATIC_PREFIX = -Wl,-Bstatic
|
||||
STATIC_SUFFIX = -Wl,-Bdynamic
|
||||
ZLIB = -lz -lzstd
|
||||
endif
|
||||
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)
|
||||
ifeq ($(OPENSSL_CHECK), true)
|
||||
LIBS += $(STATIC_PREFIX) $(ZLIB) -lcrypto -lssl $(STATIC_SUFFIX)
|
||||
CFLAGS += -DWITH_SSL
|
||||
SSL_OBJS = ssllib$(OBJSUFFICS) ssl$(OBJSUFFICS)
|
||||
else
|
||||
ZLIB :=
|
||||
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)
|
||||
ifeq ($(PCRE_CHECK), true)
|
||||
CFLAGS += -DWITH_PCRE
|
||||
PCRE_OBJS = pcre$(OBJSUFFICS)
|
||||
PCRE_LIBS = $(STATIC_PREFIX) -lpcre2-8 $(STATIC_SUFFIX)
|
||||
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)
|
||||
ifeq ($(PAM_CHECK), true)
|
||||
PLUGINS += PamAuth
|
||||
endif
|
||||
|
||||
include Makefile.inc
|
||||
|
||||
DESTDIR ?=
|
||||
prefix ?= /usr/local
|
||||
BINPREFIX ?= $(prefix)/bin
|
||||
|
||||
install: all
|
||||
if [ ! -d /usr/local/etc/3proxy/bin ]; then mkdir -p /usr/local/etc/3proxy/bin/; fi
|
||||
install bin/3proxy /usr/local/etc/3proxy/bin/3proxy
|
||||
install bin/mycrypt /usr/local/etc/3proxy/bin/mycrypt
|
||||
install scripts/rc.d/proxy.sh /usr/local/etc/rc.d/proxy.sh
|
||||
install scripts/add3proxyuser.sh /usr/local/etc/3proxy/bin/
|
||||
if [ -s /usr/local/etc/3proxy/3proxy.cfg ]; then
|
||||
echo /usr/local/etc/3proxy/3proxy.cfg already exists
|
||||
else
|
||||
install scripts/3proxy.cfg /usr/local/etc/3proxy/
|
||||
if [ ! -d /var/log/3proxy/ ]; then
|
||||
mkdir /var/log/3proxy/
|
||||
fi
|
||||
touch /usr/local/etc/3proxy/passwd
|
||||
touch /usr/local/etc/3proxy/counters
|
||||
touch /usr/local/etc/3proxy/bandlimiters
|
||||
echo Run /usr/local/etc/3proxy/bin/add3proxyuser.sh to add \'admin\' user
|
||||
if [ ! -d "$(DESTDIR)$(BINPREFIX)" ]; then mkdir -p $(DESTDIR)$(BINPREFIX)/; fi
|
||||
install bin/3proxy $(DESTDIR)$(BINPREFIX)/3proxy
|
||||
install bin/$(CRYPT_PREFIX)crypt $(DESTDIR)$(BINPREFIX)/$(CRYPT_PREFIX)crypt
|
||||
for f in proxy socks pop3p smtpp ftppr tcppm udppm tlspr; do \
|
||||
if [ -f bin/$(PREFIX)$$f ]; then install bin/$(PREFIX)$$f $(DESTDIR)$(BINPREFIX)/$(PREFIX)$$f; fi; \
|
||||
done
|
||||
install -d $(DESTDIR)$(prefix)/etc/3proxy/conf
|
||||
install -d $(DESTDIR)$(prefix)/etc/rc.d/
|
||||
sed -e 's|@CMAKE_INSTALL_FULL_BINDIR@|$(BINPREFIX)|g' -e 's|@CMAKE_INSTALL_FULL_SYSCONFDIR@|$(prefix)/etc|g' scripts/rc.d/3proxy.in > $(DESTDIR)$(prefix)/etc/rc.d/3proxy
|
||||
chmod 755 $(DESTDIR)$(prefix)/etc/rc.d/3proxy
|
||||
sed -e 's|@CMAKE_INSTALL_FULL_BINDIR@|$(BINPREFIX)|g' -e 's|@3PROXY_CONFDIR@|$(prefix)/etc/3proxy/conf|g' -e 's|@CRYPT_PREFIX@|$(CRYPT_PREFIX)|g' scripts/add3proxyuser.sh.in > $(DESTDIR)$(BINPREFIX)/add3proxyuser
|
||||
chmod 755 $(DESTDIR)$(BINPREFIX)/add3proxyuser
|
||||
if [ -s $(DESTDIR)$(prefix)/etc/3proxy/3proxy.cfg ]; then echo $(prefix)/etc/3proxy/3proxy.cfg already exists; else sed -e 's|@CMAKE_INSTALL_FULL_SYSCONFDIR@|$(prefix)/etc|g' -e 's|@3PROXY_CONFDIR@|$(prefix)/etc/3proxy/conf|g' -e 's|@3PROXY_COUNTERDIR@|/opt/3proxy|g' scripts/3proxy.cfg.in > $(DESTDIR)$(prefix)/etc/3proxy/3proxy.cfg; chmod 640 $(DESTDIR)$(prefix)/etc/3proxy/3proxy.cfg; fi
|
||||
if [ ! -d $(DESTDIR)/var/log/3proxy/ ]; then mkdir -p $(DESTDIR)/var/log/3proxy/; fi
|
||||
mkdir -p $(DESTDIR)/opt/3proxy
|
||||
touch $(DESTDIR)$(prefix)/etc/3proxy/conf/passwd
|
||||
touch $(DESTDIR)$(prefix)/etc/3proxy/conf/counters
|
||||
touch $(DESTDIR)$(prefix)/etc/3proxy/conf/bandlimiters
|
||||
install -d $(DESTDIR)$(MANDIR)/man8
|
||||
install -m 644 man/3proxy.8 $(DESTDIR)$(MANDIR)/man8/3proxy.8
|
||||
for f in proxy socks pop3p smtpp ftppr tcppm udppm tlspr; do \
|
||||
if [ -f man/$$f.8 ]; then install -m 644 man/$$f.8 $(DESTDIR)$(MANDIR)/man8/$(PREFIX)$$f.8; fi; \
|
||||
done
|
||||
install -m 644 man/3proxy_crypt.8 $(DESTDIR)$(MANDIR)/man8/$(CRYPT_PREFIX)crypt.8
|
||||
install -d $(DESTDIR)$(MANDIR)/man5
|
||||
install -m 644 man/3proxy.cfg.5 $(DESTDIR)$(MANDIR)/man5/3proxy.cfg.5
|
||||
@if [ "$(DESTDIR)" = "" ]; then \
|
||||
sh scripts/postinstall.sh $(prefix); \
|
||||
fi
|
||||
echo Run $(BINPREFIX)/add3proxyuser to add \'admin\' user
|
||||
|
||||
allplugins:
|
||||
@list='$(PLUGINS)'; for p in $$list; do cp Makefile Makefile.var plugins/$$p; cd plugins/$$p ; make ; cd ../.. ; done
|
||||
@@ -1,59 +0,0 @@
|
||||
DESTDIR =
|
||||
prefix = /usr/local
|
||||
exec_prefix = $(prefix)
|
||||
man_prefix = $(prefix)/share
|
||||
|
||||
INSTALL = /usr/bin/install
|
||||
INSTALL_BIN = $(INSTALL) -m 755
|
||||
INSTALL_DATA = $(INSTALL) -m 644
|
||||
INSTALL_OBJS = bin/3proxy \
|
||||
bin/ftppr \
|
||||
bin/mycrypt \
|
||||
bin/pop3p \
|
||||
bin/proxy \
|
||||
bin/socks \
|
||||
bin/tcppm \
|
||||
bin/udppm \
|
||||
scripts/add3proxyuser.sh
|
||||
|
||||
INSTALL_CFG_OBJS = scripts/3proxy.cfg
|
||||
INSTALL_CFG_DEST = config
|
||||
|
||||
INSTALL_CFG_OBJS2 = passwd counters bandlimiters
|
||||
|
||||
MANDIR1 = $(DESTDIR)$(man_prefix)/man/man1
|
||||
MANDIR3 = $(DESTDIR)$(man_prefix)/man/man3
|
||||
MANDIR8 = $(DESTDIR)$(man_prefix)/man/man8
|
||||
BINDIR = $(DESTDIR)$(exec_prefix)/bin
|
||||
ETCDIR = $(DESTDIR)$(prefix)/etc/3proxy
|
||||
|
||||
install-bin:
|
||||
$(INSTALL_BIN) -d $(BINDIR)
|
||||
$(INSTALL_BIN) -s $(INSTALL_OBJS) $(BINDIR)
|
||||
|
||||
install-etc-dir:
|
||||
$(INSTALL_BIN) -d $(ETCDIR)
|
||||
|
||||
install-etc-default-config:
|
||||
if [ -f $(ETCDIR)/$(INSTALL_CFG_DEST) ]; then \
|
||||
: ; \
|
||||
else \
|
||||
$(INSTALL_DATA) $(INSTALL_CFG_OBJS) $(ETCDIR)/$(INSTALL_CFG_DEST) \
|
||||
fi
|
||||
|
||||
install-etc: install-etc-dir
|
||||
for file in $(INSTALL_CFG_OBJS2); \
|
||||
do \
|
||||
touch $(ETCDIR)/$$file; chmod 0600 $(ETCDIR)/$$file; \
|
||||
done;
|
||||
|
||||
install-man:
|
||||
$(INSTALL_BIN) -d $(MANDIR1)
|
||||
$(INSTALL_BIN) -d $(MANDIR3)
|
||||
$(INSTALL_BIN) -d $(MANDIR8)
|
||||
$(INSTALL_DATA) man/*.1 $(MANDIR1)
|
||||
$(INSTALL_DATA) man/*.3 $(MANDIR3)
|
||||
$(INSTALL_DATA) man/*.8 $(MANDIR8)
|
||||
|
||||
install: install-bin install-etc install-man
|
||||
|
||||
+33
-11
@@ -1,21 +1,20 @@
|
||||
#
|
||||
# 3 proxy Makefile for Open Watcom 2
|
||||
#
|
||||
# You can try to remove -DWITH_STD_MALLOC to CFLAGS to use optimized malloc
|
||||
# libraries
|
||||
#
|
||||
# Add /DSAFESQL to CFLAGS if you are using poorely written/tested ODBC driver
|
||||
|
||||
BUILDDIR = ../bin/
|
||||
PREFIX = 3proxy_
|
||||
CRYPT_PREFIX = 3proxy_
|
||||
CC = cl
|
||||
CFLAGS = /nologo /Ox /MT /D "NOIPV6" /D "NODEBUG" /D "NOODBC" /D "NORADIUS" /D"WATCOM" /D "MSVC" /D "WITH_STD_MALLOC" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_WIN32" /D "PRINTF_INT64_MODIFIER=\"I64\"" /c $(VERSION) $(BUILDDATE)
|
||||
CFLAGS = /nologo /Ox /MT /D "NOIPV6" /D "NODEBUG" /D "NORADIUS" /D"WATCOM" /D "MSVC" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_WIN32" /D "PRId64=\"I64d\"" /D "PRIu64=\"I64u\"" /D "SCNu64=\"I64u\"" /D "SCNx64=\"I64x\"" /D "SCNd64=\"I64d\"" /D "PRIx64=\"I64x\"" /c $(VERSION) $(BUILDDATE)
|
||||
COUT = /Fo
|
||||
LN = link
|
||||
LDFLAGS = /nologo /subsystem:console /incremental:no
|
||||
DLFLAGS = /DLL
|
||||
DLSUFFICS = .dll
|
||||
LIBS = ws2_32.lib advapi32.lib user32.lib kernel32.lib
|
||||
LIBSOLD = libeay32MT.lib ssleay32MT.lib
|
||||
LIBSPREFIX =
|
||||
LIBSSUFFIX = .lib
|
||||
LIBEXT = .lib
|
||||
@@ -28,16 +27,39 @@ REMOVECOMMAND = del 2>NUL >NUL
|
||||
TYPECOMMAND = type
|
||||
COMPATLIBS =
|
||||
MAKEFILE = Makefile.watcom
|
||||
PLUGINS = utf8tocp1251 WindowsAuthentication TrafficPlugin StringsPlugin PCREPlugin
|
||||
PLUGINS = utf8tocp1251 WindowsAuthentication TrafficPlugin StringsPlugin
|
||||
VERFILE = $(VERFILE)
|
||||
VERSION = $(VERSION)
|
||||
VERSIONDEP = 3proxy.res $(VERSIONDEP)
|
||||
BUILDDATE = $(BUILDDATE)
|
||||
|
||||
include Makefile.inc
|
||||
|
||||
../3proxy.res:
|
||||
rc /fo../3proxy.res ../3proxy.rc $(VERSION) $(BUILDDATE)
|
||||
|
||||
3proxyres.obj: ../3proxy.res
|
||||
cvtres /out:3proxyres.obj ../3proxy.res
|
||||
3proxy.res:
|
||||
rc 3proxy.rc
|
||||
|
||||
allplugins:
|
||||
call ../makeplugins.bat
|
||||
copy Makefile plugins\utf8tocp1251
|
||||
copy Makefile.var plugins\utf8tocp1251
|
||||
cd plugins\utf8tocp1251
|
||||
nmake
|
||||
del *.obj *.idb
|
||||
cd ../../
|
||||
copy Makefile plugins\WindowsAuthentication
|
||||
copy Makefile.var plugins\WindowsAuthentication
|
||||
cd plugins\WindowsAuthentication
|
||||
nmake
|
||||
del *.obj *.idb
|
||||
cd ../../
|
||||
copy Makefile plugins\TrafficPlugin
|
||||
copy Makefile.var plugins\TrafficPlugin
|
||||
cd plugins\TrafficPlugin
|
||||
nmake
|
||||
del *.obj *.idb
|
||||
cd ../../
|
||||
copy Makefile plugins\StringsPlugin
|
||||
copy Makefile.var plugins\StringsPlugin
|
||||
cd plugins\StringsPlugin
|
||||
nmake
|
||||
del *.obj *.idb
|
||||
cd ../../
|
||||
+42
-13
@@ -1,24 +1,25 @@
|
||||
#
|
||||
# 3 proxy Makefile for GCC/windows
|
||||
#
|
||||
# You can try to remove -DWITH_STD_MALLOC to CFLAGS to use optimized malloc
|
||||
# libraries
|
||||
#
|
||||
# remove -DNOODBC from CFLAGS and add -lodbc to LDFLAGS to compile with ODBC
|
||||
# library support
|
||||
# ODBC support is enabled by default on Windows (-DWITH_ODBC, -lodbc32)
|
||||
|
||||
|
||||
BUILDDIR = ../bin/
|
||||
CC = gcc
|
||||
CFLAGS = -O2 -s -c -mthreads -DWITH_STD_MALLOC -DNOIPV6 -DNORADIUS
|
||||
PREFIX ?= 3proxy_
|
||||
CRYPT_PREFIX ?= $(PREFIX)
|
||||
CC ?= gcc
|
||||
CFLAGS ?= -O3 -flto
|
||||
CFLAGS += -fno-strict-aliasing -c -mthreads -DWITH_WSAPOLL -DWITH_ODBC
|
||||
COUT = -o
|
||||
LN = gcc
|
||||
LDFLAGS = -O2 -s -mthreads
|
||||
DLFLAGS = -shared
|
||||
LN ?= $(CC)
|
||||
LDFLAGS ?= -O3 -flto
|
||||
LDFLAGS += -fno-strict-aliasing -mthreads
|
||||
DLFLAGS ?= -shared
|
||||
DLSUFFICS = .dll
|
||||
LIBS = -lws2_32 -lodbc32 -ladvapi32
|
||||
LIBS += -lws2_32 -lodbc32 -ladvapi32 -luser32 -lbcrypt
|
||||
LIBSPREFIX = -l
|
||||
LIBSSUFFIX =
|
||||
LIBSSUFFIX =
|
||||
LNOUT = -o
|
||||
EXESUFFICS = .exe
|
||||
OBJSUFFICS = .o
|
||||
@@ -28,9 +29,37 @@ REMOVECOMMAND = rm -f
|
||||
TYPECOMMAND = cat
|
||||
COMPATLIBS =
|
||||
MAKEFILE = Makefile.win
|
||||
PLUGINS = utf8tocp1251 WindowsAuthentication TrafficPlugin StringsPlugin PCREPlugin
|
||||
PLUGINS := utf8tocp1251 WindowsAuthentication TrafficPlugin StringsPlugin FilePlugin
|
||||
VERFILE := 3proxyres.o $(VERFILE)
|
||||
VERSION := $(VERSION)
|
||||
VERSIONDEP := 3proxyres.o $(VERSIONDEP)
|
||||
BUILDDATE := $(BUILDDATE)
|
||||
AFTERCLEAN = (find . -type f -name "*.o" -delete && find . -type f -name "*.res" -delete && find src/ -type f -name "Makefile.var" -delete && find bin/ -type f -executable -delete) || true
|
||||
|
||||
ifndef OPENSSL_CHECK
|
||||
OPENSSL_CHECK = $(shell echo "\#include <openssl/ssl.h>\\n int main(){return 0;}" | tr -d '\\\\' | cc -x c $(CFLAGS) $(LDFLAGS) -l crypto -l ssl -o testssl - 2>/dev/null && rm testssl && echo true||echo false)
|
||||
ifeq ($(OPENSSL_CHECK), true)
|
||||
LIBS += -l crypto -l ssl
|
||||
CFLAGS += -DWITH_SSL
|
||||
SSL_OBJS = ssllib$(OBJSUFFICS) ssl$(OBJSUFFICS)
|
||||
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)
|
||||
ifeq ($(PAM_CHECK), true)
|
||||
PLUGINS += PamAuth
|
||||
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) -lpcre2-8 -o testpcre - 2>/dev/null && rm testpcre && echo true||echo false)
|
||||
ifeq ($(PCRE_CHECK), true)
|
||||
CFLAGS += -DWITH_PCRE
|
||||
PCRE_OBJS = pcre$(OBJSUFFICS)
|
||||
PCRE_LIBS = -lpcre2-8
|
||||
endif
|
||||
endif
|
||||
|
||||
include Makefile.inc
|
||||
|
||||
3proxyres.o:
|
||||
windres 3proxy.rc -o 3proxyres.o
|
||||
|
||||
allplugins:
|
||||
@list='$(PLUGINS)'; for p in $$list; do cp Makefile Makefile.var plugins/$$p; cd plugins/$$p ; make ; rm *.o ; cd ../.. ; done
|
||||
@list='$(PLUGINS)'; for p in $$list; do cp Makefile Makefile.var plugins/$$p; cd plugins/$$p ; make ; cd ../.. ; done
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
#
|
||||
# 3 proxy Makefile for GCC/windows
|
||||
#
|
||||
# You can try to remove -DWITH_STD_MALLOC to CFLAGS to use optimized malloc
|
||||
# libraries
|
||||
#
|
||||
# remove -DNOODBC from CFLAGS and add -lodbc to LDFLAGS to compile with ODBC
|
||||
# library support
|
||||
|
||||
|
||||
BUILDDIR = ../bin/
|
||||
CC = /opt/cegcc/arm-wince-cegcc/bin/gcc
|
||||
CFLAGS = -O2 -s -c -mthreads -DWITH_STD_MALLOC -DNOODBC -D_WINCE -D_WIN32 -DNORADIUS -D__USE_W32_SOCKETS
|
||||
COUT = -o
|
||||
LN = /opt/cegcc/arm-wince-cegcc/bin/gcc
|
||||
LDFLAGS = -O2 -s -mthreads
|
||||
DLFLAGS = -shared
|
||||
DLSUFFICS = .dll
|
||||
LIBS = -lws2
|
||||
LNOUT = -o
|
||||
EXESUFFICS = .exe
|
||||
OBJSUFFICS = .o
|
||||
DEFINEOPTION = -D
|
||||
COMPFILES = *.tmp
|
||||
REMOVECOMMAND = rm -f
|
||||
TYPECOMMAND = more
|
||||
COMPATLIBS =
|
||||
MAKEFILE = Makefile.winCE
|
||||
PLUGINS = TrafficPlugin StringsPlugin PCREPlugin
|
||||
|
||||
include Makefile.inc
|
||||
|
||||
allplugins:
|
||||
@list='$(PLUGINS)'; for p in $$list; do cp Makefile Makefile.var plugins/$$p; cd plugins/$$p ; make ; rm *.o ; cd ../.. ; done
|
||||
@@ -1,199 +0,0 @@
|
||||
# 3APA3A 3proxy tiny proxy server
|
||||
(c) 2002-2020 by Vladimir '3APA3A' Dubrovin <3proxy@3proxy.ru>
|
||||
|
||||
|
||||
Branches:
|
||||
Master (stable) branch - 3proxy 0.9
|
||||
Devel branch - 3proxy 10
|
||||
|
||||
|
||||
Download:
|
||||
https://github.com/z3APA3A/3proxy/releases
|
||||
or
|
||||
https://3proxy.org/download/
|
||||
Archive of old versions: https://github.com/z3APA3A/3proxy-archive
|
||||
|
||||
|
||||
3proxy --install
|
||||
|
||||
installs and starts proxy as Windows service
|
||||
(config file should be located in the same directory)
|
||||
|
||||
3proxy --remove
|
||||
|
||||
removes the service (should be stopped before via
|
||||
'net stop 3proxy').
|
||||
|
||||
To build in Linux install git and build-essential packages, use
|
||||
|
||||
git clone https://github.com/z3apa3a/3proxy
|
||||
cd 3proxy
|
||||
ln -s Makefile.Linux Makefile
|
||||
make
|
||||
sudo make install
|
||||
|
||||
use /etc/3proxy/add3proxyuser.sh script to add users.
|
||||
|
||||
|
||||
Please read doc/html/index.html and man pages.
|
||||
|
||||
Features:
|
||||
1. General
|
||||
+ IPv6 support for incoming and outgoing connection,
|
||||
can be used as a proxy between IPv4 and IPv6 networks
|
||||
in either direction.
|
||||
+ HTTP/1.1 Proxy with keep-alive client and server support,
|
||||
transparent proxy support.
|
||||
+ HTTPS (CONNECT) proxy (compatible with HTTP/2 / SPDY)
|
||||
+ Anonymous and random client IP emulation for HTTP proxy mode
|
||||
+ FTP over HTTP support.
|
||||
+ DNS caching with built-in resolver
|
||||
+ DNS proxy
|
||||
+ DNS over TCP support, redirecting DNS traffic via parent
|
||||
proxy
|
||||
+ SOCKSv4/4.5 Proxy
|
||||
+ SOCKSv5 Proxy
|
||||
+ SOCKSv5 UDP and BIND support (fully compatible with
|
||||
SocksCAP/FreeCAP for UDP)
|
||||
+ Transparent SOCKS redirection for HTTP, POP3, FTP, SMTP
|
||||
+ POP3 Proxy
|
||||
+ FTP proxy
|
||||
+ TCP port mapper (port forwarding)
|
||||
+ UDP port mapper (port forwarding)
|
||||
+ SMTP proxy
|
||||
+ Threaded application (no child process).
|
||||
+ Web administration and statistics
|
||||
+ Plugins for functionality extension
|
||||
+ Native 32/64 bit application
|
||||
2. Proxy chaining and network connections
|
||||
+ Can be used as a bridge between client and different proxy type
|
||||
(e.g. convert incoming HTTP proxy request from client to SOCKSv5
|
||||
request to parent server).
|
||||
+ Connect back proxy support to bypass firewalls
|
||||
+ Parent proxy support for any type of incoming connection
|
||||
+ Username/password authentication for parent proxy(s).
|
||||
+ HTTPS/SOCKS4/SOCKS5 and ip/port redirection parent support
|
||||
+ Random parent selection
|
||||
+ Chain building (multihop proxing)
|
||||
+ Load balancing between few network connections by choosing network
|
||||
interface
|
||||
3. Logging
|
||||
+ tuneable log format compatible with any log parser
|
||||
+ stdout logging
|
||||
+ file logging
|
||||
+ syslog logging (Unix)
|
||||
+ ODBC logging
|
||||
+ RADIUS accounting
|
||||
+ log file rotation
|
||||
+ automatic log file processing with external archiver (for files)
|
||||
+ Character filtering for log files
|
||||
+ different log files for different servces are supported
|
||||
4. Access control
|
||||
+ ACL-driven Access control by username, source IP,
|
||||
destination IP/hostname, destination port and destination action
|
||||
(POST, PUT, GET, etc), weekday and daytime.
|
||||
+ ACL-driven (user/source/destination/protocol/weekday/daytime or
|
||||
combined) bandwith limitation for incoming and (!)outgoing trafic.
|
||||
+ ACL-driven traffic limitation per day, week or month for incoming and
|
||||
outgoing traffic
|
||||
+ Connection limitation and ratelimting
|
||||
+ User authentication by username / password
|
||||
+ RADIUS Authentication and Authorization
|
||||
+ User authentication by DNS hostname
|
||||
+ Authentication cache with possibility to limit user to single IP address
|
||||
+ Access control by username/password for SOCKSv5 and HTTP/HTTPS/FTP
|
||||
+ Cleartext or encrypted (crypt/MD5 or NT) passwords.
|
||||
+ Connection redirection
|
||||
+ Access control by requested action (CONNECT/BIND,
|
||||
HTTP GET/POST/PUT/HEAD/OTHER).
|
||||
+ All access control entries now support weekday and time limitations
|
||||
+ Hostnames and * templates are supported instead of IP address
|
||||
5. Extensions
|
||||
+ Regular expression filtering (with PCRE) via PCREPlugin
|
||||
+ Authentication with Windows username/password (cleartext only)
|
||||
+ SSL/TLS decryptions with certificate spoofing
|
||||
+ Transparent redirection support for Linux and *BSD
|
||||
6. Configuration
|
||||
+ support for configuration files
|
||||
+ support for includes in configuration files
|
||||
+ interface binding
|
||||
+ socket options
|
||||
+ running as daemon process
|
||||
+ utility for automated networks list building
|
||||
+ configuration reload on any file change
|
||||
Unix
|
||||
+ support for chroot
|
||||
+ support for setgid
|
||||
+ support for setuid
|
||||
+ support for signals (SIGUSR1 to reload configuration)
|
||||
Windows
|
||||
+ support --install as service
|
||||
+ support --remove as service
|
||||
+ support for service START, STOP, PAUSE and CONTINUE commands (on
|
||||
PAUSE no new connection accepted, but active connections still in
|
||||
progress, on CONTINUE configuration is reloaded)
|
||||
Windows 95/98/ME
|
||||
+ support --install as service
|
||||
+ support --remove as service
|
||||
6. Compilation
|
||||
+ MSVC (static)
|
||||
+ OpenWatcom (static)
|
||||
+ Intel Windows Compiler (msvcrt.dll)
|
||||
+ Windows/gcc (msvcrt.dll)
|
||||
+ Cygwin/gcc (cygwin.dll)
|
||||
+ Unix/gcc
|
||||
+ Unix/ccc
|
||||
+ Solaris
|
||||
+ Mac OS X, iPhone OS
|
||||
+ Linux and derivered systems
|
||||
+ Lite version for Windows 95/98/NT/2000/XP/2003
|
||||
+ 32 bit and 64 bit versions for Windows Vista and above, Windows 2008 server and above
|
||||
|
||||
3proxy Combined proxy server may be used as
|
||||
executable or service (supports installation and removal).
|
||||
It uses config file to read it's configuration (see
|
||||
3proxy.cfg.sample for details).
|
||||
3proxy.exe is all-in-one, it doesn't require all others .exe
|
||||
to work.
|
||||
See 3proxy.cfg.sample for examples, see man 3proxy.cfg
|
||||
|
||||
proxy HTTP proxy server, binds to port 3128
|
||||
ftppr FTP proxy server, binds to port 21
|
||||
socks SOCKS 4/5 proxy server, binds to port 1080
|
||||
ftppr FTP proxy server, please do not mess it with FTP over HTTP
|
||||
proxy used in browsers
|
||||
pop3p POP3 proxy server, binds to port 110. You must specify
|
||||
POP3 username as username@target.host.ip[:port]
|
||||
port is 110 by default.
|
||||
Exmple: in Username configuration for you e-mail reader
|
||||
set someuser@pop.example.org, to obtains mail for someuser
|
||||
from pop.somehost.ru via proxy.
|
||||
smtpp SMTP proxy server, binds to port 25. You must specify
|
||||
SMTP username as username@target.host.ip[:port]
|
||||
port is 25 by default.
|
||||
Exmple: in Username configuration for you e-mail reader
|
||||
set someuser@mail.example.org, to send mail as someuser
|
||||
via mail.somehost.ru via proxy.
|
||||
tcppm TCP port mapping. Maps some TCP port on local machine to
|
||||
TCP port on remote host.
|
||||
udppm UDP port mapping. Maps some UDP port on local machine to
|
||||
UDP port on remote machine. Only one user simulationeously
|
||||
can use UDP mapping, so it cann't be used for public service
|
||||
in large networks. It's OK to use it to map to DNS server
|
||||
in small network or to map Counter-Strike server for single
|
||||
client (you can use few mappings on different ports for
|
||||
different clients in last case).
|
||||
mycrypt Program to obtain crypted password fro cleartext. Supports
|
||||
both MD5/crypt and NT password.
|
||||
mycrypt password
|
||||
produces NT password
|
||||
mycrypt salt password
|
||||
produces MD5/crypt password with salt "salt".
|
||||
dighosts Utility for building networks list from web page.
|
||||
|
||||
|
||||
Run utility with --help option for command line reference.
|
||||
|
||||
Latest version is available from https://3proxy.org/
|
||||
|
||||
Want to donate the project? https://3proxy.org/donations/
|
||||
@@ -0,0 +1,379 @@
|
||||
# 3APA3A 3proxy tiny proxy server
|
||||
|
||||
(c) 2002-2026 by Vladimir '3APA3A' Dubrovin <vlad@3proxy.org>
|
||||
|
||||
## Repository
|
||||
|
||||
### Branches
|
||||
|
||||
- **Master** (stable) branch - 3proxy 0.9
|
||||
- **Devel** branch - 3proxy 10 (don't use it)
|
||||
|
||||
### Binaries (deb / rpm / Windows zip)
|
||||
|
||||
https://github.com/3proxy/3proxy/releases
|
||||
|
||||
### Docker images
|
||||
|
||||
https://hub.docker.com/r/3proxy/3proxy
|
||||
https://github.com/3proxy/3proxy/pkgs/container/3proxy
|
||||
|
||||
### Archive of old versions
|
||||
|
||||
https://github.com/z3APA3A/3proxy-archive
|
||||
|
||||
|
||||
### Documentation
|
||||
|
||||
Documentation (man pages and HTML) available with download, on https://3proxy.org/ and in github wiki https://github.com/3proxy/3proxy/wiki
|
||||
|
||||
## 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.
|
||||
|
||||
### Default image (`:latest`):
|
||||
|
||||
Full installation requires to mount /etc/3proxy/3proxy.cfg files.
|
||||
|
||||
For docker, config can be provided via `docker config`
|
||||
|
||||
```
|
||||
echo "log
|
||||
nserver 8.8.8.8
|
||||
nscache 65536
|
||||
proxy -p3129" | docker config create 3proxy
|
||||
docker run --read-only -p 3129:3129 --config source=3proxy,target=/etc/3proxy/3proxy.cfg --name 3proxy.full docker.io/3proxy/3proxy
|
||||
```
|
||||
|
||||
`podman` does not support `config` as above.
|
||||
Mounts may be used as config alternative. `podman` used in example below can be replaced with `docker`:
|
||||
|
||||
```
|
||||
echo "log
|
||||
nserver 8.8.8.8
|
||||
nscache 65536
|
||||
proxy -p3129" >/path/to/local/config/directory/3proxy.cfg
|
||||
podman run --read-only -p 3129:3129 -v /path/to/local/config/directory/3proxy.cfg:/etc/3proxy/3proxy.cfg --name 3proxy.full 3proxy.full
|
||||
```
|
||||
|
||||
|
||||
use `log` without pathname in config to log to stdout.
|
||||
plugins are located in /usr/local/3proxy/libexec (/libexec for chroot config) and since 0.9.6 symlinked by /lib and /lib64 in both chroot and non-chroot configurations, so no full path is required in `plugin` command. Use e.g. `plugin SSLPlugin.ls.so ssl_plugin`. SSLPlugin is supported since 0.9.6. Some proxy types (e.g. SOCKSv5 UDPASSCOC, SOCKSv5 BIND functionality, ftp proxy) require access to ephemeral port, you may use e.g. -`-network host` mode or `-P` for `docker run`.
|
||||
|
||||
since 0.9.6 images are distroless (except :busybox) it's recommended to use with read only file system, there are no benefits from chroot. For compatibility, you still can use chroot installation by mounting directory with 3proxy.cfg to /usr/local/3proxy/config.
|
||||
|
||||
### Busybox image (`:busybox`):
|
||||
|
||||
`full` with busybox added, to allow `sh` and few more commands like `sed` inside container. All libraries are in /lib, so chroot configuration can not use plugins.
|
||||
|
||||
### Interactive `:minimal` image:
|
||||
|
||||
Dockerfile for "interactive" minimal 3proxy execution, no configuration mounting is required, configuration
|
||||
is accepted from stdin. Use `end` command to indicate the end of configuration. Use `log` for stdout logging.
|
||||
|
||||
|
||||
`plugin` is not supported, `nserver` or `fakeresolve` are mandatory, because system resolver is not supported, no support for RADIUS and IPv6.
|
||||
|
||||
Run example:
|
||||
|
||||
`docker run --read-only -i -p 3129:3129 --name 3proxy docker.io/3proxy/3proxy:minimal`
|
||||
or
|
||||
`docker start -ai 3proxy` to start existing container
|
||||
|
||||
send this to standard input (example):
|
||||
```
|
||||
nserver 8.8.8.8
|
||||
nscache 65535
|
||||
log
|
||||
proxy -p3129
|
||||
end
|
||||
```
|
||||
`nserver` is required for DNS resolutions.
|
||||
|
||||
Some proxy types (e.g. SOCKSv5 UDPASSCOC, SOCKSv5 BIND functionality, ftp proxy) require access to ephemeral port, you may use e.g. `--network host` mode or `-P` to `docker run`.
|
||||
|
||||
`:minimal` without version specified uses current stable version.
|
||||
|
||||
## Building and installation
|
||||
|
||||
### Windows Installation
|
||||
|
||||
Install and start proxy as Windows service:
|
||||
|
||||
```bash
|
||||
3proxy [path_to_config_file] --install
|
||||
```
|
||||
|
||||
Config file should be located in the same directory or may be optionally specified.
|
||||
|
||||
Remove the service (should be stopped before via `net stop 3proxy`):
|
||||
|
||||
```bash
|
||||
3proxy --remove
|
||||
```
|
||||
|
||||
### Building and installation on Linux
|
||||
|
||||
#### With Makefile
|
||||
|
||||
```bash
|
||||
git clone https://github.com/z3apa3a/3proxy
|
||||
cd 3proxy
|
||||
ln -s Makefile.Linux Makefile
|
||||
make
|
||||
sudo make install
|
||||
```
|
||||
|
||||
#### Default Configuration (for Makefile.Linux installation)
|
||||
|
||||
3proxy uses 2 configuration files in :
|
||||
- `/etc/3proxy/3proxy.cfg` (before-chroot) - This configuration file is executed before chroot and should not be modified.
|
||||
- `/usr/local/3proxy/conf/3proxy.cfg` symlinked from `/etc/3proxy/conf/3proxy.cfg` (after-chroot) - Main configuration file. Modify this file if required.
|
||||
|
||||
All paths in `/usr/local/3proxy/conf/3proxy.cfg` are relative to chroot directory (`/usr/local/3proxy`). For future versions it's planned to move 3proxy chroot directory to `/var`.
|
||||
|
||||
Log files are created in `/usr/local/3proxy/logs` symlinked from `/var/log/3proxy`.
|
||||
|
||||
By default, socks is started on 0.0.0.0:1080 and proxy on 0.0.0.0:3128 with basic auth, no users are added by default.
|
||||
|
||||
#### Adding Users
|
||||
|
||||
Use `add3proxyuser` script to add users:
|
||||
|
||||
```bash
|
||||
add3proxyuser username password [day_limit] [bandwidth]
|
||||
```
|
||||
|
||||
Parameters:
|
||||
- `day_limit` - traffic limit in MB per day
|
||||
- `bandwidth` - bandwidth in bits per second (1048576 = 1Mbps)
|
||||
|
||||
Or modify `/etc/3proxy/conf/` files directly.
|
||||
|
||||
#### With CMake
|
||||
|
||||
```bash
|
||||
git clone https://github.com/z3apa3a/3proxy
|
||||
cd 3proxy
|
||||
mkdir build && cd build
|
||||
cmake ..
|
||||
cmake --build .
|
||||
sudo cmake --install .
|
||||
```
|
||||
|
||||
CMake does not use chroot configuration, config file is `/etc/3proxy/3proxy.cfg`
|
||||
|
||||
### MacOS X / FreeBSD / *BSD
|
||||
|
||||
#### With Makefile
|
||||
|
||||
```bash
|
||||
git clone https://github.com/z3apa3a/3proxy
|
||||
cd 3proxy
|
||||
ln -s Makefile.FreeBSD Makefile
|
||||
make
|
||||
```
|
||||
|
||||
Binaries are in `bin/` directory.
|
||||
|
||||
#### With CMake (recommended)
|
||||
|
||||
```bash
|
||||
git clone https://github.com/z3apa3a/3proxy
|
||||
cd 3proxy
|
||||
mkdir build && cd build
|
||||
cmake ..
|
||||
cmake --build .
|
||||
sudo cmake --install .
|
||||
```
|
||||
|
||||
This installs:
|
||||
- Binaries to `/usr/local/bin/`
|
||||
- Configuration to `/etc/3proxy/`
|
||||
- Plugins to `/usr/local/lib/3proxy/`
|
||||
- rc scripts to `rc.d` for BSD
|
||||
- launchd plist to `/Library/LaunchDaemons/` for MacOS
|
||||
|
||||
#### Service Management on macOS
|
||||
|
||||
```bash
|
||||
# Load and start service
|
||||
sudo launchctl load /Library/LaunchDaemons/org.3proxy.3proxy.plist
|
||||
|
||||
# Stop service
|
||||
sudo launchctl stop org.3proxy.3proxy
|
||||
|
||||
# Start service
|
||||
sudo launchctl start org.3proxy.3proxy
|
||||
|
||||
# Unload and disable service
|
||||
sudo launchctl unload /Library/LaunchDaemons/org.3proxy.3proxy.plist
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Features
|
||||
|
||||
### 1. General
|
||||
|
||||
- IPv4 / IPv6 support for incoming and outgoing connection, can be used as a proxy between IPv4 and IPv6 networks in either direction
|
||||
- Unix domain sockets support
|
||||
- HTTP/1.1 Proxy with keep-alive client and server support, transparent proxy support
|
||||
- HTTPS (CONNECT) proxy (compatible with HTTP/2 / SPDY)
|
||||
- Anonymous and random client IP emulation for HTTP proxy mode
|
||||
- FTP over HTTP support
|
||||
- DNS caching with built-in resolver
|
||||
- DNS proxy
|
||||
- DNS over TCP support, redirecting DNS traffic via parent proxy
|
||||
- SOCKSv4/4.5 Proxy
|
||||
- SOCKSv5 Proxy
|
||||
- SOCKSv5 UDP and BIND support (fully compatible with SocksCAP/FreeCAP for UDP)
|
||||
- Transparent SOCKS redirection for HTTP, POP3, FTP, SMTP
|
||||
- SNI proxy (based on TLS hostname)
|
||||
- TLS (SSL) server and client, 3proxy may be used as https:// type proxy or stunnel replacement
|
||||
- POP3 Proxy
|
||||
- FTP proxy
|
||||
- TCP port mapper (port forwarding)
|
||||
- UDP port mapper (port forwarding)
|
||||
- SMTP proxy
|
||||
- Threaded application (no child process)
|
||||
- Web administration and statistics
|
||||
- Plugins for functionality extension
|
||||
- Native 32/64 bit application
|
||||
|
||||
### 2. Proxy Chaining and Network Connections
|
||||
|
||||
- Can be used as a bridge between client and different proxy type (e.g. convert incoming HTTP proxy request from client to SOCKSv5 request to parent server)
|
||||
- Connect back proxy support to bypass firewalls
|
||||
- Parent proxy support for any type of incoming connection
|
||||
- Username/password authentication for parent proxy(s)
|
||||
- HTTPS/SOCKS4/SOCKS5 and ip/port redirection parent support
|
||||
- Random parent selection
|
||||
- Chain building (multihop proxing)
|
||||
- Load balancing between few network connections by choosing network interface
|
||||
|
||||
### 3. Logging
|
||||
|
||||
- Tuneable log format compatible with any log parser
|
||||
- stdout logging
|
||||
- File logging
|
||||
- Syslog logging (Unix)
|
||||
- ODBC logging
|
||||
- RADIUS accounting
|
||||
- Log file rotation
|
||||
- Automatic log file processing with external archiver (for files)
|
||||
- Character filtering for log files
|
||||
- Different log files for different services are supported
|
||||
|
||||
### 4. Access Control
|
||||
|
||||
- ACL-driven Access control by username, source IP, destination IP/hostname, destination port and destination action (POST, PUT, GET, etc), weekday and daytime
|
||||
- ACL-driven (user/source/destination/protocol/weekday/daytime or combined) bandwidth limitation for incoming and (!)outgoing traffic
|
||||
- ACL-driven traffic limitation per day, week or month for incoming and outgoing traffic
|
||||
- Connection limitation and ratelimiting
|
||||
- User authentication by username / password
|
||||
- RADIUS Authentication and Authorization
|
||||
- User authentication by DNS hostname
|
||||
- Authentication cache with possibility to limit user to single IP address
|
||||
- Access control by username/password for SOCKSv5 and HTTP/HTTPS/FTP
|
||||
- Cleartext or encrypted passwords
|
||||
- Connection redirection
|
||||
- Access control by requested action (CONNECT/BIND, HTTP GET/POST/PUT/HEAD/OTHER)
|
||||
- All access control entries now support weekday and time limitations
|
||||
- Hostnames and * templates are supported instead of IP address
|
||||
|
||||
### 5. Extensions
|
||||
|
||||
- Regular expression filtering (with PCRE2) via PCREPlugin
|
||||
- Authentication with Windows username/password (cleartext only)
|
||||
- SSL/TLS decryptions with certificate spoofing
|
||||
- Transparent redirection support for Linux and *BSD
|
||||
|
||||
### 6. Configuration
|
||||
|
||||
- Support for configuration files
|
||||
- Support for includes in configuration files
|
||||
- Interface binding
|
||||
- Socket options
|
||||
- Running as daemon process
|
||||
- Utility for automated networks list building
|
||||
- Configuration reload on any file change
|
||||
|
||||
**Unix:**
|
||||
- Support for chroot
|
||||
- Support for setgid
|
||||
- Support for setuid
|
||||
- Support for signals (SIGUSR1 to reload configuration)
|
||||
|
||||
**Windows:**
|
||||
- Support `--install` as service
|
||||
- Support `--remove` as service
|
||||
- Support for service START, STOP, PAUSE and CONTINUE commands (on PAUSE no new connection accepted, but active connections still in progress, on CONTINUE configuration is reloaded)
|
||||
|
||||
**Windows 95/98/ME:**
|
||||
- Support `--install` as service
|
||||
- Support `--remove` as service
|
||||
|
||||
### 7. Compilation
|
||||
|
||||
- MSVC (static)
|
||||
- OpenWatcom (static)
|
||||
- Intel Windows Compiler (msvcrt.dll)
|
||||
- Windows/gcc (msvcrt.dll)
|
||||
- Cygwin/gcc (cygwin.dll)
|
||||
- Unix/gcc
|
||||
- Unix/ccc
|
||||
- Solaris
|
||||
- Mac OS X, iPhone OS
|
||||
- Linux and derived systems
|
||||
- Lite version for Windows 95/98/NT/2000/XP/2003
|
||||
- 32 bit and 64 bit versions for Windows Vista and above, Windows 2008 server and above
|
||||
|
||||
## Executables
|
||||
|
||||
### 3proxy
|
||||
Combined proxy server may be used as executable or service (supports installation and removal). It uses config file to read its configuration (see `3proxy.cfg.sample` for details). `3proxy.exe` is all-in-one, it doesn't require all others .exe to work. See `3proxy.cfg.sample` for examples, see `man 3proxy.cfg`
|
||||
|
||||
### 3proxy_proxy
|
||||
HTTP proxy server, binds to port 3128
|
||||
|
||||
### 3proxy_ftppr
|
||||
FTP proxy server, binds to port 21. Please do not mess it with FTP over HTTP proxy used in browsers
|
||||
|
||||
### 3proxy_socks
|
||||
SOCKS 4/5 proxy server, binds to port 1080
|
||||
|
||||
### 3proxy_pop3p
|
||||
POP3 proxy server, binds to port 110. You must specify POP3 username as `username@popserver[:port]` (port is 110 by default).
|
||||
|
||||
Example: in Username configuration for your e-mail reader set `someuser@pop.somehost.ru`, to obtain mail for someuser from pop.somehost.ru via proxy.
|
||||
|
||||
### 3proxy_smtpp
|
||||
SMTP proxy server, binds to port 25. You must specify SMTP username as `username@smtpserver[:port]` (port is 25 by default).
|
||||
|
||||
Example: in Username configuration for your e-mail reader set `someuser@mail.somehost.ru`, to send mail as someuser via mail.somehost.ru via proxy.
|
||||
|
||||
### 3proxy_tcppm
|
||||
TCP port mapping. Maps some TCP port on local machine to TCP port on remote host.
|
||||
|
||||
### 3proxy_tlspr
|
||||
TLS proxy (SNI proxy) - sniffs hostname from TLS handshake
|
||||
|
||||
### 3proxy_udppm
|
||||
UDP port mapping. Maps some UDP port on local machine to UDP port on remote machine. Only one user simultaneously can use UDP mapping, so it can't be used for public service in large networks. It's OK to use it to map to DNS server in small network or to map Counter-Strike server for single client (you can use few mappings on different ports for different clients in last case).
|
||||
|
||||
### 3proxy_crypt
|
||||
Program to obtain crypted password for cleartext. Supports both salted and NT password.
|
||||
|
||||
```bash
|
||||
3proxy_crypt password # produces NT password
|
||||
3proxy_crypt salt password # produces password hash with salt "salt"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Run utility with `--help` option for command line reference.
|
||||
|
||||
Latest version is available from https://3proxy.org/
|
||||
|
||||
Want to donate the project? https://3proxy.org/donations/
|
||||
@@ -1 +1 @@
|
||||
(c) 2002-2019 by Vladimir '3APA3A' Dubrovin <vlad@3proxy.ru>
|
||||
(c) 2002-2025 by Vladimir '3APA3A' Dubrovin <vlad@3proxy.org>
|
||||
+29
-29
@@ -2,7 +2,7 @@
|
||||
# Yes, 3proxy.cfg can be executable, in this case you should place
|
||||
# something like
|
||||
#config /usr/local/3proxy/3proxy.cfg
|
||||
# to show which configuration 3proxy should re-read on realod.
|
||||
# to show which configuration 3proxy should re-read on reload.
|
||||
|
||||
#system "echo Hello world!"
|
||||
# you may use system to execute some external command if proxy starts
|
||||
@@ -24,7 +24,7 @@ timeouts 1 5 30 60 180 1800 15 60
|
||||
# Here we can change timeout values
|
||||
|
||||
users 3APA3A:CL:3apa3a "test:CR:$1$qwer$CHFTUFGqkjue9HyhcMHEe1"
|
||||
# note that "" required, overvise $... is treated as include file name.
|
||||
# note that "" required, otherwise $... is treated as include file name.
|
||||
# $1$qwer$CHFTUFGqkjue9HyhcMHEe1 is 'test' in MD5 crypt format.
|
||||
#users $/usr/local/etc/3proxy/passwd
|
||||
# this example shows you how to include passwd file. For included files
|
||||
@@ -39,7 +39,7 @@ service
|
||||
|
||||
#log /var/log/3proxy/log D
|
||||
log c:\3proxy\logs\3proxy.log D
|
||||
# log allows to specify log file location and rotation, D means logfile
|
||||
# log allows you to specify log file location and rotation, D means logfile
|
||||
# is created daily
|
||||
|
||||
#logformat "L%d-%m-%Y %H:%M:%S %z %N.%p %E %U %C:%c %R:%r %O %I %h %T"
|
||||
@@ -60,7 +60,7 @@ log c:\3proxy\logs\3proxy.log D
|
||||
#
|
||||
#Compatible with ISA 2000/2004 firewall FWSEXTD.log (fields are TAB-delimited):
|
||||
#
|
||||
#"- + L%C %U unnknown:0:0.0 N %Y-%m-%d %H:%M:%S fwsrv 3PROXY - %n %R %r %D %O %I %r TCP Connect - - - %E - - - - -"
|
||||
#"- + L%C %U unknown:0:0.0 N %Y-%m-%d %H:%M:%S fwsrv 3PROXY - %n %R %r %D %O %I %r TCP Connect - - - %E - - - - -"
|
||||
#
|
||||
#Compatible with HTTPD standard log (Apache and others)
|
||||
#
|
||||
@@ -90,7 +90,7 @@ auth iponly
|
||||
# auth specifies type of user authentication. If you specify none proxy
|
||||
# will not do anything to check name of the user. If you specify
|
||||
# nbname proxy will send NetBIOS name request packet to UDP/137 of
|
||||
# client and parse request for NetBIOS name of messanger service.
|
||||
# client and parse request for NetBIOS name of messenger service.
|
||||
# Strong means that proxy will check password. For strong authentication
|
||||
# unknown user will not be allowed to use proxy regardless of ACL.
|
||||
# If you do not want username to be checked but wanna ACL to work you should
|
||||
@@ -102,7 +102,7 @@ auth iponly
|
||||
#parent 1000 http 192.168.1.2 80 * * * 80
|
||||
#allow * 192.168.1.0/24 * 25,53,110,20-21,1024-65535
|
||||
# we will allow everything if username matches ADMINISTRATOR or root or
|
||||
# client ip is 127.0.0.1 or 192.168.1.1. Overwise we will redirect any request
|
||||
# client ip is 127.0.0.1 or 192.168.1.1. Otherwise we will redirect any request
|
||||
# to port 80 to our Web-server 192.168.0.2.
|
||||
# We will allow any outgoing connections from network 192.168.1.0/24 to
|
||||
# SMTP, POP3, FTP, DNS and unprivileged ports.
|
||||
@@ -124,7 +124,7 @@ internal 192.168.1.1
|
||||
# have open proxy in your network in this case.
|
||||
|
||||
auth none
|
||||
# no authentication is requires
|
||||
# no authentication is required
|
||||
|
||||
dnspr
|
||||
|
||||
@@ -134,17 +134,9 @@ dnspr
|
||||
|
||||
#external $./external.ip
|
||||
#internal $./internal.ip
|
||||
# this is just an alternative form fo giving external and internal address
|
||||
# this is just an alternative form for giving external and internal address
|
||||
# allows you to read this addresses from files
|
||||
|
||||
auth strong
|
||||
# We want to protect internal interface
|
||||
deny * * 127.0.0.1,192.168.1.1
|
||||
# and llow HTTP and HTTPS traffic.
|
||||
allow * * * 80-88,8080-8088 HTTP
|
||||
allow * * * 443,8443 HTTPS
|
||||
proxy -n
|
||||
|
||||
auth none
|
||||
# pop3p will be used without any authentication. It's bad choice
|
||||
# because it's possible to use pop3p to access any port
|
||||
@@ -157,26 +149,16 @@ tcppm 25 mail.my.provider 25
|
||||
# Now we can use our proxy as SMTP and DNS server.
|
||||
# -s switch for UDP means "single packet" service - instead of setting
|
||||
# association for period of time association will only be set for 1 packet.
|
||||
# It's very userfull for services like DNS but not for some massive services
|
||||
# It's very useful for services like DNS but not for some massive services
|
||||
# like multimedia streams or online games.
|
||||
|
||||
auth strong
|
||||
flush
|
||||
allow 3APA3A,test
|
||||
maxconn 20
|
||||
socks
|
||||
# for socks we will use password authentication and different access control -
|
||||
# we flush previously configured ACL list and create new one to allow users
|
||||
# test and 3APA3A to connect from any location
|
||||
|
||||
|
||||
auth strong
|
||||
flush
|
||||
internal 127.0.0.1
|
||||
allow 3APA3A 127.0.0.1
|
||||
maxconn 3
|
||||
admin
|
||||
#only allow acces to admin interface for user 3APA3A from 127.0.0.1 address
|
||||
#only allow access to admin interface for user 3APA3A from 127.0.0.1 address
|
||||
#via 127.0.0.1 address.
|
||||
|
||||
# map external 80 and 443 ports to internal Web server
|
||||
@@ -196,6 +178,24 @@ admin
|
||||
#chroot /usr/local/jail
|
||||
#setgid 65535
|
||||
#setuid 65535
|
||||
# now we needn't any root rights. We can chroot and setgid/setuid.
|
||||
# now we no longer need root rights. We can chroot and setgid/setuid.
|
||||
|
||||
|
||||
auth strong
|
||||
flush
|
||||
# We want to protect internal interface
|
||||
deny * * 127.0.0.1,192.168.1.1
|
||||
# and allow HTTP and HTTPS traffic.
|
||||
allow * * * 80-88,8080-8088 HTTP
|
||||
allow * * * 443,8443 HTTPS
|
||||
proxy -n
|
||||
|
||||
flush
|
||||
allow 3APA3A,test
|
||||
maxconn 20
|
||||
socks
|
||||
# for socks we will use password authentication and different access control -
|
||||
# we flush previously configured ACL list and create new one to allow users
|
||||
# test and 3APA3A to connect from any location
|
||||
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
# FindODBC.cmake
|
||||
#
|
||||
# Find the ODBC library
|
||||
#
|
||||
# This module defines:
|
||||
# ODBC_FOUND - whether the ODBC library was found
|
||||
# ODBC_INCLUDE_DIRS - the ODBC include directories
|
||||
# ODBC_LIBRARIES - the ODBC libraries
|
||||
|
||||
# Try pkg-config first
|
||||
find_package(PkgConfig QUIET)
|
||||
if(PkgConfig_FOUND)
|
||||
pkg_check_modules(PC_ODBC QUIET odbc)
|
||||
endif()
|
||||
|
||||
# Find include directory
|
||||
find_path(ODBC_INCLUDE_DIR
|
||||
NAMES sql.h
|
||||
HINTS
|
||||
${PC_ODBC_INCLUDE_DIRS}
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
)
|
||||
|
||||
# Find library
|
||||
if(WIN32)
|
||||
# On Windows, ODBC is typically available as odbc32
|
||||
find_library(ODBC_LIBRARY
|
||||
NAMES odbc32
|
||||
HINTS
|
||||
${PC_ODBC_LIBRARY_DIRS}
|
||||
)
|
||||
else()
|
||||
# On Unix, look for odbc
|
||||
find_library(ODBC_LIBRARY
|
||||
NAMES odbc iodbc
|
||||
HINTS
|
||||
${PC_ODBC_LIBRARY_DIRS}
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/usr/lib/x86_64-linux-gnu
|
||||
)
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(ODBC
|
||||
REQUIRED_VARS ODBC_LIBRARY ODBC_INCLUDE_DIR
|
||||
)
|
||||
|
||||
if(ODBC_FOUND)
|
||||
set(ODBC_LIBRARIES ${ODBC_LIBRARY})
|
||||
set(ODBC_INCLUDE_DIRS ${ODBC_INCLUDE_DIR})
|
||||
|
||||
if(NOT TARGET ODBC::ODBC)
|
||||
add_library(ODBC::ODBC UNKNOWN IMPORTED)
|
||||
set_target_properties(ODBC::ODBC PROPERTIES
|
||||
IMPORTED_LOCATION "${ODBC_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${ODBC_INCLUDE_DIR}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
mark_as_advanced(ODBC_INCLUDE_DIR ODBC_LIBRARY)
|
||||
@@ -0,0 +1,45 @@
|
||||
# FindPAM.cmake
|
||||
#
|
||||
# Find the PAM library
|
||||
#
|
||||
# This module defines:
|
||||
# PAM_FOUND - whether the PAM library was found
|
||||
# PAM_INCLUDE_DIRS - the PAM include directories
|
||||
# PAM_LIBRARIES - the PAM libraries
|
||||
|
||||
# Find include directory
|
||||
find_path(PAM_INCLUDE_DIR
|
||||
NAMES security/pam_appl.h pam/pam_appl.h
|
||||
HINTS
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
)
|
||||
|
||||
# Find library
|
||||
find_library(PAM_LIBRARY
|
||||
NAMES pam
|
||||
HINTS
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/usr/lib/x86_64-linux-gnu
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(PAM
|
||||
REQUIRED_VARS PAM_LIBRARY PAM_INCLUDE_DIR
|
||||
)
|
||||
|
||||
if(PAM_FOUND)
|
||||
set(PAM_LIBRARIES ${PAM_LIBRARY})
|
||||
set(PAM_INCLUDE_DIRS ${PAM_INCLUDE_DIR})
|
||||
|
||||
if(NOT TARGET PAM::PAM)
|
||||
add_library(PAM::PAM UNKNOWN IMPORTED)
|
||||
set_target_properties(PAM::PAM PROPERTIES
|
||||
IMPORTED_LOCATION "${PAM_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${PAM_INCLUDE_DIR}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
mark_as_advanced(PAM_INCLUDE_DIR PAM_LIBRARY)
|
||||
@@ -0,0 +1,69 @@
|
||||
# FindPCRE2.cmake
|
||||
#
|
||||
# Find the PCRE2 library
|
||||
#
|
||||
# This module defines:
|
||||
# PCRE2_FOUND - whether the PCRE2 library was found
|
||||
# PCRE2_INCLUDE_DIRS - the PCRE2 include directories
|
||||
# PCRE2_LIBRARIES - the PCRE2 libraries
|
||||
# PCRE2_VERSION - the PCRE2 version
|
||||
|
||||
# Try pkg-config first
|
||||
find_package(PkgConfig QUIET)
|
||||
if(PkgConfig_FOUND)
|
||||
pkg_check_modules(PC_PCRE2 QUIET libpcre2-8)
|
||||
endif()
|
||||
|
||||
# Find include directory
|
||||
find_path(PCRE2_INCLUDE_DIR
|
||||
NAMES pcre2.h
|
||||
HINTS
|
||||
${PC_PCRE2_INCLUDE_DIRS}
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
PATH_SUFFIXES
|
||||
pcre2
|
||||
)
|
||||
|
||||
# Find library
|
||||
find_library(PCRE2_LIBRARY
|
||||
NAMES pcre2-8 pcre2-8d pcre2
|
||||
HINTS
|
||||
${PC_PCRE2_LIBRARY_DIRS}
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
)
|
||||
|
||||
# Extract version from header
|
||||
if(PCRE2_INCLUDE_DIR AND EXISTS "${PCRE2_INCLUDE_DIR}/pcre2.h")
|
||||
file(STRINGS "${PCRE2_INCLUDE_DIR}/pcre2.h" PCRE2_VERSION_MAJOR_LINE
|
||||
REGEX "^#define[ \t]+PCRE2_MAJOR[ \t]+[0-9]+")
|
||||
file(STRINGS "${PCRE2_INCLUDE_DIR}/pcre2.h" PCRE2_VERSION_MINOR_LINE
|
||||
REGEX "^#define[ \t]+PCRE2_MINOR[ \t]+[0-9]+")
|
||||
string(REGEX REPLACE "^#define[ \t]+PCRE2_MAJOR[ \t]+([0-9]+)" "\\1"
|
||||
PCRE2_VERSION_MAJOR "${PCRE2_VERSION_MAJOR_LINE}")
|
||||
string(REGEX REPLACE "^#define[ \t]+PCRE2_MINOR[ \t]+([0-9]+)" "\\1"
|
||||
PCRE2_VERSION_MINOR "${PCRE2_VERSION_MINOR_LINE}")
|
||||
set(PCRE2_VERSION "${PCRE2_VERSION_MAJOR}.${PCRE2_VERSION_MINOR}")
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(PCRE2
|
||||
REQUIRED_VARS PCRE2_LIBRARY PCRE2_INCLUDE_DIR
|
||||
VERSION_VAR PCRE2_VERSION
|
||||
)
|
||||
|
||||
if(PCRE2_FOUND)
|
||||
set(PCRE2_LIBRARIES ${PCRE2_LIBRARY})
|
||||
set(PCRE2_INCLUDE_DIRS ${PCRE2_INCLUDE_DIR})
|
||||
|
||||
if(NOT TARGET PCRE2::PCRE2)
|
||||
add_library(PCRE2::PCRE2 UNKNOWN IMPORTED)
|
||||
set_target_properties(PCRE2::PCRE2 PROPERTIES
|
||||
IMPORTED_LOCATION "${PCRE2_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${PCRE2_INCLUDE_DIR}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
mark_as_advanced(PCRE2_INCLUDE_DIR PCRE2_LIBRARY)
|
||||
@@ -0,0 +1,52 @@
|
||||
#
|
||||
# 3proxy plugin definitions
|
||||
#
|
||||
# This file defines functions for building plugins
|
||||
#
|
||||
|
||||
# Function to add a plugin with dependencies
|
||||
function(add_3proxy_plugin PLUGIN_NAME)
|
||||
set(options "")
|
||||
set(oneValueArgs "")
|
||||
set(multiValueArgs SOURCES LIBRARIES INCLUDE_DIRS COMPILE_DEFINITIONS LINK_OPTIONS)
|
||||
|
||||
cmake_parse_arguments(PLUGIN "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||
|
||||
if(WIN32)
|
||||
set(PLUGIN_SUFFIX ".dll")
|
||||
else()
|
||||
set(PLUGIN_SUFFIX ".ld.so")
|
||||
endif()
|
||||
|
||||
add_library(${PLUGIN_NAME} SHARED ${PLUGIN_SOURCES})
|
||||
|
||||
set_target_properties(${PLUGIN_NAME} PROPERTIES
|
||||
PREFIX ""
|
||||
SUFFIX ${PLUGIN_SUFFIX}
|
||||
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
|
||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
|
||||
)
|
||||
|
||||
# Always link with Threads
|
||||
target_link_libraries(${PLUGIN_NAME} PRIVATE Threads::Threads)
|
||||
|
||||
if(PLUGIN_LIBRARIES)
|
||||
target_link_libraries(${PLUGIN_NAME} PRIVATE ${PLUGIN_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(PLUGIN_INCLUDE_DIRS)
|
||||
target_include_directories(${PLUGIN_NAME} PRIVATE ${PLUGIN_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
if(PLUGIN_COMPILE_DEFINITIONS)
|
||||
target_compile_definitions(${PLUGIN_NAME} PRIVATE ${PLUGIN_COMPILE_DEFINITIONS})
|
||||
endif()
|
||||
|
||||
if(PLUGIN_LINK_OPTIONS)
|
||||
set_target_properties(${PLUGIN_NAME} PROPERTIES LINK_OPTIONS "${PLUGIN_LINK_OPTIONS}")
|
||||
endif()
|
||||
|
||||
target_include_directories(${PLUGIN_NAME} PRIVATE
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
)
|
||||
endfunction()
|
||||
@@ -1,8 +1,8 @@
|
||||
3proxy 0.9 Public License Agreement
|
||||
|
||||
(c) 2000-2020 by 3APA3A (3APA3A@3proxy.ru)
|
||||
(c) 2000-2020 by 3proxy.org (https://3proxy.org/)
|
||||
(c) 2000-2020 by Vladimir Dubrovin (vlad@3proxy.ru)
|
||||
(c) 2000-2025 by 3APA3A (3APA3A@3proxy.ru)
|
||||
(c) 2000-2025 by 3proxy.org (https://3proxy.org/)
|
||||
(c) 2000-2025 by Vladimir Dubrovin (vlad@3proxy.org)
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
@@ -38,20 +38,20 @@ terms of compatible license, including:
|
||||
1. Apache License, Version 2.0 or (at your option) any later version
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
2. GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.gnu.org/licenses/gpl.txt
|
||||
https://www.gnu.org/licenses/gpl.txt
|
||||
|
||||
3. GNU Lesser General Public License as published by the
|
||||
Free Software Foundation; either version 2.1 of the License, or
|
||||
(at your option) any later version.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.gnu.org/licenses/lgpl.txt
|
||||
https://www.gnu.org/licenses/lgpl.txt
|
||||
|
||||
|
||||
Vendored
Whitespace-only changes.
Vendored
+36
@@ -0,0 +1,36 @@
|
||||
3proxy (0.9.7-1) buster; urgency=medium
|
||||
|
||||
*3proxy 0.9.7 initial build
|
||||
|
||||
-- z3APA3A <3apa3a@3proxy.org> Sat, 04 Jul 2026 11:55:03 +0300
|
||||
|
||||
3proxy (0.9.6-1) buster; urgency=medium
|
||||
|
||||
*3proxy 0.9.6 initial build
|
||||
|
||||
-- z3APA3A <3apa3a@3proxy.org> Sat, 11 Apr 2026 13:03:32 +0300
|
||||
|
||||
3proxy (0.9.5-1) buster; urgency=medium
|
||||
|
||||
*3proxy 0.9.5 initial build
|
||||
|
||||
-- z3APA3A <3apa3a@3proxy.org> Sun, 09 Mar 2025 15:55:48 +0300
|
||||
|
||||
3proxy (0.9.4-1) buster; urgency=medium
|
||||
|
||||
*3proxy 0.9.4 initial build
|
||||
|
||||
-- z3APA3A <3apa3a@3proxy.org> Fri, 02 Jul 2021 00:47:00 +0300
|
||||
|
||||
3proxy (0.9.3-1) buster; urgency=medium
|
||||
|
||||
*3proxy 0.9.3 initial build
|
||||
|
||||
-- z3APA3A <3apa3a@3proxy.org> Thu, 03 Dec 2020 21:13:58 +0300
|
||||
|
||||
3proxy (0.9.2-1) buster; urgency=medium
|
||||
|
||||
*3proxy 0.9.2 initial build
|
||||
|
||||
-- z3APA3A <3apa3a@3proxy.org> Thu, 19 Nov 2020 19:19:19 +0300
|
||||
|
||||
File renamed without changes.
+1
-1
@@ -1,4 +1,4 @@
|
||||
/etc/3proxy/3proxy.cfg
|
||||
/usr/local/3proxy/conf/3proxy.cfg
|
||||
/usr/local/3proxy/conf/add3proxyuser.sh
|
||||
/usr/local/3proxy/conf/bandlimiters
|
||||
/usr/local/3proxy/conf/counters
|
||||
File renamed without changes.
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: 3proxy
|
||||
Upstream-Contact: 3proxy@3proxy.org
|
||||
Source: https://3proxy.org/
|
||||
|
||||
Files: *
|
||||
Copyright: 2000-2026 Vladimir Dubrovin <vlad@3proxy.org>
|
||||
License: BSD-3-clause or Apache or GPL-2+ or LGPL-2+
|
||||
|
||||
Files: src/libs/blake2*.*
|
||||
Copyright: 2012, Samuel Neves <sneves@dei.uc.pt>
|
||||
License: public-domain (CC0 1.0 Universal) or OpenSSL license or Apache 2.0
|
||||
|
||||
Vendored
+43
@@ -0,0 +1,43 @@
|
||||
[ -f /bin/add3proxyuser ] && sed -i -e 's|@CMAKE_INSTALL_FULL_BINDIR@|/bin|g' -e 's|@3PROXY_CONFDIR@|/etc/3proxy/conf|g' -e 's|@CRYPT_PREFIX@|3proxy_|g' /bin/add3proxyuser; \
|
||||
[ -f /etc/init.d/3proxy ] && sed -i -e 's|@CMAKE_INSTALL_FULL_BINDIR@|/bin|g' -e 's|@CMAKE_INSTALL_FULL_SYSCONFDIR@|/etc|g' -e 's|USER=proxy|USER=root|g' /etc/init.d/3proxy; \
|
||||
[ -f /usr/lib/systemd/system/3proxy.service ] && sed -i -e 's|@CMAKE_INSTALL_FULL_BINDIR@|/bin|g' -e 's|@CMAKE_INSTALL_FULL_SYSCONFDIR@|/etc|g' -e 's|User=proxy|User=root|g' /usr/lib/systemd/system/3proxy.service; \
|
||||
|
||||
if [ -d /etc/3proxy ]; then \
|
||||
chmod -R o-rwx /etc/3proxy; \
|
||||
chown -R proxy:proxy /etc/3proxy; \
|
||||
fi
|
||||
|
||||
if [ -d /usr/local/3proxy ]; then \
|
||||
chmod -R o-rwx /usr/local/3proxy; \
|
||||
chown -R proxy:proxy /usr/local/3proxy; \
|
||||
fi
|
||||
|
||||
if /bin/systemctl >/dev/null 2>&1; then \
|
||||
/usr/sbin/update-rc.d 3proxy disable || true; \
|
||||
/usr/sbin/chkconfig 3proxy off || true; \
|
||||
/bin/systemctl enable 3proxy.service; \
|
||||
elif [ -x /usr/sbin/update-rc.d ]; then \
|
||||
/usr/sbin/update-rc.d 3proxy defaults; \
|
||||
/usr/sbin/update-rc.d 3proxy enable; \
|
||||
elif [ -x /usr/sbin/chkconfig ]; then \
|
||||
/usr/sbin/chkconfig 3proxy on; \
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo 3proxy installed.
|
||||
if /bin/systemctl >/dev/null 2>&1; then \
|
||||
/bin/systemctl stop 3proxy.service ;\
|
||||
/bin/systemctl start 3proxy.service ;\
|
||||
echo use ;\
|
||||
echo " "systemctl start 3proxy.service ;\
|
||||
echo to start proxy ;\
|
||||
echo " "systemctl stop 3proxy.service ;\
|
||||
echo to stop proxy ;\
|
||||
elif [ -x /usr/sbin/service ]; then \
|
||||
/usr/sbin/service 3proxy stop || true;\
|
||||
/usr/sbin/service 3proxy start || true;\
|
||||
echo " "service 3proxy start ;\
|
||||
echo to start proxy ;\
|
||||
echo " "service 3proxy stop ;\
|
||||
echo to stop proxy ;\
|
||||
fi
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
if [ -x /usr/sbin/useradd ]; then \
|
||||
/usr/bin/getent group proxy >/dev/null || (/usr/sbin/groupadd -f -r proxy || true); \
|
||||
/usr/bin/getent passwd proxy >/dev/null || (/usr/sbin/useradd -UMr -s /bin/false -c 3proxy proxy || true); \
|
||||
/usr/bin/getent passwd proxy >/dev/null || (/usr/sbin/useradd -Mr -s /bin/false -g proxy -c 3proxy proxy || true); \
|
||||
fi
|
||||
Vendored
+23
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/make -f
|
||||
|
||||
%:
|
||||
dh $@
|
||||
|
||||
override_dh_auto_configure:
|
||||
ln -sf Makefile.Linux Makefile
|
||||
|
||||
override_dh_auto_build:
|
||||
$(MAKE)
|
||||
|
||||
override_dh_auto_install:
|
||||
$(MAKE) DESTDIR=debian/3proxy install
|
||||
|
||||
override_dh_installman:
|
||||
|
||||
override_dh_usrlocal:
|
||||
|
||||
override_dh_auto_clean:
|
||||
find src/ -type f -name "*.o" -delete
|
||||
find src/ -type f -name "Makefile.var" -delete
|
||||
find bin/ -type f -executable -delete
|
||||
rm -f Makefile
|
||||
File renamed without changes.
@@ -0,0 +1,26 @@
|
||||
|
||||
3proxy 0.7
|
||||
|
||||
This release is partially forced: while no new significant functions are
|
||||
added, 0.7 is code is much more stable and less buggy than 0.6. Since
|
||||
there is no new development for a long time, except few minor bugfixes,
|
||||
I decided to finally release 0.7. You may want it if you:
|
||||
|
||||
Use HTTP proxy
|
||||
Use 3proxy under *BSD/Mac OS X/iPhone OS
|
||||
Use plugins, specially traffic related ones, like PCRE.
|
||||
|
||||
I have no time for active developement. There are interesting features
|
||||
in nearly ready state, e.g. SSL support / SSL decryption via
|
||||
certificates spoofing, NAT support and SSL auto-detection. You can step
|
||||
into development, if you are interested.
|
||||
|
||||
There are some configuration changes:
|
||||
|
||||
auth iponly is now default (because most misconfigurations were
|
||||
because of default auth none)
|
||||
maxconn is now 500 by default (because WebKit browsers ignore
|
||||
standards and create a lot of connections even if proxy is configured)
|
||||
NTLM is disabled by default (-n options, -n1 to enable) because
|
||||
NTLMv1 is disabled by default in Windows since Vista and there is no
|
||||
NTLMv2 library with compatible license. Report me, if any.
|
||||
@@ -0,0 +1,35 @@
|
||||
3proxy-0.7.1.4
|
||||
|
||||
!! Fix transparent flag not reset after keep-alive connection, can lead to
|
||||
|
||||
|
||||
3proxy-0.7.1.3
|
||||
|
||||
! traffic displayed incorrectly
|
||||
! archiver doesn't add suffix if logname contains macro
|
||||
! fix potential race condition on configuration reload
|
||||
! fix FTP over HTTP authentication
|
||||
|
||||
|
||||
3proxy-0.7.1.2
|
||||
|
||||
! Request / header size limitation relaxed for HTTP proxy
|
||||
|
||||
|
||||
3proxy 0.7.1.1
|
||||
|
||||
! Linux compilation issues resolved
|
||||
|
||||
|
||||
3proxy 0.7.1
|
||||
|
||||
Minor improvements and bugfixes:
|
||||
|
||||
+ Windows icons added
|
||||
+ Warnings added for most common misconfigurations
|
||||
+ ftppr NLSD command supported
|
||||
! Ignore NTLM handshake if NTLM is not enabled
|
||||
!! memcpy replaced with memmove for overlapped region
|
||||
! better EINTR handling on *nix
|
||||
! FTP proxy debugging output removed (introduced in 0.7), binding for data connection corrected
|
||||
! memory leak fixed in ldapauth plugin
|
||||
@@ -0,0 +1,9 @@
|
||||
+ IPv6 support
|
||||
+ back connect support
|
||||
+ name resolution over TCP, parent proxy support for dnspr
|
||||
+ SSLPlugin for TLS/SSL traffic decryption
|
||||
! multiple race conditions fixed
|
||||
! reduced memory usage
|
||||
! Generate Forwarded: header instead of X-Forwarded-For:
|
||||
! Default name resolution is non-blocking in *nix
|
||||
! multiple race conditions fixed on configuration reload
|
||||
@@ -0,0 +1 @@
|
||||
!!Fix: destination IP may be not checked against ACL
|
||||
@@ -0,0 +1,2 @@
|
||||
! Fix: parent proxy can be used in some cases where it shouldn't
|
||||
! Fix: bandlimiters may not work for older connections on configuration reload
|
||||
@@ -0,0 +1,9 @@
|
||||
Minor bugfixes / improvements:
|
||||
! Fixed: deadlock on insufficient resources
|
||||
! Fixed: race condition in ssl_plugin
|
||||
! Fixed: minor memory leak on configuration reload
|
||||
! Fixed: recursion detection was not working
|
||||
! Fixed: %n for IPv6 in logging terminates log record
|
||||
! Fixed: reverse PTR validation (required for dnsauth)
|
||||
! Fixed: error on external 0.0.0.0 for NOIPV6 (light version)
|
||||
+ Better support for IPv6 in ftppr
|
||||
@@ -0,0 +1,5 @@
|
||||
Bugfixes:
|
||||
! Fixed hostname support in SOCKSv5 UDP portmapping
|
||||
! -fno-strict-aliasing added to gcc options (compiling without this option can lead to unpredictable issues under Debian with gcc 6 and potentially others)
|
||||
! Fixed LDAP plugin compilation issues (LDAP plugin is still listed as unsupported though)
|
||||
and some minor fixes and improvements.
|
||||
@@ -0,0 +1,3 @@
|
||||
Bugfixes:
|
||||
!! Fixed out-of-bound write and few minor bugs on configuration saving in admin
|
||||
! fixed: $ is not correctly handled in the beginning of quoted line on configuration parsing
|
||||
@@ -0,0 +1,3 @@
|
||||
!! Fix transparent flag not reset after keep-alive connection, can lead to DoS by authenticated user.
|
||||
! Do not use SO_REUSEADDR by default (leads to random 00013 errors under some glibc versions)
|
||||
! Use SASIZE() instead of sizeof() in bind() for FreeBSD compatibility
|
||||
@@ -0,0 +1 @@
|
||||
! fixed: use SASIZE() instead of sizeof() in connect() for FreeBSD compatibility
|
||||
@@ -0,0 +1,5 @@
|
||||
+ Build PamPlugin on *nix
|
||||
+ stacksize and -S options, stacksize defaults changed for FreeBSD
|
||||
+ extip redirection type added
|
||||
! SSL plugin fix to correct handling of certificates path
|
||||
! fixed random errors on IPv6 connect
|
||||
@@ -0,0 +1 @@
|
||||
!Fix: mutex was used prior to initialization on 'log' command processing
|
||||
@@ -0,0 +1 @@
|
||||
! Fix: random 00012 errors in some configurations
|
||||
@@ -0,0 +1,15 @@
|
||||
! Fix 'daemon' command for Linux
|
||||
! Fix 'extip' redirections 00009 errors
|
||||
! Fix counters for older Win platforms
|
||||
! Resolve logging race conditions
|
||||
! attempt to fix pam_auth race conditions
|
||||
! FTP proxy workaround for broken gethostname() on some libc limplementations
|
||||
! authcache IP matching corrected
|
||||
! fix SOCKSv5 BIND/UDP ASSOC
|
||||
! use setreuid/setregid instead of setuid / setgid
|
||||
|
||||
+ OpenWatcom makefiles for Windows
|
||||
+ -u2 support for proxy
|
||||
+ support %i in logformat
|
||||
+ force/noforce configuration commands to disconnect / do not disconnect clients if nolonger match ACL after configuration change
|
||||
+ support longer external passwords
|
||||
@@ -0,0 +1,3 @@
|
||||
!! Fix resolver for non-compressed reply parsing (on mixed-case sensitive resolvers)
|
||||
! Fix plugins export on OpenWatcom compiler (light version)
|
||||
! Fix SOCKSv5
|
||||
@@ -0,0 +1 @@
|
||||
! Fix: tcppm may fail if used with parent proxy
|
||||
@@ -0,0 +1,6 @@
|
||||
+ Socket options, interface binding
|
||||
+ Connection limiting / connection rate limiting
|
||||
+ RADIUS support (beta)
|
||||
+ Zero copy (splice) support for Linux
|
||||
+ Possibility to limit user to single IP (via authentication cache)
|
||||
! bugfixes, improvements
|
||||
@@ -0,0 +1,8 @@
|
||||
Bugfixes:
|
||||
! Fixed: socket may be closed before all data received/sent
|
||||
! Fixed: bandlimin non-working
|
||||
! Fixed: countall/nocountall
|
||||
! Fixed: few race conditions
|
||||
|
||||
Improvements:
|
||||
+ deb/rpm build, systemd support (experimental)
|
||||
@@ -0,0 +1,9 @@
|
||||
Bugfixes:
|
||||
! Fixed: bandwidth limiters (once again)
|
||||
! Fixed: data filtering plugins (PCREPlugin, SSLPlugin). SSLPlugin use on Linux requires to disable splice (-s0)
|
||||
! FIxed: standalone proxies do not react on HUP (Ctrl+C) in Linux/Unix
|
||||
! Fixed: few minor bugs
|
||||
|
||||
Improvements:
|
||||
+ deb for arm platforms (experimental)
|
||||
+ Openssl 1.1 support for SSLPlugin
|
||||
@@ -0,0 +1,11 @@
|
||||
Bugfixes:
|
||||
! Fixed: systemd description file (proxy may fail to start after reboot or via systemctl)
|
||||
! Fixed: group/account creation in installation scripts
|
||||
! Fixed: countall/nocounall do not work in some configurations
|
||||
! Fixed: counters do not work if counter file is not specified
|
||||
! Fixed: counters without rotation (type N) are incorrectly shown in web admin interface
|
||||
! Fixed: %n may be incomplete or missed in long log records
|
||||
! Fixed: connect back functionality does not work
|
||||
|
||||
Improvements:
|
||||
+ Docker builds
|
||||
@@ -0,0 +1,4 @@
|
||||
! Fix: invalid handling of '-' character in ACL hostname
|
||||
! Fix: minor bugfixes and improvements
|
||||
+ parentretry command added (defaults to 2) to retry connections to parent proxies
|
||||
- icqpr related code (OSCAR proxy) removed, due to drop of OSCAR support by messengers
|
||||
@@ -0,0 +1,7 @@
|
||||
!! Security fix: proxy can potentially crash on on some platforms due to overlapping regions in strcpy() (thanks to @lenix123 for reporting)
|
||||
+ new proxy service type: `tlspr` - SNI proxy, may also be used as parent `tls` type, sniffs hostname from TLS handhake, read more in https://github.com/3proxy/3proxy/wiki/tlspr https://github.com/3proxy/3proxy/wiki/How-To-(incomplete)#TLSPR
|
||||
+ new proxy service type: `auto` - autodetect proxy type between `proxy` and `socks`
|
||||
+ SSLPlugin is rewritten, production-ready, supports TLS (SSL) server (may be used to create https:// type proxy), certificates checks and cypher options, see https://github.com/3proxy/3proxy/wiki/SSLPlugin
|
||||
+ -g option is added for grace delay to reduce CPU load, see https://github.com/3proxy/3proxy/wiki/High-Load
|
||||
! Multiple minor bugfixes
|
||||
! More supported sockets options
|
||||
@@ -0,0 +1,9 @@
|
||||
+ ssl_client and multiple configuration options added to SSLPlugin, SSLPlugin code significantly improved and bugfixed. See https://github.com/3proxy/3proxy/wiki/SSLPlugin. 3proxy can now be used as stunnel replacement for many scenarios.
|
||||
+ HAProxy proxy protocol v1 support as client and server, add -H option for service to expect HA proxy v1 protocol header, use ha parent type: parent 1000 ha 0.0.0.0 0 to send v1 header.
|
||||
+ tlspr is supported in auto
|
||||
+ tlspr supports -s option, it breaks HELLO packet to prevent some DPIs from detecting SNI
|
||||
+ maxseg configuration option and TCP_MAXSEG socket flag support added. It sets maximum size of TCP segment to fix PathMTU discovery problems
|
||||
+ -Ne / -Ni options added to specify external / internal NAT address for SOCKSv5
|
||||
+ cmake environment added
|
||||
! External pcre2 (pcre2-8) library is used for PCRE, pcre code is removed from 3proxy
|
||||
! Multiple minor bugfixes
|
||||
@@ -0,0 +1,23 @@
|
||||
+ PCRE2 and SSL/TLS code moved from plugins into main 3proxy binary; dynamic linking with ssl/pcre by default, STATIC/LIBSTATIC options for static linking
|
||||
+ Unix sockets support for parent proxies, tcppm, internal listeners and -i option; abstract (fileless) unix sockets on Linux
|
||||
+ ssl_client_mode = 3 to use 'secure' parent types: https, tcps, socks5s, connect+s, etc.
|
||||
+ New authcache types: cacheacl, dstaddr, dstport, dsthost, dstoper, srvaddr, srvport; authcache is now configurable per service
|
||||
+ Hashtables for password lists and authcache, faster password lookups
|
||||
+ 3proxy_crypt: new internal password hashing replacing mycrypt
|
||||
+ udppm switched to hashtables and supports multiple connections
|
||||
+ SOCKSv5 UDP parent support; -Ne/-Ni NAT options
|
||||
+ Docker images for more platforms, signed; DLLs signed; public cert added to build
|
||||
+ Grace sleep and linger on connection close; correctly process half-closed connections
|
||||
+ Allow setting internal/external network namespaces on Linux
|
||||
- icqpr/OSCAR code removed
|
||||
! Fix: invalid error in SSL server handshake could break service state
|
||||
! Fix: invalid offset in datafilters
|
||||
! Fix: invalid socket in poll() could break sockmap() on Windows
|
||||
! Fix: deadlock in ftppr
|
||||
! Fix: crash on standalone services
|
||||
! Fix: non-initialized mutex crash under Windows
|
||||
! Fix: socks v5 parent with no auth
|
||||
! Fix: hanging connections in sockmap; unneeded poll in sockmap
|
||||
! Fix: symbols collision with OpenSSL could lead to crash
|
||||
! Fix: compatibility with older SSL versions and older Windows (7 and below)
|
||||
! Multiple minor bugfixes and code cleanup
|
||||
@@ -1,508 +0,0 @@
|
||||
{\rtf1\adeflang1025\ansi\ansicpg1251\uc1\adeff0\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang1049\deflangfe1049{\fonttbl{\f0\froman\fcharset204\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f2\fmodern\fcharset204\fprq1{\*\panose 02070309020205020404}Courier New;}
|
||||
{\f3\froman\fcharset2\fprq2{\*\panose 05050102010706020507}Symbol;}{\f10\fnil\fcharset2\fprq2{\*\panose 05000000000000000000}Wingdings;}{\f39\froman\fcharset0\fprq2 Times New Roman;}{\f37\froman\fcharset238\fprq2 Times New Roman CE;}
|
||||
{\f40\froman\fcharset161\fprq2 Times New Roman Greek;}{\f41\froman\fcharset162\fprq2 Times New Roman Tur;}{\f42\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f43\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
|
||||
{\f44\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f45\froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f59\fmodern\fcharset0\fprq1 Courier New;}{\f57\fmodern\fcharset238\fprq1 Courier New CE;}
|
||||
{\f60\fmodern\fcharset161\fprq1 Courier New Greek;}{\f61\fmodern\fcharset162\fprq1 Courier New Tur;}{\f62\fbidi \fmodern\fcharset177\fprq1 Courier New (Hebrew);}{\f63\fbidi \fmodern\fcharset178\fprq1 Courier New (Arabic);}
|
||||
{\f64\fmodern\fcharset186\fprq1 Courier New Baltic;}{\f65\fmodern\fcharset163\fprq1 Courier New (Vietnamese);}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;
|
||||
\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{
|
||||
\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1049\langfe1049\cgrid\langnp1049\langfenp1049 \snext0 Normal;}{\*\cs10 \additive \ssemihidden
|
||||
Default Paragraph Font;}{\*\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tblind0\tblindtype3\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv
|
||||
\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \fs20\lang1024\langfe1024\cgrid\langnp1024\langfenp1024 \snext11 \ssemihidden Normal Table;}}
|
||||
{\*\latentstyles\lsdstimax156\lsdlockeddef0}{\*\listtable{\list\listtemplateid-1938272566{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'01\'00;}{\levelnumbers\'01;}\rtlch\fcs1 \af0
|
||||
\ltrch\fcs0 \fbias0 \fi-360\li360\jclisttab\tx360\lin360 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'03\'00.\'01;}{\levelnumbers\'01\'03;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fbias0
|
||||
\fi-360\li360\jclisttab\tx360\lin360 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'05\'00.\'01.\'02;}{\levelnumbers\'01\'03\'05;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fbias0 \fi-720\li720
|
||||
\jclisttab\tx720\lin720 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'07\'00.\'01.\'02.\'03;}{\levelnumbers\'01\'03\'05\'07;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fbias0 \fi-720\li720
|
||||
\jclisttab\tx720\lin720 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'09\'00.\'01.\'02.\'03.\'04;}{\levelnumbers\'01\'03\'05\'07\'09;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fbias0
|
||||
\fi-1080\li1080\jclisttab\tx1080\lin1080 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'0b\'00.\'01.\'02.\'03.\'04.\'05;}{\levelnumbers\'01\'03\'05\'07\'09\'0b;}\rtlch\fcs1 \af0
|
||||
\ltrch\fcs0 \fbias0 \fi-1080\li1080\jclisttab\tx1080\lin1080 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'0d\'00.\'01.\'02.\'03.\'04.\'05.\'06;}{\levelnumbers
|
||||
\'01\'03\'05\'07\'09\'0b\'0d;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fbias0 \fi-1440\li1440\jclisttab\tx1440\lin1440 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
|
||||
\'0f\'00.\'01.\'02.\'03.\'04.\'05.\'06.\'07;}{\levelnumbers\'01\'03\'05\'07\'09\'0b\'0d\'0f;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fbias0 \fi-1440\li1440\jclisttab\tx1440\lin1440 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1
|
||||
\levelspace0\levelindent0{\leveltext\'11\'00.\'01.\'02.\'03.\'04.\'05.\'06.\'07.\'08;}{\levelnumbers\'01\'03\'05\'07\'09\'0b\'0d\'0f\'11;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fbias0 \fi-1800\li1800\jclisttab\tx1800\lin1800 }{\listname ;}\listid233053280}
|
||||
{\list\listtemplateid269381388\listhybrid{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid1994686728\'02\'00.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fbias0
|
||||
\fi-360\li720\jclisttab\tx720\lin720 }{\listlevel\levelnfc255\levelnfcn255\leveljc0\leveljcn0\levelfollow0\levelstartat0\levelspace0\levelindent0{\leveltext\leveltemplateid-2036938464\'00;}{\levelnumbers;}\rtlch\fcs1 \af0 \ltrch\fcs0 \jclisttab\tx360 }
|
||||
{\listlevel\levelnfc255\levelnfcn255\leveljc0\leveljcn0\levelfollow0\levelstartat0\levelspace0\levelindent0{\leveltext\leveltemplateid1578941516\'00;}{\levelnumbers;}\rtlch\fcs1 \af0 \ltrch\fcs0 \jclisttab\tx360 }{\listlevel\levelnfc255\levelnfcn255
|
||||
\leveljc0\leveljcn0\levelfollow0\levelstartat0\levelspace0\levelindent0{\leveltext\leveltemplateid936021434\'00;}{\levelnumbers;}\rtlch\fcs1 \af0 \ltrch\fcs0 \jclisttab\tx360 }{\listlevel\levelnfc255\levelnfcn255\leveljc0\leveljcn0\levelfollow0
|
||||
\levelstartat0\levelspace0\levelindent0{\leveltext\leveltemplateid-1323636224\'00;}{\levelnumbers;}\rtlch\fcs1 \af0 \ltrch\fcs0 \jclisttab\tx360 }{\listlevel\levelnfc255\levelnfcn255\leveljc0\leveljcn0\levelfollow0\levelstartat0\levelspace0\levelindent0
|
||||
{\leveltext\leveltemplateid-1892018578\'00;}{\levelnumbers;}\rtlch\fcs1 \af0 \ltrch\fcs0 \jclisttab\tx360 }{\listlevel\levelnfc255\levelnfcn255\leveljc0\leveljcn0\levelfollow0\levelstartat0\levelspace0\levelindent0{\leveltext\leveltemplateid-108487922
|
||||
\'00;}{\levelnumbers;}\rtlch\fcs1 \af0 \ltrch\fcs0 \jclisttab\tx360 }{\listlevel\levelnfc255\levelnfcn255\leveljc0\leveljcn0\levelfollow0\levelstartat0\levelspace0\levelindent0{\leveltext\leveltemplateid-4969626\'00;}{\levelnumbers;}\rtlch\fcs1 \af0
|
||||
\ltrch\fcs0 \jclisttab\tx360 }{\listlevel\levelnfc255\levelnfcn255\leveljc0\leveljcn0\levelfollow0\levelstartat0\levelspace0\levelindent0{\leveltext\leveltemplateid1135759886\'00;}{\levelnumbers;}\rtlch\fcs1 \af0 \ltrch\fcs0 \jclisttab\tx360 }{\listname
|
||||
;}\listid243993609}{\list\listtemplateid1411046654{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat2\levelspace0\levelindent0{\leveltext\'01\'00;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fbias0 \fi-360\li360
|
||||
\jclisttab\tx360\lin360 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat2\levelspace0\levelindent0{\leveltext\'03\'00.\'01;}{\levelnumbers\'01\'03;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fbias0 \fi-360\li720\jclisttab\tx720\lin720 }
|
||||
{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'05\'00.\'01.\'02;}{\levelnumbers\'01\'03\'05;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fbias0 \fi-720\li1440\jclisttab\tx1440\lin1440 }{\listlevel
|
||||
\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'07\'00.\'01.\'02.\'03;}{\levelnumbers\'01\'03\'05\'07;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fbias0 \fi-720\li1800\jclisttab\tx1800\lin1800 }{\listlevel
|
||||
\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'09\'00.\'01.\'02.\'03.\'04;}{\levelnumbers\'01\'03\'05\'07\'09;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fbias0 \fi-1080\li2520\jclisttab\tx2520\lin2520 }
|
||||
{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'0b\'00.\'01.\'02.\'03.\'04.\'05;}{\levelnumbers\'01\'03\'05\'07\'09\'0b;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fbias0 \fi-1080\li2880
|
||||
\jclisttab\tx2880\lin2880 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'0d\'00.\'01.\'02.\'03.\'04.\'05.\'06;}{\levelnumbers\'01\'03\'05\'07\'09\'0b\'0d;}\rtlch\fcs1 \af0 \ltrch\fcs0
|
||||
\fbias0 \fi-1440\li3600\jclisttab\tx3600\lin3600 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'0f\'00.\'01.\'02.\'03.\'04.\'05.\'06.\'07;}{\levelnumbers
|
||||
\'01\'03\'05\'07\'09\'0b\'0d\'0f;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fbias0 \fi-1440\li3960\jclisttab\tx3960\lin3960 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
|
||||
\'11\'00.\'01.\'02.\'03.\'04.\'05.\'06.\'07.\'08;}{\levelnumbers\'01\'03\'05\'07\'09\'0b\'0d\'0f\'11;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fbias0 \fi-1800\li4680\jclisttab\tx4680\lin4680 }{\listname ;}\listid368384829}{\list\listtemplateid1424627480\listhybrid
|
||||
{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid1868871046\'01-;}{\levelnumbers;}\loch\af0\hich\af0\dbch\af0\fbias0 \fi-360\li420\jclisttab\tx420\lin420 }{\listlevel
|
||||
\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid68747267\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li1140\jclisttab\tx1140\lin1140 }{\listlevel\levelnfc23\levelnfcn23
|
||||
\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid68747269\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li1860\jclisttab\tx1860\lin1860 }{\listlevel\levelnfc23\levelnfcn23\leveljc0
|
||||
\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid68747265\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li2580\jclisttab\tx2580\lin2580 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0
|
||||
\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid68747267\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li3300\jclisttab\tx3300\lin3300 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1
|
||||
\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid68747269\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li4020\jclisttab\tx4020\lin4020 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative
|
||||
\levelspace0\levelindent0{\leveltext\leveltemplateid68747265\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li4740\jclisttab\tx4740\lin4740 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0
|
||||
\levelindent0{\leveltext\leveltemplateid68747267\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li5460\jclisttab\tx5460\lin5460 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext
|
||||
\leveltemplateid68747269\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li6180\jclisttab\tx6180\lin6180 }{\listname ;}\listid634527506}{\list\listtemplateid1914202178\listhybrid{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0
|
||||
\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid745160830\'02\'00.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fbias0 \fi-360\li720\jclisttab\tx720\lin720 }{\listlevel\levelnfc255\levelnfcn255\leveljc0\leveljcn0\levelfollow0
|
||||
\levelstartat0\levelspace0\levelindent0{\leveltext\leveltemplateid-1816475770\'00;}{\levelnumbers;}\rtlch\fcs1 \af0 \ltrch\fcs0 \jclisttab\tx360 }{\listlevel\levelnfc255\levelnfcn255\leveljc0\leveljcn0\levelfollow0\levelstartat0\levelspace0\levelindent0
|
||||
{\leveltext\leveltemplateid-715330988\'00;}{\levelnumbers;}\rtlch\fcs1 \af0 \ltrch\fcs0 \jclisttab\tx360 }{\listlevel\levelnfc255\levelnfcn255\leveljc0\leveljcn0\levelfollow0\levelstartat0\levelspace0\levelindent0{\leveltext\leveltemplateid1569232270
|
||||
\'00;}{\levelnumbers;}\rtlch\fcs1 \af0 \ltrch\fcs0 \jclisttab\tx360 }{\listlevel\levelnfc255\levelnfcn255\leveljc0\leveljcn0\levelfollow0\levelstartat0\levelspace0\levelindent0{\leveltext\leveltemplateid-297370836\'00;}{\levelnumbers;}\rtlch\fcs1 \af0
|
||||
\ltrch\fcs0 \jclisttab\tx360 }{\listlevel\levelnfc255\levelnfcn255\leveljc0\leveljcn0\levelfollow0\levelstartat0\levelspace0\levelindent0{\leveltext\leveltemplateid-346936770\'00;}{\levelnumbers;}\rtlch\fcs1 \af0 \ltrch\fcs0 \jclisttab\tx360 }{\listlevel
|
||||
\levelnfc255\levelnfcn255\leveljc0\leveljcn0\levelfollow0\levelstartat0\levelspace0\levelindent0{\leveltext\leveltemplateid416698944\'00;}{\levelnumbers;}\rtlch\fcs1 \af0 \ltrch\fcs0 \jclisttab\tx360 }{\listlevel\levelnfc255\levelnfcn255\leveljc0
|
||||
\leveljcn0\levelfollow0\levelstartat0\levelspace0\levelindent0{\leveltext\leveltemplateid-596467262\'00;}{\levelnumbers;}\rtlch\fcs1 \af0 \ltrch\fcs0 \jclisttab\tx360 }{\listlevel\levelnfc255\levelnfcn255\leveljc0\leveljcn0\levelfollow0\levelstartat0
|
||||
\levelspace0\levelindent0{\leveltext\leveltemplateid11278156\'00;}{\levelnumbers;}\rtlch\fcs1 \af0 \ltrch\fcs0 \jclisttab\tx360 }{\listname ;}\listid1261259807}}{\*\listoverridetable{\listoverride\listid1261259807\listoverridecount0\ls1}
|
||||
{\listoverride\listid634527506\listoverridecount0\ls2}{\listoverride\listid233053280\listoverridecount0\ls3}{\listoverride\listid243993609\listoverridecount0\ls4}{\listoverride\listid368384829\listoverridecount0\ls5}}{\*\rsidtbl \rsid1339617\rsid1586505
|
||||
\rsid1600374\rsid1771507\rsid1986875\rsid2235853\rsid2296829\rsid2567226\rsid2701137\rsid3560132\rsid3671104\rsid3692728\rsid4980816\rsid5776876\rsid5975359\rsid6257560\rsid6570302\rsid7013593\rsid7235628\rsid7749673\rsid8087560\rsid8326885\rsid8672163
|
||||
\rsid8675175\rsid9981679\rsid10440144\rsid10497064\rsid10908886\rsid12060716\rsid12261729\rsid12544729\rsid12806430\rsid13111076\rsid13909505\rsid15236432\rsid15609114\rsid15928529\rsid16077654}{\*\generator Microsoft Word 11.0.0000;}{\info
|
||||
{\title 3proxy developer reference}{\author Vladimir Dubrovin}{\operator Vladimir Dubrovin}{\creatim\yr2007\mo11\dy23\hr19\min28}{\revtim\yr2008\mo1\dy22\hr19\min28}{\version8}{\edmins86}{\nofpages8}{\nofwords2396}{\nofchars13662}{\*\company Sandy}
|
||||
{\nofcharsws16026}{\vern24611}{\*\password 00000000}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}{\xmlns2 urn:schemas-microsoft-com:office:smarttags}}
|
||||
\paperw11906\paperh16838\margl1701\margr850\margt1134\margb1134\gutter0\ltrsect
|
||||
\deftab708\widowctrl\ftnbj\aenddoc\donotembedsysfont1\donotembedlingdata0\grfdocevents0\validatexml1\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors1\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\formshade\horzdoc\dgmargin
|
||||
\dghspace180\dgvspace180\dghorigin1701\dgvorigin1134\dghshow1\dgvshow1
|
||||
\jexpand\viewkind1\viewscale130\viewzk2\pgbrdrhead\pgbrdrfoot\splytwnine\ftnlytwnine\htmautsp\nolnhtadjtbl\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule\nobrkwrptbl\viewnobound1\snaptogridincell
|
||||
\allowfieldendsel\wrppunct\asianbrkrule\rsidroot10497064\newtblstyruls\nogrowautofit \fet0{\*\wgrffmtfilter 013f}\ilfomacatclnup0\ltrpar \sectd \ltrsect\linex0\headery708\footery708\colsx708\endnhere\sectlinegrid360\sectdefaultcl\sftnbj {\*\pnseclvl1
|
||||
\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5
|
||||
\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang
|
||||
{\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0
|
||||
\fs24\lang1049\langfe1049\cgrid\langnp1049\langfenp1049 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid13111076
|
||||
\par }\pard \ltrpar\qc \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid2235853 {\rtlch\fcs1 \af0\afs32 \ltrch\fcs0 \fs32\lang1033\langfe1049\langnp1033\insrsid10497064\charrsid12261729 3proxy developer reference}{
|
||||
\rtlch\fcs1 \af0\afs32 \ltrch\fcs0 \fs32\lang1033\langfe1049\langnp1033\insrsid10497064
|
||||
\par }{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \fs20\lang1033\langfe1049\langnp1033\insrsid2235853\charrsid12261729 $Id: devref.rtf,v 1.4 2008/01/24 08:44:57 vlad Exp $
|
||||
\par }\pard \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid10497064
|
||||
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \b\lang1033\langfe1049\langnp1033\insrsid10497064\charrsid12060716 \hich\af0\dbch\af0\loch\f0 1.\tab}}\pard \ltrpar\ql \fi-360\li720\ri0\widctlpar
|
||||
\jclisttab\tx720\wrapdefault\aspalpha\aspnum\faauto\ls4\adjustright\rin0\lin720\itap0\pararsid6570302 {\rtlch\fcs1 \af0 \ltrch\fcs0 \b\lang1033\langfe1049\langnp1033\insrsid10497064\charrsid12060716 Understanding Internal 3proxy structure
|
||||
\par }\pard \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid10497064 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid10497064
|
||||
\par 3proxy is implemented as multithread application. Server model is implemented as \'93one connection \endash one thread\'94. It means, for every client connection new thre
|
||||
ad is created. This model is effective enough under Windows, because it allows it avoid thread creation on asynchronous operations, yet under most POSIX systems this model can not be considered as most efficient. It\rquote
|
||||
s planned for (very far in future) release to implement more efficient model, where single thread can serve few clients.
|
||||
\par
|
||||
\par
|
||||
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid10497064 \hich\af0\dbch\af0\loch\f0 1.1\tab}}\pard \ltrpar\ql \fi-360\li360\ri0\widctlpar
|
||||
\jclisttab\tx360\wrapdefault\aspalpha\aspnum\faauto\ls3\ilvl1\adjustright\rin0\lin360\itap0\pararsid6570302 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid10497064 main thread:
|
||||
\par }\pard \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid6570302 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid6570302
|
||||
\par }\pard \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid10497064 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid10497064
|
||||
3proxy begins with main thread. This thread parses configuration}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid4980816 file and starts main loop}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid10497064 . }{
|
||||
\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid8672163 During configuration file parsing }{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid8672163\charrsid8672163 struct extaparam conf;}{\rtlch\fcs1 \af0
|
||||
\ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid8672163 structure is filled and service threads are started.
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid3560132
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid6570302 Main loop cycle }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid2701137 takes approximately 1 second and }{\rtlch\fcs1 \af0 \ltrch\fcs0
|
||||
\lang1033\langfe1049\langnp1033\insrsid6570302 does these tasks:}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid10497064
|
||||
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid6570302 \hich\af0\dbch\af0\loch\f0 -\tab}}\pard \ltrpar\ql \fi-360\li420\ri0\widctlpar
|
||||
\jclisttab\tx420\wrapdefault\aspalpha\aspnum\faauto\ls2\adjustright\rin0\lin420\itap0\pararsid6570302 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid6570302 re-reads configuration}{\rtlch\fcs1 \af0 \ltrch\fcs0
|
||||
\lang1033\langfe1049\langnp1033\insrsid8672163 file}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid6570302 , if necessary
|
||||
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid6570302 \hich\af0\dbch\af0\loch\f0 -\tab}performs scheduled tasks
|
||||
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid6570302 \hich\af0\dbch\af0\loch\f0 -\tab}monitors files (\lquote monitor}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid4980816 \rquote
|
||||
command}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid6570302 )}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid2701137 , approx. once in a minute}{\rtlch\fcs1 \af0 \ltrch\fcs0
|
||||
\lang1033\langfe1049\langnp1033\insrsid6570302
|
||||
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid6570302 \hich\af0\dbch\af0\loch\f0 -\tab}rotates main logfile
|
||||
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid6570302 \hich\af0\dbch\af0\loch\f0 -\tab}dumps counters to }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid2701137
|
||||
file, approx. once in a minute}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid6570302
|
||||
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid2701137 \hich\af0\dbch\af0\loch\f0 -\tab}}\pard \ltrpar\ql \fi-360\li420\ri0\widctlpar
|
||||
\jclisttab\tx420\wrapdefault\aspalpha\aspnum\faauto\ls2\adjustright\rin0\lin420\itap0\pararsid2701137 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid2701137 performs termination, if required
|
||||
\par }\pard \ltrpar\ql \li60\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin60\itap0\pararsid8672163 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid3560132
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid2701137 I}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid8672163 t\rquote s guaranteed every configuration and schedule command is executed from the same thread.
|
||||
|
||||
\par Main thread is implemented in }{\rtlch\fcs1 \af0 \ltrch\fcs0 \b\lang1033\langfe1049\langnp1033\insrsid8672163\charrsid12544729 3proxy.c}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid8672163
|
||||
\par }\pard \ltrpar\ql \li60\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin60\itap0\pararsid6570302 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid6570302
|
||||
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid8672163 \hich\af0\dbch\af0\loch\f0 1.2\tab}}\pard \ltrpar\ql \fi-360\li360\ri0\widctlpar
|
||||
\jclisttab\tx360\wrapdefault\aspalpha\aspnum\faauto\ls3\ilvl1\adjustright\rin0\lin360\itap0\pararsid8672163 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid8672163 service thread}{\rtlch\fcs1 \af0 \ltrch\fcs0
|
||||
\lang1033\langfe1049\langnp1033\insrsid6570302
|
||||
\par }\pard \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid8672163 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid8672163
|
||||
\par Service threads are started immediately, than service command (e.g. \lquote proxy\rquote or \lquote socks\rquote ) are found during configuration file parsing. Each command creates new thread. Thread does these tasks:
|
||||
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid8672163 \hich\af0\dbch\af0\loch\f0 -\tab}}\pard \ltrpar\ql \fi-360\li420\ri0\widctlpar
|
||||
\jclisttab\tx420\wrapdefault\aspalpha\aspnum\faauto\ls2\adjustright\rin0\lin420\itap0\pararsid8672163 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid8672163 parses service command arguments and fills \lquote }{\rtlch\fcs1 \af0
|
||||
\ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid8672163\charrsid6257560 struct srvparam srv}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid8672163 \rquote structure with service configuration and \lquote }{\rtlch\fcs1 \af0
|
||||
\ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid8672163\charrsid6257560 struct clientparam defparam}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid8672163 \rquote structure with default client configuration
|
||||
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid6257560 \hich\af0\dbch\af0\loch\f0 -\tab}}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid6257560 initializes filters}{\rtlch\fcs1 \af0
|
||||
\ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid3560132 (filter_open)}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid6257560\charrsid8672163
|
||||
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid6257560 \hich\af0\dbch\af0\loch\f0 -\tab}}\pard \ltrpar\ql \fi-360\li420\ri0\widctlpar
|
||||
\jclisttab\tx420\wrapdefault\aspalpha\aspnum\faauto\ls2\adjustright\rin0\lin420\itap0\pararsid6257560 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid6257560 creates }{\rtlch\fcs1 \af0 \ltrch\fcs0
|
||||
\lang1033\langfe1049\langnp1033\insrsid2701137 and initializes }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid6257560 listening service socket
|
||||
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid2701137 \hich\af0\dbch\af0\loch\f0 -\tab}}\pard \ltrpar\ql \fi-360\li420\ri0\widctlpar
|
||||
\jclisttab\tx420\wrapdefault\aspalpha\aspnum\faauto\ls2\adjustright\rin0\lin420\itap0\pararsid3560132 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid2701137 enters into service loop}{\rtlch\fcs1 \af0 \ltrch\fcs0
|
||||
\lang1033\langfe1049\langnp1033\insrsid3560132
|
||||
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid3560132 \hich\af0\dbch\af0\loch\f0 -\tab}terminates filters (filter_close)
|
||||
\par }\pard \ltrpar\ql \li60\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin60\itap0\pararsid2701137 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid3560132
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid2701137 service loop:
|
||||
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid2701137 \hich\af0\dbch\af0\loch\f0 -\tab}}\pard \ltrpar\ql \fi-360\li420\ri0\widctlpar
|
||||
\jclisttab\tx420\wrapdefault\aspalpha\aspnum\faauto\ls2\adjustright\rin0\lin420\itap0\pararsid2701137 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid2701137
|
||||
checks for configuration reload (approximately every second), thread exits if configuration reloaded or 3proxy is in terminating state.
|
||||
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid2701137 \hich\af0\dbch\af0\loch\f0 -\tab}accepts client connection and creates \lquote }{\rtlch\fcs1 \af0 \ltrch\fcs0
|
||||
\i\lang1033\langfe1049\langnp1033\insrsid2701137 struct clientparam new}{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid2701137\charrsid6257560 param}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid2701137
|
||||
\rquote structure with client configuration
|
||||
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid3560132 \hich\af0\dbch\af0\loch\f0 -\tab}}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid3560132
|
||||
creates/checks client filters (filter_client)
|
||||
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid3560132 \hich\af0\dbch\af0\loch\f0 -\tab}creates client thread with newly created \lquote }{\rtlch\fcs1 \af0 \ltrch\fcs0
|
||||
\i\lang1033\langfe1049\langnp1033\insrsid3560132 struct clientparam new}{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid3560132\charrsid6257560 param}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid3560132
|
||||
\rquote
|
||||
\par }\pard \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid6570302 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid6570302
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid5975359 service threads are implemented in }{\rtlch\fcs1 \af0 \ltrch\fcs0 \b\lang1033\langfe1049\langnp1033\insrsid7749673\charrsid12544729 proxymain.c}{\rtlch\fcs1 \af0 \ltrch\fcs0
|
||||
\lang1033\langfe1049\langnp1033\insrsid5975359\charrsid7749673
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid5975359
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid3560132 Please note: struct clientparam is freed and }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid3560132\charrsid3560132 filter_clear}{\rtlch\fcs1 \af0
|
||||
\ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid3560132 is executed from different (client) thread.
|
||||
\par
|
||||
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid3560132 \hich\af0\dbch\af0\loch\f0 1.3\tab}}\pard \ltrpar\ql \fi-360\li360\ri0\widctlpar
|
||||
\jclisttab\tx360\wrapdefault\aspalpha\aspnum\faauto\ls3\ilvl1\adjustright\rin0\lin360\itap0\pararsid3560132 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid3560132 client thread
|
||||
\par }\pard \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid7749673 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid7749673
|
||||
\par Client threads are started from service thread. Client thread:
|
||||
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid7749673 \hich\af0\dbch\af0\loch\f0 -\tab}}\pard \ltrpar\ql \fi-360\li420\ri0\widctlpar
|
||||
\jclisttab\tx420\wrapdefault\aspalpha\aspnum\faauto\ls2\adjustright\rin0\lin420\itap0\pararsid7749673 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid7749673
|
||||
reads client request (except portmappers) with authentication information and request headers (if any).
|
||||
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid5776876 \hich\af0\dbch\af0\loch\f0 -\tab}}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid5776876 filters request (if any) with }{
|
||||
\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid5776876\charrsid5776876 filter_request}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid7749673
|
||||
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid5776876 \hich\af0\dbch\af0\loch\f0 -\tab}}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid5776876 filters headers (if any) with }{
|
||||
\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid5776876\charrsid5776876 filter_header_cli}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid5776876
|
||||
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid5776876 \hich\af0\dbch\af0\loch\f0 -\tab}performs authentication and authorization
|
||||
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid5776876 \hich\af0\dbch\af0\loch\f0 -\tab}established connection with server
|
||||
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid5776876 \hich\af0\dbch\af0\loch\f0 -\tab}sends request to server
|
||||
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid5776876 \hich\af0\dbch\af0\loch\f0 -\tab}}\pard \ltrpar\ql \fi-360\li420\ri0\widctlpar
|
||||
\jclisttab\tx420\wrapdefault\aspalpha\aspnum\faauto\ls2\adjustright\rin0\lin420\itap0\pararsid3560132 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid5776876 filters server headers (if any)}{\rtlch\fcs1 \af0 \ltrch\fcs0
|
||||
\lang1033\langfe1049\langnp1033\insrsid3560132
|
||||
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid5776876 \hich\af0\dbch\af0\loch\f0 -\tab}}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid5776876 maps client end s
|
||||
erver sockets to transmit data between client and server
|
||||
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid5776876 \hich\af0\dbch\af0\loch\f0 -\tab}}\pard \ltrpar\ql \fi-360\li420\ri0\widctlpar
|
||||
\jclisttab\tx420\wrapdefault\aspalpha\aspnum\faauto\ls2\adjustright\rin0\lin420\itap0\pararsid5776876 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid5776876 logs request. Global counters are also updated on this operation
|
||||
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid5776876 \hich\af0\dbch\af0\loch\f0 -\tab}}\pard \ltrpar\ql \fi-360\li420\ri0\widctlpar
|
||||
\jclisttab\tx420\wrapdefault\aspalpha\aspnum\faauto\ls2\adjustright\rin0\lin420\itap0\pararsid3560132 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid5776876 clears client filters (}{\rtlch\fcs1 \af0 \ltrch\fcs0
|
||||
\lang1033\langfe1049\langnp1033\insrsid5776876\charrsid5776876 filter_clear}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid5776876 )
|
||||
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid5776876 \hich\af0\dbch\af0\loch\f0 -\tab}frees }{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid5776876\charrsid5776876
|
||||
struct clientparam}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid5776876 data
|
||||
\par }\pard \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid5776876 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid5776876
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid10908886 in some point client thread may loop to process few client requests from the same connection (e.g. HTTP \lquote established\rquote connection in \lquote proxy\rquote ).
|
||||
\par
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid5776876 Socket mapping does:
|
||||
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid5776876 \hich\af0\dbch\af0\loch\f0 -\tab}}\pard \ltrpar\ql \fi-360\li420\ri0\widctlpar
|
||||
\jclisttab\tx420\wrapdefault\aspalpha\aspnum\faauto\ls2\adjustright\rin0\lin420\itap0\pararsid5776876 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid5776876 caches data in internal client and server buffers
|
||||
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid5776876 \hich\af0\dbch\af0\loch\f0 -\tab}delays data transmit to limit bandwidth
|
||||
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid5776876 \hich\af0\dbch\af0\loch\f0 -\tab}performs data filtering (}{\rtlch\fcs1 \af0 \ltrch\fcs0
|
||||
\lang1033\langfe1049\langnp1033\insrsid5776876\charrsid5776876 filter_data_cli}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid5776876 / }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid5776876\charrsid5776876
|
||||
filter_data_srv}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid5776876 )
|
||||
\par }\pard \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid3560132 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid3560132
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid1586505 client threads are implemented in }{\rtlch\fcs1 \af0 \ltrch\fcs0 \b\lang1033\langfe1049\langnp1033\insrsid1586505\charrsid12544729 proxy.c}{\rtlch\fcs1 \af0 \ltrch\fcs0
|
||||
\lang1033\langfe1049\langnp1033\insrsid1586505 , }{\rtlch\fcs1 \af0 \ltrch\fcs0 \b\lang1033\langfe1049\langnp1033\insrsid1586505\charrsid12544729 socks.c}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid1586505 , }{\rtlch\fcs1 \af0
|
||||
\ltrch\fcs0 \b\lang1033\langfe1049\langnp1033\insrsid1586505\charrsid12544729 pop3p.c}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid1586505 etc.
|
||||
\par
|
||||
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \b\lang1033\langfe1049\langnp1033\insrsid1586505\charrsid12060716 \hich\af0\dbch\af0\loch\f0 2.\tab}}\pard \ltrpar\ql \fi-360\li720\ri0\widctlpar
|
||||
\jclisttab\tx720\wrapdefault\aspalpha\aspnum\faauto\ls4\adjustright\rin0\lin720\itap0\pararsid1586505 {\rtlch\fcs1 \af0 \ltrch\fcs0 \b\lang1033\langfe1049\langnp1033\insrsid1586505\charrsid12060716 Hacking into 3proxy code with plugins
|
||||
\par }\pard \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid3560132 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid1586505
|
||||
\par }\pard \ltrpar\ql \li0\ri0\widctlpar\jclisttab\tx720\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid2296829 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid2296829 2.1 }{\rtlch\fcs1 \af0 \ltrch\fcs0
|
||||
\lang1033\langfe1049\langnp1033\insrsid1586505 What is 3proxy plugin
|
||||
\par }\pard \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid1586505 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid1586505
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid10440144 3proxy plugin is any dynamic/shared library. There is no specific requirement for plugin, actually you can load any dynamic library with \lquote plugin\rquote
|
||||
command. No linking with any libraries are required. However, to interoperate with 3proxy dynamic library must have an export function 3proxy may call to pass the structure with required information.}{\rtlch\fcs1 \af0 \ltrch\fcs0
|
||||
\lang1033\langfe1049\langnp1033\insrsid1586505
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid15928529
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid10440144\charrsid10440144 typedef int (*PLUGINFUNC) (struct pluginlink *pluginlink, int argc, char** argv);
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid10440144
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid10440144\charrsid10440144 struct pluginlink}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid10440144
|
||||
is a structure with export information, explained later, argc and argv are argument counter and array of arguments of \'93plugin\'94 command. Plugin should report it\rquote
|
||||
s status with integer return value. 0 is success, positive value indicates non-recoverable error, 3proxy do not parse rest of configuration and enters into termination state, negative value indicates recoverable value, 3proxy logs warning (if possible).}{
|
||||
\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid12544729 In case of C++, all 3proxy functions/structures must be extern \'93C\'94.}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid10440144
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid15928529
|
||||
\par }\pard \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid15928529 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid15928529 All 3proxy structures/functions descriptions are located in
|
||||
}{\rtlch\fcs1 \af0 \ltrch\fcs0 \b\lang1033\langfe1049\langnp1033\insrsid15928529\charrsid15928529 structures.h}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid15928529
|
||||
\par }\pard \ltrpar\ql \li360\ri0\widctlpar\jclisttab\tx720\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin360\itap0\pararsid2296829 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid2296829
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid15928529
|
||||
\par }\pard \ltrpar\ql \li0\ri0\widctlpar\jclisttab\tx720\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid2296829 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid2296829 2.2 }{\rtlch\fcs1 \af0 \ltrch\fcs0
|
||||
\lang1033\langfe1049\langnp1033\insrsid12544729 Understanding pluginlink structure
|
||||
\par }\pard \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid12544729 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid12544729
|
||||
\par Because there is no linking between 3proxy and plugin, all 3proxy functions and structures are passed with pluginlink structure. Pluginlink is actually a collection of pointers to 3proxy internal structures and functions. Because plug
|
||||
inlink is constantly extending, you should see it\rquote s definitions in }{\rtlch\fcs1 \af0 \ltrch\fcs0 \b\lang1033\langfe1049\langnp1033\insrsid12544729\charrsid12544729 structures.h}{\rtlch\fcs1 \af0 \ltrch\fcs0
|
||||
\lang1033\langfe1049\langnp1033\insrsid12544729 .
|
||||
\par
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid13909505 most important}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid12544729 are:
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid13909505
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid12544729\charrsid8087560 struct symbol symbols;
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid8087560 \'93symbols\'94
|
||||
is a kind of name/value export table, made as a list. It can be used by plugins to exchange information and functions between plugins, e.g. to export functions from one plugin to another, where pluginlink is useless, because it\rquote s static. It
|
||||
\rquote s quite simple:}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid12544729
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid8087560
|
||||
\par }\pard \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid8087560 {\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid8087560\charrsid8087560 struct symbol \{
|
||||
\par \tab struct symbol *next;
|
||||
\par \tab char * name;
|
||||
\par \tab void * value;
|
||||
\par \};
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid8087560
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid13909505 n}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid8087560 ame \endash is a name of function or structure
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid13909505 v}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid8087560 alue \endash is it\rquote s value.
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid13909505
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid8087560 u}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid13909505 se}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid8087560
|
||||
pluginlink->fundbyname function to lookup, e.g.
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid13909505
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid8087560\charrsid13909505 anotherplugindata = pluginlink->findbyname(\'93anotherplugindata\'94);
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid13909505
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid8087560 To export }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid13909505 something from your plugin, add your structure to this list.}{\rtlch\fcs1 \af0
|
||||
\ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid8087560\charrsid8087560
|
||||
\par }\pard \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid12544729 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid8087560\charrsid12544729
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid12544729\charrsid13909505 struct extparam *conf;
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid12544729 pointer to conf structure, it holds all current 3proxy configuration
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid12544729\charrsid12544729
|
||||
\par }\pard \ltrpar\ql \li360\ri0\widctlpar\jclisttab\tx720\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin360\itap0\pararsid2296829 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid2296829
|
||||
\par }\pard \ltrpar\ql \li0\ri0\widctlpar\jclisttab\tx720\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid2296829 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid2296829 2.3 }{\rtlch\fcs1 \af0 \ltrch\fcs0
|
||||
\lang1033\langfe1049\langnp1033\insrsid12544729 How to get control within plugin}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid10440144
|
||||
\par }\pard \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid12544729 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid12544729
|
||||
\par There are few points you can get control for your plugin, after it\rquote s loaded with \lquote plugin\rquote command.
|
||||
\par
|
||||
\par {\listtext\tab}}\pard \ltrpar\ql \li0\ri0\widctlpar\jclisttab\tx360\wrapdefault\aspalpha\aspnum\faauto\ls4\ilvl2\adjustright\rin0\lin0\itap0\pararsid13909505 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid2296829 2.3.1 }{\rtlch\fcs1
|
||||
\af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid12544729 Adding configuration command processor with struct command structure
|
||||
\par }\pard \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid13909505 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid13909505
|
||||
\par A list of configuration file command, available from 3proxy.cfg is extendable. Each command is defined by }{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid13909505\charrsid13909505 struct commands}{\rtlch\fcs1 \af0 \ltrch\fcs0
|
||||
\lang1033\langfe1049\langnp1033\insrsid13909505 :
|
||||
\par
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid13909505\charrsid13909505 struct commands \{
|
||||
\par \tab struct commands *next;
|
||||
\par \tab char * command;
|
||||
\par \tab int (* handler)(int argc, unsigned char ** argv);
|
||||
\par \tab int minargs;
|
||||
\par \tab int maxargs;\tab
|
||||
\par \};
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid13909505
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid13909505\charrsid13909505 struct commands *next}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid13909505 - next element in list}{\rtlch\fcs1 \af0 \ltrch\fcs0
|
||||
\lang1033\langfe1049\langnp1033\insrsid13909505\charrsid13909505
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid13909505\charrsid13909505 char * command}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid13909505 \endash command name
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid13909505\charrsid13909505 int (* handler)(i}{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid13909505 nt argc, unsigned char ** argv)}{\rtlch\fcs1 \af0
|
||||
\ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid13909505 \endash command handler. It\rquote s called than \lquote command\rquote is found in configuration files, argc is a number of arguments, counting command itself, argv is array of arguments.
|
||||
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid13909505\charrsid12060716 minargs}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid13909505 \endash minimum number of arguments command support (>= 1)
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid12060716\charrsid12060716 maxargs}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid12060716 \endash
|
||||
maximum number of arguments command support, 0 means infinity.}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid13909505\charrsid13909505
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid13909505
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid16077654 Handler r}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid3671104
|
||||
eturn value of 0 indicates command is successfully processed. Positive return value indicates non-recoverable error, 3proxy enter}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid16077654 s}{\rtlch\fcs1 \af0 \ltrch\fcs0
|
||||
\lang1033\langfe1049\langnp1033\insrsid3671104 }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid16077654 termination state. Negative value indicate
|
||||
s 3proxy to continue to process command list, it makes it possible to set few handlers for the same command.}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid3671104
|
||||
\par
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid12060716 A list of the command is pointed by pluginlinks->}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid12060716\charrsid12060716 commandhandlers}{\rtlch\fcs1
|
||||
\af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid12060716 ; you must insert you command after first one (do not replace pluginlink->}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid12060716\charrsid12060716 commandhandlers}{
|
||||
\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid12060716 ). It\rquote s guaranteed at least 1 dummy command is always present.}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid12060716\charrsid12060716
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid12060716
|
||||
\par Example:
|
||||
\par
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid12060716\charrsid12060716 int mycommandhandler(int argc, unsigned char **argv);
|
||||
\par struct commands mycommand;
|
||||
\par
|
||||
\par mycommand.command = \'93mycommand\'94;
|
||||
\par mycommand.handler = mycommandhandler;
|
||||
\par mycommand.intargs = 1;
|
||||
\par }\pard \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid12060716 {\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid12060716\charrsid12060716 mycommand.intargs = 2;
|
||||
\par mycommand.next = pluginslinks->commandhandlers->next;
|
||||
\par pluginslink->commandhandlers->next = &mycommand;
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid12060716
|
||||
\par Adds processor for \'93mycommand\'94 command with zero on one arguments.}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid12060716\charrsid13909505
|
||||
\par }\pard \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid13909505 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid13909505
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid12060716 Adding configuration command is useful, if your plugin expects configuration data.
|
||||
\par
|
||||
\par }\pard \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid3671104 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid3671104
|
||||
\par {\listtext\tab}}\pard \ltrpar\ql \li0\ri0\widctlpar\jclisttab\tx360\wrapdefault\aspalpha\aspnum\faauto\ls4\ilvl2\adjustright\rin0\lin0\itap0\pararsid3671104 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid2296829 2.3.2 }{\rtlch\fcs1
|
||||
\af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid3671104 Adding authentication method with }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid3671104\charrsid3671104 struct auth}{\rtlch\fcs1 \af0 \ltrch\fcs0
|
||||
\lang1033\langfe1049\langnp1033\insrsid3671104
|
||||
\par }\pard \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid3671104 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid3671104
|
||||
\par 3proxy supports authentication and authorization. Authentication process determines user account (for example by user
|
||||
name and password), authorization checks, if user account has a right to access given resource and optionally establishes a connection, if required.
|
||||
\par
|
||||
\par \lquote auth\rquote command combines both authentication and authorization method. It\rquote s extandable with struct auth list:
|
||||
\par
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid3671104\charrsid16077654 struct auth \{
|
||||
\par \tab struct auth *next;
|
||||
\par \tab AUTHFUNC authenticate;
|
||||
\par \tab AUTHFUNC authorize;
|
||||
\par \tab char * desc;
|
||||
\par \};
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid3671104
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid3671104\charrsid16077654 char * desc}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid3671104 \endash name of authentication/authorization method}{\rtlch\fcs1
|
||||
\af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid3671104\charrsid3671104
|
||||
\par }\pard \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid13909505 {\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid3671104\charrsid16077654 authenticate}{\rtlch\fcs1 \af0
|
||||
\ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid3671104 \endash name of authentication function}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid12060716
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid3671104\charrsid16077654 authorize}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid3671104 \endash name of authorization function
|
||||
\par
|
||||
\par pluginlink->}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid3671104\charrsid3671104 authfuncs}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid3671104
|
||||
points to list of authenticataction structures. Like above, new structure must be inserted after fiest one (or to the end of the list).
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid16077654
|
||||
\par First, authentication is called, if authentication indicates OK status (return value 0), authorization is called. Normally, \lquote }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid16077654\charrsid16077654 checkACL}{\rtlch\fcs1 \af0
|
||||
\ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid16077654 \rquote (pluginlink->checkACL) is called as authorization function to check user\rquote s request matches to standard allow/deny rules.
|
||||
If for some reason you need to avoid this check, you should call pluginlink->alwaysauth to do some dirty job, like establishing outgoing connection.
|
||||
\par
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid16077654\charrsid4980816 typedef int (*AUTHFUNC)(struct clientparam * param);
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid16077654
|
||||
\par is both authentication and authorization function. \lquote }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid16077654\charrsid16077654 struct clientparam}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid16077654
|
||||
\rquote holds all information about client connection, including username (param->username) and password (param->password).
|
||||
\par
|
||||
\par Return value of 0 indicates successful authentication/authorization, 1}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid1600374 and 3}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid16077654 \endash
|
||||
authorization }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid1600374 failed (access denied), use {\*\xmlopen\xmlns2{\factoidname metricconverter}{\xmlattr\xmlattrns0{\xmlattrname ProductID}{\xmlattrvalue 3 in}}}3 in{\*\xmlclose}
|
||||
case you want to indicate access is explicitly denied and {\*\xmlopen\xmlns2{\factoidname metricconverter}{\xmlattr\xmlattrns0{\xmlattrname ProductID}{\xmlattrvalue 3 in}}}3 in{\*\xmlclose} case there is no matching rule. 4,5,6,7,8 \endash
|
||||
authentication failed (e.g. username/password do not match). 4 indicates username }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid12806430 does not present in request and }{\rtlch\fcs1 \af0 \ltrch\fcs0
|
||||
\lang1033\langfe1049\langnp1033\insrsid1600374 must be requested, if possible. 5 indicates username }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid12806430 found in request }{\rtlch\fcs1 \af0 \ltrch\fcs0
|
||||
\lang1033\langfe1049\langnp1033\insrsid1600374 can not be found in user\rquote s database/list, 6,7,8 \endash username does not match password for different authentication types. 10 \endash user exceeded some limits, e.g. tr
|
||||
affic. You may use some different code to indicate internal problems.}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid16077654
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid1600374
|
||||
\par Example:
|
||||
\par
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid1600374\charrsid1600374 int myauthfunc(struct clientparam *param);
|
||||
\par struct auth myauth;
|
||||
\par
|
||||
\par myauth.desc = \'93myauth\'94;
|
||||
\par myauth.authenticate = myauthfunc;
|
||||
\par myauth.authorize = pluginlink->checkACL;
|
||||
\par myauth->next = pluginlink->authfuncs->next;
|
||||
\par pluginlink->authfuncs->next = &myauth;
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid1600374
|
||||
\par Installs \'93myauthfunc\'94 as authentication function.}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid7235628 There is no need to add \lquote auth\rquote command processor for new authentication type, it\rquote
|
||||
s processed by standard \lquote auth\rquote command processor.}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid12806430
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid7235628
|
||||
\par {\listtext\tab}}\pard \ltrpar\ql \li0\ri0\widctlpar\jclisttab\tx360\wrapdefault\aspalpha\aspnum\faauto\ls4\ilvl2\adjustright\rin0\lin0\itap0\pararsid12806430 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid2296829 2.3.3 }{\rtlch\fcs1
|
||||
\af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid12806430 Adding scheduled functions
|
||||
\par }\pard \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid12806430 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid12806430
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid4980816 Scheduled functions are described by this structure:
|
||||
\par
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid15928529\charrsid15236432 typedef enum \{NONE, MINUTELY, HOURLY, DAILY, WEEKLY, MONTHLY, ANNUALLY, NEVER\} ROTATION;
|
||||
\par
|
||||
\par }\pard \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid4980816 {\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid4980816\charrsid15236432 struct schedule \{
|
||||
\par \tab struct schedule *next;
|
||||
\par \tab ROTATION type;
|
||||
\par \tab void *data;
|
||||
\par \tab int (*function)(void *);
|
||||
\par \tab time_t start_time;
|
||||
\par \};
|
||||
\par }\pard \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid12806430 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid4980816
|
||||
\par }\pard \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid15928529 {\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid15928529\charrsid15236432 int (*function)(void *)}{\rtlch\fcs1
|
||||
\af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid15928529 \endash scheduled function}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid15928529\charrsid4980816
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid15928529\charrsid15236432 void *data}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid15928529 \endash
|
||||
this pointer will be passed as an argument to scheduled functions}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid15928529\charrsid4980816
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid15928529\charrsid15236432 ROTATION type}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid15928529 \endash
|
||||
defines how often function is called (once in a minute, hour, etc).
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid15928529\charrsid15236432 start_time}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid15928529 \endash time to begin using of scheduled function
|
||||
\par
|
||||
\par Scheduled functions are called every \lquote type\rquote interval after start_time and also on reloading configuration and going to termination state.
|
||||
\par
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid15236432 Schedule function r}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid15928529 eturn value of 1 means function must be
|
||||
removed from the schedule. 3proxy doesn\rquote t free struct schedule.
|
||||
\par
|
||||
\par Schedule list can be empty. Pointer to schedule is pointed by }{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid15928529\charrsid15236432 struct schedule ** schedule;}{\rtlch\fcs1 \af0 \ltrch\fcs0
|
||||
\lang1033\langfe1049\langnp1033\insrsid15928529 in pluginlink.
|
||||
\par
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid15236432 Example:}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid15928529
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid15236432
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid15236432\charrsid15236432 int myschedfunc(void * data);
|
||||
\par struct schedule myschedule;
|
||||
\par
|
||||
\par myschedule.data = \'93somethinghere\'94;
|
||||
\par myschedule.function = myschedfunc}{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid15236432 ;}{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid15236432\charrsid15236432
|
||||
\par }\pard \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid12806430 {\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid15236432\charrsid15236432 myschedule.type = MINUTELY;}{\rtlch\fcs1
|
||||
\af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid15928529\charrsid15236432
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid15236432\charrsid15236432 myschedule.starttime = 0;
|
||||
\par myschedule.next = *pluginlink->schedule;
|
||||
\par *pluginlink->schedule = myschedule;
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid15236432
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \ul\lang1033\langfe1049\langnp1033\insrsid15236432\charrsid15236432 NOTE:}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid15236432 time_t is different for different compilers.
|
||||
Make sure to compile plugin and 3proxy with same compiler.
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid15928529
|
||||
\par {\listtext\tab}}\pard \ltrpar\ql \li0\ri0\widctlpar\jclisttab\tx360\wrapdefault\aspalpha\aspnum\faauto\ls4\ilvl2\adjustright\rin0\lin0\itap0\pararsid4980816 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid4980816 2.3.4 Filters API
|
||||
|
||||
\par }\pard \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid4980816 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid4980816
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid15236432 3proxy has filters API, you can use, to process client request and data flowing through proxy. It should be noted, that currently 3proxy doesn\rquote
|
||||
t provide filters with any useful data conversion, so, it\rquote s filter\rquote s task to find data in data flow. In case filter modifies some data, it\rquote s filter\rquote s task again to assure that everything\rquote s fine.}{\rtlch\fcs1 \af0
|
||||
\ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid1771507 If you know some filtering API like MILTER, you will find 3proxy filters very same.}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid15236432
|
||||
\par
|
||||
\par }\pard \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid15236432 {\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid15236432\charrsid1771507 typedef enum \{
|
||||
\par \tab PASS,
|
||||
\par \tab CONTINUE,
|
||||
\par \tab HANDLED,
|
||||
\par \tab REJECT,
|
||||
\par \tab REMOVE
|
||||
\par \} FILTER_ACTION;
|
||||
\par
|
||||
\par typedef\tab void*\tab \tab FILTER_OPEN(void * idata, struct srvparam * param);
|
||||
\par typedef\tab FILTER_ACTION \tab FILTER_CLIENT(void *fo, struct clientparam * param, void** fc);
|
||||
\par typedef\tab FILTER_ACTION\tab FILTER_BUFFER(void *fc, struct clientparam * param, unsigned char ** buf_p, int * bufsize_p, int offset, int * length_p);
|
||||
\par typedef\tab void\tab \tab FILTER_CLOSE(void *fo);
|
||||
\par
|
||||
\par struct filter \{
|
||||
\par \tab struct filter * next;
|
||||
\par \tab char * instance;
|
||||
\par \tab void * data;
|
||||
\par \tab FILTER_OPEN *filter_open;
|
||||
\par \tab FILTER_CLIENT *filter_client;
|
||||
\par \tab FILTER_BUFFER *filter_request;
|
||||
\par \tab FILTER_BUFFER *filter_header_cli;
|
||||
\par \tab FILTER_BUFFER *filter_header_srv;
|
||||
\par \tab FILTER_BUFFER *filter_data_cli;
|
||||
\par \tab FILTER_BUFFER *filter_data_srv;
|
||||
\par \tab FILTER_CLOSE *filter_clear;
|
||||
\par \tab FILTER_CLOSE *filter_close;
|
||||
\par \};
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid15236432
|
||||
\par }\pard \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid1771507 {\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid1771507\charrsid1771507 char * instance}{\rtlch\fcs1 \af0
|
||||
\ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid1771507 \endash is some instance identifier. You can use it to find required filter in the list. 3proxy itself doesn\rquote t use this field.}{\rtlch\fcs1 \af0 \ltrch\fcs0
|
||||
\lang1033\langfe1049\langnp1033\insrsid1771507\charrsid15236432
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid7013593
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid1771507\charrsid1771507 void * data}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid1771507 \endash this parameter is passed to filter_open function.
|
||||
\par The rest are filtering functions. Section 1 explains where and then each filter is called.}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid7013593 data should not be NULL.}{\rtlch\fcs1 \af0 \ltrch\fcs0
|
||||
\lang1033\langfe1049\langnp1033\insrsid1771507
|
||||
\par
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid1771507\charrsid1986875 filter_open}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid1771507 must always be defined, if you want filter to be ever used. It
|
||||
\rquote s called then new service is created and is given \'93data\'94 from struct filter and struct srvparam (parsed service configuration). If filter_op
|
||||
en for some filter returns NULL, filter will not be used for this service. Non-NULL return value will be used as \'93fo\'94 parameter for every call to filter_client.
|
||||
\par
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid1771507\charrsid1986875 filter_client}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid1771507 }{\rtlch\fcs1 \af0 \ltrch\fcs0
|
||||
\lang1033\langfe1049\langnp1033\insrsid1986875 is called upon client connect (before any data is sent/received). It\rquote s good plac
|
||||
e to filter client by IP (and is not good place to filter it by hostname, because this operation takes a long time, 3proxy will not be able to accept new connection). fo is a data pointer received from filter_open, param \endash
|
||||
newly created clientparam structu
|
||||
re, fc is return parameter filter_open must initialize, it will be used as an argument to FILTER_BUFFER functions. PASS return value means this filter will be used for this client request. CONTINUE says to install filters. On different values client conne
|
||||
ction is closed and no client thread is created.}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid1771507\charrsid15236432
|
||||
\par }\pard \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid15236432 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid1771507
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid1986875 f}{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid1986875\charrsid1771507 ilter_reques}{\rtlch\fcs1 \af0 \ltrch\fcs0
|
||||
\i\lang1033\langfe1049\langnp1033\insrsid1986875 t, }{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid1986875\charrsid1771507 filter_header_cli}{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid1986875 , }{
|
||||
\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid1986875\charrsid1771507 filter_header_srv}{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid1986875 , }{\rtlch\fcs1 \af0 \ltrch\fcs0
|
||||
\i\lang1033\langfe1049\langnp1033\insrsid1986875\charrsid1771507 filter_data_cli}{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid1986875 , }{\rtlch\fcs1 \af0 \ltrch\fcs0
|
||||
\i\lang1033\langfe1049\langnp1033\insrsid1986875\charrsid1771507 filter_data_srv}{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid1986875 }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid1986875
|
||||
are used to process request and data r}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid9981679 eceived from client and server.}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid1986875\charrsid1986875
|
||||
\par }\pard \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid4980816 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid15236432
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid9981679\charrsid1771507 char ** buf_p}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid9981679 is a pointer to current buffer, }{\rtlch\fcs1 \af0 \ltrch\fcs0
|
||||
\i\lang1033\langfe1049\langnp1033\insrsid9981679\charrsid1771507 int * bufsize_p}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid9981679 is a pointer to it\rquote s size. In case you change some data and it doesn\rquote
|
||||
t fit to current buffer, you may allocate new buffer (with pluginlink->myalloc), copy data from old buffer, free old buffer (with pluginlink->myfree) and set new values for *}{\rtlch\fcs1 \af0 \ltrch\fcs0
|
||||
\i\lang1033\langfe1049\langnp1033\insrsid9981679\charrsid1771507 buf_p}{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid9981679 }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid9981679 and }{\rtlch\fcs1 \af0
|
||||
\ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid9981679 *}{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid9981679\charrsid1771507 bufsize_p}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid9981679 .
|
||||
\par
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid9981679 int }{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid9981679\charrsid1771507 * offset_p}{\rtlch\fcs1 \af0 \ltrch\fcs0
|
||||
\lang1033\langfe1049\langnp1033\insrsid9981679 offset of the new data in the buffer, }{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid9981679\charrsid1771507 int * length_p}{\rtlch\fcs1 \af0 \ltrch\fcs0
|
||||
\lang1033\langfe1049\langnp1033\insrsid9981679 length of all data in the buffer. You should filter only (*length_p - *offset_p) characters starting from }{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid9981679\charrsid9981679
|
||||
(*buf_p + *offset_p)}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid9981679 .}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid9981679\charrsid9981679
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid9981679
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid9981679\charrsid1771507 filter_clear}{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid9981679 }{\rtlch\fcs1 \af0 \ltrch\fcs0
|
||||
\lang1033\langfe1049\langnp1033\insrsid9981679 is called for each successfule filter_client}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid15609114 and should be used to free allocated resources}{\rtlch\fcs1 \af0 \ltrch\fcs0
|
||||
\lang1033\langfe1049\langnp1033\insrsid9981679\charrsid9981679
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid9981679\charrsid9981679 filter_close}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid9981679 is called for each successful filter_open}{\rtlch\fcs1 \af0
|
||||
\ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid15609114 for the same reason}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid9981679
|
||||
\par
|
||||
\par An example of filter API usage you can find in PCREPlugin (see plugins/}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid9981679\charrsid9981679 PCREPlugin}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid9981679 /
|
||||
}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid9981679\charrsid9981679 pcre_plugin.c}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid9981679 ).
|
||||
\par
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \ul\lang1033\langfe1049\langnp1033\insrsid15609114\charrsid15609114 Note}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid15609114 : if }{\rtlch\fcs1 \af0 \ltrch\fcs0
|
||||
\lang1033\langfe1049\langnp1033\insrsid15609114\charrsid15609114 param->nooverwritefilter}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid15609114
|
||||
is set for FILTER_BUFFER functions, filter may change data in the buffer, but must not change data length. This flag may be set, if data size if already known and is sent to the client. }{\rtlch\fcs1 \af0 \ltrch\fcs0
|
||||
\lang1033\langfe1049\langnp1033\insrsid15609114\charrsid15609114
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid15609114\charrsid9981679
|
||||
\par {\listtext\tab}}\pard \ltrpar\ql \li0\ri0\widctlpar\jclisttab\tx360\wrapdefault\aspalpha\aspnum\faauto\ls4\ilvl2\adjustright\rin0\lin0\itap0\pararsid4980816 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid4980816 2.3.5
|
||||
Replacing log functions, traffic counting functions, bandwidth limitation functions
|
||||
\par }\pard \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid4980816 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid4980816
|
||||
\par }\pard \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid13909505 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid8326885
|
||||
Log, traffic and bandwidth function can be directly replaced in any over place. All functions may be replaced in conf (pluginlink->conf->logfunc, pluginlink->conf->bandlim
|
||||
func, pluginlink->conf->trafcountfunc). In this case, these functions will be used for services started after the changes are made. }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid2567226 l}{\rtlch\fcs1 \af0 \ltrch\fcs0
|
||||
\lang1033\langfe1049\langnp1033\insrsid8326885 ogfunc may also be changed for }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid2567226 struct s}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid8326885
|
||||
rvparam (e.g. within filter_open)}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid2567226 , bandlimfunc and trafcountfunc may be changed in struct clientparam for every client individually (e.g. within filter_client).}{\rtlch\fcs1
|
||||
\af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid12806430
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid2567226
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid2567226\charrsid2567226 typedef void (*LOGFUNC)(struct clientparam * param, const unsigned char * test);
|
||||
\par typedef void (*TRAFCOUNTFUNC)(struct clientparam * param); }{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid2567226
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid2567226\charrsid2567226 typedef unsigned (*BANDLIMFUNC)(struct clientparam * param, unsigned nbytesin, unsigned nbytesout);
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid2567226
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid2567226\charrsid2567226 struct clientparam * param}{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid2567226 \endash }{\rtlch\fcs1 \af0 \ltrch\fcs0
|
||||
\lang1033\langfe1049\langnp1033\insrsid2567226 information about client request}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid2567226\charrsid2567226
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid2567226\charrsid2567226 char * text}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid2567226 - text string (e.g. request)
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \i\lang1033\langfe1049\langnp1033\insrsid2567226\charrsid2567226 nbytesin, nbytesout}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid2567226 \endash
|
||||
number of bytes received from / send to server. bandlimfunc returns delay in milliseconds.
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe1049\langnp1033\insrsid2567226\charrsid2567226
|
||||
\par }}
|
||||
@@ -0,0 +1,259 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<title>3proxy developer reference</title>
|
||||
<style type="text/css">
|
||||
span.s1 {text-decoration: underline}
|
||||
ol {list-style-type: none}
|
||||
ol.level1 {counter-reset: h1}
|
||||
ol.level1 > li::before {content: counter(h1) ". "; counter-increment: h1; font-weight: bold}
|
||||
ol.level2 {counter-reset: h2}
|
||||
ol.level2 > li::before {content: counter(h1) "." counter(h2) " "; counter-increment: h2}
|
||||
ol.level3 {counter-reset: h3}
|
||||
ol.level3 > li::before {content: counter(h1) "." counter(h2) "." counter(h3) " "; counter-increment: h3}
|
||||
pre {margin: 0.5em 0; padding: 0.5em; background: #f5f5f5; border: 1px solid #ddd}
|
||||
code {font-family: monospace}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h2>3proxy developer reference</h2>
|
||||
|
||||
<ol class="level1">
|
||||
<li><b>Understanding Internal 3proxy structure</b>
|
||||
<p>3proxy is implemented as multithread application. Server model is implemented as "one connection – one thread". It means, for every client connection new thread is created. This model is effective enough under Windows, because it allows it avoid thread creation on asynchronous operations, yet under most POSIX systems this model can not be considered as most efficient. It's planned for (very far in future) release to implement more efficient model, where single thread can serve few clients.</p>
|
||||
<ol class="level2">
|
||||
<li>main thread
|
||||
<p>3proxy begins with main thread. This thread parses configuration file and starts main loop. During configuration file parsing <code>struct extaparam conf;</code> structure is filled and service threads are started.</p>
|
||||
<p>Main loop cycle takes approximately 1 second and does these tasks:</p>
|
||||
<ul>
|
||||
<li>re-reads configuration file, if necessary</li>
|
||||
<li>performs scheduled tasks</li>
|
||||
<li>monitors files ('monitor' command), approx. once in a minute</li>
|
||||
<li>rotates main logfile</li>
|
||||
<li>dumps counters to file, approx. once in a minute</li>
|
||||
<li>performs termination, if required</li>
|
||||
</ul>
|
||||
<p>It's guaranteed every configuration and schedule command is executed from the same thread.</p>
|
||||
<p>Main thread is implemented in <b>3proxy.c</b></p>
|
||||
</li>
|
||||
<li>service thread
|
||||
<p>Service threads are started immediately, than service command (e.g. 'proxy' or 'socks') are found during configuration file parsing. Each command creates new thread. Thread does these tasks:</p>
|
||||
<ul>
|
||||
<li>parses service command arguments and fills <code>struct srvparam srv</code> structure with service configuration and <code>struct clientparam defparam</code> structure with default client configuration</li>
|
||||
<li>initializes filters (filter_open)</li>
|
||||
<li>creates and initializes listening service socket</li>
|
||||
<li>enters into service loop</li>
|
||||
<li>terminates filters (filter_close)</li>
|
||||
</ul>
|
||||
<p>service loop:</p>
|
||||
<ul>
|
||||
<li>checks for configuration reload (approximately every second), thread exits if configuration reloaded or 3proxy is in terminating state.</li>
|
||||
<li>accepts client connection and creates <code>struct clientparam newparam</code> structure with client configuration</li>
|
||||
<li>creates/checks client filters (filter_client)</li>
|
||||
<li>creates client thread with newly created <code>struct clientparam newparam</code></li>
|
||||
</ul>
|
||||
<p>service threads are implemented in <b>proxymain.c</b></p>
|
||||
<p>Please note: struct clientparam is freed and filter_clear is executed from different (client) thread.</p>
|
||||
</li>
|
||||
<li>client thread
|
||||
<p>Client threads are started from service thread. Client thread:</p>
|
||||
<ul>
|
||||
<li>reads client request (except portmappers) with authentication information and request headers (if any).</li>
|
||||
<li>filters request (if any) with filter_request</li>
|
||||
<li>filters headers (if any) with filter_header_cli</li>
|
||||
<li>performs authentication and authorization</li>
|
||||
<li>established connection with server</li>
|
||||
<li>sends request to server</li>
|
||||
<li>filters server headers (if any)</li>
|
||||
<li>maps client end server sockets to transmit data between client and server</li>
|
||||
<li>logs request. Global counters are also updated on this operation</li>
|
||||
<li>clears client filters (filter_clear)</li>
|
||||
<li>frees <code>struct clientparam</code> data</li>
|
||||
</ul>
|
||||
<p>in some point client thread may loop to process few client requests from the same connection (e.g. HTTP 'established' connection in 'proxy').</p>
|
||||
<p>Socket mapping does:</p>
|
||||
<ul>
|
||||
<li>caches data in internal client and server buffers</li>
|
||||
<li>delays data transmit to limit bandwidth</li>
|
||||
<li>performs data filtering (filter_data_cli / filter_data_srv)</li>
|
||||
</ul>
|
||||
<p>client threads are implemented in <b>proxy.c</b>, <b>socks.c</b>, <b>pop3p.c</b> etc.</p>
|
||||
</li>
|
||||
</ol>
|
||||
</li>
|
||||
<li><b>Hacking into 3proxy code with plugins</b>
|
||||
<ol class="level2">
|
||||
<li>What is 3proxy plugin
|
||||
<p>3proxy plugin is any dynamic/shared library. There is no specific requirement for plugin, actually you can load any dynamic library with 'plugin' command. No linking with any libraries are required. However, to interoperate with 3proxy dynamic library must have an export function 3proxy may call to pass the structure with required information.</p>
|
||||
<pre><code>typedef int (*PLUGINFUNC) (struct pluginlink *pluginlink, int argc, char** argv);</code></pre>
|
||||
<p><code>struct pluginlink</code> is a structure with export information, explained later, argc and argv are argument counter and array of arguments of "plugin" command. Plugin should report it's status with integer return value. 0 is success, positive value indicates non-recoverable error, 3proxy do not parse rest of configuration and enters into termination state, negative value indicates recoverable value, 3proxy logs warning (if possible). In case of C++, all 3proxy functions/structures must be extern "C".</p>
|
||||
<p>All 3proxy structures/functions descriptions are located in <b>structures.h</b></p>
|
||||
</li>
|
||||
<li>Understanding pluginlink structure
|
||||
<p>Because there is no linking between 3proxy and plugin, all 3proxy functions and structures are passed with pluginlink structure. Pluginlink is actually a collection of pointers to 3proxy internal structures and functions. Because pluginlink is constantly extending, you should see it's definitions in <b>structures.h</b>.</p>
|
||||
<p>most important are:</p>
|
||||
<pre><code>struct symbol symbols;</code></pre>
|
||||
<p>"symbols" is a kind of name/value export table, made as a list. It can be used by plugins to exchange information and functions between plugins, e.g. to export functions from one plugin to another, where pluginlink is useless, because it's static. It's quite simple:</p>
|
||||
<pre><code>struct symbol {
|
||||
struct symbol *next;
|
||||
char * name;
|
||||
void * value;
|
||||
};</code></pre>
|
||||
<p><code>name</code> – is a name of function or structure</p>
|
||||
<p><code>value</code> – is it's value.</p>
|
||||
<p>use <code>pluginlink->findbyname</code> function to lookup, e.g.</p>
|
||||
<pre><code>anotherplugindata = pluginlink->findbyname("anotherplugindata");</code></pre>
|
||||
<p>To export something from your plugin, add your structure to this list.</p>
|
||||
<pre><code>struct extparam *conf;</code></pre>
|
||||
<p>pointer to conf structure, it holds all current 3proxy configuration</p>
|
||||
</li>
|
||||
<li>How to get control within plugin
|
||||
<p>There are few points you can get control for your plugin, after it's loaded with 'plugin' command.</p>
|
||||
<ol class="level3">
|
||||
<li>Adding configuration command processor with struct command structure
|
||||
<p>A list of configuration file command, available from 3proxy.cfg is extendable. Each command is defined by <code>struct commands</code>:</p>
|
||||
<pre><code>struct commands {
|
||||
struct commands *next;
|
||||
char * command;
|
||||
int (* handler)(int argc, unsigned char ** argv);
|
||||
int minargs;
|
||||
int maxargs;
|
||||
};</code></pre>
|
||||
<p><code>struct commands *next</code> - next element in list</p>
|
||||
<p><code>char * command</code> – command name</p>
|
||||
<p><code>int (* handler)(int argc, unsigned char ** argv)</code> – command handler. It's called than 'command' is found in configuration files, argc is a number of arguments, counting command itself, argv is array of arguments.</p>
|
||||
<p><code>minargs</code> – minimum number of arguments command support (>= 1)</p>
|
||||
<p><code>maxargs</code> – maximum number of arguments command support, 0 means infinity.</p>
|
||||
<p>Handler return value of 0 indicates command is successfully processed. Positive return value indicates non-recoverable error, 3proxy enters termination state. Negative value indicates 3proxy to continue to process command list, it makes it possible to set few handlers for the same command.</p>
|
||||
<p>A list of the command is pointed by <code>pluginlink->commandhandlers</code>; you must insert you command after first one (do not replace <code>pluginlink->commandhandlers</code>). It's guaranteed at least 1 dummy command is always present.</p>
|
||||
<p>Example:</p>
|
||||
<pre><code>int mycommandhandler(int argc, unsigned char **argv);
|
||||
struct commands mycommand;
|
||||
|
||||
mycommand.command = "mycommand";
|
||||
mycommand.handler = mycommandhandler;
|
||||
mycommand.intargs = 1;
|
||||
mycommand.intargs = 2;
|
||||
mycommand.next = pluginslinks->commandhandlers->next;
|
||||
pluginslink->commandhandlers->next = &mycommand;</code></pre>
|
||||
<p>Adds processor for "mycommand" command with zero on one arguments.</p>
|
||||
<p>Adding configuration command is useful, if your plugin expects configuration data.</p>
|
||||
</li>
|
||||
<li>Adding authentication method with struct auth
|
||||
<p>3proxy supports authentication and authorization. Authentication process determines user account (for example by username and password), authorization checks, if user account has a right to access given resource and optionally establishes a connection, if required.</p>
|
||||
<p>'auth' command combines both authentication and authorization method. It's extandable with struct auth list:</p>
|
||||
<pre><code>struct auth {
|
||||
struct auth *next;
|
||||
AUTHFUNC authenticate;
|
||||
AUTHFUNC authorize;
|
||||
char * desc;
|
||||
};</code></pre>
|
||||
<p><code>char * desc</code> – name of authentication/authorization method</p>
|
||||
<p><code>authenticate</code> – name of authentication function</p>
|
||||
<p><code>authorize</code> – name of authorization function</p>
|
||||
<p><code>pluginlink->authfuncs</code> points to list of authenticataction structures. Like above, new structure must be inserted after fiest one (or to the end of the list).</p>
|
||||
<p>First, authentication is called, if authentication indicates OK status (return value 0), authorization is called. Normally, 'checkACL' (<code>pluginlink->checkACL</code>) is called as authorization function to check user's request matches to standard allow/deny rules. If for some reason you need to avoid this check, you should call <code>pluginlink->alwaysauth</code> to do some dirty job, like establishing outgoing connection.</p>
|
||||
<pre><code>typedef int (*AUTHFUNC)(struct clientparam * param);</code></pre>
|
||||
<p>is both authentication and authorization function. <code>struct clientparam</code> holds all information about client connection, including username (<code>param->username</code>) and password (<code>param->password</code>).</p>
|
||||
<p>Return value of 0 indicates successful authentication/authorization, 1 and 3 – authorization failed (access denied), use 3 in case you want to indicate access is explicitly denied and 3 in case there is no matching rule. 4,5,6,7,8 – authentication failed (e.g. username/password do not match). 4 indicates username does not present in request and must be requested, if possible. 5 indicates username found in request can not be found in user's database/list, 6,7,8 – username does not match password for different authentication types. 10 – user exceeded some limits, e.g. traffic. You may use some different code to indicate internal problems.</p>
|
||||
<p>Example:</p>
|
||||
<pre><code>int myauthfunc(struct clientparam *param);
|
||||
struct auth myauth;
|
||||
|
||||
myauth.desc = "myauth";
|
||||
myauth.authenticate = myauthfunc;
|
||||
myauth.authorize = pluginlink->checkACL;
|
||||
myauth->next = pluginlink->authfuncs->next;
|
||||
pluginlink->authfuncs->next = &myauth;</code></pre>
|
||||
<p>Installs "myauthfunc" as authentication function. There is no need to add 'auth' command processor for new authentication type, it's processed by standard 'auth' command processor.</p>
|
||||
</li>
|
||||
<li>Adding scheduled functions
|
||||
<p>Scheduled functions are described by this structure:</p>
|
||||
<pre><code>typedef enum {NONE, MINUTELY, HOURLY, DAILY, WEEKLY, MONTHLY, ANNUALLY, NEVER} ROTATION;
|
||||
|
||||
struct schedule {
|
||||
struct schedule *next;
|
||||
ROTATION type;
|
||||
void *data;
|
||||
int (*function)(void *);
|
||||
time_t start_time;
|
||||
};</code></pre>
|
||||
<p><code>int (*function)(void *)</code> – scheduled function</p>
|
||||
<p><code>void *data</code> – this pointer will be passed as an argument to scheduled functions</p>
|
||||
<p><code>ROTATION type</code> – defines how often function is called (once in a minute, hour, etc).</p>
|
||||
<p><code>start_time</code> – time to begin using of scheduled function</p>
|
||||
<p>Scheduled functions are called every 'type' interval after start_time and also on reloading configuration and going to termination state.</p>
|
||||
<p>Schedule function return value of 1 means function must be removed from the schedule. 3proxy doesn't free struct schedule.</p>
|
||||
<p>Schedule list can be empty. Pointer to schedule is pointed by <code>struct schedule ** schedule;</code> in pluginlink.</p>
|
||||
<p>Example:</p>
|
||||
<pre><code>int myschedfunc(void * data);
|
||||
struct schedule myschedule;
|
||||
|
||||
myschedule.data = "somethinghere";
|
||||
myschedule.function = myschedfunc;
|
||||
myschedule.type = MINUTELY;
|
||||
myschedule.starttime = 0;
|
||||
myschedule.next = *pluginlink->schedule;
|
||||
*pluginlink->schedule = myschedule;</code></pre>
|
||||
<p><span class="s1">NOTE:</span> time_t is different for different compilers. Make sure to compile plugin and 3proxy with same compiler.</p>
|
||||
</li>
|
||||
<li>Filters API
|
||||
<p>3proxy has filters API, you can use, to process client request and data flowing through proxy. It should be noted, that currently 3proxy doesn't provide filters with any useful data conversion, so, it's filter's task to find data in data flow. In case filter modifies some data, it's filter's task again to assure that everything's fine. If you know some filtering API like MILTER, you will find 3proxy filters very same.</p>
|
||||
<pre><code>typedef enum {
|
||||
PASS,
|
||||
CONTINUE,
|
||||
HANDLED,
|
||||
REJECT,
|
||||
REMOVE
|
||||
} FILTER_ACTION;
|
||||
|
||||
typedef void* FILTER_OPEN(void * idata, struct srvparam * param);
|
||||
typedef FILTER_ACTION FILTER_CLIENT(void *fo, struct clientparam * param, void** fc);
|
||||
typedef FILTER_ACTION FILTER_BUFFER(void *fc, struct clientparam * param, unsigned char ** buf_p, int * bufsize_p, int offset, int * length_p);
|
||||
typedef void FILTER_CLOSE(void *fo);
|
||||
|
||||
struct filter {
|
||||
struct filter * next;
|
||||
char * instance;
|
||||
void * data;
|
||||
FILTER_OPEN *filter_open;
|
||||
FILTER_CLIENT *filter_client;
|
||||
FILTER_BUFFER *filter_request;
|
||||
FILTER_BUFFER *filter_header_cli;
|
||||
FILTER_BUFFER *filter_header_srv;
|
||||
FILTER_BUFFER *filter_data_cli;
|
||||
FILTER_BUFFER *filter_data_srv;
|
||||
FILTER_CLOSE *filter_clear;
|
||||
FILTER_CLOSE *filter_close;
|
||||
};</code></pre>
|
||||
<p><code>char * instance</code> – is some instance identifier. You can use it to find required filter in the list. 3proxy itself doesn't use this field.</p>
|
||||
<p><code>void * data</code> – this parameter is passed to filter_open function. The rest are filtering functions. Section 1 explains where and then each filter is called. data should not be NULL.</p>
|
||||
<p><code>filter_open</code> must always be defined, if you want filter to be ever used. It's called then new service is created and is given "data" from struct filter and struct srvparam (parsed service configuration). If filter_open for some filter returns NULL, filter will not be used for this service. Non-NULL return value will be used as "fo" parameter for every call to filter_client.</p>
|
||||
<p><code>filter_client</code> is called upon client connect (before any data is sent/received). It's good place to filter client by IP (and is not good place to filter it by hostname, because this operation takes a long time, 3proxy will not be able to accept new connection). fo is a data pointer received from filter_open, param – newly created clientparam structure, fc is return parameter filter_open must initialize, it will be used as an argument to FILTER_BUFFER functions. PASS return value means this filter will be used for this client request. CONTINUE says to install filters. On different values client connection is closed and no client thread is created.</p>
|
||||
<p><code>filter_request, filter_header_cli, filter_header_srv, filter_data_cli, filter_data_srv</code> are used to process request and data received from client and server.</p>
|
||||
<p><code>char ** buf_p</code> is a pointer to current buffer, <code>int * bufsize_p</code> is a pointer to it's size. In case you change some data and it doesn't fit to current buffer, you may allocate new buffer (with <code>pluginlink->myalloc</code>), copy data from old buffer, free old buffer (with <code>pluginlink->myfree</code>) and set new values for <code>*buf_p</code> and <code>*bufsize_p</code>.</p>
|
||||
<p><code>int offset</code> offset of the new data in the buffer, <code>int * length_p</code> length of all data in the buffer. You should filter only <code>(*length_p - *offset_p)</code> characters starting from <code>(*buf_p + *offset_p)</code>.</p>
|
||||
<p><code>filter_clear</code> is called for each successfule filter_client and should be used to free allocated resources</p>
|
||||
<p><code>filter_close</code> is called for each successful filter_open for the same reason</p>
|
||||
<p>An example of filter API usage you can find in PCREPlugin (see plugins/PCREPlugin/pcre_plugin.c).</p>
|
||||
<p><span class="s1">Note</span>: if <code>param->nooverwritefilter</code> is set for FILTER_BUFFER functions, filter may change data in the buffer, but must not change data length. This flag may be set, if data size if already known and is sent to the client.</p>
|
||||
</li>
|
||||
<li>Replacing log functions, traffic counting functions, bandwidth limitation functions
|
||||
<p>Log, traffic and bandwidth function can be directly replaced in any over place. All functions may be replaced in conf (<code>pluginlink->conf->logfunc</code>, <code>pluginlink->conf->bandlimfunc</code>, <code>pluginlink->conf->trafcountfunc</code>). In this case, these functions will be used for services started after the changes are made. logfunc may also be changed for struct srvparam (e.g. within filter_open), bandlimfunc and trafcountfunc may be changed in struct clientparam for every client individually (e.g. within filter_client).</p>
|
||||
<pre><code>typedef void (*LOGFUNC)(struct clientparam * param, const unsigned char * test);
|
||||
typedef void (*TRAFCOUNTFUNC)(struct clientparam * param);
|
||||
typedef unsigned (*BANDLIMFUNC)(struct clientparam * param, unsigned nbytesin, unsigned nbytesout);</code></pre>
|
||||
<p><code>struct clientparam * param</code> – information about client request</p>
|
||||
<p><code>char * text</code> - text string (e.g. request)</p>
|
||||
<p><code>nbytesin, nbytesout</code> – number of bytes received from / send to server. bandlimfunc returns delay in milliseconds.</p>
|
||||
</li>
|
||||
</ol>
|
||||
</li>
|
||||
</ol>
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
|
||||
<H2><A href="hotoe.html">See HowTo:</a></H2>
|
||||
<H2><A href="howtoe.html">See HowTo:</a></H2>
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
|
||||
<H2><A href="hotoe.html">См. HowTo</a></H2>
|
||||
<H2><A href="howtoe.html">См. HowTo</a></H2>
|
||||
+143
-130
@@ -1,12 +1,12 @@
|
||||
<h3>Optimizing 3proxy for high load</h3>
|
||||
<p>Precaution 1: 3proxy was not initially developed for high load and is positioned as a SOHO product, the main reason is "one connection - one thread" model 3proxy uses. 3proxy is known to work with above 200,000 connections under proper configuration, but use it in production environment under high loads at your own risk and do not expect too much.
|
||||
<p>Precaution 2: This documentation is incomplete and is not sufficient. High loads may require very specific system tuning including, but not limited to specific or cusomized kernels, builds, settings, sysctls, options, etc. All this is not covered by this documentation.
|
||||
<h3>Optimizing 3proxy for High Load</h3>
|
||||
<p>Precaution 1: 3proxy was not initially developed for high load and is positioned as a SOHO product. The main reason is the "one connection - one thread" model 3proxy uses. 3proxy is known to work with over 200,000 connections under proper configuration, but use it in a production environment under high loads at your own risk and do not expect too much.
|
||||
<p>Precaution 2: This documentation is incomplete and insufficient. High loads may require very specific system tuning including, but not limited to, specific or customized kernels, builds, settings, sysctls, options, etc. All of this is not covered by this documentation.
|
||||
|
||||
<h4>Configuring 'maxconn'</h4>
|
||||
|
||||
A number of simulatineous connections per service is limited by 'maxconn' option.
|
||||
Default maxconn value since 3proxy 0.8 is 500. You may want to set 'maxconn'
|
||||
to higher value. Under this configuration:
|
||||
The number of simultaneous connections per service is limited by the 'maxconn' option.
|
||||
The default maxconn value since 3proxy 0.8 is 500. You may want to set 'maxconn'
|
||||
to a higher value. Under this configuration:
|
||||
<pre>
|
||||
maxconn 1000
|
||||
proxy -p3129
|
||||
@@ -14,53 +14,53 @@ proxy -p3128
|
||||
socks
|
||||
</pre>
|
||||
maxconn for every service is 1000, and there are 3 services running
|
||||
(2 proxy and 1 socks), so, for all services there can be up to 3000
|
||||
simulatineous connections to 3proxy.
|
||||
<p>Avoid setting 'maxconn' to arbitrary high value, it should be carefully
|
||||
choosen to protect system and proxy from resources exhaution. Setting maxconn
|
||||
above resources available can lead to denial of service conditions.
|
||||
<h4>Understanding resources requirements</h4>
|
||||
Each running service require:
|
||||
(2 proxy and 1 socks), so for all services there can be up to 3000
|
||||
simultaneous connections to 3proxy.
|
||||
<p>Avoid setting 'maxconn' to an arbitrarily high value; it should be carefully
|
||||
chosen to protect the system and proxy from resource exhaustion. Setting maxconn
|
||||
above available resources can lead to denial of service conditions.
|
||||
<h4>Understanding Resource Requirements</h4>
|
||||
Each running service requires:
|
||||
<ul>
|
||||
<li>1*thread (process)
|
||||
<li>1*socket (file descriptor)
|
||||
<li>1 thread (process)
|
||||
<li>1 socket (file descriptor)
|
||||
<li>1 stack memory segment + some heap memory, ~64K-128K depending on the system
|
||||
</ul>
|
||||
Each connected client require:
|
||||
Each connected client requires:
|
||||
<ul>
|
||||
<li>1*thread (process)
|
||||
<li>2*socket (file descriptor). For FTP 4 sockets are required.
|
||||
<br>Under linux since 0.9 splice() is used. It's much more effective, but requires
|
||||
<br>2*socket (file descriptor) + 2*pipe (file descriptors) = 4 file descriptors.
|
||||
<br>For FTP 4 sockets and 2 pipes are required with splice().
|
||||
<br>Up to 128K (up to 256K in the case of splice()) of kernel buffers memory. This is theoretical maximum, actual numbers depend on connection quality and traffic amount.
|
||||
<li>1 thread (process)
|
||||
<li>2 sockets (file descriptors). For FTP, 4 sockets are required.
|
||||
<br>Under Linux since 0.9, splice() is used. It's much more efficient but requires
|
||||
<br>2 sockets (file descriptors) + 2 pipes (file descriptors) = 4 file descriptors.
|
||||
<br>For FTP with splice(), 4 sockets and 2 pipes are required.
|
||||
<br>Up to 128K (up to 256K in the case of splice()) of kernel buffer memory. This is the theoretical maximum; actual numbers depend on connection quality and traffic amount.
|
||||
<br>1 additional socket (file descriptor) during name resolution for non-cached names
|
||||
<br>1 additional socket during authentication or logging for RADIUS authentication or logging.
|
||||
<li>1*ephemeral port (3*ephemeral ports for FTP connection).
|
||||
<li>1 stack memory segment of ~32K-128K depending on the system + at least 16K and up to few MB (for 'proxy' and 'ftppr') of heap memory. If you are short of memory, prefer 'socks' to 'proxy' and 'ftppr'.
|
||||
<li>a lot of system buffers, specially in the case of slow network connections.
|
||||
<li>1 ephemeral port (3 ephemeral ports for FTP connections).
|
||||
<li>1 stack memory segment of ~32K-128K depending on the system + at least 16K and up to a few MB (for 'proxy' and 'ftppr') of heap memory. If you are short on memory, prefer 'socks' over 'proxy' and 'ftppr'.
|
||||
<li>Many system buffers, especially in the case of slow network connections.
|
||||
</ul>
|
||||
Also, additional resources like system buffers are required for network activity.
|
||||
|
||||
<h4>Setting ulimits</h4>
|
||||
|
||||
Hard and soft ulimits must be set above calculated requirements. Under Linux, you can
|
||||
check limits of running process with
|
||||
check the limits of a running process with
|
||||
<pre>
|
||||
cat /proc/PID/limits
|
||||
</pre>
|
||||
where PID is a pid of the process.
|
||||
Validate ulimits match your expectation, especially if you run 3proxy under dedicated account
|
||||
by adding e.g.
|
||||
where PID is the process ID.
|
||||
Validate that ulimits match your expectations, especially if you run 3proxy under a dedicated account
|
||||
by adding, e.g.:
|
||||
<pre>
|
||||
system "ulimit -Ha >>/tmp/3proxy.ulim.hard"
|
||||
system "ulimit -Sa >>/tmp/3proxy.ulim.soft"
|
||||
</pre>
|
||||
in the beginning (before first service started) and the end of config file.
|
||||
Make both hard restart (that is kill and start 3proxy process) and soft restart
|
||||
by sending SIGUSR1 to 3proxy process, check ulimits recorded to files match your
|
||||
expecation. In systemd based distros (e.g. latest Debian / Ubuntu) changing limits.conf
|
||||
is not enough, limits must be ajusted in systemd configuration, e.g. by setting
|
||||
at the beginning (before the first service is started) and at the end of the config file.
|
||||
Perform both a hard restart (i.e., kill and start the 3proxy process) and a soft restart
|
||||
by sending SIGUSR1 to the 3proxy process; check that the ulimits recorded to files match your
|
||||
expectations. In systemd-based distros (e.g., latest Debian/Ubuntu), changing limits.conf
|
||||
is not enough; limits must be adjusted in the systemd configuration, e.g., by setting:
|
||||
<pre>
|
||||
DefaultLimitDATA=infinity
|
||||
DefaultLimitSTACK=infinity
|
||||
@@ -73,51 +73,51 @@ DefaultLimitMEMLOCK=infinity
|
||||
</pre>
|
||||
in user.conf / system.conf
|
||||
|
||||
<h4>Extending system limitation</h4>
|
||||
<h4>Extending System Limitations</h4>
|
||||
|
||||
Check manuals / documentation for your system limitations e.g. system-wide limit for number of open files
|
||||
Check the manuals/documentation for your system's limitations, e.g., the system-wide limit for the number of open files
|
||||
(fs.file-max in Linux). You may need to change sysctls or even rebuild the kernel from source.
|
||||
<p>
|
||||
To help with socket-based system-dependant settings, since 0.9-devel 3proxy supports different
|
||||
socket options which can be set via -ol option for listening socket, -oc for proxy-to-client
|
||||
socket and -os for proxy-to-server socket. Example:
|
||||
To help with socket-based system-dependent settings, since 0.9-devel, 3proxy supports different
|
||||
socket options which can be set via the -ol option for the listening socket, -oc for the proxy-to-client
|
||||
socket, and -os for the proxy-to-server socket. Example:
|
||||
<pre>
|
||||
proxy -olSO_REUSEADDR,SO_REUSEPORT -ocTCP_TIMESTAMPS,TCP_NODELAY -osTCP_NODELAY
|
||||
</pre>
|
||||
available options are system dependant.
|
||||
Available options are system-dependent.
|
||||
|
||||
<h4>Using 3proxy in virtual environment</h4>
|
||||
<h4>Using 3proxy in a Virtual Environment</h4>
|
||||
|
||||
If 3proxy is used in VPS environment, there can be additional limitations.
|
||||
For example, kernel resources / system CPU usage / IOCTLs can be limited in a different way, and this can become a bottleneck.
|
||||
Since 0.9 devel, 3proxy uses splice() by default on Linux, splice() prevents network traffic from being copied from
|
||||
kernel space to 3proxy process and generally increases throughput, epecially in the case of high volume traffic. It especially
|
||||
true for virtual environment (it can improve thoughput up to 10 times) unless there are additional kernel limitations.
|
||||
Since some work is moved to kernel, it requires up to 2 times more kernel resources in terms of CPU, memory and IOCTLs.
|
||||
If your hosting additionally limits kernel resources (you can see it as nearly 100% CPU usage without any real CPU activity for
|
||||
any application which performs IOCTLS), use -s0 option to disable splice() usage for given service e.g.
|
||||
<pre>
|
||||
If 3proxy is used in a VPS environment, there can be additional limitations.
|
||||
For example, kernel resources, system CPU usage, and IOCTLs can be limited differently, and this can become a bottleneck.
|
||||
Since 0.9-devel, 3proxy uses splice() by default on Linux. splice() prevents network traffic from being copied from
|
||||
kernel space to the 3proxy process and generally increases throughput, especially in the case of high-volume traffic. This is especially
|
||||
true for virtual environments (it can improve throughput up to 10 times) unless there are additional kernel limitations.
|
||||
Since some work is moved to the kernel, it requires up to 2 times more kernel resources in terms of CPU, memory, and IOCTLs.
|
||||
If your hosting additionally limits kernel resources (you can see this as nearly 100% CPU usage without any real CPU activity for
|
||||
any application performing IOCTLs), use the -s0 option to disable splice() usage for a given service, e.g.:
|
||||
<pre>
|
||||
socks -s0
|
||||
</pre>
|
||||
|
||||
<h4>Extending ephemeral port range</h4>
|
||||
<h4>Extending the Ephemeral Port Range</h4>
|
||||
|
||||
Check ephemeral port range for your system and extend it to the number of the
|
||||
Check the ephemeral port range for your system and extend it to the number of
|
||||
ports required.
|
||||
Ephimeral range is always limited to maximum number of ports (64K). To extend the
|
||||
number of outgoing connections above this limit, extending ephemeral port range
|
||||
is not enough, you need additional actions:
|
||||
The ephemeral range is always limited to the maximum number of ports (64K). To extend the
|
||||
number of outgoing connections above this limit, extending the ephemeral port range
|
||||
is not enough; you need additional actions:
|
||||
<ol>
|
||||
<li> Configure multiple outgoing IPs
|
||||
<li> Make sure 3proxy is configured to use different outgoing IP by either setting
|
||||
external IP via RADIUS
|
||||
<li> Make sure 3proxy is configured to use a different outgoing IP by either setting
|
||||
the external IP via RADIUS:
|
||||
<pre>
|
||||
radius secret 1.2.3.4
|
||||
auth radius
|
||||
proxy
|
||||
</pre>
|
||||
or by using multiple services with different external
|
||||
interfaces, example:
|
||||
interfaces, for example:
|
||||
<pre>
|
||||
allow user1,user11,user111
|
||||
proxy -p1111 -e1.1.1.1
|
||||
@@ -133,7 +133,7 @@ proxy -p4444 -e4.4.4.4
|
||||
flush
|
||||
</pre>
|
||||
or via "parent extip" rotation,
|
||||
e.g.
|
||||
e.g.:
|
||||
<pre>
|
||||
allow user1,user11,user111
|
||||
parent 1000 extip 1.1.1.1 0
|
||||
@@ -156,8 +156,8 @@ socks
|
||||
</pre>
|
||||
<pre>
|
||||
</pre>
|
||||
Under latest Linux version you can also start multiple services with different
|
||||
external addresses on the single port with SO_REUSEPORT on listening socket to
|
||||
Under the latest Linux versions, you can also start multiple services with different
|
||||
external addresses on a single port with SO_REUSEPORT on the listening socket to
|
||||
evenly distribute incoming connections between outgoing interfaces:
|
||||
<pre>
|
||||
socks -olSO_REUSEPORT -p3128 -e 1.1.1.1
|
||||
@@ -165,123 +165,136 @@ socks -olSO_REUSEPORT -p3128 -e 2.2.2.2
|
||||
socks -olSO_REUSEPORT -p3128 -e 3.3.3.3
|
||||
socks -olSO_REUSEPORT -p3128 -e 4.4.4.4
|
||||
</pre>
|
||||
for Web browsing last two examples are not recommended, because same client can get
|
||||
different external address for different requests, you should choose external
|
||||
For web browsing, the last two examples are not recommended because the same client can get
|
||||
a different external address for different requests; you should choose the external
|
||||
interface with user-based rules instead.
|
||||
<li> You may need additional system dependant actions to use same port on different IPs,
|
||||
usually by adding SO_REUSEADDR (SO_PORT_SCALABILITY for Windows) socket option to
|
||||
external socket. This option can be set (since 0.9 devel) with -os option:
|
||||
<li> You may need additional system-dependent actions to use the same port on different IPs,
|
||||
usually by adding the SO_REUSEADDR (SO_PORT_SCALABILITY for Windows) socket option to
|
||||
the external socket. This option can be set (since 0.9-devel) with the -os option:
|
||||
<pre>
|
||||
proxy -p3128 -e1.2.3.4 -osSO_REUSEADDR
|
||||
</pre>
|
||||
Behavior for SO_REUSEADDR and SO_REUSEPORT is different between different system,
|
||||
even between different kernel versions and can lead to unexpected results.
|
||||
Specifics is described <a href="https://stackoverflow.com/questions/14388706/socket-options-so-reuseaddr-and-so-reuseport-how-do-they-differ-do-they-mean-t">here</a>.
|
||||
Use this options only if actually required and if you fully understand possible
|
||||
consiquences. E.g. SO_REUSEPORT can help to establish more connections than the
|
||||
number of the client port available, but it can also lead to situation connections
|
||||
are randomely fail due to ip+port pairs collision if remote or local system
|
||||
The behavior for SO_REUSEADDR and SO_REUSEPORT is different between different systems,
|
||||
even between different kernel versions, and can lead to unexpected results.
|
||||
The specifics are described <a href="https://stackoverflow.com/questions/14388706/socket-options-so-reuseaddr-and-so-reuseport-how-do-they-differ-do-they-mean-t">here</a>.
|
||||
Use these options only if actually required and if you fully understand the possible
|
||||
consequences. For example, SO_REUSEPORT can help establish more connections than the
|
||||
number of client ports available, but it can also lead to situations where connections
|
||||
randomly fail due to IP+port pair collisions if the remote or local system
|
||||
doesn't support this trick.
|
||||
</ol>
|
||||
|
||||
<h4>Setting stacksize</h4>
|
||||
<h4>Setting Stack Size</h4>
|
||||
|
||||
'stacksize' is a size added to all stack allocations and can be both positive and
|
||||
negative. Stack is required in functions call. 3proxy itself doesn't require large
|
||||
negative. Stack is required for function calls. 3proxy itself doesn't require a large
|
||||
stack, but it can be required if some
|
||||
purely-written libc, 3rd party libraries or system functions called. There is known\
|
||||
poorly written libc, 3rd party libraries, or system functions are called. There is known
|
||||
dirty code in Unix ODBC
|
||||
implementations, build-in DNS resolvers, especially in the case of IPv6 and large
|
||||
number of interfaces. Under most 64-bit system extending stacksize will lead
|
||||
to additional memory space usage, but do not require actual commited memory,
|
||||
so you can inrease stacksize to relatively large value (e.g. 1024000) without
|
||||
the need to add additional phisical memory,
|
||||
but it's system/libc dependant and requires additional testing under your
|
||||
installation. Don't forget about memory related ulimts.
|
||||
<p>For 32-bit systems address space can be a bottlneck you should consider. If
|
||||
you're short of address space you can try to use negative stack size.
|
||||
implementations and built-in DNS resolvers, especially in the case of IPv6 and a large
|
||||
number of interfaces. Under most 64-bit systems, extending stacksize will lead
|
||||
to additional memory space usage but does not require actual committed memory,
|
||||
so you can increase stacksize to a relatively large value (e.g., 1024000) without
|
||||
the need to add additional physical memory,
|
||||
but it's system/libc dependent and requires additional testing under your
|
||||
installation. Don't forget about memory-related ulimits.
|
||||
<p>For 32-bit systems, address space can be a bottleneck you should consider. If
|
||||
you're short on address space, you can try using a negative stack size.
|
||||
|
||||
<h4>Known system issues</h4>
|
||||
<h4>Known System Issues</h4>
|
||||
|
||||
There are known race condition issues in Linux / glibc resolver. The probability
|
||||
of race condition arises under configuration with IPv6, large number of interfaces
|
||||
or IP addresses or resolvers configured. In this case, install local recursor and
|
||||
use 3proxy built-in resolver (nserver / nscache / nscache6).
|
||||
<h4>Do not use public resolvers</h4>
|
||||
Public resolvers like ones from Google have ratelimits. For large number of
|
||||
requests install local caching recursor (ISC bind named, PowerDNS recursor, etc).
|
||||
There are known race condition issues in the Linux/glibc resolver. The probability
|
||||
of a race condition arises under configuration with IPv6, a large number of interfaces
|
||||
or IP addresses, or with resolvers configured. In this case, install a local recursor and
|
||||
use 3proxy's built-in resolver (nserver / nscache / nscache6).
|
||||
<h4>Do Not Use Public Resolvers</h4>
|
||||
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).
|
||||
|
||||
<h4>Avoid large lists</h4>
|
||||
<h4>Avoid Large Lists</h4>
|
||||
|
||||
Currently, 3proxy is not optimized to use large ACLs, user lists, etc. All lists
|
||||
are processed lineary. In devel version you can use RADIUS authentication to avoid
|
||||
user lists and ACLs in 3proxy itself. Also, RADIUS allows to easily set outgoing IP
|
||||
on per-user basis or more sophisicated logics.
|
||||
RADIUS is a new beta feature, test it before using in production.
|
||||
are processed linearly. In the devel version, you can use RADIUS authentication to avoid
|
||||
user lists and ACLs in 3proxy itself. Also, RADIUS allows you to easily set an outgoing IP
|
||||
on a per-user basis or implement more sophisticated logic.
|
||||
RADIUS is a new beta feature; test it before using it in production.
|
||||
|
||||
<h4>Avoid changing configuration too often</h4>
|
||||
<h4>Avoid Changing Configuration Too Often</h4>
|
||||
|
||||
Every configuration reload requires additional resources. Do not do frequent
|
||||
changes, like users addition/deletaion via connfiguration, use alternative
|
||||
Every configuration reload requires additional resources. Do not make frequent
|
||||
changes, such as user addition/deletion via configuration; use alternative
|
||||
authentication methods instead, like RADIUS.
|
||||
|
||||
<h4>Consider using 'noforce'</h4>
|
||||
<h4>Consider Using 'noforce'</h4>
|
||||
|
||||
'force' behaviour (default) re-authenticates all connections after
|
||||
configuration reload, it may be resource consuming on large number of
|
||||
connections. Consider adding 'noforce' command before services started
|
||||
to prevent connections reauthentication.
|
||||
The 'force' behavior (default) re-authenticates all connections after
|
||||
configuration reload; it may be resource-consuming with a large number of
|
||||
connections. Consider adding the 'noforce' command before services are started
|
||||
to prevent connection re-authentication.
|
||||
|
||||
<h4>Do not monitor configuration files directly</h4>
|
||||
<h4>Do Not Monitor Configuration Files Directly</h4>
|
||||
|
||||
Using configuration file directly in 'monitor' can lead to race condition where
|
||||
configuration is reloaded while file is being written.
|
||||
Using a configuration file directly in 'monitor' can lead to a race condition where
|
||||
the configuration is reloaded while the file is being written.
|
||||
To avoid race conditions:
|
||||
<ol>
|
||||
<li> Update config files only if there is no lock file
|
||||
<li> Create lock file then 3proxy configuration is updated, e.g. with
|
||||
<li> Create a lock file when the 3proxy configuration is updated, e.g., with
|
||||
"touch /some/path/3proxy/3proxy.lck". If you generate config files
|
||||
asynchronously, e.g. by user's request via web, you should consider
|
||||
implementing existance checking and file creation as atomic operation.
|
||||
<li>add
|
||||
asynchronously, e.g., by a user's request via web, you should consider
|
||||
implementing existence checking and file creation as an atomic operation.
|
||||
<li> Add
|
||||
<pre>
|
||||
system "rm /some/path/3proxy/3proxy.lck"
|
||||
</pre>
|
||||
at the end of config file to remove it after configuration is successfully loaded
|
||||
<li> Use a dedicated version file to monitor, e.g.
|
||||
at the end of the config file to remove it after the configuration is successfully loaded
|
||||
<li> Use a dedicated version file to monitor, e.g.:
|
||||
<pre>
|
||||
monitor "/some/path/3proxy/3proxy.ver"
|
||||
</pre>
|
||||
<li> After config is updated, change version file for 3proxy to reload configuration,
|
||||
e.g. with "touch /some/path/3proxy/3proxy.ver".
|
||||
<li> After the config is updated, change the version file for 3proxy to reload the configuration,
|
||||
e.g., with "touch /some/path/3proxy/3proxy.ver".
|
||||
</ol>
|
||||
|
||||
<h4>Use TCP_NODELAY to speed-up connections with small amount of data</h4>
|
||||
<h4>Use TCP_NODELAY to Speed Up Connections with Small Amounts of Data</h4>
|
||||
|
||||
If most requests require exchange with a small amount of data in a both ways
|
||||
without the need for bandwidth, e.g. messengers or small web request,
|
||||
you can eliminate Nagle's algorithm delay with TCP_NODELAY flag. Usage example:
|
||||
If most requests require an exchange with a small amount of data in both directions
|
||||
without the need for bandwidth, e.g., messengers or small web requests,
|
||||
you can eliminate Nagle's algorithm delay with the TCP_NODELAY flag. Usage example:
|
||||
<pre>
|
||||
proxy -osTCP_NODELAY -ocTCP_NODELAY
|
||||
</pre>
|
||||
sets TCP_NODELAY for client (oc) and server (os) connections.
|
||||
<p>Do not use TCP_NODELAY on slow connections with high delays and then
|
||||
<p>Do not use TCP_NODELAY on slow connections with high delays when
|
||||
connection bandwidth is a bottleneck.
|
||||
|
||||
<h4>Use splice to speedup large data amount transfers</h4>
|
||||
<h4>Use Splice to Speed Up Large Data Amount Transfers</h4>
|
||||
|
||||
splice() allows to copy data between connections without copying to process
|
||||
addres space. It can speedup proxy on high bandwidth connections, if most
|
||||
splice() allows copying data between connections without copying to the process
|
||||
address space. It can speed up the proxy on high-bandwidth connections if most
|
||||
connections require large data transfers. Splice is enabled by default on Linux
|
||||
since 0.9, "-s0" disables splice usage. Example:
|
||||
since 0.9; "-s0" disables splice usage. Example:
|
||||
<pre>
|
||||
proxy -s0
|
||||
</pre>
|
||||
Splice is only available on Linux. Splice requires more system buffers and file descriptors,
|
||||
Splice is only available on Linux. Splice requires more system buffers and file descriptors
|
||||
and produces more IOCTLs but reduces process memory and overall CPU usage.
|
||||
Disable splice if there is a lot of short-living connections with no bandwidth
|
||||
Disable splice if there are a lot of short-lived connections with no bandwidth
|
||||
requirements.
|
||||
<p>Use splice only on high-speed connections (e.g. 10GBE), if processor, memory speed or
|
||||
<p>Use splice only on high-speed connections (e.g., 10GbE) when the processor, memory speed, or
|
||||
system bus are bottlenecks.
|
||||
<p>TCP_NODELAY and splice are not contrary to each over and should be combined on
|
||||
<p>TCP_NODELAY and splice are not contrary to each other and should be combined on
|
||||
high-speed connections.
|
||||
|
||||
<h4>Add Grace Delay to Reduce System Calls</h4>
|
||||
|
||||
<pre>proxy -g8000,3,10</pre>
|
||||
The first parameter is the average read size we want to keep, the second parameter is
|
||||
the minimal number of packets in the same direction to apply the algorithm,
|
||||
and the last value is the delay added after polling and prior to reading data.
|
||||
The example above adds a 10-millisecond delay before reading data if the average
|
||||
polling size is below 8000 bytes and 3 read operations have been made in the same
|
||||
direction. It's especially useful with splice. <pre>logdump 1 1</pre> is useful
|
||||
to see how grace delays work; choose a delay value to avoid filling the read
|
||||
pipe/buffer (typically 64K) but keep the request sizes close to the chosen average
|
||||
on large file uploads/downloads.
|
||||
+890
-416
File diff suppressed because it is too large.
Load diff
+543
-91
@@ -5,16 +5,15 @@
|
||||
<li><a href="#COMPILE">Компиляция</a>
|
||||
<ul>
|
||||
<li><a href="#MSVC">Как скомпилировать 3proxy Visual C++</a>
|
||||
<li><a href="#INTL">Как скомпилировать 3proxy Intel C Compiler под Windows</a>
|
||||
<li><a href="#GCCWIN">Как скомпилировать 3proxy GCC под Windows</a>
|
||||
<li><a href="#CMAKE">Как скомпилировать 3proxy с помощью CMake</a>
|
||||
<li><a href="#GCCUNIX">Как скомпилировать 3proxy GCC под Unix/Linux</a>
|
||||
<li><a href="#CCCUNIX">Как скомпилировать 3proxy Compaq C Compiler под Unix/Linux</a>
|
||||
</ul>
|
||||
<li><a href="#INSTALL">Установка и удаление 3proxy</a>
|
||||
<ul>
|
||||
<li><a href="#INSTNT">Как установить/удалить 3proxy под Windows 95/98/ME/NT/2000/XP как службу</a>
|
||||
<li><a href="#INST95">Как установить/удалить 3proxy под Windows 95/98/ME</a>
|
||||
<li><a href="#INSTNT">Как установить/удалить 3proxy под Windows NT/2000/XP/2003 как службу</a>
|
||||
<li><a href="#INSTUNIX">Как установить/удалить 3proxy под Unix/Linux</a>
|
||||
<li><a href="#INSTMACOS">Как установить/удалить 3proxy под macOS</a>
|
||||
<li><a href="#INSTDOCKER">Как использовать 3proxy с Docker</a>
|
||||
</ul>
|
||||
<li><a href="#SERVER">Конфигурация сервера</a>
|
||||
<ul>
|
||||
@@ -33,6 +32,10 @@
|
||||
<li><a href="#BIND">Как повесить службу на определенный интерфейс или порт</a>
|
||||
<li><a href="#NAMES">Как разрешать имена на родительском прокси?</a></li>
|
||||
<li><a href="#ISFTP">Как настроить FTP прокси?</a></li>
|
||||
<li><a href="#TLSPR">Как настроить SNI proxy (tlspr)</a></li>
|
||||
<li><a href="#SSLPLUGIN">Как настроить TLS/SSL (https прокси, mTLS)</a></li>
|
||||
<li><a href="#CERTIFICATES">Как создать CA и сертификаты для SSL</a></li>
|
||||
<li><a href="#PCRE">Как использовать PCRE-фильтрацию (регулярные выражения)</a></li>
|
||||
<li><a href="#AUTH">Как ограничить доступ к службе</a>
|
||||
<li><a href="#USERS">Как создать список пользователей</a>
|
||||
<li><a href="#ACL">Как ограничить доступ пользователей к ресурсам</a>
|
||||
@@ -46,6 +49,8 @@
|
||||
<li><a href="#NSCACHING">Как управлять разрешением имен и кэшированием DNS</a>
|
||||
<li><a href="#IPV6">Как использовать IPv6</a>
|
||||
<li><a href="#CONNBACK">Как использовать connect back</a>
|
||||
<li><a href="#HAPROXY">Как использовать протокол HAProxy PROXY</a>
|
||||
<li><a href="#MAXSEG">Как установить максимальный размер сегмента TCP (MSS)</a>
|
||||
</ul>
|
||||
<li><a href="#CLIENT">Конфигурация и настройка клиентов</a>
|
||||
<ul>
|
||||
@@ -71,64 +76,67 @@
|
||||
<ul>
|
||||
<li><a name="MSVC"><i>Как скомпилировать 3proxy Visual C++</i></a>
|
||||
<p>
|
||||
Извлеките файлы из архива 3proxy.tgz (например, с помощью WinZip).
|
||||
Используйте команду nmake /f Makefile.msvc.
|
||||
Извлеките файлы из архива 3proxy.tgz (например, с помощью WinZip) или используйте git.
|
||||
<pre>
|
||||
nmake /f Makefile.msvc
|
||||
</pre>
|
||||
Исполняемые файлы будут помещены в каталог <code>bin/</code>.
|
||||
</p>
|
||||
<li><a name="INTL"><i>Как скомпилировать 3proxy Intel C Compiler под Windows</i></a>
|
||||
<li><a name="CMAKE"><i>Как скомпилировать 3proxy с помощью CMake</i></a>
|
||||
<p>
|
||||
См. <a href="#MSVC">Как скомпилировать 3proxy Visual C++</a>.
|
||||
Используйте Makefile.intl вместо Makefile.msvc
|
||||
</p>
|
||||
<li><a name="GCCWIN"><i>Как скомпилировать 3proxy GCC под Windows</i></a></li>
|
||||
<p>
|
||||
Извлеките файлы из архива 3proxy.tgz (например, с помощью WinZip или, при наличии
|
||||
Cygwin, tar -xzf 3proxy.tgz).
|
||||
Используйте команду make -f Makefile.win. Если по каким-то причинам вы хотите использовать
|
||||
библиотеку POSIX-эмуляции CygWin - используйте make -f Makefile.unix.
|
||||
При использовании CygWin, функции, специфичные для Windows (такие, как запуск в
|
||||
качестве службы) будут недоступны.
|
||||
CMake предоставляет кроссплатформенную систему сборки. Работает на Windows (MSVC, MinGW), Linux, macOS и BSD.
|
||||
<br>Базовые шаги сборки:
|
||||
<pre>
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
cmake --build .</pre>
|
||||
На Windows с Visual Studio можно также сгенерировать файл решения:
|
||||
<pre>
|
||||
cmake -G "Visual Studio 17 2022" -A x64 ..
|
||||
cmake --build . --config Release</pre>
|
||||
Опциональные функции можно включить через параметры cmake:
|
||||
<pre>
|
||||
cmake -D3PROXY_USE_OPENSSL=ON -D3PROXY_USE_PCRE2=ON ..</pre>
|
||||
Доступные опции: 3PROXY_USE_OPENSSL, 3PROXY_USE_PCRE2, 3PROXY_USE_PAM, 3PROXY_USE_ODBC.
|
||||
<br>Исполняемые файлы будут помещены в каталог <code>build/bin/</code>.
|
||||
</p>
|
||||
<li><a name="GCCUNIX"><i>Как скомпилировать 3proxy GCC под Unix/Linux</i></a></li>
|
||||
<p>
|
||||
Используйте make -f Makefile.unix. Должен использоваться GNU make, на
|
||||
некоторых системах необходимо использовать gmake вместо make. Под Linux
|
||||
необходимо использовать Makefile.Linux, под Solaris - Makefile.Solaris-* (в
|
||||
зависимости от используемого компилятора). Компиляция проверена в FreeBSD/i386,
|
||||
OpenBSD/i386, NetBSD/i386, RH Linux/Alpha, Debian/i386, Gentoo/i386, Gentoo/PPC,
|
||||
Solaris 10, но должно собираться в любых версиях *BSD/Linux/Solaris.
|
||||
В других системах может потребоваться модификация make-файла и/или исходных текстов.
|
||||
Для компиляции с поддержкой ODBC необходимо убрать -DNOODBC из флагов
|
||||
компиляции и добавить -lodbc (или другую ODBC-библиотеку) к флагам линковщика.
|
||||
</p>
|
||||
<li><a name="CCCUNIX"><i>Как скомпилировать 3proxy Compaq C Compiler под Unix/Linux</i></a></li>
|
||||
<p>
|
||||
Используйте make -f Makefile.ccc. Компиляция проверена в RH Linux 7.1/Alpha.
|
||||
В других системах может потребоваться модификация файла и/или исходных текстов.
|
||||
Для Linux используйте:
|
||||
<pre>
|
||||
ln -sf Makefile.Linux Makefile
|
||||
make</pre>
|
||||
Для FreeBSD используйте:
|
||||
<pre>
|
||||
ln -sf Makefile.FreeBSD Makefile
|
||||
make</pre>
|
||||
Для других Unix-подобных систем используйте Makefile.unix. На BSD-производных системах
|
||||
убедитесь, что используете GNU make; иногда он называется gmake вместо make.
|
||||
<br>Компиляция проверена на FreeBSD, NetBSD, OpenBSD, Linux, Solaris и macOS.
|
||||
<br>Для поддержки ODBC необходимо установить Unix ODBC, убрать -DNOODBC из флагов
|
||||
компиляции и добавить ODBC-библиотеку к флагам линковщика.
|
||||
<br>Исполняемые файлы будут помещены в каталог <code>bin/</code>.
|
||||
</p>
|
||||
</ul>
|
||||
<hr>
|
||||
<li><a name="INSTALL"><b>Установка и удаление 3proxy</b></a>
|
||||
<p>
|
||||
<ul>
|
||||
<li><a name="INSTNT"><i>Как установить/удалить 3proxy под Windows 95/98/ME/NT/2000/XP/2003 как службу</i></a>
|
||||
<li><a name="INSTNT"><i>Как установить/удалить 3proxy под Windows NT/2000/XP/2003 как службу</i></a>
|
||||
<p>
|
||||
Извлеките файлы из архива 3proxy.zip в любой каталог
|
||||
Извлеките файлы из архива 3proxy.zip в любой каталог
|
||||
(например, c:\Program Files\3proxy). Если необходимо, создайте каталог для
|
||||
хранения файлов журналов. Создайте файл конфигурации 3proxy.cfg в
|
||||
каталоге 3proxy (см. раздел <a href="#SERVER">Конфигурация сервера</a>).
|
||||
Если используется версия более ранняя, чем 0.6, добавьте строку
|
||||
<pre>
|
||||
service</pre>
|
||||
в файл 3proxy.cfg. Откройте командную строку (cmd.exe).
|
||||
Откройте командную строку (cmd.exe).
|
||||
Перейдите в каталог с 3proxy и дайте команду 3proxy.exe --install:
|
||||
<pre>
|
||||
D:\>C:
|
||||
C:\>cd C:\Program Files\3proxy
|
||||
C:\Program Files\3proxy>3proxy.exe --install</pre>
|
||||
Сервис должен быть установлен и запущен. Если сервис не запускается,
|
||||
проверьте содержимое файла журнала,
|
||||
попробуйте удалить строку service из 3proxy.cfg, запустить 3proxy.exe вручную
|
||||
и проанализировать сообщения об ошибках.
|
||||
попробуйте запустить 3proxy.exe вручную и проанализировать сообщения об ошибках.
|
||||
</p><p>
|
||||
Для удаления 3proxy необходимо остановить сервис и дать
|
||||
команду 3proxy.exe --remove:
|
||||
@@ -138,43 +146,110 @@
|
||||
C:\Program Files\3proxy>net stop 3proxy
|
||||
C:\Program Files\3proxy>3proxy.exe --remove</pre>
|
||||
после чего каталог 3proxy можно удалить.
|
||||
<p>
|
||||
Установка в качестве системной службы под Windows 9x поддерживается с версии 0.5
|
||||
</p>
|
||||
<li><a name="INST95"><i>Как установить/удалить 3proxy под Windows 95/98/ME</i></a>
|
||||
<p>
|
||||
Извлеките файлы из архива 3proxy.zip в любой каталог
|
||||
(например, c:\Program Files\3proxy). Если необходимо, создайте каталог для
|
||||
хранения файлов журналов. Создайте файл конфигурации 3proxy.cfg в
|
||||
каталоге 3proxy (См. раздел <a href="#SERVER">Конфигурация сервера</a>).
|
||||
В файле конфигурации удалите строку
|
||||
<pre>
|
||||
service</pre>
|
||||
и добавьте строку
|
||||
<pre>
|
||||
daemon</pre>
|
||||
Создайте ярлык для 3proxy.exe и поместите его в автозагрузку либо с помощью
|
||||
редактора реестра regedit.exe добавьте в разделе
|
||||
<br>HKLM\Software\Microsoft\Windows\CurrentVersion\Run</br>
|
||||
строковый параметр
|
||||
<br>3proxy = "c:\Program Files\3proxy.exe" "C:\Program Files\3proxy.cfg"<br>
|
||||
Использование кавычек при наличии в пути пробела обязательно.
|
||||
Перезагрузитесь.
|
||||
Если сервер не запускается,
|
||||
проверьте содержимое файла журнала,
|
||||
попробуйте удалить строку daemon из 3proxy.cfg, запустить 3proxy.exe вручную
|
||||
и проанализировать сообщения об ошибках.
|
||||
</p>
|
||||
<li><a name="INSTUNIX"><i>Как установить/удалить 3proxy под Unix/Linux</i></a>
|
||||
<p>
|
||||
Скомпилируйте 3proxy (см. раздел <a href="#COMPILE">Компиляция</a>). Скопируйте
|
||||
исполняемые файлы в подходящий каталог (например, /usr/local/3proxy/sbin для
|
||||
серверных приложений или /usr/local/3proxy/bin для клиентских утилит).
|
||||
Создайте файл /usr/local/etc/3proxy.cfg.
|
||||
(См. раздел <a href="#SERVER">Конфигурация сервера</a>).
|
||||
Изменить расположение файла конфигурации можно, задав параметр при вызове
|
||||
3proxy или изменив путь в файле 3proxy.c до компиляции.
|
||||
Добавьте вызов 3proxy в скрипты начальной инициализации.
|
||||
<b>С помощью Makefile:</b>
|
||||
<br>Скомпилируйте 3proxy (см. раздел <a href="#COMPILE">Компиляция</a>), затем выполните:
|
||||
<pre>
|
||||
sudo make install</pre>
|
||||
Это установит исполняемые файлы в <code>/usr/local/3proxy/sbin/</code>,
|
||||
конфигурацию в <code>/etc/3proxy/</code> и настроит chroot-каталоги.
|
||||
Файл конфигурации по умолчанию: <code>/etc/3proxy/3proxy.cfg</code>.
|
||||
</p>
|
||||
<p>
|
||||
<b>С помощью CMake:</b>
|
||||
<pre>
|
||||
mkdir build && cd build
|
||||
cmake ..
|
||||
cmake --build .
|
||||
sudo cmake --install .</pre>
|
||||
</p>
|
||||
<p>
|
||||
<b>С помощью готовых пакетов из GitHub:</b>
|
||||
<br>Скачайте .deb или .rpm пакеты со страницы <a href="https://github.com/3proxy/3proxy/releases">GitHub Releases</a>.
|
||||
<br>Для Debian/Ubuntu:
|
||||
<pre>
|
||||
sudo dpkg -i 3proxy_*.deb</pre>
|
||||
Для RHEL/CentOS/Fedora:
|
||||
<pre>
|
||||
sudo rpm -i 3proxy-*.rpm</pre>
|
||||
</p>
|
||||
<p>
|
||||
Добавьте 3proxy в скрипты автозапуска или используйте systemd:
|
||||
<pre>
|
||||
sudo systemctl enable 3proxy
|
||||
sudo systemctl start 3proxy</pre>
|
||||
</p>
|
||||
<li><a name="INSTMACOS"><i>Как установить/удалить 3proxy под macOS</i></a>
|
||||
<p>
|
||||
<b>С помощью CMake (рекомендуется):</b>
|
||||
<pre>
|
||||
mkdir build && cd build
|
||||
cmake ..
|
||||
cmake --build .
|
||||
sudo cmake --install .</pre>
|
||||
Это установит:
|
||||
<ul>
|
||||
<li>Исполняемые файлы в <code>/usr/local/bin/</code></li>
|
||||
<li>Конфигурацию в <code>/etc/3proxy/</code></li>
|
||||
<li>Плагины в <code>/usr/local/lib/3proxy/</code></li>
|
||||
<li>Launchd plist в <code>/Library/LaunchDaemons/org.3proxy.3proxy.plist</code></li>
|
||||
</ul>
|
||||
</p>
|
||||
<p>
|
||||
<b>С помощью Makefile:</b>
|
||||
<pre>
|
||||
ln -sf Makefile.FreeBSD Makefile
|
||||
make
|
||||
sudo make install</pre>
|
||||
Это установит исполняемые файлы в <code>/usr/local/3proxy/bin/</code> и конфигурацию в <code>/usr/local/etc/3proxy/</code>.
|
||||
</p>
|
||||
<p>
|
||||
<b>Управление службой через launchd:</b>
|
||||
<br>После установки через cmake службой можно управлять с помощью launchctl:
|
||||
<pre>
|
||||
# Загрузить и запустить службу
|
||||
sudo launchctl load /Library/LaunchDaemons/org.3proxy.3proxy.plist
|
||||
|
||||
# Остановить службу
|
||||
sudo launchctl stop org.3proxy.3proxy
|
||||
|
||||
# Запустить службу
|
||||
sudo launchctl start org.3proxy.3proxy
|
||||
|
||||
# Выгрузить и отключить службу
|
||||
sudo launchctl unload /Library/LaunchDaemons/org.3proxy.3proxy.plist</pre>
|
||||
Служба запускается от имени пользователя <code>proxy</code> (создаётся при установке).
|
||||
Файл конфигурации: <code>/etc/3proxy/3proxy.cfg</code>
|
||||
</p>
|
||||
<li><a name="INSTDOCKER"><i>Как использовать 3proxy с Docker</i></a>
|
||||
<p>
|
||||
<b>Использование готовых образов из GitHub Container Registry:</b>
|
||||
<pre>
|
||||
docker pull ghcr.io/3proxy/3proxy:latest</pre>
|
||||
</p>
|
||||
<p>
|
||||
<b>Сборка Docker-образов:</b>
|
||||
<br>Предоставляются два Dockerfile:
|
||||
<ul>
|
||||
<li><code>Dockerfile.minimal</code> - минимальная статическая сборка без плагинов, конфигурация из stdin:
|
||||
<pre>
|
||||
docker build -f Dockerfile.minimal -t 3proxy.minimal .
|
||||
docker run -i -p 3129:3129 --name 3proxy 3proxy.minimal</pre>
|
||||
Затем введите конфигурацию, завершив командой "end".
|
||||
</li>
|
||||
<li><code>Dockerfile.full</code> - полная сборка с плагинами (SSL, PCRE, Transparent):
|
||||
<pre>
|
||||
docker build -f Dockerfile.full -t 3proxy.full .
|
||||
docker run -p 3129:3129 -v /path/to/config:/usr/local/3proxy/conf 3proxy.full</pre>
|
||||
Файл конфигурации должен находиться по пути <code>/path/to/config/3proxy.cfg</code>.
|
||||
</li>
|
||||
</ul>
|
||||
</p>
|
||||
<p>
|
||||
По умолчанию 3proxy работает в chroot-окружении с uid/gid 65535. Используйте <code>nserver</code> в конфигурации для DNS-разрешения в chroot.
|
||||
Для запуска без chroot монтируйте конфигурацию в <code>/etc/3proxy</code>.
|
||||
</p>
|
||||
</ul>
|
||||
<hr>
|
||||
@@ -218,7 +293,7 @@
|
||||
<li>Служба уже установлена или запущена
|
||||
</ul>
|
||||
</p>
|
||||
<li><a name="INTEXT">Как разобраться с internal и external</a></li></li>
|
||||
<li><a name="INTEXT">Как разобраться с internal и external</a></li>
|
||||
<p>
|
||||
Убедитесь, что выправильно понимаете что такое internal и external адреса.
|
||||
Оба адреса - это адреса, принадлежищие хосту, на котором установлен 3proxy.
|
||||
@@ -439,7 +514,7 @@
|
||||
- Internal External 0x0 Allowed"</pre>
|
||||
Формат ISA 2000/2004 firewall FWSEXTD.log (поля разделены табуляцией):
|
||||
<pre>
|
||||
"- + L%C %U unnknown:0:0.0 N %Y-%m-%d
|
||||
"- + L%C %U unknown:0:0.0 N %Y-%m-%d
|
||||
%H:%M:%S fwsrv 3PROXY - %n %R %r
|
||||
%D %O %I %r TCP Connect - -
|
||||
- %E - - - - -"</pre>
|
||||
@@ -508,6 +583,341 @@
|
||||
через http прокси, дополнительного прокси поднимать не надо. Для FTP-клиентов необходимо поднять ftppr. FTP прокси всегда работает
|
||||
с FTP сервером в пассивном режиме.
|
||||
</p>
|
||||
<li><a name="TLSPR"><i>Как настроить SNI proxy (tlspr)</i></a></li>
|
||||
<p>
|
||||
SNI proxy может быть использован для транспарентного перенаправления любого TLS трафика (например HTTPS) на внешнем маршрутизаторе
|
||||
или локальными правилами. Так же можно использовать его для извлечения имени хоста из TLS хендшейка с целью логгирования или использования в ACL.
|
||||
Еще одна задача которую может решать модуль - требование наличия TLS или mTLS (mutual TLS).
|
||||
Если tlspr используется как отдельный сервис без использования плагина Transparent, то необходимо задать порт назначения через опцию -P (по умолчанию 443),
|
||||
т.к. TLS хендшейк не содержит информации о порте назначения.
|
||||
</p><p>
|
||||
<b>Опции:</b>
|
||||
</p><pre>
|
||||
-P <порт> - порт назначения (по умолчанию: 443)
|
||||
-c <уровень> - уровень проверки TLS:
|
||||
0 (по умолчанию) - пропустить трафик без TLS
|
||||
1 - требовать TLS, проверять наличие client HELLO
|
||||
2 - требовать TLS, проверять наличие client и server HELLO
|
||||
3 - требовать TLS, проверять наличие серверного сертификата (не совместим с TLS 1.3+)
|
||||
4 - требовать взаимный (mutual) TLS, проверять что сервер запрашивает сертификат и клиент его отправляет (не совместим с TLS 1.3+)
|
||||
</pre>
|
||||
<p>
|
||||
<b>SNI Break (обход DPI):</b>
|
||||
<br>tlspr может использоваться как родительский прокси типа "tls" для реализации SNI-фрагментации (аналог NoDPI/GoodByeDPI).
|
||||
Клиент отправляет первую часть TLS ClientHello, tlspr разбивает его на расширении SNI и отправляет двумя TCP-пакетами,
|
||||
что позволяет обойти некоторые DPI-системы, ищущие заблокированные имена хостов в TLS-рукопожатиях.
|
||||
<br>Для включения SNI break используйте <code>parent ... tls 0.0.0.0 0</code> и опцию <code>-s</code> на слушающем сервисе с TCP_NODELAY:
|
||||
</p><pre>
|
||||
auth iponly
|
||||
allow *
|
||||
parent 1000 tls 0.0.0.0 0
|
||||
allow *
|
||||
proxy -s -i127.0.0.1 -ocTCP_NODELAY -osTCP_NODELAY -p1443
|
||||
</pre>
|
||||
<p>
|
||||
TCP_NODELAY необходим, чтобы ядро не объединяло разделенные пакеты.
|
||||
</p>
|
||||
<p>
|
||||
<b>Примеры конфигурации:</b>
|
||||
</p>
|
||||
<p>
|
||||
1. Отдельный SNI proxy на порту 1443 с перенаправлением на порт назначения 443:
|
||||
</p><pre>
|
||||
tlspr -p1443 -P443 -c1
|
||||
</pre>
|
||||
<p>
|
||||
2. Использование tlspr как родительского прокси в SOCKS для обнаружения hostname из TLS (даже если клиент подключается по IP):
|
||||
</p><pre>
|
||||
allow * * * 80
|
||||
parent 1000 http 0.0.0.0 0
|
||||
allow * * * * CONNECT
|
||||
parent 1000 tls 0.0.0.0 0
|
||||
deny * * some.not.allowed.host
|
||||
allow *
|
||||
socks
|
||||
</pre>
|
||||
<p>
|
||||
3. Использование tlspr с HTTP proxy для ACL по имени хоста TLS:
|
||||
</p><pre>
|
||||
allow * * * 80
|
||||
parent 1000 http 0.0.0.0 0
|
||||
allow * * * 443
|
||||
parent 1000 tls 0.0.0.0 0
|
||||
deny * * blocked.example.com
|
||||
allow *
|
||||
proxy
|
||||
</pre>
|
||||
</p>
|
||||
|
||||
<li><a name="SSLPLUGIN"><i>Как настроить TLS/SSL (https прокси, mTLS)</i></a>
|
||||
<p>
|
||||
Начиная с версии 0.9.7 поддержка TLS/SSL встроена в 3proxy при компиляции с OpenSSL
|
||||
(WITH_SSL). Ранее доступная как SSLPlugin, функциональность теперь интегрирована
|
||||
в основной бинарный файл. Строка plugin больше не нужна.
|
||||
TLS/SSL может использоваться для:
|
||||
<ul>
|
||||
<li>Создания https:// прокси (TLS-шифрованное соединение между клиентом и прокси)</li>
|
||||
<li>Реализации MITM для инспекции TLS-трафика</li>
|
||||
<li>Соединения с вышестоящими серверами через TLS с аутентификацией по клиентскому сертификату</li>
|
||||
<li>Требования аутентификации по клиентскому сертификату (mTLS)</li>
|
||||
</ul>
|
||||
</p>
|
||||
<p>
|
||||
<b>Создание https:// прокси:</b>
|
||||
<br>Для создания https:// прокси требуется сертификат и ключ сервера. Сертификат не должен быть самоподписанным
|
||||
и должен содержать альтернативные имена (SAN) для имени хоста/IP прокси.
|
||||
</p><pre>
|
||||
ssl_server_cert /etc/3proxy/certs/server.crt
|
||||
ssl_server_key /etc/3proxy/certs/server.key
|
||||
ssl_serv
|
||||
proxy -p3129
|
||||
ssl_noserv
|
||||
proxy -p3128
|
||||
</pre>
|
||||
<p>
|
||||
Создаётся https:// прокси на порту 3129 и http:// прокси на порту 3128.
|
||||
Настройте клиенты на использование https://proxy-host:3129/ в качестве URL прокси.
|
||||
</p>
|
||||
<p>
|
||||
<b>Аутентификация по клиентскому сертификату (mTLS):</b>
|
||||
<br>Чтобы требовать от клиентов аутентификацию по сертификату, используйте ssl_server_verify и укажите CA-сертификат:
|
||||
</p><pre>
|
||||
ssl_server_cert /etc/3proxy/certs/server.crt
|
||||
ssl_server_key /etc/3proxy/certs/server.key
|
||||
ssl_server_ca_file /etc/3proxy/certs/ca.crt
|
||||
ssl_server_verify
|
||||
ssl_serv
|
||||
proxy -p3129
|
||||
</pre>
|
||||
<p>
|
||||
Только клиенты с действительным сертификатом, подписанным CA, смогут подключиться.
|
||||
</p>
|
||||
<p>
|
||||
<b>MITM для инспекции TLS-трафика:</b>
|
||||
<br>Для перехвата и расшифровки TLS-трафика требуется CA-сертификат для генерации подделанных серверных сертификатов:
|
||||
</p><pre>
|
||||
ssl_server_ca_file /etc/3proxy/certs/ca.crt
|
||||
ssl_server_ca_key /etc/3proxy/certs/ca.key
|
||||
ssl_client_verify
|
||||
ssl_client_ca_file /etc/ssl/certs/ca-certificates.crt
|
||||
ssl_mitm
|
||||
proxy -p3128
|
||||
ssl_nomitm
|
||||
proxy -p3129
|
||||
</pre>
|
||||
<p>
|
||||
CA-сертификат должен быть доверенным для клиентов. ssl_client_verify обеспечивает проверку реальных серверных сертификатов.
|
||||
Без ssl_client_verify прокси уязвим для MITM-атак.
|
||||
</p>
|
||||
<p>
|
||||
<b>TLS-клиент (соединение с вышестоящим сервером через TLS):</b>
|
||||
<br>Для соединения с вышестоящими серверами через TLS с аутентификацией по клиентскому сертификату:
|
||||
</p><pre>
|
||||
ssl_client_cert /etc/3proxy/certs/client.crt
|
||||
ssl_client_key /etc/3proxy/certs/client.key
|
||||
ssl_client_verify
|
||||
ssl_client_ca_file /etc/ssl/certs/ca-certificates.crt
|
||||
ssl_cli
|
||||
proxy -p3128
|
||||
</pre>
|
||||
<p>
|
||||
<b>Условное TLS для parent прокси (ssl_client_mode 3):</b>
|
||||
<br>При ssl_client_mode 3 TLS-рукопожатие с родительским прокси выполняется только если тип parent прокси заканчивается на 's' (защищённые типы). Это позволяет смешивать защищённые и незащищённые родительские прокси в одной конфигурации:
|
||||
</p><pre>
|
||||
ssl_server_cert /etc/3proxy/certs/server.crt
|
||||
ssl_server_key /etc/3proxy/certs/server.key
|
||||
ssl_client_mode 3
|
||||
|
||||
auth strong
|
||||
allow user1
|
||||
parent 1000 https parent1.example.com 443
|
||||
allow user2
|
||||
parent 1000 socks5 parent2.example.com 1080
|
||||
ssl_serv
|
||||
ssl_cli
|
||||
proxy -p3128
|
||||
ssl_noserv
|
||||
ssl_nocli
|
||||
</pre>
|
||||
<p>
|
||||
Создаётся HTTPS-прокси (ssl_serv), принимающий TLS-соединения от клиентов. Для соединений с родительским прокси трафик user1 идёт через https родитель с TLS-шифрованием (защищённый тип), а трафик user2 — через обычный socks5 родитель без TLS. Защищённые типы parent прокси: tcps, https, connects, connect+s, socks4s, socks5s, socks4+s, socks5+s, pop3s, smtps, ftps.
|
||||
</p>
|
||||
<li><a name="CERTIFICATES"><i>Как создать CA и сертификаты для SSL</i></a>
|
||||
<p>
|
||||
<b>Создание удостоверяющего центра (CA):</b>
|
||||
<br>Для MITM или mTLS требуется CA. Сгенерируйте закрытый ключ CA и сертификат:
|
||||
</p><pre>
|
||||
# Генерация закрытого ключа CA
|
||||
openssl genrsa -out ca.key 4096
|
||||
|
||||
# Генерация сертификата CA (действителен 10 лет)
|
||||
openssl req -x509 -new -nodes -key ca.key -sha256 -days 3650 \
|
||||
-subj "/C=RU/ST=Region/L=City/O=MyOrg/CN=My CA" \
|
||||
-out ca.crt
|
||||
</pre>
|
||||
<p>
|
||||
Для MITM импортируйте ca.crt в браузеры/ОС клиентов как доверенный корневой CA.
|
||||
</p>
|
||||
<p>
|
||||
<b>Создание серверного сертификата для https:// прокси:</b>
|
||||
<br>Серверный сертификат должен иметь правильные альтернативные имена (SAN):
|
||||
</p><pre>
|
||||
# Генерация закрытого ключа сервера
|
||||
openssl genrsa -out server.key 2048
|
||||
|
||||
# Создание запроса на подпись сертификата (CSR)
|
||||
openssl req -new -key server.key \
|
||||
-subj "/C=RU/ST=Region/L=City/O=MyOrg/CN=proxy.example.com" \
|
||||
-out server.csr
|
||||
|
||||
# Создание файла расширений для SAN
|
||||
cat > server.ext << 'EOF'
|
||||
authorityKeyIdentifier=keyid,issuer
|
||||
basicConstraints=CA:FALSE
|
||||
keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment
|
||||
extendedKeyUsage = serverAuth
|
||||
subjectAltName = @alt_names
|
||||
|
||||
[alt_names]
|
||||
DNS.1 = proxy.example.com
|
||||
DNS.2 = proxy
|
||||
IP.1 = 192.168.1.100
|
||||
EOF
|
||||
|
||||
# Подписание сертификата CA
|
||||
openssl x509 -req -in server.csr -CA ca.crt -CAkey ca.key \
|
||||
-CAcreateserial -out server.crt -days 365 -sha256 \
|
||||
-extfile server.ext
|
||||
</pre>
|
||||
<p>
|
||||
Для публичного https:// прокси используйте CA вроде Let's Encrypt вместо самоподписанного.
|
||||
</p>
|
||||
<p>
|
||||
<b>Создание клиентского сертификата для mTLS:</b>
|
||||
</p><pre>
|
||||
# Генерация закрытого ключа клиента
|
||||
openssl genrsa -out client1.key 2048
|
||||
|
||||
# Создание CSR
|
||||
openssl req -new -key client1.key \
|
||||
-subj "/C=RU/ST=Region/L=City/O=MyOrg/CN=client1" \
|
||||
-out client1.csr
|
||||
|
||||
# Создание файла расширений
|
||||
cat > client.ext << 'EOF'
|
||||
basicConstraints=CA:FALSE
|
||||
keyUsage = digitalSignature, nonRepudiation, keyEncipherment
|
||||
extendedKeyUsage = clientAuth
|
||||
EOF
|
||||
|
||||
# Подписание CA
|
||||
openssl x509 -req -in client1.csr -CA ca.crt -CAkey ca.key \
|
||||
-CAcreateserial -out client1.crt -days 365 -sha256 \
|
||||
-extfile client.ext
|
||||
|
||||
# Создание PKCS#12 для импорта в браузер
|
||||
openssl pkcs12 -export -out client1.p12 \
|
||||
-inkey client1.key -in client1.crt -certfile ca.crt
|
||||
</pre>
|
||||
<p>
|
||||
Импортируйте client1.p12 в хранилище сертификатов браузера или ОС клиента.
|
||||
</p>
|
||||
<p>
|
||||
<b>Скрипт быстрой настройки для разработки/тестирования:</b>
|
||||
</p><pre>
|
||||
#!/bin/sh
|
||||
# Создаёт CA, серверный и клиентский сертификаты для тестирования SSLPlugin
|
||||
|
||||
# CA
|
||||
openssl genrsa -out ca.key 4096
|
||||
openssl req -x509 -new -nodes -key ca.key -sha256 -days 3650 \
|
||||
-subj "/CN=3proxy CA" -out ca.crt
|
||||
|
||||
# Сервер
|
||||
openssl genrsa -out server.key 2048
|
||||
openssl req -new -key server.key -subj "/CN=localhost" -out server.csr
|
||||
cat > server.ext << 'EOF'
|
||||
basicConstraints=CA:FALSE
|
||||
keyUsage = keyEncipherment
|
||||
extendedKeyUsage = serverAuth
|
||||
subjectAltName = DNS:localhost,DNS:proxy,IP:127.0.0.1
|
||||
EOF
|
||||
openssl x509 -req -in server.csr -CA ca.crt -CAkey ca.key \
|
||||
-CAcreateserial -out server.crt -days 365 -sha256 -extfile server.ext
|
||||
|
||||
# Клиент
|
||||
openssl genrsa -out client.key 2048
|
||||
openssl req -new -key client.key -subj "/CN=client" -out client.csr
|
||||
cat > client.ext << 'EOF'
|
||||
basicConstraints=CA:FALSE
|
||||
extendedKeyUsage = clientAuth
|
||||
EOF
|
||||
openssl x509 -req -in client.csr -CA ca.crt -CAkey ca.key \
|
||||
-CAcreateserial -out client.crt -days 365 -sha256 -extfile client.ext
|
||||
openssl pkcs12 -export -out client.p12 -passout pass: \
|
||||
-inkey client.key -in client.crt -certfile ca.crt
|
||||
</pre>
|
||||
|
||||
<li><a name="PCRE"><i>Как использовать PCRE-фильтрацию (регулярные выражения)</i></a>
|
||||
<p>
|
||||
Начиная с версии 0.9.7 фильтрация PCRE встроена в 3proxy при компиляции с поддержкой
|
||||
PCRE2 (WITH_PCRE). Ранее доступная как PCREPlugin, функциональность теперь интегрирована
|
||||
в основной бинарный файл. Строка plugin больше не нужна.
|
||||
</p>
|
||||
<p>
|
||||
PCRE-фильтрация может использоваться для создания правил поиска и замены с регулярными
|
||||
выражениями для запросов клиентов, заголовков клиента и сервера, а также данных.
|
||||
</p>
|
||||
<p>
|
||||
<b>Команды:</b>
|
||||
</p><pre>
|
||||
pcre TYPE FILTER_ACTION REGEXP [ACE]
|
||||
pcre_rewrite TYPE FILTER_ACTION REGEXP REWRITE_EXPRESSION [ACE]
|
||||
pcre_extend FILTER_ACTION [ACE]
|
||||
pcre_options OPTION1 [...]
|
||||
</pre>
|
||||
<p>
|
||||
<ul>
|
||||
<li><b>TYPE</b> - тип фильтруемых данных (список через запятую):
|
||||
<ul>
|
||||
<li><b>request</b> - содержимое запроса клиента (например, строка HTTP GET-запроса)
|
||||
<li><b>cliheader</b> - содержимое заголовков запроса клиента
|
||||
<li><b>srvheader</b> - содержимое заголовков ответа сервера
|
||||
<li><b>clidata</b> - данные полученные от клиента (например, данные POST-запроса)
|
||||
<li><b>srvdata</b> - данные полученные от сервера (например, HTML-страница)
|
||||
</ul>
|
||||
<li><b>FILTER_ACTION</b> - действие при совпадении:
|
||||
<ul>
|
||||
<li><b>allow</b> - разрешить запрос без проверки остальных правил
|
||||
<li><b>deny</b> - запретить запрос без проверки остальных правил
|
||||
<li><b>dunno</b> - продолжить проверку правил (полезно для pcre_rewrite)
|
||||
</ul>
|
||||
<li><b>REGEXP</b> - регулярное выражение PCRE (Perl). Используйте * если проверка не требуется.
|
||||
<li><b>REWRITE_EXPRESSION</b> - строка замены. Может содержать Perl-подстановки
|
||||
$1, $2 и т.д. $0 - вся найденная подстрока. \r и \n для вставки новых строк.
|
||||
<li><b>ACE</b> - элемент списка контроля доступа (имена пользователей, IP источника,
|
||||
IP назначения, порты и т.д.), аналогичный командам allow/deny/bandlimin.
|
||||
Регулярное выражение проверяется только при совпадении ACL с данными соединения.
|
||||
</ul>
|
||||
</p>
|
||||
<p>
|
||||
<b>Примеры:</b>
|
||||
</p><pre>
|
||||
# Блокировать запросы с определёнными ключевыми словами для некоторых пользователей
|
||||
pcre request deny "porn|sex" user1,user2,user3 192.168.0.0/16
|
||||
|
||||
# Блокировать ответы с определённым content-type
|
||||
pcre srvheader deny "Content-type: application"
|
||||
|
||||
# Замена содержимого в обоих направлениях (цензура)
|
||||
pcre_rewrite clidata,srvdata dunno "porn|sex|pussy" "***" baduser
|
||||
pcre_extend deny * 192.168.0.1/16
|
||||
</pre>
|
||||
<p>
|
||||
<b>Примечание:</b> Регулярные выражения не требуют авторизации и не могут заменить
|
||||
авторизацию и/или ACL allow/deny.
|
||||
</p>
|
||||
|
||||
<li><a name="AUTH"><i>Как ограничить доступ к службе</i></a>
|
||||
<p>
|
||||
Во-первых, для ограничения доступа необходимо указать внутренний интерфейс,
|
||||
@@ -632,7 +1042,7 @@
|
||||
или
|
||||
<pre>
|
||||
users $"c:\Program Files\3proxy\passwords"</pre>
|
||||
Шифрованные NT и crypt пароли можно создавать с помощью утилиты mycrypt.
|
||||
Шифрованные NT и crypt пароли можно создавать с помощью утилиты 3proxy_crypt.
|
||||
<br>Список пользователей един для всех служб. Разграничение доступа по службам
|
||||
необходимо производить с помощью списков доступа.
|
||||
</p>
|
||||
@@ -1009,7 +1419,55 @@
|
||||
allow * * 1.1.1.1
|
||||
tcppm -R0.0.0.0:1234 3128 1.1.1.1 3128</pre>
|
||||
В настройках браузера указывается host.dyndns.example.org:3128.
|
||||
</p>
|
||||
</p>
|
||||
<li><a name="HAPROXY"><i>Как использовать протокол HAProxy PROXY</i></a>
|
||||
<p>
|
||||
3proxy поддерживает протокол HAProxy PROXY v1 как для приёма, так и для
|
||||
отправки информации об IP-адресе клиента. Это полезно, когда 3proxy находится
|
||||
за балансировщиком нагрузки или при передаче информации о клиенте родительскому прокси.
|
||||
</p>
|
||||
<p>
|
||||
<b>Приём заголовка PROXY протокола:</b>
|
||||
<br>Используйте опцию <code>-H</code>, чтобы 3proxy ожидал заголовок PROXY протокола v1
|
||||
на входящих соединениях. Это позволяет 3proxy получать реальный IP-адрес клиента
|
||||
от HAProxy или другого балансировщика нагрузки:
|
||||
</p><pre>
|
||||
proxy -H -p3128
|
||||
socks -H -p1080
|
||||
</pre>
|
||||
<p>
|
||||
Заголовок PROXY протокола должен быть отправлен до любых протокольных данных.
|
||||
</p>
|
||||
<p>
|
||||
<b>Отправка заголовка PROXY протокола родительскому прокси:</b>
|
||||
<br>Используйте тип родительского прокси <code>ha</code> для отправки заголовка
|
||||
PROXY протокола v1 родительскому прокси. Это должен быть последний родитель в цепочке:
|
||||
</p><pre>
|
||||
allow *
|
||||
parent 1000 ha
|
||||
parent 1000 socks5 parent.example.com 1080
|
||||
socks
|
||||
</pre>
|
||||
<p>
|
||||
Эта конфигурация отправляет информацию об IP-адресе клиента SOCKS5 родительскому
|
||||
прокси через PROXY протокол.
|
||||
</p>
|
||||
<li><a name="MAXSEG"><i>Как установить максимальный размер сегмента TCP (MSS)</i></a>
|
||||
<p>
|
||||
Используйте команду <code>maxseg</code> для установки максимального размера
|
||||
сегмента TCP (MSS) для исходящих соединений. Это может быть полезно для обхода
|
||||
проблем с Path MTU Discovery или для оптимизации трафика в специфических
|
||||
сетевых условиях:
|
||||
</p><pre>
|
||||
maxseg 1400
|
||||
proxy -p3128 -OcTCP_NODELAY,TCP_MAXSEG -OsTCP_NODELAY,TCP_MAXSEG
|
||||
</pre>
|
||||
<p>
|
||||
Значение указывается в байтах. Эта настройка использует опцию сокета TCP_MAXSEG
|
||||
и может не поддерживаться на всех платформах. Типичный случай использования -
|
||||
уменьшение MSS для избежания фрагментации в VPN туннелях или для обхода проблем
|
||||
с MTU на определённых сетевых путях.
|
||||
</p>
|
||||
</ul>
|
||||
<hr>
|
||||
<li><a name="CLIENT"><b>Конфигурация клиентов</b></a>
|
||||
@@ -1066,9 +1524,9 @@
|
||||
прокси-серверы для доступа к разным ресурсам. Эта возможность разбирается в
|
||||
статьях
|
||||
<br>Microsoft: Q296591 A Description of the Automatic Discovery Feature
|
||||
<br><a href="http://support.microsoft.com/default.aspx?scid=kb;EN-US;296591">http://support.microsoft.com/default.aspx?scid=kb;EN-US;296591</a>
|
||||
<br><a href="https://support.microsoft.com/default.aspx?scid=kb;EN-US;296591">http://support.microsoft.com/default.aspx?scid=kb;EN-US;296591</a>
|
||||
<br>Netscape: Navigator Proxy Auto-Config File Format
|
||||
<br><a href="http://wp.netscape.com/eng/mozilla/2.0/relnotes/demo/proxy-live.html">http://wp.netscape.com/eng/mozilla/2.0/relnotes/demo/proxy-live.html</a>
|
||||
<br><a href="https://wp.netscape.com/eng/mozilla/2.0/relnotes/demo/proxy-live.html">http://wp.netscape.com/eng/mozilla/2.0/relnotes/demo/proxy-live.html</a>
|
||||
<li><a name="FTP"><i>Как настраивать FTP клиент</i></a>
|
||||
<p>
|
||||
Настройка FTP клиента для работы через SOCKS прокси не отличается от настройки
|
||||
@@ -1124,20 +1582,14 @@
|
||||
</p>
|
||||
<li><a name="CAP"><i>Как использовать 3proxy с программой, не поддерживающей работу с прокси-сервером</i></a>
|
||||
<p>
|
||||
Можно использовать любую программу-редиректор, например,
|
||||
<a href="http://www.socks.permeo.com">SocksCAP</a> или
|
||||
<a href="http://www.freecap.ru">FreeCAP</a>. 3proxy поддерживает исходящие
|
||||
Можно использовать любую программу-редиректор. 3proxy поддерживает исходящие
|
||||
и обратные TCP и UDP соединения, но редиректоры могут иметь свои ограничения,
|
||||
кроме того, некоторые плохо написаные приложения не поддаются "соксификации".
|
||||
Если программе требуется обращаться к небольшому набору серверов
|
||||
(например, игровых), то проблему можно решить с помощью портмаппинга.
|
||||
<li><a name="GAMES"><i>Как использовать 3proxy с играми</i></a>
|
||||
<p>
|
||||
Оптимальный варинт - использовать соксификатор (<a href="#CAP">Как использовать
|
||||
3proxy с программой, не поддерживающей работу с прокси-сервером</a>).
|
||||
<a href="http://www.freecap.ru/">FreeCap 3.13 </a> проверен с играми на движке
|
||||
Unreal (включая Unreal Tournament), Half-Life (включая Counter-Strike) и
|
||||
другими. Если по каким-то причинам соксификатор не работает или недоступен,
|
||||
Если по каким-то причинам соксификатор не работает или недоступен,
|
||||
то необходимо использовать отображения портов (обычно игры,
|
||||
кроме mood-подобных, работают по протоколу UDP, надо использовать udppm).
|
||||
Нужно иметь ввиду, что для udppm требуется отдельный маппинг для каждого
|
||||
@@ -1162,7 +1614,7 @@
|
||||
<li><a name="NEWVERSION"><i>Где взять свежую версию</i></a>
|
||||
<p>
|
||||
Свежую версию всегда можно взять
|
||||
<a href="http://3proxy.ru/">здесь</a>. Обратите внимание,
|
||||
<a href="https://3proxy.ru/">здесь</a>. Обратите внимание,
|
||||
что в новой версии может измениться порядок лицензирования или команды
|
||||
конфигурации, поэтому прежде чем устанавливать новую версии программы
|
||||
обязательно ознакомьтесь с документацией.
|
||||
|
||||
+19
-19
@@ -1,19 +1,19 @@
|
||||
<html><title>3proxy documentation</title><body><h2>3proxy documentation</h2>
|
||||
<a href="securityen.html">Security recommendations</a><br>
|
||||
<a href="highload.html">Optimizing 3proxy for high loads</a><br>
|
||||
<a href="howtoe.html">How To (English, very incomplete)</a><br>
|
||||
<a href="howtor.html">How To (Russian)</a><br>
|
||||
<a href="faqe.html">FAQ (English)</a><br>
|
||||
<a href="faqr.html">FAQ (Russian)</a>
|
||||
<h3>Man pages:</h>
|
||||
<br><A HREF="man8/3proxy.8.html">3proxy.8</A>
|
||||
<br><A HREF="man8/ftppr.8.html">ftppr.8</A>
|
||||
<br><A HREF="man8/icqpr.8.html">icqpr.8</A>
|
||||
<br><A HREF="man8/pop3p.8.html">pop3p.8</A>
|
||||
<br><A HREF="man8/proxy.8.html">proxy.8</A>
|
||||
<br><A HREF="man8/smtpp.8.html">smtpp.8</A>
|
||||
<br><A HREF="man8/socks.8.html">socks.8</A>
|
||||
<br><A HREF="man8/tcppm.8.html">tcppm.8</A>
|
||||
<br><A HREF="man8/udppm.8.html">udppm.8</A>
|
||||
<br><A HREF="man3/3proxy.cfg.3.html">3proxy.cfg.3</A>
|
||||
</body></html>
|
||||
<html><title>3proxy documentation</title><body><h2>3proxy documentation</h2>
|
||||
<a href="securityen.html">Security recommendations</a><br>
|
||||
<a href="highload.html">Optimizing 3proxy for high loads</a><br>
|
||||
<a href="howtoe.html">How To (English, very incomplete)</a><br>
|
||||
<a href="howtor.html">How To (Russian)</a><br>
|
||||
<a href="devref.html">Developer reference</a><br>
|
||||
<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/ftppr.8.html">ftppr.8</A>
|
||||
<br><A HREF="man8/pop3p.8.html">pop3p.8</A>
|
||||
<br><A HREF="man8/proxy.8.html">proxy.8</A>
|
||||
<br><A HREF="man8/smtpp.8.html">smtpp.8</A>
|
||||
<br><A HREF="man8/socks.8.html">socks.8</A>
|
||||
<br><A HREF="man8/tcppm.8.html">tcppm.8</A>
|
||||
<br><A HREF="man8/tlspr.8.html">tlspr.8</A>
|
||||
<br><A HREF="man8/udppm.8.html">udppm.8</A>
|
||||
<br><A HREF="man5/3proxy.cfg.5.html">3proxy.cfg.5</A>
|
||||
</body></html>
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,211 @@
|
||||
<!-- Creator : groff version 1.24.1 -->
|
||||
<html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1 align="center">3proxy</h1>
|
||||
|
||||
<a href="#NAME">NAME</a><br>
|
||||
<a href="#SYNOPSIS">SYNOPSIS</a><br>
|
||||
<a href="#DESCRIPTION">DESCRIPTION</a><br>
|
||||
<a href="#OPTIONS">OPTIONS</a><br>
|
||||
<a href="#SIGNALS">SIGNALS</a><br>
|
||||
<a href="#FILES">FILES</a><br>
|
||||
<a href="#BUGS">BUGS</a><br>
|
||||
<a href="#SEE ALSO">SEE ALSO</a><br>
|
||||
<a href="#AUTHORS">AUTHORS</a><br>
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
<h2>NAME
|
||||
<a name="NAME"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em"><b>3proxy</b> -
|
||||
3[APA3A] tiny proxy server, or trivial proxy server, or free
|
||||
proxy server</p>
|
||||
|
||||
<h2>SYNOPSIS
|
||||
<a name="SYNOPSIS"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em"><b>3proxy</b>
|
||||
[<i>config_file</i>] <b><br>
|
||||
3proxy</b> [<i>--install</i>] <b><br>
|
||||
3proxy</b> [<i>--remove</i>]</p>
|
||||
|
||||
<h2>DESCRIPTION
|
||||
<a name="DESCRIPTION"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em"><b>3proxy</b> is
|
||||
a universal proxy server. It can be used to provide internal
|
||||
users with fully controllable access to external resources
|
||||
or to provide external users with access to internal
|
||||
resources. 3proxy is not developed to replace
|
||||
<b>squid</b>(8), but it can extend the functionality of an
|
||||
existing caching proxy. It can be used to route requests
|
||||
between different types of clients and proxy servers. Think
|
||||
about it as application level gateway with configuration
|
||||
like hardware router has for network layer. It can establish
|
||||
multiple gateways with HTTP and HTTPS proxy with FTP over
|
||||
HTTP support, SOCKS v4, v4.5 and v5, POP3 proxy, UDP and TCP
|
||||
portmappers. Each gateway is started from the configuration
|
||||
file like an independent service <b>proxy</b>(8)
|
||||
<b>socks</b>(8) <b>pop3p</b>(8) <b>tcppm</b>(8)
|
||||
<b>udppm</b>(8) <b>ftppr</b>(8) <b>dnspr</b> but
|
||||
<b>3proxy</b> is not a kind of wrapper or superserver for
|
||||
these daemons. It just has the same code compiled in, but
|
||||
provides much more functionality. SOCKSv5 implementation
|
||||
allows you to use 3proxy with any UDP or TCP based client
|
||||
applications designed without proxy support (with
|
||||
<i>SocksCAP</i>, <i>FreeCAP</i> or another client-side
|
||||
redirector under Windows or with a socksification library
|
||||
under Unix). So you can play your favourite games, listen to
|
||||
music, exchange files and messages and even accept incoming
|
||||
connections behind a proxy server.</p>
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em"><i>dnspr</i>
|
||||
does not exist as an independent service. It’s a DNS
|
||||
caching proxy (it requires <i>nscache</i> and <i>nserver</i>
|
||||
to be set in the configuration. Only A-records are cached.
|
||||
Please note that this caching is mostly a ’hack’
|
||||
and has nothing to do with a real DNS server, but it works
|
||||
perfectly for SOHO networks.</p>
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em">3proxy supports
|
||||
access control lists (ACL) like network router. Source and
|
||||
destination networks and destination port can be specified.
|
||||
In addition, usernames and gateway action (for example GET
|
||||
or POST) can be used in ACLs. In order to filter request on
|
||||
username basis user must be authenticated somehow. There are
|
||||
few authentication types including password authentication
|
||||
and authentication by NetBIOS name for Windows clients
|
||||
(it´s very like ident authentication). Depending on
|
||||
ACL action request can be allowed, denied or redirected to
|
||||
another host or to another proxy server or even to a chain
|
||||
of proxy servers.</p>
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em">It supports
|
||||
different types of logging: to logfiles, <b>syslog</b>(3)
|
||||
(only under Unix) or to an ODBC database. Logging format is
|
||||
tunable to provide compatibility with existing log file
|
||||
parsers. It makes it possible to use 3proxy with IIS, ISA,
|
||||
Apache or Squid log parsers.</p>
|
||||
|
||||
<h2>OPTIONS
|
||||
<a name="OPTIONS"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em"><b>config_file</b></p>
|
||||
|
||||
<p style="margin-left:15%;">Name of config file. See
|
||||
<b>3proxy.cfg</b>(3) for configuration file format. Under
|
||||
Windows, if config_file is not specified, <b>3proxy</b>
|
||||
looks for a file named <i>3proxy.cfg</i> in the default
|
||||
location (in the same directory as the executable file and
|
||||
in the current directory). Under Unix, if no config file is
|
||||
specified, 3proxy reads configuration from stdin. It makes
|
||||
it possible to use the 3proxy.cfg file as an executable
|
||||
script just by setting +x mode and adding <br>
|
||||
#!/usr/local/3proxy/3proxy <br>
|
||||
as a first line in 3proxy.cfg</p>
|
||||
|
||||
<p style="margin-left:6%;"><b>--install</b></p>
|
||||
|
||||
<p style="margin-left:15%;">(Windows NT family only)
|
||||
install <b>3proxy</b> as a system service</p>
|
||||
|
||||
<p style="margin-left:6%;"><b>--remove</b></p>
|
||||
|
||||
<p style="margin-left:15%;">(Windows NT family only) remove
|
||||
<b>3proxy</b> from system services</p>
|
||||
|
||||
<h2>SIGNALS
|
||||
<a name="SIGNALS"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em">Under Unix there
|
||||
are a few signals <b>3proxy</b> catches. See <b>kill</b>(1).
|
||||
<b><br>
|
||||
SIGTERM</b></p>
|
||||
|
||||
<p style="margin-left:15%;">clean up connections and
|
||||
exit</p>
|
||||
|
||||
<p style="margin-left:6%;"><b>SIGPAUSE</b></p>
|
||||
|
||||
<p style="margin-left:15%;">stop accepting new connections,
|
||||
on second signal - start and re-read configuration</p>
|
||||
|
||||
<p style="margin-left:6%;"><b>SIGCONT</b></p>
|
||||
|
||||
<p style="margin-left:15%;">start to accept new
|
||||
connections</p>
|
||||
|
||||
<p style="margin-left:6%;"><b>SIGUSR1</b></p>
|
||||
|
||||
<p style="margin-left:15%;">reload configuration</p>
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em">Under Windows,
|
||||
if <b>3proxy</b> is installed as a service you can use
|
||||
standard service management to start, stop, pause and
|
||||
continue the 3proxy service, for example: <b><br>
|
||||
net start 3proxy <br>
|
||||
net stop 3proxy <br>
|
||||
net pause 3proxy <br>
|
||||
net continue 3proxy</b></p>
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em">Web admin
|
||||
service can also be used to reload configuration. Use wget
|
||||
to automate this task.</p>
|
||||
|
||||
<h2>FILES
|
||||
<a name="FILES"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em"><i>/usr/local/3proxy/3proxy.cfg
|
||||
(3proxy.cfg)</i></p>
|
||||
|
||||
<p style="margin-left:15%;"><b>3proxy</b> configuration
|
||||
file</p>
|
||||
|
||||
<h2>BUGS
|
||||
<a name="BUGS"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em">Report all bugs
|
||||
to <b>3proxy@3proxy.org</b></p>
|
||||
|
||||
<h2>SEE ALSO
|
||||
<a name="SEE ALSO"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em">3proxy.cfg(5),
|
||||
proxy(8), ftppr(8), socks(8), pop3p(8), tcppm(8), udppm(8),
|
||||
kill(1), syslogd(8), <br>
|
||||
https://3proxy.org/</p>
|
||||
|
||||
<h2>AUTHORS
|
||||
<a name="AUTHORS"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em">3proxy is
|
||||
designed by Vladimir Dubrovin <vlad@3proxy.org></p>
|
||||
<hr>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,167 @@
|
||||
<!-- Creator : groff version 1.24.1 -->
|
||||
<html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1 align="center">3proxy_crypt</h1>
|
||||
|
||||
<a href="#NAME">NAME</a><br>
|
||||
<a href="#SYNOPSIS">SYNOPSIS</a><br>
|
||||
<a href="#DESCRIPTION">DESCRIPTION</a><br>
|
||||
<a href="#OPTIONS">OPTIONS</a><br>
|
||||
<a href="#EXAMPLE">EXAMPLE</a><br>
|
||||
<a href="#NOTES">NOTES</a><br>
|
||||
<a href="#BUGS">BUGS</a><br>
|
||||
<a href="#SEE ALSO">SEE ALSO</a><br>
|
||||
<a href="#AUTHORS">AUTHORS</a><br>
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
<h2>NAME
|
||||
<a name="NAME"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em"><b>3proxy_crypt</b>
|
||||
- utility to generate encrypted passwords for 3proxy</p>
|
||||
|
||||
<h2>SYNOPSIS
|
||||
<a name="SYNOPSIS"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em"><b>3proxy_crypt</b>
|
||||
<i>password</i> <b><br>
|
||||
3proxy_crypt</b> <i>salt password</i></p>
|
||||
|
||||
<h2>DESCRIPTION
|
||||
<a name="DESCRIPTION"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em"><i><b>3proxy_crypt</b></i>
|
||||
is a utility to generate encrypted password hashes for use
|
||||
with 3proxy configuration. Encrypted passwords allow the
|
||||
system to avoid storing passwords in cleartext in
|
||||
configuration files.</p>
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em">When invoked
|
||||
with a single argument, it produces an NT password hash
|
||||
(MD4-based, suitable for NTLM authentication). The output is
|
||||
prefixed with <b>NT:</b>.</p>
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em">When invoked
|
||||
with two arguments (salt and password), it produces a
|
||||
BLAKE2b password hash. The salt length is limited to 64
|
||||
characters. The output is prefixed with <b>CR:</b>.</p>
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em">The resulting
|
||||
hash can be used in the 3proxy configuration file with the
|
||||
<b>users</b> directive instead of a cleartext password.</p>
|
||||
|
||||
<h2>OPTIONS
|
||||
<a name="OPTIONS"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em"><i>password</i></p>
|
||||
|
||||
<p style="margin-left:15%;">Cleartext password to
|
||||
encrypt.</p>
|
||||
|
||||
<table width="100%" border="0" rules="none" frame="void"
|
||||
cellspacing="0" cellpadding="0">
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="5%">
|
||||
|
||||
|
||||
<p><i>salt</i></p></td>
|
||||
<td width="4%"></td>
|
||||
<td width="65%">
|
||||
|
||||
|
||||
<p>Salt string for BLAKE2b hashing (max 64 characters).</p></td>
|
||||
<td width="20%">
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
<h2>EXAMPLE
|
||||
<a name="EXAMPLE"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em">Generate NT
|
||||
password hash:</p>
|
||||
|
||||
<p style="margin-left:15%;">3proxy_crypt
|
||||
MySecretPassword</p>
|
||||
|
||||
<p style="margin-left:6%;">Result:</p>
|
||||
|
||||
|
||||
<p style="margin-left:15%;">NT:3F7E6D8D96E8E7A9B0C1D2E3F4A5B6C7</p>
|
||||
|
||||
<p style="margin-left:6%;">Generate BLAKE2b password hash
|
||||
with salt:</p>
|
||||
|
||||
<p style="margin-left:15%;">3proxy_crypt MySalt
|
||||
MySecretPassword</p>
|
||||
|
||||
<p style="margin-left:6%;">Result:</p>
|
||||
|
||||
<p style="margin-left:15%;">CR:$3$MySalt$...</p>
|
||||
|
||||
<p style="margin-left:6%;">Using in 3proxy.cfg:</p>
|
||||
|
||||
<p style="margin-left:15%;">users
|
||||
user1:CR:$3$MySalt$...</p>
|
||||
|
||||
<h2>NOTES
|
||||
<a name="NOTES"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em">The NT hash uses
|
||||
the RSA MD4 Message-Digest Algorithm. The BLAKE2b hash uses
|
||||
the BLAKE2 cryptographic hash function.</p>
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em">When a password
|
||||
hash is prefixed with <b>NT:</b> or <b>CR:</b>, 3proxy uses
|
||||
the corresponding algorithm to verify passwords instead of
|
||||
comparing cleartext strings.</p>
|
||||
|
||||
<h2>BUGS
|
||||
<a name="BUGS"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em">Report all bugs
|
||||
to <b>3proxy@3proxy.org</b></p>
|
||||
|
||||
<h2>SEE ALSO
|
||||
<a name="SEE ALSO"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em">3proxy(8),
|
||||
3proxy.cfg(5), <br>
|
||||
https://3proxy.org/</p>
|
||||
|
||||
<h2>AUTHORS
|
||||
<a name="AUTHORS"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em">3proxy is
|
||||
designed by Vladimir Dubrovin <vlad@3proxy.org></p>
|
||||
<hr>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,257 @@
|
||||
<!-- Creator : groff version 1.24.1 -->
|
||||
<html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1 align="center">ftppr</h1>
|
||||
|
||||
<a href="#NAME">NAME</a><br>
|
||||
<a href="#SYNOPSIS">SYNOPSIS</a><br>
|
||||
<a href="#DESCRIPTION">DESCRIPTION</a><br>
|
||||
<a href="#OPTIONS">OPTIONS</a><br>
|
||||
<a href="#CLIENTS">CLIENTS</a><br>
|
||||
<a href="#BUGS">BUGS</a><br>
|
||||
<a href="#SEE ALSO">SEE ALSO</a><br>
|
||||
<a href="#AUTHORS">AUTHORS</a><br>
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
<h2>NAME
|
||||
<a name="NAME"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em"><b>ftppr</b> -
|
||||
FTP proxy gateway service</p>
|
||||
|
||||
<h2>SYNOPSIS
|
||||
<a name="SYNOPSIS"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em"><b>ftppr</b>
|
||||
[<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>-e</b><i>external_ip</i>]
|
||||
[<b>-h</b><i>default_ip[:port]</i>]</p>
|
||||
|
||||
<h2>DESCRIPTION
|
||||
<a name="DESCRIPTION"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em"><b>ftppr</b> is
|
||||
FTP gateway service to allow internal users to access
|
||||
external FTP servers.</p>
|
||||
|
||||
<h2>OPTIONS
|
||||
<a name="OPTIONS"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<table width="100%" border="0" rules="none" frame="void"
|
||||
cellspacing="0" cellpadding="0">
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-I</b></p></td>
|
||||
<td width="6%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em">Inetd mode. Standalone service
|
||||
only.</p> </td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-d</b></p></td>
|
||||
<td width="6%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em">Daemonize. Detach service from
|
||||
console and run in the background.</p></td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-t</b></p></td>
|
||||
<td width="6%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em">Be silenT. Do not log
|
||||
start/stop/accept error records.</p></td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-u</b></p></td>
|
||||
<td width="6%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em">Never look for username
|
||||
authentication.</p> </td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-e</b></p></td>
|
||||
<td width="6%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em">External address. IP address of
|
||||
the interface the proxy should initiate connections from. By
|
||||
default, the system will decide which address to use in
|
||||
accordance with the routing table.</p></td></tr>
|
||||
</table>
|
||||
|
||||
<p style="margin-left:6%;"><b>-ni</b><i>PATH</i></p>
|
||||
|
||||
<p style="margin-left:15%;">(Linux only) Switch to the
|
||||
network namespace identified by <i>PATH</i> before opening
|
||||
the listening socket. The current namespace is saved and
|
||||
restored immediately after binding, so outgoing connections
|
||||
run in the original namespace unless <b>-ne</b> is also
|
||||
given.</p>
|
||||
|
||||
<p style="margin-left:6%;"><b>-ne</b><i>PATH</i></p>
|
||||
|
||||
<p style="margin-left:15%;">(Linux only) Switch to the
|
||||
network namespace identified by <i>PATH</i> after the
|
||||
listening socket has been bound (and after restoring from
|
||||
<b>-ni</b> if applicable). Both options accept any namespace
|
||||
file path (e.g. <i>/var/run/netns/myns</i> or
|
||||
<i>/proc/PID/ns/net</i>) and require
|
||||
<b>CAP_SYS_ADMIN</b>.</p>
|
||||
|
||||
<table width="100%" border="0" rules="none" frame="void"
|
||||
cellspacing="0" cellpadding="0">
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p><b>-i</b></p></td>
|
||||
<td width="6%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p>Internal address. IP address the proxy accepts
|
||||
connections to. By default, connections to any interface are
|
||||
accepted. It´s usually unsafe. Unix domain sockets can
|
||||
be specified with <i>-iunix:/path/to/socket</i> syntax
|
||||
(e.g., -iunix:/var/run/ftppr.sock). On Linux, abstract
|
||||
sockets use <i>-iunix:@socketname</i> syntax.</p></td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-h</b></p></td>
|
||||
<td width="6%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em">Default destination. It’s
|
||||
used if the target address is not specified by the user.</p></td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-p</b></p></td>
|
||||
<td width="6%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em">Port. Port proxy listens for
|
||||
incoming connections. Default is 21.</p></td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-l</b></p></td>
|
||||
<td width="6%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em">Log. By default logging is to
|
||||
stdout. If <i>logfile</i> is specified logging is to file.
|
||||
Under Unix, if ´<i>@</i>´ precedes
|
||||
<i>logfile</i>, syslog is used for logging.</p></td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-S</b></p></td>
|
||||
<td width="6%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em">Increase or decrease stack size.
|
||||
You may want to try something like -S8192 if you experience
|
||||
3proxy crashes.</p></td></tr>
|
||||
</table>
|
||||
|
||||
<h2>CLIENTS
|
||||
<a name="CLIENTS"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em">You can use any
|
||||
FTP client, regardless of FTP proxy support. For a client
|
||||
with FTP proxy support, configure <i>internal_ip</i> and
|
||||
<i>port</i> in the FTP proxy parameters. For clients without
|
||||
FTP proxy support, use <i>internal_ip</i> and <i>port</i> as
|
||||
the FTP server. The address of the real FTP server must be
|
||||
configured as a part of the FTP username. The format for the
|
||||
username is <i>username</i>@<i>server</i>, where
|
||||
<i>server</i> is the address of the FTP server and
|
||||
<i>username</i> is the user´s login on this FTP
|
||||
server. The login itself may contain an ´@´
|
||||
sign. Only cleartext authentication is currently
|
||||
supported.</p>
|
||||
|
||||
<h2>BUGS
|
||||
<a name="BUGS"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em">Report all bugs
|
||||
to <b>3proxy@3proxy.org</b></p>
|
||||
|
||||
<h2>SEE ALSO
|
||||
<a name="SEE ALSO"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em">3proxy(8),
|
||||
proxy(8), pop3p(8), socks(8), tcppm(8), udppm(8),
|
||||
syslogd(8), <br>
|
||||
https://3proxy.org/</p>
|
||||
|
||||
<h2>AUTHORS
|
||||
<a name="AUTHORS"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em">3proxy is
|
||||
designed by Vladimir Dubrovin <vlad@3proxy.org></p>
|
||||
<hr>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,257 @@
|
||||
<!-- Creator : groff version 1.24.1 -->
|
||||
<html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1 align="center">pop3p</h1>
|
||||
|
||||
<a href="#NAME">NAME</a><br>
|
||||
<a href="#SYNOPSIS">SYNOPSIS</a><br>
|
||||
<a href="#DESCRIPTION">DESCRIPTION</a><br>
|
||||
<a href="#OPTIONS">OPTIONS</a><br>
|
||||
<a href="#CLIENTS">CLIENTS</a><br>
|
||||
<a href="#BUGS">BUGS</a><br>
|
||||
<a href="#SEE ALSO">SEE ALSO</a><br>
|
||||
<a href="#AUTHORS">AUTHORS</a><br>
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
<h2>NAME
|
||||
<a name="NAME"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em"><b>pop3p</b> -
|
||||
POP3 proxy gateway service</p>
|
||||
|
||||
<h2>SYNOPSIS
|
||||
<a name="SYNOPSIS"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em"><b>pop3p</b>
|
||||
[<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>-e</b><i>external_ip</i>]
|
||||
[<b>-h</b><i>default_ip[:port]</i>]</p>
|
||||
|
||||
<h2>DESCRIPTION
|
||||
<a name="DESCRIPTION"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em"><b>pop3p</b> is
|
||||
POP3 gateway service to allow internal users to access
|
||||
external POP3 servers.</p>
|
||||
|
||||
<h2>OPTIONS
|
||||
<a name="OPTIONS"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<table width="100%" border="0" rules="none" frame="void"
|
||||
cellspacing="0" cellpadding="0">
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-I</b></p></td>
|
||||
<td width="6%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em">Inetd mode. Standalone service
|
||||
only.</p> </td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-d</b></p></td>
|
||||
<td width="6%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em">Daemonize. Detach service from
|
||||
console and run in the background.</p></td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-t</b></p></td>
|
||||
<td width="6%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em">Be silenT. Do not log
|
||||
start/stop/accept error records.</p></td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-u</b></p></td>
|
||||
<td width="6%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em">Never look for username
|
||||
authentication.</p> </td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-e</b></p></td>
|
||||
<td width="6%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em">External address. IP address of
|
||||
the interface the proxy should initiate connections from. By
|
||||
default, the system will decide which address to use in
|
||||
accordance with the routing table.</p></td></tr>
|
||||
</table>
|
||||
|
||||
<p style="margin-left:6%;"><b>-ni</b><i>PATH</i></p>
|
||||
|
||||
<p style="margin-left:15%;">(Linux only) Switch to the
|
||||
network namespace identified by <i>PATH</i> before opening
|
||||
the listening socket. The current namespace is saved and
|
||||
restored immediately after binding, so outgoing connections
|
||||
run in the original namespace unless <b>-ne</b> is also
|
||||
given.</p>
|
||||
|
||||
<p style="margin-left:6%;"><b>-ne</b><i>PATH</i></p>
|
||||
|
||||
<p style="margin-left:15%;">(Linux only) Switch to the
|
||||
network namespace identified by <i>PATH</i> after the
|
||||
listening socket has been bound (and after restoring from
|
||||
<b>-ni</b> if applicable). Both options accept any namespace
|
||||
file path (e.g. <i>/var/run/netns/myns</i> or
|
||||
<i>/proc/PID/ns/net</i>) and require
|
||||
<b>CAP_SYS_ADMIN</b>.</p>
|
||||
|
||||
<table width="100%" border="0" rules="none" frame="void"
|
||||
cellspacing="0" cellpadding="0">
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p><b>-i</b></p></td>
|
||||
<td width="6%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p>Internal address. IP address the proxy accepts
|
||||
connections to. By default, connections to any interface are
|
||||
accepted. It´s usually unsafe. Unix domain sockets can
|
||||
be specified with <i>-iunix:/path/to/socket</i> syntax
|
||||
(e.g., -iunix:/var/run/pop3p.sock). On Linux, abstract
|
||||
sockets use <i>-iunix:@socketname</i> syntax.</p></td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-p</b></p></td>
|
||||
<td width="6%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em">Port. Port proxy listens for
|
||||
incoming connections. Default is 110.</p></td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-h</b></p></td>
|
||||
<td width="6%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em">Default destination. It’s
|
||||
used if the target address is not specified by the user.</p></td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-l</b></p></td>
|
||||
<td width="6%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em">Log. By default logging is to
|
||||
stdout. If <i>logfile</i> is specified logging is to file.
|
||||
Under Unix, if ´<i>@</i>´ precedes
|
||||
<i>logfile</i>, syslog is used for logging.</p></td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-S</b></p></td>
|
||||
<td width="6%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em">Increase or decrease stack size.
|
||||
You may want to try something like -S8192 if you experience
|
||||
3proxy crashes.</p></td></tr>
|
||||
</table>
|
||||
|
||||
<h2>CLIENTS
|
||||
<a name="CLIENTS"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em">You can use any
|
||||
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
|
||||
address of the real POP3 server must be configured as a part
|
||||
of the POP3 username. The format for the username is
|
||||
<i>username</i>@<i>server</i>, where <i>server</i> is the
|
||||
address of the POP3 server and <i>username</i> is the
|
||||
user´s login on this POP3 server. The login itself may
|
||||
contain an ´@´ sign. Only cleartext
|
||||
authentication is supported, because challenge-response
|
||||
authentication (APOP, CRAM-MD5, etc.) requires a challenge
|
||||
from the server before we know which server to connect
|
||||
to.</p>
|
||||
|
||||
<h2>BUGS
|
||||
<a name="BUGS"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em">Report all bugs
|
||||
to <b>3proxy@3proxy.org</b></p>
|
||||
|
||||
<h2>SEE ALSO
|
||||
<a name="SEE ALSO"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em">3proxy(8),
|
||||
ftppr(8), proxy(8), socks(8), tcppm(8), udppm(8),
|
||||
syslogd(8), <br>
|
||||
https://3proxy.org/</p>
|
||||
|
||||
<h2>AUTHORS
|
||||
<a name="AUTHORS"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em">3proxy is
|
||||
designed by Vladimir Dubrovin <vlad@3proxy.org></p>
|
||||
<hr>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,262 @@
|
||||
<!-- Creator : groff version 1.24.1 -->
|
||||
<html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1 align="center">proxy</h1>
|
||||
|
||||
<a href="#NAME">NAME</a><br>
|
||||
<a href="#SYNOPSIS">SYNOPSIS</a><br>
|
||||
<a href="#DESCRIPTION">DESCRIPTION</a><br>
|
||||
<a href="#OPTIONS">OPTIONS</a><br>
|
||||
<a href="#CLIENTS">CLIENTS</a><br>
|
||||
<a href="#BUGS">BUGS</a><br>
|
||||
<a href="#SEE ALSO">SEE ALSO</a><br>
|
||||
<a href="#AUTHORS">AUTHORS</a><br>
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
<h2>NAME
|
||||
<a name="NAME"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em"><b>proxy</b> -
|
||||
HTTP proxy gateway service</p>
|
||||
|
||||
<h2>SYNOPSIS
|
||||
<a name="SYNOPSIS"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em"><b>proxy</b>
|
||||
[<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>-e</b><i>external_ip</i>]</p>
|
||||
|
||||
<h2>DESCRIPTION
|
||||
<a name="DESCRIPTION"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em"><b>proxy</b> is
|
||||
HTTP gateway service with HTTPS and FTP over HTTPS
|
||||
support.</p>
|
||||
|
||||
<h2>OPTIONS
|
||||
<a name="OPTIONS"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<table width="100%" border="0" rules="none" frame="void"
|
||||
cellspacing="0" cellpadding="0">
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-I</b></p></td>
|
||||
<td width="6%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em">Inetd mode. Standalone service
|
||||
only.</p> </td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-d</b></p></td>
|
||||
<td width="6%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em">Daemonize. Detach service from
|
||||
console and run in the background.</p></td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-t</b></p></td>
|
||||
<td width="6%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em">Be silenT. Do not log
|
||||
start/stop/accept error records.</p></td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-u</b></p></td>
|
||||
<td width="6%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em">Never ask for username
|
||||
authentication</p> </td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-e</b></p></td>
|
||||
<td width="6%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em">External address. IP address of
|
||||
the interface the proxy should initiate connections from. By
|
||||
default, the system will decide which address to use in
|
||||
accordance with the routing table.</p></td></tr>
|
||||
</table>
|
||||
|
||||
<p style="margin-left:6%;"><b>-ni</b><i>PATH</i></p>
|
||||
|
||||
<p style="margin-left:15%;">(Linux only) Switch to the
|
||||
network namespace identified by <i>PATH</i> before opening
|
||||
the listening socket. The current namespace is saved and
|
||||
restored immediately after binding, so outgoing connections
|
||||
run in the original namespace unless <b>-ne</b> is also
|
||||
given.</p>
|
||||
|
||||
<p style="margin-left:6%;"><b>-ne</b><i>PATH</i></p>
|
||||
|
||||
<p style="margin-left:15%;">(Linux only) Switch to the
|
||||
network namespace identified by <i>PATH</i> after the
|
||||
listening socket has been bound (and after restoring from
|
||||
<b>-ni</b> if applicable). Both options accept any namespace
|
||||
file path (e.g. <i>/var/run/netns/myns</i> or
|
||||
<i>/proc/PID/ns/net</i>) and require
|
||||
<b>CAP_SYS_ADMIN</b>.</p>
|
||||
|
||||
<table width="100%" border="0" rules="none" frame="void"
|
||||
cellspacing="0" cellpadding="0">
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="4%">
|
||||
|
||||
|
||||
<p><b>-i</b></p></td>
|
||||
<td width="5%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p>Internal address. IP address the proxy accepts
|
||||
connections to. By default, connections to any interface are
|
||||
accepted. It´s usually unsafe. Unix domain sockets can
|
||||
be specified with <i>-iunix:/path/to/socket</i> syntax
|
||||
(e.g., -iunix:/var/run/proxy.sock). On Linux, abstract
|
||||
sockets use <i>-iunix:@socketname</i> syntax.</p></td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="4%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-a</b></p></td>
|
||||
<td width="5%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em">Anonymous. Hide information
|
||||
about client.</p></td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="4%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-a1</b></p></td>
|
||||
<td width="5%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em">Anonymous. Show fake information
|
||||
about client.</p></td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="4%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-p</b></p></td>
|
||||
<td width="5%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em">Port. Port proxy listens for
|
||||
incoming connections. Default is 3128.</p></td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="4%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-l</b></p></td>
|
||||
<td width="5%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em">Log. By default logging is to
|
||||
stdout. If <i>logfile</i> is specified logging is to file.
|
||||
Under Unix, if ´<i>@</i>´ preceeds
|
||||
<i>logfile</i>, syslog is used for logging.</p></td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="4%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-S</b></p></td>
|
||||
<td width="5%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em">Increase or decrease stack size.
|
||||
You may want to try something like -S8192 if you experience
|
||||
3proxy crashes.</p></td></tr>
|
||||
</table>
|
||||
|
||||
<h2>CLIENTS
|
||||
<a name="CLIENTS"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em">You should use a
|
||||
client with HTTP proxy support or configure a router to
|
||||
redirect HTTP traffic to the proxy (transparent proxy).
|
||||
Configure the client to connect to <i>internal_ip</i> and
|
||||
<i>port</i>. HTTPS support allows you to use almost any
|
||||
TCP-based protocol. If you need to limit clients, use
|
||||
<b>3proxy</b>(8) instead.</p>
|
||||
|
||||
<h2>BUGS
|
||||
<a name="BUGS"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em">Report all bugs
|
||||
to <b>3proxy@3proxy.org</b></p>
|
||||
|
||||
<h2>SEE ALSO
|
||||
<a name="SEE ALSO"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em">3proxy(8),
|
||||
ftppr(8), socks(8), pop3p(8), tcppm(8), udppm(8),
|
||||
syslogd(8), <br>
|
||||
https://3proxy.org/</p>
|
||||
|
||||
<h2>AUTHORS
|
||||
<a name="AUTHORS"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em">3proxy is
|
||||
designed by Vladimir Dubrovin <vlad@3proxy.org></p>
|
||||
<hr>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,257 @@
|
||||
<!-- Creator : groff version 1.24.1 -->
|
||||
<html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1 align="center">smtpp</h1>
|
||||
|
||||
<a href="#NAME">NAME</a><br>
|
||||
<a href="#SYNOPSIS">SYNOPSIS</a><br>
|
||||
<a href="#DESCRIPTION">DESCRIPTION</a><br>
|
||||
<a href="#OPTIONS">OPTIONS</a><br>
|
||||
<a href="#CLIENTS">CLIENTS</a><br>
|
||||
<a href="#BUGS">BUGS</a><br>
|
||||
<a href="#SEE ALSO">SEE ALSO</a><br>
|
||||
<a href="#AUTHORS">AUTHORS</a><br>
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
<h2>NAME
|
||||
<a name="NAME"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em"><b>smtpp</b> -
|
||||
SMTP proxy gateway service</p>
|
||||
|
||||
<h2>SYNOPSIS
|
||||
<a name="SYNOPSIS"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em"><b>smtpp</b>
|
||||
[<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>-e</b><i>external_ip</i>]
|
||||
[<b>-h</b><i>default_ip[:port]</i>]</p>
|
||||
|
||||
<h2>DESCRIPTION
|
||||
<a name="DESCRIPTION"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em"><b>smtpp</b> is
|
||||
SMTP gateway service to allow internal users to access
|
||||
external SMTP servers.</p>
|
||||
|
||||
<h2>OPTIONS
|
||||
<a name="OPTIONS"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<table width="100%" border="0" rules="none" frame="void"
|
||||
cellspacing="0" cellpadding="0">
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-I</b></p></td>
|
||||
<td width="6%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em">Inetd mode. Standalone service
|
||||
only.</p> </td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-d</b></p></td>
|
||||
<td width="6%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em">Daemonize. Detach service from
|
||||
console and run in the background.</p></td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-t</b></p></td>
|
||||
<td width="6%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em">Be silenT. Do not log
|
||||
start/stop/accept error records.</p></td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-u</b></p></td>
|
||||
<td width="6%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em">Never look for username
|
||||
authentication.</p> </td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-e</b></p></td>
|
||||
<td width="6%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em">External address. IP address of
|
||||
the interface the proxy should initiate connections from. By
|
||||
default, the system will decide which address to use in
|
||||
accordance with the routing table.</p></td></tr>
|
||||
</table>
|
||||
|
||||
<p style="margin-left:6%;"><b>-ni</b><i>PATH</i></p>
|
||||
|
||||
<p style="margin-left:15%;">(Linux only) Switch to the
|
||||
network namespace identified by <i>PATH</i> before opening
|
||||
the listening socket. The current namespace is saved and
|
||||
restored immediately after binding, so outgoing connections
|
||||
run in the original namespace unless <b>-ne</b> is also
|
||||
given.</p>
|
||||
|
||||
<p style="margin-left:6%;"><b>-ne</b><i>PATH</i></p>
|
||||
|
||||
<p style="margin-left:15%;">(Linux only) Switch to the
|
||||
network namespace identified by <i>PATH</i> after the
|
||||
listening socket has been bound (and after restoring from
|
||||
<b>-ni</b> if applicable). Both options accept any namespace
|
||||
file path (e.g. <i>/var/run/netns/myns</i> or
|
||||
<i>/proc/PID/ns/net</i>) and require
|
||||
<b>CAP_SYS_ADMIN</b>.</p>
|
||||
|
||||
<table width="100%" border="0" rules="none" frame="void"
|
||||
cellspacing="0" cellpadding="0">
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p><b>-i</b></p></td>
|
||||
<td width="6%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p>Internal address. IP address the proxy accepts
|
||||
connections to. By default, connections to any interface are
|
||||
accepted. It´s usually unsafe. Unix domain sockets can
|
||||
be specified with <i>-iunix:/path/to/socket</i> syntax
|
||||
(e.g., -iunix:/var/run/smtpp.sock). On Linux, abstract
|
||||
sockets use <i>-iunix:@socketname</i> syntax.</p></td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-p</b></p></td>
|
||||
<td width="6%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em">Port. Port proxy listens for
|
||||
incoming connections. Default is 25.</p></td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-h</b></p></td>
|
||||
<td width="6%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em">Default destination. It’s
|
||||
used if the target address is not specified by the user.</p></td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-l</b></p></td>
|
||||
<td width="6%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em">Log. By default logging is to
|
||||
stdout. If <i>logfile</i> is specified logging is to file.
|
||||
Under Unix, if ´<i>@</i>´ precedes
|
||||
<i>logfile</i>, syslog is used for logging.</p></td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-S</b></p></td>
|
||||
<td width="6%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em">Increase or decrease stack size.
|
||||
You may want to try something like -S8192 if you experience
|
||||
3proxy crashes.</p></td></tr>
|
||||
</table>
|
||||
|
||||
<h2>CLIENTS
|
||||
<a name="CLIENTS"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em">You can use any
|
||||
MUA (Mail User Agent) with SMTP authentication support. Set
|
||||
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
|
||||
configured as a part of the SMTP username. The format for
|
||||
the username is <i>username</i>@<i>server</i>, where
|
||||
<i>server</i> is the address of the SMTP server and
|
||||
<i>username</i> is the user´s login on this SMTP
|
||||
server. The login itself may contain an ´@´
|
||||
sign. Only cleartext authentication is supported, because
|
||||
challenge-response authentication (CRAM-MD5, SPA, etc.)
|
||||
requires a challenge from the server before we know which
|
||||
server to connect to.</p>
|
||||
|
||||
<h2>BUGS
|
||||
<a name="BUGS"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em">Report all bugs
|
||||
to <b>3proxy@3proxy.org</b></p>
|
||||
|
||||
<h2>SEE ALSO
|
||||
<a name="SEE ALSO"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em">3proxy(8),
|
||||
ftppr(8), proxy(8), socks(8), tcppm(8), udppm(8),
|
||||
syslogd(8), <br>
|
||||
https://3proxy.org/</p>
|
||||
|
||||
<h2>AUTHORS
|
||||
<a name="AUTHORS"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em">3proxy is
|
||||
designed by Vladimir Dubrovin <vlad@3proxy.org></p>
|
||||
<hr>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,275 @@
|
||||
<!-- Creator : groff version 1.24.1 -->
|
||||
<html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1 align="center">socks</h1>
|
||||
|
||||
<a href="#NAME">NAME</a><br>
|
||||
<a href="#SYNOPSIS">SYNOPSIS</a><br>
|
||||
<a href="#DESCRIPTION">DESCRIPTION</a><br>
|
||||
<a href="#OPTIONS">OPTIONS</a><br>
|
||||
<a href="#CLIENTS">CLIENTS</a><br>
|
||||
<a href="#BUGS">BUGS</a><br>
|
||||
<a href="#SEE ALSO">SEE ALSO</a><br>
|
||||
<a href="#AUTHORS">AUTHORS</a><br>
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
<h2>NAME
|
||||
<a name="NAME"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em"><b>socks</b> -
|
||||
SOCKS 4/4.5/5 gateway service</p>
|
||||
|
||||
<h2>SYNOPSIS
|
||||
<a name="SYNOPSIS"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em"><b>socks</b>
|
||||
[<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>-e</b><i>external_ip</i>]</p>
|
||||
|
||||
<h2>DESCRIPTION
|
||||
<a name="DESCRIPTION"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em"><b>socks</b> is
|
||||
SOCKS server. It supports SOCKSv4, SOCKSv4.5 (extension to
|
||||
v4 for server side name resolution) and SOCKSv5. SOCKSv5
|
||||
specification allows both outgoing and reverse TCP
|
||||
connections and UDP portmapping.</p>
|
||||
|
||||
<h2>OPTIONS
|
||||
<a name="OPTIONS"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<table width="100%" border="0" rules="none" frame="void"
|
||||
cellspacing="0" cellpadding="0">
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-I</b></p></td>
|
||||
<td width="6%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em">Inetd mode. Standalone service
|
||||
only.</p> </td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-d</b></p></td>
|
||||
<td width="6%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em">Daemonize. Detach service from
|
||||
console and run in the background.</p></td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-t</b></p></td>
|
||||
<td width="6%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em">Be silenT. Do not log
|
||||
start/stop/accept error records.</p></td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-u</b></p></td>
|
||||
<td width="6%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em">Never ask for username
|
||||
authentication</p> </td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-e</b></p></td>
|
||||
<td width="6%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em">External address. IP address of
|
||||
the interface the proxy should initiate connections from.
|
||||
External IP must be specified if you need incoming
|
||||
connections. By default, the system will decide which
|
||||
address to use in accordance with the routing table.</p></td></tr>
|
||||
</table>
|
||||
|
||||
<p style="margin-left:6%;"><b>-ni</b><i>PATH</i></p>
|
||||
|
||||
<p style="margin-left:15%;">(Linux only) Switch to the
|
||||
network namespace identified by <i>PATH</i> before opening
|
||||
the listening socket. The current namespace is saved and
|
||||
restored immediately after binding, so outgoing connections
|
||||
run in the original namespace unless <b>-ne</b> is also
|
||||
given.</p>
|
||||
|
||||
<p style="margin-left:6%;"><b>-ne</b><i>PATH</i></p>
|
||||
|
||||
<p style="margin-left:15%;">(Linux only) Switch to the
|
||||
network namespace identified by <i>PATH</i> after the
|
||||
listening socket has been bound (and after restoring from
|
||||
<b>-ni</b> if applicable). Both options accept any namespace
|
||||
file path (e.g. <i>/var/run/netns/myns</i> or
|
||||
<i>/proc/PID/ns/net</i>) and require
|
||||
<b>CAP_SYS_ADMIN</b>.</p>
|
||||
|
||||
<table width="100%" border="0" rules="none" frame="void"
|
||||
cellspacing="0" cellpadding="0">
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="4%">
|
||||
|
||||
|
||||
<p><b>-Ne</b></p></td>
|
||||
<td width="5%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p>External NAT address 3proxy reports to client for
|
||||
CONNECT/BIND. This is external address of NAT between 3proxy
|
||||
and destination server. By default, the external address is
|
||||
reported. It’s only useful in the case of IP-IP NAT
|
||||
and does not work with port translation.</p></td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="4%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-Ni</b></p></td>
|
||||
<td width="5%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em">Internal NAT address 3proxy
|
||||
reports to client for UDPASSOC. This is external address of
|
||||
the NAT between 3proxy and the client, client uses to
|
||||
connect to 3proxy. By default, the internal address is
|
||||
reported. It’s only useful in the case of IP-IP NAT
|
||||
and does not work with port translation.</p></td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="4%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-i</b></p></td>
|
||||
<td width="5%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em">Internal address. IP address the
|
||||
proxy accepts connections to. By default, connections to any
|
||||
interface are accepted. It´s usually unsafe. Unix
|
||||
domain sockets can be specified with
|
||||
<i>-iunix:/path/to/socket</i> syntax (e.g.,
|
||||
-iunix:/var/run/socks.sock). On Linux, abstract sockets use
|
||||
<i>-iunix:@socketname</i> syntax.</p></td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="4%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-p</b></p></td>
|
||||
<td width="5%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em">Port. Port proxy listens for
|
||||
incoming connections. Default is 1080.</p></td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="4%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-l</b></p></td>
|
||||
<td width="5%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em">Log. By default logging is to
|
||||
stdout. If <i>logfile</i> is specified logging is to file.
|
||||
Under Unix, if ´<i>@</i>´ preceeds
|
||||
<i>logfile</i>, syslog is used for logging.</p></td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="6%"></td>
|
||||
<td width="4%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>-S</b></p></td>
|
||||
<td width="5%"></td>
|
||||
<td width="85%">
|
||||
|
||||
|
||||
<p style="margin-top: 1em">Increase or decrease stack size.
|
||||
You may want to try something like -S8192 if you experience
|
||||
3proxy crashes.</p></td></tr>
|
||||
</table>
|
||||
|
||||
<h2>CLIENTS
|
||||
<a name="CLIENTS"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em">You should use a
|
||||
client with SOCKS support or use some socksification support
|
||||
(for example <i>SocksCAP</i> or <i>FreeCAP</i>). Configure
|
||||
client to use <i>internal_ip</i> and <i>port</i>. SOCKS
|
||||
allows you to use almost any application protocol without
|
||||
limitation. This implementation also allows you to open
|
||||
privileged ports on the server (if socks has sufficient
|
||||
privileges). If you need to control access, use
|
||||
<b>3proxy</b>(8) instead.</p>
|
||||
|
||||
<h2>BUGS
|
||||
<a name="BUGS"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em">Report all bugs
|
||||
to <b>3proxy@3proxy.org</b></p>
|
||||
|
||||
<h2>SEE ALSO
|
||||
<a name="SEE ALSO"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em">3proxy(8),
|
||||
proxy(8), ftppr(8), pop3p(8), tcppm(8), udppm(8),
|
||||
syslogd(8), <br>
|
||||
https://3proxy.org/</p>
|
||||
|
||||
<h2>AUTHORS
|
||||
<a name="AUTHORS"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em">3proxy is
|
||||
designed by Vladimir Dubrovin <vlad@3proxy.org></p>
|
||||
<hr>
|
||||
</body>
|
||||
</html>
|
||||
Loaded 100 of 259 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user