Compare commits

..
960 Commits
Author SHA1 Message Date
github-actions[bot] f6963ea302 Update version files for 1.0.0
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
Update wiki / wiki (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ubuntu-latest (wolfSSL) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
Update version files / version (push) Has been cancelled
2026-08-22 12:13:00 +00:00
Vladimir Dubrovin cf7749b320 Releasing as 1.0.0.0 2026-08-22 15:12:44 +03:00
Vladimir Dubrovin f599c3239c Publish documentation to the wiki when the HTML changes
The wiki pages were copies of doc/html made by a script run by hand outside
this repository, so the wiki drifted from master whenever that step was
skipped.

Copy them from a workflow instead, taking master as the source and committing
only when a page actually changed.

GitHub wikis cannot run Actions, so the workflow lives here and pushes to the
wiki repository rather than the other way round.

It runs on a push touching doc/html, and also after the documentation workflow
finishes: that workflow commits with GITHUB_TOKEN, and GitHub does not raise
push events for those commits, so a push trigger alone would never see
regenerated HTML.
2026-08-22 14:42:59 +03:00
github-actions[bot] 984366ce3e Update HTML documentation from man pages 2026-08-22 11:28:42 +00:00
Vladimir Dubrovin 22c7dfe0e1 Generate HTML documentation from man pages in a workflow
The HTML under doc/html was produced by a script kept outside this repository,
so editing a man page and refreshing its HTML were separate manual steps and
the two could drift apart.

Run the same groff conversion in a workflow triggered by a change under man/.
It rebuilds doc/html/index.html and the man5 and man8 pages, and commits only
when something actually changed.

Output was verified byte for byte against the committed tree: all twelve man
pages and index.html are reproduced exactly.
2026-08-22 14:23:13 +03:00
Vladimir Dubrovin 4b48311d82 Derive all build timestamps from BUILDDATE
The build date stored in version.h is now the single time source for a
release. Each package workflow converts it to SOURCE_DATE_EPOCH and passes
that into the build containers, the debian changelog entry is stamped from it
rather than from the build clock, and rpmbuild is told to use it as the build
time and to clamp file mtimes to it.

rpm also records the build host, which is a container id and therefore differs
on every run, so pin it as well - otherwise the timestamps alone do not make
the package reproducible.

Rebuilding the same commit now produces byte identical packages, verified for
both formats by building twice and comparing checksums.

In the version workflow the clock is read exactly once, when a new build date
is minted. YEAR3PROXY is derived from the build date instead of being read
separately, so the two cannot straddle a year boundary and a re-run in a later
year no longer rewrites version.h.
2026-08-22 13:53:30 +03:00
Vladimir Dubrovin 3dcd83e6d6 Regenerate version files from RELEASE in a workflow
The version files were derived from RELEASE by a script kept outside this
repository, so bumping RELEASE and updating src/version.h, the spec version
and debian/changelog were separate manual steps.

Do it in a workflow triggered by a change to RELEASE. It writes the same
content the external script produced, verified byte for byte against the
current tree.

The build date is now minted once, when RELEASE changes, and stored in
version.h rather than taken from the clock of whichever build is running. The
package workflows read it from there, so rebuilding a commit produces the same
version string and the same package file names. Re-running the workflow
without a RELEASE change keeps the existing build date and makes no commit.
2026-08-22 13:34:35 +03:00
Vladimir Dubrovin 7a80a6ceb8 Fix rpm signing: hand the built packages back to the runner user
The rpm build runs in a container as root, so the packages arrived in the
workspace owned by root. Renaming them still worked, since that only needs
write permission on the directory, but rpm --addsign rewrites the file in
place and failed:

    error: 3proxy-0.9.9.0.el9.x86_64.rpm: open failed: Permission denied

Restore the invoking user's ownership before leaving the container, falling
back to a mode change where the container cannot chown, as under a rootless
container runtime.
2026-08-22 12:09:25 +03:00
Vladimir Dubrovin 33b2a31180 README: widen the documented deb coverage to Debian 12 and Ubuntu 22.04 2026-08-22 11:30:55 +03:00
Vladimir Dubrovin fb2d1c0442 Build deb packages in an Ubuntu 22.04 container
dpkg-buildpackage ran on the runner itself, so the packages inherited its ABI.
On ubuntu-latest that means glibc 2.38 and libssl3t64, which restricts the
packages to Ubuntu 24.04 and newer - Debian 12, Debian 13 and Ubuntu 22.04
cannot install them.

Nothing in the source needs glibc 2.38. The floor comes from the build host:
gcc 13 with glibc 2.38 redirects sscanf and strtol to __isoc23_ variants, and
arc4random arrived in glibc 2.36.

Build in an Ubuntu 22.04 container instead. That lowers the dependencies to
libc6 (>= 2.34) and libssl3, and libssl3t64 declares Provides: libssl3, so one
package covers Ubuntu 22.04 and later as well as Debian 12 and later. Verified
by installing on all four.

The armhf cross build moves into the same container, keeping the cross
toolchain on PATH so that install -s uses the ARM strip rather than the host
one.
2026-08-22 11:30:38 +03:00
Vladimir Dubrovin 7e1ddf2e84 Document the package repository in README 2026-08-22 11:13:20 +03:00
Vladimir Dubrovin 5908695b0f Drop the Ed25519 release key
No published release was ever signed with it - signing was introduced after
0.9.9 - so it verifies nothing and only adds a second key for users to reason
about.
2026-08-22 10:43:32 +03:00
Vladimir Dubrovin 7807faa71b Build rpm packages against Enterprise Linux, not Ubuntu
rpmbuild ran directly on the Ubuntu runner, so the packages carried Ubuntu's
ABI: glibc 2.38, libssl.so.3 and libpcre2-8. No RPM distribution can satisfy
that - RHEL 9 has glibc 2.34, RHEL 8 has 2.28 and OpenSSL 1.1 - so the rpms
were installable nowhere.

Build them in AlmaLinux 8, 9 and 10 containers instead, covering supported
AlmaLinux and CentOS Stream releases. Release: 1%{?dist} already in the spec
now expands, so the packages are named el8, el9 and el10 and can coexist.

Two spec changes are needed for a build outside Ubuntu:

debug_package is disabled. Enterprise Linux enables debuginfo extraction by
default while Ubuntu's rpm does not; the build produces no debug sources, so
rpmbuild aborted on an empty debugsourcefiles.list.

/bin/3proxy is excluded from automatic requires. The installed configuration
file is executable and begins with #!/bin/3proxy, so rpm generates a
dependency on it. rpm 4.16 and later canonicalise that to /usr/bin/3proxy
while %files declares /bin/3proxy, leaving a dependency that can never be
satisfied and making the package uninstallable on el9 and el10.

Enterprise Linux has no 32-bit ARM, so the armhf workflow now builds only the
deb package.
2026-08-22 10:43:32 +03:00
Vladimir Dubrovin d2fa99fbd4 Fix library detection under shells whose echo does not expand escapes
The OpenSSL, wolfSSL, PCRE2 and PAM probes built their test program with
echo "...\n...". make runs recipes through /bin/sh, which is dash on Debian
and Ubuntu, where the builtin echo expands \n. On distributions where /bin/sh
is bash - every RPM based distribution, and macOS - it does not, so the probe
compiled

    #include <openssl/ssl.h>n int main(){return 0;}

which is not valid C. Every probe therefore failed and the build silently
dropped TLS, PCRE2 and PAM support with no diagnostic.

Use printf, which expands escapes the same way everywhere.
2026-08-22 10:43:32 +03:00
Vladimir Dubrovin 1e019bad0e Switch release signing to an RSA-4096 key
rpm 4.14 (RHEL/CentOS/Rocky 8) cannot import an Ed25519 public key at all:
the import fails and package verification reports SIGNATURES NOT OK. RHEL 8
is supported until 2029 and is a realistic target for a signed package repo,
so the Ed25519 key excludes a large part of the rpm audience.

Publish an RSA-4096 signing key as 3proxy-release-key.asc and keep the old
Ed25519 key as 3proxy-release-key-ed25519.asc so artifacts up to 0.9.9 stay
verifiable. Workflows derive the key id from the imported secret key, so no
workflow change is needed.
2026-08-21 17:45:20 +03:00
Vladimir Dubrovin 86ad7263a6 rpm signing: accept non-RSA signature headers
The release key is ed25519, so rpm stores the header signature in
DSAHEADER (EdDSA/SHA256) and RSAHEADER is empty. The verification only
looked at RSAHEADER and failed correctly signed packages.
2026-08-21 15:34:30 +03:00
Vladimir Dubrovin 55761128b3 rpm signing: pass the passphrase explicitly, add diagnostics on failure
Do not rely on the gpg-agent passphrase cache surviving between steps:
the signing command gets the passphrase from a file. A test signature is
made first, so a wrong passphrase or a key which can not sign fails with
a clear gpg error instead of an rpm which is silently left unsigned.
On failure the rpm version, the sign command and the key capabilities are
printed.
2026-08-21 13:13:03 +03:00
Vladimir Dubrovin b68887b6f9 Fix rpm signing: point %__gpg at the real gpg binary
rpm on Debian/Ubuntu defaults %__gpg to /usr/bin/gpg2, which does not exist,
so rpm --addsign failed with 'Could not exec gpg' and packages were left
unsigned.
2026-08-21 13:01:57 +03:00
Vladimir Dubrovin e9b8f37053 publish PGP key 2026-08-21 11:23:51 +03:00
Vladimir Dubrovin 21346cb2ce Use latest tag in verification example on master 2026-08-21 11:08:11 +03:00
Vladimir Dubrovin fa43cafd58 Sign packages, publish checksums, attest before upload, narrow permissions
GPG signing of rpm packages and detached signatures for deb packages and
for the SHA256SUMS files, using GPG_PRIVATE_KEY / GPG_PASSPHRASE secrets.
Checksums are published as release assets.

Build provenance is attested before the assets are uploaded, so a failed
attestation does not leave unattested files published.

Workflow permissions are read-only, write permissions are requested per
job only where they are used.
2026-08-21 11:07:54 +03:00
Vladimir Dubrovin 8f62e42e7d Update README.md 2026-08-20 20:13:41 +03:00
Vladimir Dubrovin f4ad34c35a Rework docker workflow, add build provenance attestations
Docker: single workflow, one job per image per platform instead of one
workflow per registry. Platforms are built in parallel and pushed by
digest, then combined into a manifest list pushed to Docker Hub and GHCR
at once, so both registries get identical digests. arm64 and arm/v7 build
on native arm runners, ppc64le is dropped.

Registry provenance/sbom attestations are disabled (they were shown as
unknown/unknown entries in the registries), build provenance is attested
with actions/attest-build-provenance instead and is verifiable with
'gh attestation verify oci://...'. Release binaries (rpm, deb, zip) are
attested the same way. cosign version is pinned and images are signed by
digest.
2026-08-20 20:04:30 +03:00
Vladimir Dubrovin ff3398c6a9 Commit as 0.9.9
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ubuntu-latest (wolfSSL) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
2026-08-20 18:32:25 +03:00
Vladimir Dubrovin 4fb5c95704 Print error on non-zero local redirection in conf
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI cmake / ubuntu-latest (wolfSSL) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
2026-08-12 17:08:09 +03:00
Vladimir Dubrovin 13a57812e5 Fix: -Ne/-Ni, -4 / -6 handling for udp mapping in socks, mixed family support in udp 2026-08-12 16:25:12 +03:00
Vladimir Dubrovin a43c95023d Check DNS reply source in udpresolve 2026-08-12 15:32:30 +03:00
Vladimir Dubrovin 75021a2003 Update highload.html 2026-08-12 14:49:44 +03:00
Vladimir Dubrovin bebc3894e2 Support acls for UDP ASSOC, fix udppm via SOCKSv5
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ubuntu-latest (wolfSSL) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
2026-08-11 19:02:54 +03:00
Vladimir Dubrovin ddb74a111c remove dead code
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ubuntu-latest (wolfSSL) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
2026-08-10 19:14:33 +03:00
Vladimir Dubrovin 1e47e74c49 FIx: support extip / ha for SOCKSv5 udp associate 2026-08-10 17:18:57 +03:00
Vladimir Dubrovin eca362af81 FIx: UDPASSOC via parent broken after previous commits
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ubuntu-latest (wolfSSL) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
2026-08-10 11:18:56 +03:00
Vladimir Dubrovin c31fe8367f Minor FilePlugin cleanup
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ubuntu-latest (wolfSSL) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
2026-08-08 23:06:36 +03:00
Vladimir Dubrovin f480c9dfe8 Do not try non-SOCKSv5 proxies for UDPASSOC 2026-08-08 22:58:41 +03:00
Vladimir Dubrovin 8de2be3b3b fix socket leak on failed UDPASSOC parent 2026-08-08 22:11:25 +03:00
Vladimir Dubrovin aea9ff8c94 Fix warnings 2026-08-08 21:58:53 +03:00
Vladimir Dubrovin e7bc76da73 Restore half-close support by default (accidentally switched off in previous fixes) 2026-08-08 21:34:15 +03:00
Vladimir Dubrovin 207ddb7f02 Fix: descriptors leak in proxy.c 2026-08-08 21:31:54 +03:00
Vladimir Dubrovin f5ff81d0bc remove dead code
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ubuntu-latest (wolfSSL) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
2026-08-08 21:10:57 +03:00
Vladimir Dubrovin 8c2ad56665 Use memmove for overlapping region 2026-08-08 20:46:52 +03:00
Vladimir Dubrovin a986ed7a07 Add linger timeout 2026-08-08 19:13:02 +03:00
Vladimir Dubrovin eceb5a22df Add outsize parameter to en64 2026-08-08 17:58:49 +03:00
Vladimir Dubrovin 7eba73fc8f Create SECURITY.md 2026-08-08 17:29:57 +03:00
Vladimir Dubrovin 122ca26249 Fix windows build, re-submit as 0.9.8
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI cmake / ubuntu-latest (wolfSSL) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
2026-08-07 19:16:00 +03:00
Vladimir Dubrovin 6369fe966e fix rh spec file for imapp 2026-08-07 18:00:43 +03:00
Vladimir Dubrovin cb27ca5223 Commit as 0.9.8 2026-08-07 17:45:37 +03:00
Vladimir Dubrovin 932c4e3fd9 Fix use-after-free on ftp:// request path in proxychild()
ss pointed into the buf request buffer and was never updated when buf
was realloc()ed while reading request headers (both in the header loop
and in handlehdrfilterscli()). The ftp:// branch then dereferenced the
stale pointer.

Store ss as an offset into buf and recompute it before use.

Requires authenticated access to proxy or configuration with
authentication disabled.

Reported by Calif.io in collaboration with Anthropic
(ref ANT-2026-FHVKZ7VQ).
2026-08-07 16:36:51 +03:00
dependabot[bot] 6818872f63 Bump docker/build-push-action from 6 to 7 (#1261)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6 to 7.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v6...v7)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-04 11:29:45 +03:00
dependabot[bot] 81a4e5bae3 Bump actions/checkout from 4 to 7 (#1260)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 7.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v7)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-04 11:29:06 +03:00
Vladimir Dubrovin 0ae2754c1e make html formatting compatible with .md
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI cmake / ubuntu-latest (wolfSSL) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
2026-08-01 11:47:50 +03:00
Vladimir Dubrovin 05f83896bf Update 3proxy.cfg.5.html 2026-08-01 11:15:53 +03:00
Vladimir Dubrovin f668a34910 Correct example in howto 2026-08-01 11:11:26 +03:00
Vladimir Dubrovin 763e21e053 Fixed: maxchild dropped to 100 on config reload if not explicitly set, system-specific tuning hints added to doc 2026-08-01 10:22:03 +03:00
Vladimir Dubrovin 7b85f6a684 Disable splice support
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ubuntu-latest (wolfSSL) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
2026-08-01 09:38:49 +03:00
Vladimir Dubrovin 92d3b08dd2 fix arm64 docker build
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ubuntu-latest (wolfSSL) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
2026-07-31 19:44:04 +03:00
Vladimir Dubrovin 4877b39f2c Fix deadcode / warnings / minor bugs 2026-07-31 18:55:59 +03:00
Vladimir Dubrovin 44c47ee7d9 replace recursion with loop for local redirects, fix wolfSSL build
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI cmake / ubuntu-latest (wolfSSL) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
2026-07-31 15:44:22 +03:00
Vladimir Dubrovin 5f1ed7363b Fix: race conditions / stack overflow on FreeBSD / minor bugs 2026-07-31 13:27:33 +03:00
Vladimir Dubrovin c370635fc4 fix wolfSSL, switch minimal/busybox to musl+wolfssl 2026-07-31 11:27:10 +03:00
Vladimir Dubrovin 3bfabb29f8 pass -fPIC for plugins (so) only
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
2026-07-28 18:59:02 +03:00
Vladimir Dubrovin e4a5a7252c Fix: buffer overflow in radsend (log radius or combination of auth radius with fakeresolve must be enabled, RADIUS feature is experimental)
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ubuntu-latest (wolfSSL) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
2026-07-28 11:31:06 +03:00
Vladimir Dubrovin 5f542a505a apt update before install in workflows
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI cmake / ubuntu-latest (wolfSSL) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
2026-07-27 11:27:55 +03:00
Vladimir Dubrovin 5b7446ba8f apt update before install in workflows 2026-07-27 11:22:03 +03:00
Vladimir Dubrovin 4af02c9268 Fix: pcre/ssl command handlers broken in last commits
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI cmake / ubuntu-latest (wolfSSL) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
2026-07-26 15:51:55 +03:00
Vladimir Dubrovin ed5103d176 Optimize sockgetchar functions
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ubuntu-latest (wolfSSL) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
2026-07-24 15:04:27 +03:00
Nirmal Khanal 75dedeff28 Fix: short CL cleartext passwords failed authentication
strongauth() compared short CL passwords over pwl_table.recsize-1 bytes,
reading past the client password buffer (strdup of pwlen+1) and rejecting
valid passwords whenever trailing heap bytes were non-zero. Zero-pad the
provided password to the record width and compare in constant time, like
the long-password BLAKE2 path.

Fixes #1254
2026-07-24 15:00:00 +03:00
Vladimir Dubrovin c60af54c98 Minor bugfixes
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ubuntu-latest (wolfSSL) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
2026-07-23 19:43:47 +03:00
Nirmal Khanal 01f85cf755 Fix parent negotiation after sending PROXY protocol header
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI cmake / ubuntu-latest (wolfSSL) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
After 'parent ha' sends the PROXY v1 header, continue negotiating the
real parent protocol (SOCKS5/CONNECT/etc.) instead of returning early.
'ha' used alone still sends the header and relays plain TCP.
2026-07-23 10:55:07 +03:00
Vladimir Dubrovin 305f9932ac Update docs
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI cmake / ubuntu-latest (wolfSSL) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
2026-07-22 18:47:11 +03:00
Vladimir Dubrovin c94766dff7 Fix: dnspr was broken since udppm rewrite. -F (fake resolve to redirect traffic) option added to dnspr 2026-07-22 17:34:51 +03:00
Vladimir Dubrovin 87fc8ae4ee Fix cmake build 2026-07-22 16:23:11 +03:00
Vladimir Dubrovin 9ab2e820b5 Added imapp, starttls support for smtpp, pop3p, tlspr 2026-07-22 16:15:50 +03:00
Vladimir Dubrovin 7798f78137 support chunked TE from client
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ubuntu-latest (wolfSSL) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
2026-07-21 16:05:12 +03:00
Vladimir Dubrovin d60ac723a5 Multiple fixes, including security-related ones (in smtpp and LDAP plugin)
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ubuntu-latest (wolfSSL) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
2026-07-20 19:52:10 +03:00
Vladimir Dubrovin afb2ec0696 IPV6_BOUND_IF also in second place
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ubuntu-latest (wolfSSL) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
2026-07-17 15:12:49 +03:00
Vladimir Dubrovin f18a751f89 define IPV6_BOUND_IF if not defined (for legacy MacOS 10.x) 2026-07-17 15:07:11 +03:00
Vladimir Dubrovin 8de071aa87 fix wolfSSL build
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ubuntu-latest (wolfSSL) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
2026-07-13 20:50:27 +03:00
Vladimir Dubrovin f173f8860d wolfSSL support added 2026-07-13 20:24:51 +03:00
Vladimir Dubrovin 3a66c0a4c0 Use half sha256 for cert cache
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
2026-07-13 17:14:46 +03:00
Vladimir Dubrovin 66ee250e5c Fix: hashstable item is added with wrong index on table grow 2026-07-13 15:30:49 +03:00
Vladimir Dubrovin c893e866bd Use Solar Designer's md4/md5 on non-Windows
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
2026-07-10 14:01:29 +03:00
Vladimir Dubrovin fbc0953d5c Use native Windows crypto for MD4/MD5 2026-07-10 13:04:43 +03:00
Vladimir Dubrovin 37b1ab8169 Update Makefile.win 2026-07-10 12:15:45 +03:00
Vladimir Dubrovin b7769d05af Support static libraries in Makefile.win 2026-07-10 12:10:01 +03:00
Vladimir Dubrovin fdda69c1f4 fux ucrt workflow 2026-07-10 11:41:27 +03:00
Vladimir Dubrovin a757fae617 Fix Makefile.win for UCRT bug 2026-07-10 11:35:56 +03:00
Vladimir Dubrovin 1c9577b9a9 Add ucrt64 build support 2026-07-10 11:25:45 +03:00
Vladimir Dubrovin b59c044663 Update CMakeLists.txt 2026-07-10 10:53:58 +03:00
Vladimir Dubrovin de5acb2abd Do not use getrandom for glibc < 2.25
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
2026-07-06 11:41:12 +03:00
Vladimir Dubrovin d6dea13a6f Fix zip name in win32 build action
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
2026-07-04 14:37:24 +03:00
Vladimir Dubrovin a04cd67eaa Fix release artefact uploads in Windows workflows 2026-07-04 14:15:01 +03:00
Vladimir Dubrovin 19cacf0bd9 Commit as 0.9.7 2026-07-04 13:51:28 +03:00
Vladimir Dubrovin 27d5d8d102 Update build-rpm-armhf.yml 2026-07-04 12:14:54 +03:00
Vladimir Dubrovin 6b944f3fa9 Documentation update 2026-07-04 11:51:40 +03:00
Vladimir Dubrovin 4f99443750 Authcache fix 2026-07-04 11:38:47 +03:00
Vladimir Dubrovin c462963d8e Fix standalone services link
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
2026-06-28 21:15:38 +03:00
Vladimir Dubrovin e41ab58b2c Fix: invalid error in ssl server handshake can lead to broken service state 2026-06-28 21:10:45 +03:00
Vladimir Dubrovin 8f13582329 Fix invalid offset in datafilters 2026-06-28 21:09:36 +03:00
Vladimir Dubrovin af9f23ece7 Fix: invalid socket in poll(): can break sockmap() on Windows
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
2026-06-28 13:49:52 +03:00
dependabot[bot] d77dc00fd1 Bump actions/checkout from 6 to 7 (#1241)
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
Bumps [actions/checkout](https://github.com/actions/checkout) from 6 to 7.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-23 11:54:36 +03:00
Vladimir Dubrovin 101125de36 ssl code cleanup
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
2026-06-14 19:49:59 +03:00
Vladimir Dubrovin 1dfe9e718b Sign DLLs 2026-06-03 11:00:47 +03:00
Vladimir Dubrovin 84879cc0ba Add public cert to build 2026-06-03 10:34:38 +03:00
Vladimir Dubrovin 757ad916ec Sign docker images
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
2026-06-02 18:12:48 +03:00
Vladimir Dubrovin fbc3ed5a18 Update README.md 2026-06-02 16:36:38 +03:00
Vladimir Dubrovin 69862b67cb Check bandlims for UDP traffic 2026-06-02 14:23:52 +03:00
Vladimir Dubrovin fd7b25bf06 Use non-blocking sockets for UDP 2026-06-02 13:43:56 +03:00
Vladimir Dubrovin ab11e6c4a3 Fix deadlock in ftppr
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
2026-06-02 13:06:53 +03:00
Vladimir Dubrovin 74d5b67ef4 riscv64 removed due to lack of gcc image
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
2026-06-01 20:27:47 +03:00
dependabot[bot] 6d8643b70e Bump actions/checkout from 5 to 6 (#1234)
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-01 20:22:52 +03:00
dependabot[bot] 9e7246e864 Bump open-watcom/setup-watcom from 0 to 1 (#1233)
Bumps [open-watcom/setup-watcom](https://github.com/open-watcom/setup-watcom) from 0 to 1.
- [Changelog](https://github.com/open-watcom/setup-watcom/blob/master/release.py)
- [Commits](https://github.com/open-watcom/setup-watcom/compare/v0...v1)

---
updated-dependencies:
- dependency-name: open-watcom/setup-watcom
  dependency-version: '1'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-01 20:22:03 +03:00
dependabot[bot] c5affd2db4 Bump actions/upload-artifact from 6 to 7 (#1232)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 6 to 7.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-01 20:21:37 +03:00
Vladimir Dubrovin 794f667eea Add more docker platforms 2026-06-01 20:16:19 +03:00
Vladimir Dubrovin 0259b58b95 Start proxy as root in chroot 2026-06-01 19:18:51 +03:00
Vladimir Dubrovin 9734b54f56 Add permissions to workflows
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
2026-06-01 14:29:32 +03:00
Vladimir Dubrovin fe2b2fd544 Revert "send provenance to github only"
This reverts commit 254112cfde.
2026-06-01 13:27:41 +03:00
Vladimir Dubrovin 086d4cbd6a Update README.md 2026-06-01 11:49:32 +03:00
Vladimir Dubrovin 2695d83847 Update README.md 2026-06-01 11:40:18 +03:00
Vladimir Dubrovin dd5fe3994e Update README.md 2026-06-01 11:38:15 +03:00
Vladimir Dubrovin 5ab63a0b68 Update README.md 2026-06-01 11:36:16 +03:00
Vladimir Dubrovin 254112cfde send provenance to github only 2026-06-01 10:48:02 +03:00
Vladimir Dubrovin 5cae5dc866 Keep provenance
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
2026-05-31 16:07:53 +03:00
Vladimir Dubrovin 56fdbd6e8a remove debugging ls in dockerfiles 2026-05-31 15:33:07 +03:00
Vladimir Dubrovin 997671ee16 publish builds on release 2026-05-31 15:29:11 +03:00
Vladimir Dubrovin 34e9c453fa Workflows update 2026-05-31 13:47:41 +03:00
Vladimir Dubrovin 3dde2de498 do not keep untagged dockers 2026-05-31 13:10:26 +03:00
Vladimir Dubrovin bdf9946fe5 Add dockers build
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
2026-05-30 17:05:43 +03:00
Vladimir Dubrovin eab5758b51 Fix deb/rpm builds 2026-05-30 16:22:39 +03:00
Vladimir Dubrovin 1772295a36 Fix installation
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
2026-05-29 21:11:32 +03:00
Vladimir Dubrovin f0a672b16a Unify installation environment 2026-05-29 20:29:25 +03:00
Vladimir Dubrovin 01dad546b7 Fix filenames in builds
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
2026-05-27 21:38:02 +03:00
Vladimir Dubrovin 30aaccc155 Fix build for Windows 2026-05-27 21:24:01 +03:00
Vladimir Dubrovin 2cb6297968 Documentation update 2026-05-27 17:06:48 +03:00
Vladimir Dubrovin d66311a045 Support STATIC and LIBSTATIC in Makefile's, fix dockerfiles 2026-05-27 17:04:34 +03:00
Vladimir Dubrovin 905e3d3152 support IPv6 with NOSTDRESOLVE 2026-05-27 17:03:17 +03:00
Vladimir Dubrovin 7c08432a70 do not use FD_SETSIZE on Windows
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
2026-05-22 20:16:56 +03:00
Vladimir Dubrovin d4554cfabd Do not build PCRE/SSL with Watcom 2026-05-22 19:17:29 +03:00
Vladimir Dubrovin 1aecfa7995 Use C89 style declarations 2026-05-22 19:03:14 +03:00
Vladimir Dubrovin 289d2f5211 Use C89 style declarations 2026-05-22 18:57:23 +03:00
Vladimir Dubrovin 94efc7f7a6 Allow run workflows manually 2026-05-22 18:20:13 +03:00
Vladimir Dubrovin d34c036eb7 Make build workflows manual 2026-05-22 18:13:02 +03:00
Vladimir Dubrovin 4bf1f3990b Use -lbcrypt in Makefile.win 2026-05-22 18:06:56 +03:00
Vladimir Dubrovin a639bcb017 Fix: unneeded poll in sockmap 2026-05-22 17:57:15 +03:00
Vladimir Dubrovin bed3977575 Merge branch 'master' of https://github.com/3proxy/3proxy 2026-05-22 17:55:57 +03:00
Vladimir Dubrovin 16af910f3a Fix: non-initialized mutex (crash under Windows) 2026-05-22 16:57:53 +03:00
Vladimir Dubrovin 7c1bc48c85 Fix socks v5 parent with no auth
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
2026-05-15 18:45:47 +03:00
Vladimir Dubrovin 05c4832c6c Minor cleanups 2026-05-13 23:21:13 +03:00
Vladimir Dubrovin 381ef993a7 Minor logging improvement / code cleanup
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
2026-05-12 21:21:59 +03:00
Vladimir Dubrovin 1de06c5059 Fix invalid buffer calculation in sockmap 2026-05-12 21:06:31 +03:00
Vladimir Dubrovin aaa04116a8 Fix issues with -s
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
2026-05-08 20:43:02 +03:00
Vladimir Dubrovin 5fdd4a4d6f NOODBC inverted to WITH_ODBC 2026-05-08 20:30:14 +03:00
Vladimir Dubrovin 7871279fae Support namespaces for UDP in socks 2026-05-08 20:21:04 +03:00
Vladimir Dubrovin ff15a8d480 Update copyright 2026-05-08 19:25:33 +03:00
Vladimir Dubrovin 95029e9e41 Use blake2 hashsize 2026-05-08 19:14:28 +03:00
Vladimir Dubrovin 6286bfcd6e Fix crypt passwords 2026-05-08 19:00:14 +03:00
Vladimir Dubrovin b1d21cbdca Copyright update 2026-05-08 18:07:08 +03:00
Vladimir Dubrovin 978f351560 Add compatiblity with older SSL versions 2026-05-08 17:16:47 +03:00
Vladimir Dubrovin 41d1fa8b00 Do not use OSSL_LIB_CTX 2026-05-08 17:03:00 +03:00
Vladimir Dubrovin 8c638fcaff Revert usage of OpenSSL blake2 implementation 2026-05-08 16:45:44 +03:00
Vladimir Dubrovin 6963af7614 Do not use OSSL_PARAM_DIGEST_SIZE for blake2 in openssl 2026-05-08 16:14:09 +03:00
Vladimir Dubrovin f8c22d5f91 Fix: symbols collision with openssl, could lead to crash
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
2026-05-08 14:03:47 +03:00
Vladimir Dubrovin c104203765 Fix memory leak in hash functions 2026-05-08 12:10:08 +03:00
Vladimir Dubrovin 45c3b89484 3proxy_crypt cleanup
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
2026-05-07 23:21:09 +03:00
Vladimir Dubrovin 0d7f05b05b set hostname in proxy if hostname is numeric
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
2026-05-07 19:10:36 +03:00
Vladimir Dubrovin 750bb38907 Do not fail on -n 2026-05-07 19:10:13 +03:00
Vladimir Dubrovin 46cff56cf4 Use EVP_MD_CTX_reset instead of free/new 2026-05-07 18:47:06 +03:00
Vladimir Dubrovin d0d3b90226 Fix $1$ crypt 2026-05-07 18:34:38 +03:00
Vladimir Dubrovin 7a139e59a5 Use UDPMAP request address to limit client, not server 2026-05-07 16:07:59 +03:00
Vladimir Dubrovin ff7f4b8ea6 Dynamic link with ssl/pcre by default, static as option in makefiles
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
2026-05-07 11:55:42 +03:00
Vladimir Dubrovin ec48b7f30e Clear mingw warnings
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
2026-05-06 23:07:16 +03:00
Vladimir Dubrovin 88a09bc3ff Fix socks v5 derivations from standard 2026-05-06 23:02:04 +03:00
Vladimir Dubrovin 0e13f57139 Allocate udp buffer dynamically 2026-05-06 22:45:00 +03:00
Vladimir Dubrovin cbab76fe41 do not use static linking for .so
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
2026-05-05 18:38:45 +03:00
Vladimir Dubrovin fb9337c030 Add option for static libraries linking (ssl / pcre2 / pam) 2026-05-05 18:34:58 +03:00
Vladimir Dubrovin ef9386e29d More accurate flags in linking 2026-05-05 18:13:32 +03:00
Vladimir Dubrovin 334de0658c update datatypes 2026-05-05 15:27:55 +03:00
Vladimir Dubrovin ec469fa2a6 Fix: buffer size in hash
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
2026-05-04 21:55:20 +03:00
Vladimir Dubrovin fbd1788f4c increase stack size 2026-05-04 21:34:13 +03:00
Vladimir Dubrovin 830b2d39d1 Use standard malloc functions
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
2026-05-04 18:50:02 +03:00
Vladimir Dubrovin a338a0c689 Speedup passwords lists 2026-05-04 18:37:18 +03:00
Vladimir Dubrovin af8a6e0b91 minimize blake2 usage for hashing 2026-05-04 16:48:07 +03:00
Vladimir Dubrovin 2997533287 Use only defined PCRE2 options
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
2026-05-04 12:46:33 +03:00
Vladimir Dubrovin 5f06879843 Fix: crash on standalone services 2026-05-04 12:03:02 +03:00
Vladimir Dubrovin da8a8615f4 Remove UDPASSOC check from tcp sockmap
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
2026-05-02 15:36:21 +03:00
Vladimir Dubrovin 51a82613a6 Allow to set internal / external namespace on linux 2026-05-02 14:49:35 +03:00
Vladimir Dubrovin b87e998e4d remove 'usentlm' option 2026-05-02 13:58:56 +03:00
Vladimir Dubrovin 4068a6955f Fix UDP parent for SOCKSv5
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
2026-05-02 00:00:45 +03:00
Vladimir Dubrovin 07c1dc1462 Fix shutdown for Windows
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
2026-05-01 19:26:39 +03:00
Vladimir Dubrovin acce67a512 Fix NULL address request for UDP ASSOC 2026-05-01 17:26:06 +03:00
Vladimir Dubrovin e986f8a747 FIx hanging connections in sockmap 2026-05-01 17:19:23 +03:00
Vladimir Dubrovin 314503d8df SOCKSv5 parent udp support (initial, untested) 2026-05-01 15:13:53 +03:00
Vladimir Dubrovin 8107f03062 Move PCRE/SSL to main code 2026-05-01 15:11:08 +03:00
Vladimir Dubrovin a3fb7aff07 Clean up UDP code 2026-04-30 11:32:12 +03:00
Vladimir Dubrovin b1ac46da79 Remove linux futext implementation
Build Win32 3proxy with MSVC / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
Build Win64 3proxy with MSVC / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
Build Win32 3proxy-lite with Watcom / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Has been cancelled
Build Win-arm64 3proxy with MSVC / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
2026-04-28 18:06:54 +03:00
Vladimir Dubrovin d125261e8c fix: hashtables on recsize < 4 2026-04-28 16:32:30 +03:00
Vladimir Dubrovin a4527783d6 Correctly process half-closed connections; add grace sleep before closing sockets 2026-04-28 16:15:18 +03:00
Vladimir Dubrovin fb70d06d3e Add linger sleep on connection close 2026-04-28 14:55:37 +03:00
Vladimir Dubrovin 57d687fcb8 add 3proxy_crypt man 2026-04-28 14:41:14 +03:00
Vladimir Dubrovin ada24a98ec Use semaphore/mutex insted of pipe for threads sync 2026-04-28 14:00:15 +03:00
Vladimir Dubrovin ba2584cebf change 3proxy.cfg.3 to 3proxy.cfg.5 2026-04-28 12:34:53 +03:00
Vladimir Dubrovin 05096c222a Return standalone udppm; do not build standalone modules by default in cmake
Allow to set prefix in cmake, 3proxy_ by default
2026-04-28 12:21:11 +03:00
Vladimir Dubrovin 6c3c5f31a2 Update mans
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
2026-04-27 21:11:25 +03:00
Vladimir Dubrovin 319a74de06 Update proxymain.c 2026-04-27 20:12:28 +03:00
Vladimir Dubrovin e088a5d7f9 Remove udppm from build 2026-04-27 20:05:34 +03:00
Vladimir Dubrovin f01c8bfee9 Code cleanup 2026-04-27 19:58:34 +03:00
Vladimir Dubrovin a7cdfa578d split auth.c 2026-04-27 15:30:35 +03:00
Vladimir Dubrovin d52701518d udppm switched to hashtable and supports multiple connections; no standalone udppm 2026-04-27 15:12:39 +03:00
Vladimir Dubrovin 7ddea44ffd Fix: blake crypt
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
2026-04-27 13:23:32 +03:00
Vladimir Dubrovin 760a521df8 remove pwl_mutex
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
2026-04-26 20:43:13 +03:00
Vladimir Dubrovin 62ceb36157 Use hashtables for password lists 2026-04-26 20:38:58 +03:00
Vladimir Dubrovin 62be3c7b5b cash the hash for auth cache 2026-04-26 19:56:38 +03:00
Vladimir Dubrovin 85c431b96e Merge branch 'master' of https://github.com/3proxy/3proxy 2026-04-25 11:52:57 +03:00
Vladimir Dubrovin 90c312f4cd Changelog added 2026-04-25 11:52:54 +03:00
Vladimir Dubrovin 451b3d180c Allow hashtables to grow index
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
2026-04-24 21:08:57 +03:00
Vladimir Dubrovin f63a83f554 Fix blake2 for watcom 2026-04-24 18:13:30 +03:00
Vladimir Dubrovin 6b61cfde4c Fix for older Windows (7 and below) / VC 2026-04-24 17:04:03 +03:00
Vladimir Dubrovin e6c3427cab fix hashtable init
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
2026-04-22 12:02:20 +03:00
Vladimir Dubrovin 4f0f3c81e1 add 'cacheacl' auth type, dstaddr, dstport, dsthost, dstoper, srvaddr and srvport authcache types; allow to configure authcache by service
'auth cacheacl ...' is identical to 'auth cache ...' except ACL is not checked for cached authentication. dstaddr, dstport, dsthost and dstoper (operation) are intended to be used with cacheacl. For example

authcache user,ip,password,dstaddr 600
auth cacheacl iponly strong

allows user to access destination ip without ACL/password revalidation if he has cached attempt to the same ip from the same ip with the same username and password.

srvaddr, srvport are useful to only match with cached attempts to the same `internal` address / service port.
2026-04-21 21:49:52 +03:00
Vladimir Dubrovin bfbbf1f446 Fix FilePlugin warnings
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
2026-04-21 16:28:28 +03:00
Vladimir Dubrovin b79906da02 Add FilePlugin to builds 2026-04-21 16:23:23 +03:00
Vladimir Dubrovin 68ef9dcc59 Fix Windows compilation 2026-04-21 16:10:17 +03:00
Vladimir Dubrovin 3957210609 Allow different hash lengths; fix bug on hashtable grow 2026-04-20 18:49:53 +03:00
Vladimir Dubrovin ee00956b74 hash username/password with terminators 2026-04-20 11:59:58 +03:00
Vladimir Dubrovin 083a70393f Minor hashtable refactor 2026-04-20 10:40:38 +03:00
Vladimir Dubrovin d9b1493260 Fix hashadd
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
2026-04-19 19:22:22 +03:00
Vladimir Dubrovin 7102afe856 authcache switched to hashtables, overflow fixed
- authcache switched to use hashtables, size parameter added
- overflow fixed on hashinit
- hashtable prefers new values on insert if table is full
- hashtable is able to compact/grow
2026-04-19 19:16:33 +03:00
Vladimir Dubrovin a3729354b8 Allow hashtable to grow
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
2026-04-18 17:24:01 +03:00
Vladimir Dubrovin 45796f66c7 Cleanup 3proxy_crypt 2026-04-18 15:47:07 +03:00
Vladimir Dubrovin 260cbf7a3d Use uint32_t for hashtable indicies 2026-04-18 15:36:14 +03:00
Vladimir Dubrovin bba9871ed8 Use 3proxy_crypt instead of mycrypt 2026-04-18 15:19:06 +03:00
Vladimir Dubrovin f1af44f3a9 Refactor hashtables to use indices instead of pointers, use blake2 as a hash, mycrypt renamed to 3proxy_crypt 2026-04-18 15:12:43 +03:00
Vladimir Dubrovin 4ee7f71fb9 Использовать tablesize в хештаблице 2026-04-17 21:15:21 +03:00
Vladimir Dubrovin 98604b5421 Add hashcompact 2026-04-17 20:40:27 +03:00
Vladimir Dubrovin a0d580b36d move hashtable/resolve/sql functions to separate files 2026-04-17 19:29:50 +03:00
Vladimir Dubrovin 4c0e3a1bac Check OpenSSL version for SNI/TLS 1.3/alpn
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
2026-04-14 17:36:35 +03:00
Vladimir Dubrovin 454f5e1d54 -Ne / -Ni description added to man
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
2026-04-13 21:37:46 +03:00
Vladimir Dubrovin c4ac696919 Update documentation for parent tcps/https/etc 2026-04-13 21:32:04 +03:00
Vladimir Dubrovin afbdad0ac7 Fix for first in chain https/tcps parent 2026-04-13 21:09:46 +03:00
Vladimir Dubrovin a1a65c3fd5 ssl_client_mode = 3 added, allow 'secure' parent types ending with 's': https, tcps, socks5s, connect+s, etc.
example:

plugin SSLPlugin.ld.so ssl_plugin

allow user1
parent 1000 http 1.1.1.1 1111
allow user2
parent 1000 https 2.2.2.2 2222
ssl_client_mode 3
ssl_client
proxy

With ssl_client_mode 3 TLS is only handshaked for https parent type and is not handshaked for http parent.
2026-04-13 20:53:38 +03:00
Vladimir Dubrovin 2fd536781f Add unix sockets to man 2026-04-13 11:54:24 +03:00
Vladimir Dubrovin 878a432481 Support unix socket for parent and tcppm; abstract (fileless) unix sockets for linux support
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
Use unix:/path/to/socket, e.g.

tcppm 1234 unix:/path/to/socket 1234

Under linux abstract sockets are supported with '@' prefix, e.g.

parent 1000 http unix:@virtual.3proxy.socket 1111

Destination port numbers are not used in tcppm/parent, but you must specify any positive value to match the syntaxis.
2026-04-12 19:18:15 +03:00
Vladimir Dubrovin 3f92dc7355 Fix dockerfiles
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
2026-04-12 15:18:20 +03:00
Vladimir Dubrovin bae96b0823 Support plugins in chroot in Dockerfile.busybox 2026-04-12 14:55:54 +03:00
Vladimir Dubrovin f77f65ac4e Fix: SOCKSv5 parent reply parsing for domain name address 2026-04-12 14:16:48 +03:00
Vladimir Dubrovin 2d6eeff5f3 FIx typos, update documentation 2026-04-12 13:58:42 +03:00
Vladimir Dubrovin c206349ee2 Support unix sockets for internal and -i
Example configuration:

log
auto -iunix:/path/to/3proxy.sock

test with

curl --unix-socket /path/to/3proxy.sock https://3proxy.ru
2026-04-12 00:30:35 +03:00
Vladimir Dubrovin 77b0dc3397 Documentation update
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
RPM/DEB build aarch64 / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
RPM/DEB build armhf / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
Build Win32 3proxy with MSVC / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
Build Win64 3proxy with MSVC / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Waiting to run
Build Win32 3proxy-lite with Watcom / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
RPM/DEB build x86-64 / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
Build Win-arm64 3proxy with MSVC / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
2026-04-11 14:47:09 +03:00
Vladimir Dubrovin a2641cb103 Push as 0.9.6 2026-04-11 13:06:43 +03:00
Vladimir Dubrovin 98f8ec1464 Dockerfiles updates:
- Build distroless from scratch
- Static linking with NOSTDRESOLVE for minimal
- SSLPlugin is supported in full, including chroot configuration
- No need to specify full path for plugins

chroot provides no additional security due to distroless, but is still supported for compatiblity reasons. Plugins, including SSL should work in chroot configuration. --read-only is recommended, no tmp directories are required.
2026-04-11 12:47:22 +03:00
Vladimir Dubrovin 238ed094dd Support building without standard resolvers (NOSTDRESOLVE)
build from stra
2026-04-11 12:22:38 +03:00
Vladimir Dubrovin c853ea5b9e More accurate libraries detection in Makefiles 2026-04-11 12:21:07 +03:00
Vladimir Dubrovin 825563ad85 Detailed warnings for 'plugin' command errors 2026-04-10 19:30:22 +03:00
Vladimir Dubrovin 0c8be907e9 -Ne / -Ni options added to specify external / internal NAT address 2026-04-10 15:01:43 +03:00
Vladimir Dubrovin 840dd5dbdf Update Makefile.Linux 2026-04-10 13:14:00 +03:00
Vladimir Dubrovin 71d676eb58 Update workflows and builds 2026-04-09 17:53:27 +03:00
Vladimir Dubrovin 8cb8be1be8 Fix warnings 2026-04-08 21:13:45 +03:00
Vladimir Dubrovin 0381461495 Use PRI/SCN modifiers where possible 2026-04-08 21:13:31 +03:00
Vladimir Dubrovin 483542b914 Use uint32_t/uint16_t instead of unsigned long / unsigned short where required 2026-04-08 21:13:18 +03:00
Vladimir Dubrovin 855c04d8f6 Uodate build environment 2026-04-08 21:12:51 +03:00
ilya ab852c6860 docs: fix Docker link in README (#1193) 2026-04-08 19:21:31 +03:00
Vladimir Dubrovin a54b773fac scripts/debian moved to debian 2026-04-08 19:21:31 +03:00
Vladimir Dubrovin 4d7d2cab6e keep HTML mans 2026-04-08 19:21:31 +03:00
Vladimir Dubrovin 05e5fbe274 fix debian files 2026-04-08 19:21:31 +03:00
Vladimir Dubrovin de40d1839d Update workflows and makefiles (5 commits squashed) 2026-04-08 19:21:31 +03:00
Vladimir Dubrovin d8161e94b5 Update year 2026-04-08 19:21:31 +03:00
Vladimir Dubrovin 30c3764c90 change config example 2026-04-08 19:21:31 +03:00
Vladimir Dubrovin ceb4912172 howto update 2026-04-08 19:21:31 +03:00
Vladimir Dubrovin ce104a5b3c Update README 2026-04-08 19:21:31 +03:00
Vladimir Dubrovin d8d3d8cc1b Use syslog for non-chroot configuration, support MacOS launchd 2026-04-08 19:21:31 +03:00
Vladimir Dubrovin 44c86236cd add rc.d script 2026-04-08 19:21:30 +03:00
Vladimir Dubrovin 3ee78a3195 Use non-chroot configuration in cmake; remove older script 2026-04-08 19:21:30 +03:00
Vladimir Dubrovin 9b06edb4f6 Howto update 2026-04-08 19:21:30 +03:00
Vladimir Dubrovin 9d314a5fba Howto update 2026-04-08 19:21:30 +03:00
Vladimir Dubrovin be40871276 Update 3proxy.cfg.3 2026-04-08 19:21:30 +03:00
Vladimir Dubrovin 35993dfaaf SSLPlugin documentation updated 2026-04-08 19:21:30 +03:00
Vladimir Dubrovin 3d9d76fcf5 Update documentation 2026-04-08 19:21:30 +03:00
Vladimir Dubrovin c6eddc69a1 remove unsued variables 2026-04-08 19:21:30 +03:00
Vladimir Dubrovin 758c290092 Fix CONNECT_TO usage 2026-04-08 19:21:30 +03:00
Vladimir Dubrovin 1a753da70d Update workflows and makefiles (5 commits squashed) 2026-04-08 19:21:30 +03:00
Vladimir Dubrovin 2e534c7794 Add cmake environment 2026-04-08 19:21:30 +03:00
Vladimir Dubrovin 237fa15e36 Fix external libraries 2026-04-08 19:21:30 +03:00
Vladimir Dubrovin 6f1bb65841 Update workflows and makefiles (11 commits squashed) 2026-04-08 19:21:30 +03:00
Vladimir Dubrovin 238b314c90 switch PCREPlugin to PCRE2 2026-04-08 19:21:29 +03:00
Vladimir Dubrovin e12b061148 Use pcre/pam in Dockerfile.full 2026-04-08 19:21:29 +03:00
BDBSAlive6one6 5e92822900 fix(PamAuth): добавлен вызов pam_acct_mgmt(), исправлен pam_start() (#1203)
Добавлен вызов pam_acct_mgmt() после pam_authenticate() для проверки
прав доступа на уровне PAM (HBAC, истечение пароля, блокировка учётки)
Исправлена передача реального username в pam_start() вместо '3proxy@'

---

Added pam_acct_mgmt() call after pam_authenticate() to enable PAM
account checks (HBAC, password expiration, account lockout).
Fixed pam_start() to pass actual username instead of hardcoded '3proxy@'
Tested with FreeIPA 4.12 + SSSD Rocky Linux 9
2026-04-08 19:21:29 +03:00
Vladimir Dubrovin 0252f4978c Update workflows and makefiles (1 commits squashed) 2026-04-08 19:21:29 +03:00
Vladimir Dubrovin 7299bcc0e2 Move timeouts from conf 2026-04-08 19:21:29 +03:00
Vladimir Dubrovin 416e30ed0d Update .gitignore 2026-04-08 19:21:29 +03:00
Vladimir Dubrovin 7c25c23325 Update workflows and makefiles (5 commits squashed) 2026-04-08 19:21:29 +03:00
Vladimir Dubrovin c34d29b7dd Do not use applink.c 2026-04-08 19:21:29 +03:00
Vladimir Dubrovin 1d515af787 Update workflows and makefiles (16 commits squashed) 2026-04-08 19:21:29 +03:00
Vladimir Dubrovin 499c4240ad Fix TrafficPlugin 2026-04-08 19:21:28 +03:00
Vladimir Dubrovin 23b9e698e0 Update workflows and makefiles (15 commits squashed) 2026-04-08 19:21:28 +03:00
Vladimir Dubrovin a5fce1a2f6 compile PCRE on Windows 2026-04-08 19:21:28 +03:00
Vladimir Dubrovin c05023ab6d Correct SSL functions for Windows 2026-04-08 19:21:27 +03:00
Vladimir Dubrovin 1e8130cae8 Update workflows and makefiles (5 commits squashed) 2026-04-08 19:21:27 +03:00
Vladimir Dubrovin 28724187fb Use external PCRE library 2026-04-08 19:21:27 +03:00
Vladimir Dubrovin 35db214b78 Use external PCRE library 2026-04-08 19:21:27 +03:00
Vladimir Dubrovin 1ba0008055 Update workflows and makefiles (6 commits squashed) 2026-04-08 19:21:27 +03:00
Vladimir Dubrovin 92f170fca2 Fix warning 2026-04-08 19:21:27 +03:00
Vladimir Dubrovin 71c58e0c77 Update workflows and makefiles (2 commits squashed) 2026-04-08 19:21:27 +03:00
Vladimir Dubrovin 00d2ecbc31 Use 64 bit arithmetics for rate limits 2026-04-08 19:21:27 +03:00
Vladimir Dubrovin 662603f9d8 Update workflows and makefiles (1 commits squashed) 2026-04-08 19:21:27 +03:00
Vladimir Dubrovin 8292ec21a7 remove SSL_shutdown 2026-04-08 19:21:27 +03:00
Vladimir Dubrovin ef318bff67 Use quit shutdown for SSL to prevent races 2026-04-08 19:21:27 +03:00
Vladimir Dubrovin 128386723a Fix potential use-after-free on filters, add SSL_shutdown in SSLPlugin 2026-04-08 19:21:27 +03:00
Vladimir Dubrovin acc6db59a3 SNI break (DPI bypass) added
-s option to tlspr (or tls type redirect), requires TCP_NODELAY to be set

auth iponly
allow *
parent 1000 tls 0.0.0.0 0
allow *
proxy -s -i127.0.0.1 -ocTCP_NODELAY -osTCP_NODELAY -p1443
2026-04-08 19:21:26 +03:00
Vladimir Dubrovin 251660940e Fixed: crash on invalid configuration file 2026-04-08 19:21:26 +03:00
Vladimir Dubrovin 7e4504997e Fixed: memory corruptions on config parsing 2026-04-08 19:21:26 +03:00
Vladimir Dubrovin 8d8ee23385 ssl_client_mode added, code cleanup
ssl_client_mode
0 (default) - handshake immediately after connect() (with first parent or with destination if there is no parent)
1 - handshake with destination server (handshake after connection via parents is established)
2 - handshake after data channel is established (e.g. after CONNECT)
2026-04-08 19:21:26 +03:00
Vladimir Dubrovin 7e47d5bd92 ssl_client_alpn added 2026-04-08 19:21:26 +03:00
Vladimir Dubrovin 7fce892391 Use SSL_connect / SSL_accept in non-blocking mode 2026-04-08 19:21:26 +03:00
Vladimir Dubrovin 23551e53bf Fixed: allow ssl server and client on the same service 2026-04-08 19:21:26 +03:00
Vladimir Dubrovin 35406e6b61 client_sni command added; do not send hostname from request as SNI in SSL client configuration 2026-04-08 19:21:26 +03:00
Vladimir Dubrovin 26534e9cbd Close SSL on shutdown 2026-04-08 19:21:26 +03:00
Vladimir Dubrovin 2cd0a34fd5 maxseg / TCP_MAXSEG support added 2026-04-08 19:21:26 +03:00
Vladimir Dubrovin d67a052aa8 Fixed: invalid config value initializers 2026-04-08 19:21:26 +03:00
Vladimir Dubrovin 7d04915d3d Update workflows and makefiles (3 commits squashed) 2026-04-08 19:21:26 +03:00
Alexey Suslov 280c7c8976 Fix HTTPS proxy for HTTPS addresses (#1175) 2026-04-08 19:21:26 +03:00
Vladimir Dubrovin bc7e9b2ac6 Fix: -P option for tlspr 2026-04-08 19:21:26 +03:00
Vladimir Dubrovin 5355af3112 Fix: WSAPoll fail in some Windows versions after e525ce913e 2026-04-08 19:21:26 +03:00
Sertonix 2cfad638a7 Update workflows and makefiles (11 commits squashed) 2026-04-08 19:21:26 +03:00
bipface cfc9c30bd2 Fix missing semicolons in debian postinst script (#1158)
These missing semicolons cause some errors to be printed during installation, such as: `Failed to stop bin-systemctl.mount: Unit bin-systemctl.mount not loaded.`
2026-04-08 19:21:25 +03:00
Vladimir Dubrovin 7b4e8b6d6b Fixed: ssl_server_cert doesn't read full certificate chain 2026-04-08 19:21:25 +03:00
Vladimir Dubrovin e945890613 Fixed: CONNECT does not work in standalone 'proxy' binary 2026-04-08 19:21:25 +03:00
Vladimir Dubrovin 5c7cc3c9b2 Fixed: Failed connect may result in success response on some Windows versions 2026-04-08 19:21:25 +03:00
Vladimir Dubrovin 6e55af7f48 Fixed: invalid timeout in socksendto / sockrecvfrom 2026-04-08 19:21:25 +03:00
danyhm 4ec2226d3e Update workflows and makefiles (1 commits squashed) 2026-04-08 19:21:25 +03:00
Vladimir Dubrovin 8d744e16fb Convert PAMAUTH.TXT to UTF-8 2026-04-08 19:21:25 +03:00
Vladimir Dubrovin af25cb460f Fixed service name detection for auto / tlspr 2026-04-08 19:21:25 +03:00
Vladimir Dubrovin 2508b89d96 Avoid sleep on service thread sync 2026-04-08 19:21:25 +03:00
Vladimir Dubrovin 09a3ddeeac SOCKSTRACE fixed 2026-04-08 19:21:25 +03:00
Vladimir Dubrovin 66bdd86c6b ssl_server_verify, ssl_server_ca_dir, ssl_server_ca_store added, ssl_server / ssl_client aliases added to ssl_serv / ssl_cli 2026-04-08 19:21:25 +03:00
Vladimir Dubrovin b624da443a ssl_noserv fixed, ssl_cli/ssl_nocli/ssl_client_cert/ssl_client_key added 2026-04-08 19:21:25 +03:00
Vladimir Dubrovin 3c51af3737 Remove legacy NTLMv1 code 2026-04-08 19:21:25 +03:00
Vladimir Dubrovin 7e7a0d4336 Support HAProxy proxy v1 protocol
Added:
-H option - expect HAProxy proxy v1 header, e.g. `proxy -H`

parent ha type - send HAProxy proxy v1 header (must be last in redirection), e.g.

allow *
parent 1000 ha
parent 1000 proxy 1.2.3.4 3128
socks
2026-04-08 19:21:25 +03:00
Vladimir Dubrovin e373d84717 Support tlspr in auto 2026-04-08 19:21:25 +03:00
Vladimir Dubrovin 68ff2373b4 Update workflows and makefiles (10 commits squashed) 2026-04-08 19:21:25 +03:00
Vladimir Dubrovin 8d58e2618e make compatible with openssl 1.x 2026-04-08 19:21:24 +03:00
Vladimir Dubrovin 1bfa64303a rsa.h not required 2026-04-08 19:21:24 +03:00
Vladimir Dubrovin 81224b6708 Use PCRE_STATIC pcre_plugin.c 2026-04-08 19:21:24 +03:00
Vladimir Dubrovin 6944a012d9 use PCRE_STATIC 2026-04-08 19:21:24 +03:00
Vladimir Dubrovin 7652a9bba1 Update workflows and makefiles (7 commits squashed) 2026-04-08 19:21:24 +03:00
Vladimir Dubrovin cb368e0792 Update README 2026-04-08 19:21:23 +03:00
Vladimir Dubrovin e20584cb2e Update README 2026-04-08 19:21:23 +03:00
z3apa3a f23fc4fc44 mention https:// proxy in README 2025-03-10 00:51:43 +03:00
z3apa3a 3668634781 Update readme for 0.9.5 2025-03-10 00:46:46 +03:00
Vladimir Dubrovin 46a230ebd3 Merge branch 'master' of https://github.com/3proxy/3proxy 2025-03-10 00:37:18 +03:00
z3apa3a e8e1bdfbf1 switch windows / arm to DLL version of OpenSSL 2025-03-10 00:36:05 +03:00
Vladimir Dubrovin a5f1f08b60 Use non-static openssl libs for windows arm64 2025-03-09 20:55:23 +03:00
z3apa3a 926ef71ba0 Fix Makefile.Linux 2025-03-09 19:51:17 +03:00
z3apa3a bc92819572 Fix tlspr for compatibility with older compileres 2025-03-09 19:16:35 +03:00
z3apa3a a76dd93e86 Add tlspr to install section 2025-03-09 18:38:04 +03:00
z3apa3a 2900b80d88 Prepare for 0.9.5 release 2025-03-09 17:29:17 +03:00
z3apa3a d7b0061626 Fix ssl_plugin for windows building 2025-03-09 17:26:50 +03:00
z3apa3a 74134db09e Fix ssl_plugin for Windows 2025-03-09 17:22:18 +03:00
Vladimir Dubrovin 878025598b tlspr (SNI proxy) documented 2025-03-09 15:03:06 +03:00
Vladimir Dubrovin 6387bed4f2 Replace strcpy with memmove for overlapping regions 2024-12-20 14:38:58 +03:00
Vladimir Dubrovin cb6a4166b7 Use -fPIC instead of -fPIE 2024-09-11 18:34:40 +03:00
Vladimir Dubrovin cf6946cc8b Fix: IPv6 address may be invalid on some plafrorms for SOCKSv5 UDP ASSOCIATE 2024-07-18 12:50:59 +03:00
Vladimir Dubrovin ab8db00b1f Fix type for ssl_poll 2024-06-04 19:26:34 +03:00
Vladimir Dubrovin 94dfa195db char * / unsigned char * conversions fixed 2024-05-31 19:53:28 +03:00
Vladimir Dubrovin fb4ab5d07f Remove accidentely added binary 2024-05-20 13:44:50 +03:00
Vladimir Dubrovin 57f11d8a0f Add tlspr binary to git ignore 2024-05-20 13:41:55 +03:00
Vladimir Dubrovin 013d4bc333 tlspr (SNI proxy) implemented
Options -cN - level of TLS check
default - allow non-TLS traffic
1 - require TLS, only check client HELLO packet
2 - require TLS, check both client and server HELLO
3 - require TLS, check server send certificate (not compatible with TLS 1.3)
4 - require mutual TLS, check server send certificate request and client sends certificate (not compatible with TLS 1.3)
-P - default port

examples:

1.
tlspr -p1443 -P443 -c1
(port 1443 may be used to redirect traffic to destination port 143). SNI is used to find destination host

2.
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

attempts to take destination hostname from SNI in SOCKS
2024-05-20 13:01:38 +03:00
Vladimir Dubrovin 29ef226b3c Обновлена документация 2024-03-10 17:01:54 +03:00
Vladimir Dubrovin d347f0a058 More TLS commands added, ssl_srvkey / ssl_srvfile renamed
ssl_server_cert - certificate for SSL server (rename from ssl_srvkey)
ssl_server_key - key for ssl_server_cert of generated mirm certificate (renamed from ssl_srvkey)
ssl_server_ca_file - CA file for mitm
ssl_server_ca_key - key for mitm CA
ssl_client_ca_file, ssl_client_ca_dir, ssl_client_ca_store - locations for root CAs used with ssl_client_verify for TLS client
ssl_certcache is not optional, if ssl_server_ca_file / ssl_server_ca_key are configured
2024-03-10 16:20:42 +03:00
Vladimir Dubrovin a316622a85 Added multiple TLS configuration parameters for SSLPlugin
ssl_client_ciphersuites - TLS client ciphers for TLS 1.3, e.g. ssl_client_ciphersuites TLS_AES_128_GCM_SHA256
ssl_server_ciphersuites - TLS server ciphers for TLS 1.3
ssl_client_cipher_list - TLS client ciphers for TLS 1.2 and below , e.g. ssl_client_cipher_list ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-CHACHA20-POLY1305
ssl_server_cipher_list - TLS server ciphers for TLS 1.2 and below
ssl_client_min_proto_version - TLS client min TLS version (e.g. TLSv1.2)
ssl_server_min_proto_version - TLS server min TLS version (e.g. TLSv1.2)
ssl_client_max_proto_version - TLS client max TLS version (e.g. TLSv1.2)
ssl_server_max_proto_version - TLS server max TLS version (e.g. TLSv1.2)
ssl_client_verify - verify certificate for upstream server in TLS client functionality
ssl_client_no_verify - do not verify certificate for upstream server in TLS client functionality (default)
2024-03-10 13:36:40 +03:00
Vladimir Dubrovin d87241c487 Keep TLS server context 2024-03-09 18:37:44 +03:00
Vladimir Dubrovin 144af547fb Keep TLS client context between requests 2024-03-09 16:23:03 +03:00
Vladimir Dubrovin 35d1de6f5e Ffix use-after-free in freeparam 2024-02-22 17:30:50 +03:00
Vladimir Dubrovin a592f07783 Update SSLPlugin documentation 2024-02-19 00:13:08 +03:00
Vladimir Dubrovin 161cbbd452 fix crash on insufficient memory 2024-02-18 23:54:31 +03:00
Vladimir Dubrovin 067fdd7f95 support ssl_serv / ssl_noserv commands
example:
plugin /path/to/SSLPlugin.so ssl_plugin
ssl_srvcert path_to_cert
ssl_srvkey path_to_key
ssl_serv
proxy -p33128
ssl_noserv
proxy -p3128
2024-02-18 23:42:09 +03:00
Vladimir Dubrovin d77e528847 minor fixes 2024-02-18 20:18:31 +03:00
Vladimir Dubrovin 2b4d8e67e4 Do not store CA cert subject 2024-02-18 19:53:35 +03:00
Vladimir Dubrovin 375e3a74d0 call local socket function 2024-02-18 19:41:45 +03:00
Vladimir Dubrovin 6dc145b16b initial commit to TLS refactoring 2024-02-18 19:07:09 +03:00
Vladimir Dubrovin d162ad5c38 Fix windows issues 2024-02-17 18:53:58 +03:00
Vladimir Dubrovin 8198db8617 adding state to socket functions 2024-02-17 17:31:25 +03:00
Vladimir Dubrovin d83c1f47f8 Rollback commit in the wrong branch 2024-02-17 13:18:14 +03:00
Vladimir Dubrovin 20a929ca53 Add per-service sockfuncs 2024-02-17 12:57:36 +03:00
Vladimir Dubrovin a80bef9ecf Merge pull request #978 from tautschnig/fix-decls
Fix plugin declarations of hashindex and nametohash
2023-10-11 17:00:48 +03:00
Michael Tautschnig 687ebafb1b Fix plugin declarations of hashindex and nametohash
Plugins using these would fail to provide the required arguments.
2023-10-11 10:00:47 +00:00
Vladimir Dubrovin 5e2b2a399e clean up warnings 2023-07-13 15:29:26 +03:00
Vladimir Dubrovin 5f341806b7 Deadloc on traffcount fixed 2023-07-13 13:13:36 +03:00
Vladimir Dubrovin 00513a7d28 eliminate redundant code in previous fix 2023-07-12 17:21:46 +03:00
Vladimir Dubrovin dc7e098e6b Support request filters for SOCKS, support broken BIND request from some clients 2023-07-12 15:55:50 +03:00
Vladimir Dubrovin 8b57982a09 Fix FreeBSD install 2023-06-10 12:22:59 +03:00
Vladimir Dubrovin cebb45c095 Fix FreeBSD install secrion 2023-06-01 11:42:16 +03:00
Vladimir Dubrovin 13979b5df4 Allow hostnames in parent 2023-04-26 15:05:47 +03:00
Vladimir Dubrovin 782878b5b4 Fix github links 2023-04-26 15:04:24 +03:00
Vladimir Dubrovin 6532163f01 Fix connlim issues 2023-04-26 15:04:00 +03:00
Vladimir Dubrovin 862405bdfd set linger close to setsockopt 2022-12-23 17:58:15 +03:00
Vladimir Dubrovin c716c67da2 Merge pull request #840 from DanWin/increase-listen-backlog
Add backlog configuration
2022-11-08 19:51:40 +03:00
Daniel Winzen b94e1fc01f Few more changes 2022-11-08 16:02:47 +01:00
Daniel Winzen cc0fd518bd Incorporate feedback from z3APA3A 2022-11-08 15:42:04 +01:00
Daniel Winzen 9a6908e623 Add backlog config option 2022-11-08 15:04:19 +01:00
Daniel Winzen 65e57a251d Clarify use of maxconn in man page 2022-11-08 13:25:05 +01:00
Daniel Winzen 25c375a78a Increase backlog of listening sockets to match maxconn 2022-11-03 23:24:25 +01:00
Vladimir Dubrovin a22e2be77b Merge pull request #838 from DanWin/linux-tcp-fastopen
Add support for TCP_FASTOPEN_CONNECT and TCP_FASTOPEN socket options
2022-11-02 10:57:40 +03:00
Daniel Winzen 8a160dd188 Add support for TCP_FASTOPEN_CONNECT and TCP_FASTOPEN socket options (linux) 2022-11-01 20:11:26 +01:00
Vladimir Dubrovin fb56b7d307 "auto" command added 2022-10-18 17:58:52 +03:00
Vladimir Dubrovin 5165a4d5bd prevent use-after-free in smtpp 2022-08-31 14:34:48 +03:00
Vladimir Dubrovin bac19c9ae6 Close service only after config mutex unlocked on reload 2022-08-12 19:18:52 +03:00
Vladimir Dubrovin c98621aeef Always select between IPV6_BOUND_IF and IP_BOUND_IF 2022-06-29 10:35:17 +03:00
Vladimir Dubrovin 3dc698eccd Fix compilation issues 2022-06-29 10:18:36 +03:00
Vladimir Dubrovin c1beceb24b Support IP_BOUND_IF on MacOS 2022-06-28 12:50:48 +03:00
Vladimir Dubrovin 4ad05d1565 add handleredirect() to symbols 2022-06-24 10:44:28 +03:00
Vladimir Dubrovin 55d1bbe155 Grace delay feature added
`proxy -g8000,3,10`

First parameter is average read size we want to keep, second parameter is
minimal number of packets in the same direction to apply algorythm,
last value is delay added after polling and prior to reading data.
An example above adds 10 millisecond delay before reading data if average
polling size is below 8000 bytes and 3 read operations are made in the same
direction. It's specially usefule with splice. `logdump 1 1` is useful
to see how grace delays work, choose delay value to avoid filling the read
pipe/buffer (typically 64K) but keep the request sizes close to chosen average
on large file upload/download.
2022-05-19 18:51:02 +03:00
Vladimir Dubrovin 8a8622b30f FIX: SSLPlugin for tcppm 2022-05-19 15:42:18 +03:00
Vladimir Dubrovin 1cf169b7ae FIX: SSLPlugin with SOCKS 2022-05-19 13:26:52 +03:00
Vladimir Dubrovin d20e76bbc9 FIX: SSLPlugin with http proxy 2022-05-19 11:49:19 +03:00
Vladimir Dubrovin 468124f55c Fix SSLPlugin with HTTP proxy 2022-05-18 18:14:24 +03:00
Vladimir Dubrovin 17f07f2053 Update udppm.c 2022-04-25 16:45:49 +03:00
Vladimir Dubrovin 6d77141ecc Update socks.c 2022-04-25 13:09:55 +03:00
Vladimir Dubrovin 7e681bbacd Update common.c
Process failed connect more correcly
2022-04-07 20:19:49 +03:00
Vladimir Dubrovin 266e62644c Fix RADIUS Login-Service/Login-TCP-Port length 2022-02-22 15:45:23 +03:00
Vladimir Dubrovin f53b0eb985 fix invalid length in previous commit 2021-11-25 12:21:06 +03:00
Vladimir Dubrovin bd1dcacf73 Fix domain name reply processing on connect request for parent proxy 2021-11-24 22:53:14 +03:00
Vladimir Dubrovin e1448b9eb1 connlim error code corrected (should return 10) 2021-11-24 18:22:04 +03:00
Vladimir Dubrovin 70b14394b0 Change minumum DNS cache time to 1 sec 2021-10-30 13:43:20 +03:00
Vladimir Dubrovin 6c1b711fc9 do not ignore Makefile from plugins 2021-10-29 19:26:20 +03:00
Vladimir Dubrovin 34c4162cea Update Makefile.FreeBSD 2021-10-29 19:25:58 +03:00
Vladimir Dubrovin 461fae12e7 set logfunc after configuration reload 2021-10-29 19:12:03 +03:00
Vladimir Dubrovin e8203ac3a5 Merge branch 'master' of https://github.com/3proxy/3proxy 2021-10-29 18:56:25 +03:00
Vladimir Dubrovin beaa8777bb Add RuntimeDirectory for systemd 2021-10-29 18:56:23 +03:00
Vladimir Dubrovin 9254688d07 Merge pull request #684 from victor-rds/arm_docker
Add support to Docker images for ARM platforms
2021-10-29 17:43:56 +03:00
Vladimir Dubrovin daa2b74354 Merge branch 'master' of https://github.com/3proxy/3proxy 2021-10-21 19:57:06 +03:00
Vladimir Dubrovin bec6e589fb extNat implemented incorrectly, removing current support 2021-10-21 19:57:02 +03:00
Vladimir Dubrovin f9347c2f8b Allow all-zero IP and port for BIND and UDP ASSOC 2021-10-21 19:56:09 +03:00
Victor R. Santos 0d47a1eee3 Update Dockerfiles, fix builds on ARM plaforms
- Add support to ARM64, ARM/v7 and ARM/v6 devices
- Remove hardcoded "/lib/x86_64-linux-gnu" path
- Move libdl.so.* to a common location
- Format code to keep consistency between dockerfiles
2021-10-04 16:41:44 -03:00
Vladimir Dubrovin 58cf0d8def do not create pid file in default configuration 2021-10-01 15:56:56 +03:00
z3apa3a 5fa261e91e Send accounting start packet if log radius is enabled 2021-07-02 18:38:21 +03:00
z3apa3a b15d5bf681 Commit as 0.9.4 2021-07-02 12:01:43 +03:00
z3apa3a e1b4e50242 Copyright update 2021-07-02 11:50:33 +03:00
z3apa3a 346880eb2e debian files 2021-07-01 19:59:57 +03:00
z3apa3a e607c8b5d0 remove icqpr references from specs 2021-07-01 19:58:12 +03:00
z3apa3a 1fca6ada82 Use self-built openssl for Windows 2021-07-01 19:55:20 +03:00
z3apa3a d7eb9fb82f better error handling on splice() 2021-05-18 11:34:57 +03:00
z3apa3a 1bd6eff0e6 Update sockmap.c 2021-05-17 18:12:50 +03:00
z3apa3a e642100271 Merge branch 'master' of https://github.com/3proxy/3proxy 2021-05-15 18:42:30 +03:00
z3apa3a aac5c9fff9 More accurate error handling on socket mapping 2021-05-15 18:42:17 +03:00
Vladimir Dubrovin e235ada0de Make SSLPlugin to compile under *nix 2021-05-11 13:53:41 +03:00
Vladimir Dubrovin 7335bc2fb6 Do not change error code >10 on redirection 2021-04-29 14:01:07 +03:00
z3apa3a 3f4c267a25 Use logic operation instead of binary where appropriate 2021-04-22 17:59:10 +03:00
z3apa3a 6279e86086 Do not terminate connection on POLLHUP if there is a data to read 2021-04-22 16:59:07 +03:00
z3apa3a cc2979ee5b use uint16 instead of char 2021-04-22 11:26:18 +03:00
z3apa3a bad85a3d51 Support IPv6 subnets in parent extip 2021-04-21 20:39:57 +03:00
z3apa3a 36f16fb899 Better connection error handling in 'proxy' 2021-04-21 17:35:17 +03:00
z3apa3a 5f550c9107 change code for getpeername() error 2021-04-21 16:36:34 +03:00
z3apa3a 47c1640223 remove icqpr man 2021-04-15 17:52:24 +03:00
Vladimir Dubrovin 681182b1e5 Fix: '-' sign incorrectly parsed in hostname ACL, bandlim race condition on configuration reload 2021-04-15 12:26:34 +03:00
Vladimir Dubrovin 9fae0082a3 Change clean command for BSD 2021-01-22 18:17:09 +03:00
z3APA3A c30065256f Use so._closesocket instead of socket (compilation issues on non-Windows) 2021-01-20 17:55:09 +03:00
z3APA3A cbe0c2f511 parentretries command added 2021-01-19 14:40:18 +03:00
z3APA3A 1f2bdd7b80 Update version.h
version year update
2021-01-19 14:37:36 +03:00
z3APA3A 0c902525e5 commit as 0.9.3 2020-12-03 21:14:59 +03:00
z3APA3A 129d26475e Fixed: counters incorectly shown in webadmin, contall/nocountall are not applied 2020-12-02 20:08:03 +03:00
z3APA3A 29f8867a9e fix the compilation warning 2020-12-02 11:13:55 +03:00
z3APA3A 252c4cb36b set 1 for release in specs 2020-12-01 18:20:13 +03:00
z3APA3A 07603ceea7 & is not required for systemd 2020-12-01 11:19:43 +03:00
z3APA3A 8ec14c131d Do not fail on clean 2020-11-29 14:00:19 +03:00
z3APA3A 1225dbced7 hostname (%n) may by incomlete in log on long record 2020-11-29 12:47:58 +03:00
z3APA3A 3cd9bdffcb Update README for docker images 2020-11-28 03:18:11 +03:00
z3APA3A 336a4acd46 Update dockerfiles 2020-11-28 02:45:36 +03:00
z3APA3A c5abe51e26 fix adding proxy account 2020-11-27 19:36:21 +03:00
z3APA3A 31062bdc3c Create Dockerfile.minimal 2020-11-27 15:49:13 +03:00
z3APA3A 8943099dfb extip parent type documented 2020-11-27 15:48:59 +03:00
z3APA3A 09f007e741 http supported in parent name resolution 2020-11-25 17:09:54 +03:00
z3APA3A 4487fd4a73 typo corrected 2020-11-25 17:06:06 +03:00
z3APA3A 5498a79115 add builddate (if defined) to rc 2020-11-24 20:43:30 +03:00
z3APA3A 9c7fc9fddc correct clean 2020-11-24 20:05:49 +03:00
z3APA3A 4d63f957c2 Fix for connect back 2020-11-23 18:58:33 +03:00
z3APA3A 828e00e668 correct afterclean 2020-11-22 02:15:42 +03:00
z3APA3A 3ba16310c5 del res files in afterclean 2020-11-22 02:15:24 +03:00
z3APA3A 7aaa9c18dd build rc file from res 2020-11-22 02:14:53 +03:00
z3APA3A 72923879a3 Make rc file non-version specific 2020-11-21 18:36:39 +03:00
z3APA3A b1cc2c7c70 Label as 0.9.2 2020-11-21 11:27:43 +03:00
z3APA3A d88c927ba9 allow overwrite CC for linking 2020-11-20 14:19:47 +03:00
z3APA3A cf58e62baa rm makefile on clean 2020-11-20 13:49:17 +03:00
z3APA3A daf4a56665 Remove .o and binaries after clean 2020-11-20 13:30:38 +03:00
z3APA3A 05bc297ea7 Fixed SSLPlugin handling 2020-11-19 23:22:15 +03:00
z3APA3A 7ea9ec89be update changelog and spec for 0.9.2 2020-11-19 10:39:37 +03:00
z3APA3A f23b6b0d96 export pcre_options 2020-11-19 02:52:47 +03:00
z3APA3A d2dcf4bb69 better dat filters handling 2020-11-19 02:30:19 +03:00
z3APA3A 1ff0fabf15 switching version to 0.9.2 2020-11-18 18:45:32 +03:00
z3APA3A e013cc2ab8 remove unneeded fseek 2020-11-18 17:55:23 +03:00
z3APA3A 99a744abda Few bugfixes 2020-11-18 16:10:07 +03:00
z3APA3A 062d60e9d6 README updated 2020-11-17 12:45:44 +03:00
z3APA3A b777ffec66 RH man handling is arch dependant 2020-11-13 21:00:28 +03:00
z3APA3A 8a2050e7fa remove FAQ from index 2020-11-13 19:58:55 +03:00
z3APA3A 9fbb88238e support cross building 2020-11-13 19:50:39 +03:00
z3APA3A 36f8cde2fb remove unused float variable 2020-11-13 11:39:13 +03:00
z3APA3A f64cd475af Do not set sigmask for thread in standalone service 2020-11-13 11:01:14 +03:00
z3APA3A a29d2ab66b readme update 2020-11-13 03:20:37 +03:00
z3APA3A fd1b7ce2a2 Commit as 0.9.1 2020-11-13 02:56:03 +03:00
z3APA3A e0ccb34c10 Add LimitNOFILE/LimitNPROC for systemd 2020-11-13 02:09:43 +03:00
z3APA3A ba29f38959 update gitignore 2020-11-13 02:09:26 +03:00
z3APA3A a6dfc81e98 debian files corrected 2020-11-12 17:43:18 +03:00
z3APA3A fe05526472 do not ingore changelog 2020-11-12 16:30:05 +03:00
z3APA3A a6445334e2 initial implementation of debian building rules 2020-11-12 16:24:00 +03:00
z3APA3A e5db29d1cb spec file added for rpm build 2020-11-12 03:20:15 +03:00
z3APA3A 7bf7de53b2 start 3proxy without daemon to keep pid 2020-11-12 03:00:34 +03:00
z3APA3A 312c40359c make Makefile.Linux more suitable for packaging + support systemd 2020-11-12 01:57:25 +03:00
z3APA3A 021314d6f5 Fix bandlim handling 2020-11-11 17:40:46 +03:00
z3APA3A ff67464aa1 Do not fail users without argument 2020-11-11 17:35:06 +03:00
z3APA3A c113f236e4 FAQ moved to HowTo 2020-11-10 14:40:44 +03:00
z3APA3A 596dee0c5b typo corrected 2020-11-05 17:43:03 +03:00
z3APA3A 32d5dc05c3 More accurate bandlim hangling 2020-11-05 16:09:13 +03:00
z3APA3A 3a31da9b3d fixed error in previous commit 2020-11-03 14:48:55 +03:00
z3APA3A 9356db8de6 Minor memory handling changes 2020-11-03 13:39:56 +03:00
z3APA3A dbbbe59ef2 Fix acl copy / auth copy out-of-memory error 2020-11-03 11:16:04 +03:00
z3APA3A c1c5875356 better memory allocation errors handling, countall/nocountall corrected 2020-11-03 02:05:18 +03:00
z3APA3A b81089f22e More correct handling of insufficient memory 2020-11-02 18:59:13 +03:00
z3APA3A ee0eac51d6 Remove RDHUP processing
Do not actually need it, may lead to connection closed before all data
read
2020-11-02 16:10:04 +03:00
z3APA3A 6ecb4993fd readme update 2020-10-31 02:31:18 +03:00
z3APA3A 285a7e6765 Commit as 0.9.0 2020-10-22 11:38:44 +03:00
z3APA3A b2f82ed04f More accurate conditions in sockmap's main event loop 2020-10-19 13:11:44 +03:00
z3APA3A 01ec2f12d5 fail portmapping if name can not be resolved 2020-10-16 23:13:07 +03:00
z3APA3A 624c3e6ae1 correct IPv6 parsing where hostname is expected 2020-10-16 22:51:02 +03:00
z3APA3A 0d713dacc1 README updated 2020-10-16 02:35:01 +03:00
z3APA3A 582f9d7be4 Minor documentation update 2020-10-15 18:39:47 +03:00
z3APA3A 3f2659cb0f Use MAXFAILATTEMPT to limit socket failuers 2020-10-15 16:44:32 +03:00
z3APA3A aeb0f4caa5 Better handle socket closing 2020-10-15 16:27:39 +03:00
z3APA3A 22555b58ec Do not sigmask main thread for standalone services 2020-10-15 16:00:43 +03:00
z3APA3A 5448329c8a Document RADIUS support 2020-10-15 12:25:33 +03:00
z3APA3A a8b000b7f1 Allow to specify binding address for RADIUS 2020-10-15 12:21:46 +03:00
z3APA3A edaee895e6 Merged from devel as 0.9.0-rc 2020-10-15 02:16:20 +03:00
z3APA3A 47f1bbc8d7 Merge branch 'master' into devel 2020-10-15 01:49:04 +03:00
z3APA3A c9097154c6 ignore version 2020-10-15 01:38:13 +03:00
z3APA3A 9f6a8460ac limit failed mapping attempts to 13 2020-10-15 01:17:10 +03:00
z3APA3A 637cb2e76d adding guard for polling loop to prevent CPU exhastion in the case of system misbihavior 2020-10-14 18:58:52 +03:00
z3APA3A 47affa0add Correct returning 98 code from socksmap 2020-10-14 16:15:11 +03:00
z3APA3A eb829b062b Major code refactoring
- sockmapping rewritten from stratch to minimilse polling. poll() is now
only called if blocking is actually expected, splice pipes are now
polled if splice fails, buffers flushing is much more accurate.
- logging code moved to separate files
- signal masks added to client threads to prevent unneeded interruptions
- bandwidth limitation will not delay the thread after client or server
shutdown
2020-10-09 15:42:34 +03:00
z3APA3A 3dd1969657 Move logging to log.c 2020-10-07 19:03:59 +03:00
z3APA3A b6629850e5 Revert "index file re-generated"
This reverts commit e3840d2258.
2020-10-07 11:50:51 +03:00
z3APA3A e3840d2258 index file re-generated 2020-10-07 11:42:01 +03:00
z3APA3A 8c92470124 countall, nocountall -N options are documented 2020-10-07 11:35:51 +03:00
z3APA3A 024c0fb749 countall, nocountall, -N options are documented 2020-10-07 11:35:20 +03:00
z3APA3A ebd7b34159 -N(NAT_address) option added for socks 2020-10-07 11:21:01 +03:00
z3APA3A d0725163d1 countall / nocountall ssupport added 2020-10-06 14:29:08 +03:00
z3APA3A cc6ec2445c Do not overwrite connection for HTTP "upgade" 2020-08-18 18:43:22 +03:00
z3APA3A 1075370594 Don't terminate connection on datagram sending issue in SOCKSv5 UDP ASSOCIATE 2020-08-08 13:56:34 +03:00
z3APA3A 1fd759d327 Correct typo (name resolution could fail on some platforms) 2020-08-07 12:14:03 +03:00
z3APA3A dd75eaa35e Link with -fPIE for Linux 2020-08-07 11:20:29 +03:00
z3APA3A c30b4637a5 Do not resolve hostname to IP on ACL destination 2020-08-06 17:57:50 +03:00
z3APA3A 8c511a19e9 Do not resolve hostname to IP on ACL destination 2020-08-06 17:56:28 +03:00
z3APA3A 35153001ed Use -fPIC instead of -fpic 2020-08-06 16:19:55 +03:00
z3APA3A 3b5fa46e27 Change Proxy-authorization to Proxy-Authorization for compatiblity with RFC ignorant upstreams 2020-07-02 18:34:37 +03:00
z3APA3A 19eef46d7e Compile error in last commit corrected 2020-06-23 11:17:32 +03:00
z3APA3A c532958b9f Do not cache external port 2020-06-17 16:14:34 +03:00
z3APA3A 936724f4f7 documentation updated for authcachtype 2020-06-17 16:14:23 +03:00
z3APA3A 1e7e94d7ac corrected 'acl' and 'ext' cach types added with previous commit
acl - allows to bind cache entry to ACL to prevent caching
authentication for different services
ext - allows to cache external address
both options are useful with RADIUS
2020-06-17 16:09:28 +03:00
z3APA3A 859713d10f Fail if can not bind to device 2020-06-17 16:05:23 +03:00
z3APA3A 9eac5c13a8 Correct wildcard hostname compare and make it case-insensitve where possible 2020-04-11 11:34:08 +03:00
z3APA3A 041134007d Correct ip/network/hostname parsing in ACLs 2020-04-11 09:58:47 +03:00
z3APA3A 37c380f4f7 Documentation example corrected 2019-12-04 17:56:06 +03:00
z3APA3A 9996856698 Send Basic vs basic for Basic HTTP auth to deal with reportedly broken implementation 2019-10-16 11:29:07 +03:00
z3APA3A 22cf9254c5 rename memory functions in pluginlink 2019-09-03 20:46:47 +03:00
z3APA3A e7e7d2fddf "limit" support in authcache to bind sessions to ip 2019-08-21 15:20:43 +03:00
z3APA3A 336b411ea2 do not use "my" prefix for memory functions in pluginlink 2019-08-19 12:35:36 +03:00
z3APA3A cb217d79c1 Fix: IPv6 support in TransparentPlugin 2019-08-13 12:38:03 +03:00
z3APA3A 8ad8a9ccd2 Remove unsupported "myalloc" code 2019-08-13 12:36:55 +03:00
z3APA3A 70ed1233fb Remove outdated LastFRipper plugin 2019-08-13 12:35:47 +03:00
z3APA3A 5471e0faf4 attempt to support IPv6 in netfilter transparent redirection 2019-08-12 14:11:08 +03:00
z3APA3A e85b064b52 Commit as 0.8.13 2019-08-01 17:54:28 +03:00
z3APA3A 9f6c0b5b8d Fix: $ is ignored in the begginning of quoted line 2019-08-01 16:54:40 +03:00
z3APA3A 3b67dc8447 Fix: out-of-bounds write and few more bugs in 'admin' configuration upload 2019-08-01 16:49:26 +03:00
z3APA3A bf4ef2284b Fix: out-of-bounds write and few more bugs in 'admin' configuration upload 2019-08-01 16:46:22 +03:00
z3APA3A 19203381db documentation update 2019-08-01 16:44:30 +03:00
z3APA3A 4e2d4d56ac Do not add admin user by default 2019-08-01 16:43:56 +03:00
z3APA3A a905d00008 documentation update 2019-06-26 16:52:55 +03:00
z3APA3A 38a1ab80bc minor changes 2019-06-20 11:19:58 +03:00
z3APA3A 43b4c893ad Minor documentation updates 2019-06-20 11:18:13 +03:00
z3APA3A 96c28c6cba man update 2019-03-25 18:01:14 +03:00
z3APA3A 189b227853 typo in Makefile.Linux corrected 2019-03-05 15:03:24 +03:00
z3APA3A d89134be33 minor doc update 2019-03-05 15:02:04 +03:00
z3APA3A 3a1f8c2328 typo corrected 2019-02-22 17:16:36 +03:00
z3APA3A 158bacc087 Highload documentation update 2019-02-22 17:05:22 +03:00
z3APA3A b88d07a1a7 Minor make install changes 2019-02-21 17:44:11 +03:00
z3APA3A e07054e8d0 minor man update 2019-02-21 17:41:54 +03:00
z3APA3A 536c8327ff Minor man updates 2019-02-14 18:35:12 +03:00
z3APA3A 0565cf050b Linux installation: do not allow proxy account to write to chrooted config dir 2019-02-08 12:34:44 +03:00
z3APA3A ac429c8d52 minor README correction 2019-01-28 18:05:48 +03:00
z3APA3A 09507a2fe9 prevent warnings in proxymain 2019-01-25 23:40:35 +03:00
z3APA3A 5ee553e9a9 Correct: do not log 98/99 as an error 2019-01-20 17:52:00 +03:00
z3APA3A eed6e2962e Do not log events 98 and 99 as errors 2019-01-20 17:33:35 +03:00
z3APA3A 76b040bfb8 minor man update 2019-01-17 17:31:15 +03:00
z3APA3A 941baaa311 minor man update 2019-01-17 17:24:42 +03:00
z3APA3A 92fbb0d2f5 More minor documentation updates 2019-01-17 12:26:38 +03:00
z3APA3A 1c7ce8744c Minor doc update 2019-01-17 12:08:25 +03:00
z3APA3A 02d52e89e9 Fix: config change may stop log rotation 2019-01-15 11:51:10 +03:00
z3APA3A d7373be071 Revert "Fixed: logrotation may stop after config change"
This reverts commit ede4aee619.
2019-01-14 20:14:08 +03:00
z3APA3A ede4aee619 Fixed: logrotation may stop after config change 2019-01-14 18:02:16 +03:00
z3APA3A 8af9ea8de8 back to non-blockin splice on sending 2019-01-11 23:26:52 +03:00
z3APA3A 603ab8187f make spliced sockmap more reliable 2019-01-11 23:10:39 +03:00
z3APA3A 953959efab print file descriptors 2019-01-11 19:38:34 +03:00
z3APA3A 480f999d21 Add _GNU_SOURCE to compile options for Linux 2019-01-11 19:17:44 +03:00
z3APA3A 03efdc451b Add POLLRDHUP support to spliced sockmap 2019-01-11 19:12:03 +03:00
z3APA3A 54e9f9cedd Highload docs correction 2019-01-11 19:11:31 +03:00
z3APA3A 930d9823ea Use futex instead of pthread_mutex on Linux 2018-12-28 18:49:45 +03:00
z3APA3A 6fe36b01d1 Fixed: admin always starts with -s under Linux 2018-12-28 12:45:52 +03:00
z3APA3A dec10d4edd Add rundir creation to linux start script 2018-12-28 12:45:15 +03:00
z3APA3A 37cebe08af Disable strict aliasing and add stripping for MIPS cross compile example makefile 2018-12-07 14:26:11 +03:00
z3APA3A 3f2e621902 Correct socket polling on mapping 2018-12-06 00:32:37 +03:00
z3APA3A b7e3a85e88 Use non-blocking splice only on write to socket
to prevent race condition data is not copied to the pipe yet
2018-12-05 23:41:37 +03:00
z3APA3A 79ea433caf Can go to 100% CPU if one side have closed connection 2018-12-05 21:44:59 +03:00
z3APA3A a0591c9786 Fix: $ is ignored in the begginning of quoted line 2018-12-05 14:21:03 +03:00
z3APA3A cc503ba925 Add IPv6 hostname question to FAQ 2018-07-04 00:56:33 +03:00
z3APA3A 68823c2921 Fix sockets option parsing 2018-05-25 18:19:19 +03:00
z3APA3A 46be58ab1d Add filename to XML data 2018-05-22 19:15:31 +03:00
z3APA3A 3d9ac1e1fb Flush splice pipe on socket close 2018-05-12 01:19:11 +03:00
z3APA3A 68fed46ea0 fix 'radius' is not applied correctly on configuration reload 2018-05-11 16:23:05 +03:00
z3APA3A 92b3dd8638 Use overloadable poll 2018-05-05 20:07:59 +03:00
z3APA3A d8b5900be6 Update Makefile.BSD 2018-05-05 20:07:26 +03:00
z3APA3A 20fa72bd42 Add connback timeouts / improve logging 2018-05-05 19:59:37 +03:00
z3APA3A eb09ae7c58 Support socket options for connback sockets and connection timeouts 2018-05-05 17:16:51 +03:00
z3APA3A b8127257f9 Remove pstdin.h 2018-05-01 18:30:04 +03:00
z3APA3A a5f7222a19 minor README correction 2018-04-28 18:27:45 +03:00
z3APA3A b56c294c01 Update highload.html with splice() requirements 2018-04-28 01:56:13 +03:00
z3APA3A b583e423c8 Install plugins to /usr/local/3proxy/libexec 2018-04-27 22:18:26 +03:00
z3APA3A 951304e18e Send Connection instead of Proxy-Connection to parent proxy 2018-04-27 22:17:37 +03:00
z3APA3A 0376e54196 simlify sockgetline 2018-04-27 19:23:20 +03:00
z3APA3A 572a5b3c34 Fixed: socks fails on 1-character username or password 2018-04-27 15:09:18 +03:00
z3APA3A 9bd81a18b9 Use native OpenSSL 1.0 static build for Windows 2018-04-27 01:54:28 +03:00
z3APA3A f35f0a0608 Print counters traffic in megabytes in admin 2018-04-27 01:53:10 +03:00
z3APA3A 12b5ad143f correct trafic accounting in spliced map 2018-04-27 01:52:08 +03:00
z3APA3A 73438cc378 use useradd in make install 2018-04-25 17:30:10 +03:00
z3APA3A f860ea9e54 Install chrooted configuration with make install on linux 2018-04-25 17:14:03 +03:00
z3APA3A 836fffddbe Include openssl/applink.c in windows plugin DLL 2018-04-25 14:38:32 +03:00
z3APA3A 4a9b924064 Readme update 2018-04-25 02:53:40 +03:00
z3APA3A 4fce1f41b5 update readme 2018-04-25 02:52:31 +03:00
z3APA3A 46630a9b1b move installation to beginning 2018-04-25 02:51:18 +03:00
z3APA3A 52ec3738d8 README update 2018-04-25 02:47:25 +03:00
z3APA3A 775530e28e Correct make install and installation scripts for Linux 2018-04-25 02:40:11 +03:00
z3APA3A 1af6e65fba Fix getting group id by groupname 2018-04-24 19:21:35 +03:00
z3APA3A acc64b03fd Fix recently broken admin -s 2018-04-23 13:49:39 +03:00
z3APA3A 0f9a9d6e37 Fix redirection to http in lite version 2018-04-23 02:34:36 +03:00
z3APA3A 8d36bb6453 Correct install scripts to take binaries from bin/ 2018-04-23 02:24:24 +03:00
Vladimir Dubrovin b7c667a682 Bugfixes for previous commit 2018-04-23 02:00:53 +03:00
Vladimir Dubrovin 97b97a5664 Typo corrected 2018-04-23 02:00:34 +03:00
z3APA3A 531e0707cf Simplify splicemap 2018-04-23 02:00:19 +03:00
z3APA3A b3abf80a50 slicedmap - replace usleep with poll, remove SPLICE_F_MOVE
use poll instead of usleep (to get rid of potential blocking in future)
remove SPLICE_F_MOVE
2018-04-22 23:23:22 +03:00
z3APA3A fd588949c9 remove unneeded check 2018-04-22 22:44:06 +03:00
z3APA3A 0b0de0d2ee cleaunup signed/unsigned mismatch 2018-04-22 21:57:17 +03:00
z3APA3A d971601316 Rmove more icqpr related things 2018-04-22 21:46:18 +03:00
z3APA3A 24127196ce Remove ICQPR because OSCAR is outdated 2018-04-22 21:46:00 +03:00
z3APA3A 0425cbbdb5 corre usesplice setting 2018-04-22 20:30:16 +03:00
z3APA3A d2705df891 Use splice by default if no filteers set
-s0 to disable splice
2018-04-22 20:03:04 +03:00
z3APA3A a4bc89dc8f Fixed recently introduced logging bug
Logging could stop after configuration reload, introduced with
50277692f4
2018-04-22 01:12:54 +03:00
z3APA3A a42bb38d76 Use WSAPoll on Windows (except lite version) 2018-04-21 23:57:42 +03:00
z3APA3A db485dd4c4 Build binaries in bin folder 2018-04-21 22:39:55 +03:00
z3APA3A 93e410cd7a Merge remote-tracking branch 'refs/remotes/origin/devel-epoll' into devel 2018-04-21 22:36:57 +03:00
Vladimir Dubrovin 819d63caad Create binaries in bin 2018-04-21 22:34:18 +03:00
z3APA3A 78e180a054 fixed: race condition on service stop / restart
Do not close -l file descriptor while there are alive childrent
2018-04-21 17:25:01 +03:00
z3APA3A de21bd0f6a potential memory leak fixed + TCP_CORK support
potential memleak fixed in very unlikely configuration
TCP_CORK used to prevent sending request apart of headers
2018-04-21 17:05:36 +03:00
z3APA3A 39be30ba5d Simplify socket options printing
+ add supported options to 3proxy help message
2018-04-21 17:02:20 +03:00
z3APA3A e2906f1219 pass version thorugh building environment 2018-04-21 03:26:49 +03:00
z3APA3A b76b3b49fa rename static buffer 2018-04-21 01:45:09 +03:00
z3APA3A 83441eebc7 Move log buffer to stack
Move log bufer to stack and remove mutex
2018-04-21 01:37:31 +03:00
z3APA3A e469e9e369 Increase default stacksize 2018-04-21 01:29:15 +03:00
z3APA3A d1b527b523 Minor logging changes 2018-04-21 01:24:18 +03:00
z3APA3A 098b6194df Update copyright 2018-04-21 00:30:16 +03:00
z3APA3A 50277692f4 Replace fclose+fopen with freopen where possible 2018-04-21 00:30:02 +03:00
z3APA3A 819d61f5b6 3proxy.rc - add builddate to version 2018-04-20 22:44:29 +03:00
z3APA3A 63fdeb4bff MSVC ARM Makefile added 2018-04-20 21:56:04 +03:00
z3APA3A 6c3a5db52f Get rid of pstdint.h 2018-04-20 19:32:49 +03:00
z3APA3A d07500687c Commit as 0.8.12 2018-04-18 22:48:45 +03:00
z3APA3A 439373abd3 Example corrected 2018-04-18 19:36:05 +03:00
z3APA3A 8afad700f8 force / noforce commands description added 2018-04-18 19:33:31 +03:00
z3APA3A a8b79d5df5 add hostname logging to tcppm 2018-04-18 19:28:37 +03:00
z3APA3A 10a8febb0d Fix IPv4/IPv6 addresses in webadmin 2018-04-18 19:27:14 +03:00
z3APA3A 747828d3ab Move sys/timeb.h to Win32 section. 2018-04-18 19:26:27 +03:00
z3APA3A 9b8e6b33c7 UDP portmap doesn't resolve hostname in UDP packet 2018-04-18 19:23:34 +03:00
z3APA3A 05b23a840e resolving conflicts 2018-04-18 19:23:07 +03:00
z3APA3A 5c9bb58a81 Clearing LdapPlugin compilation issues 2018-04-18 19:22:43 +03:00
z3APA3A f8557187cd Conflic resolve 2018-04-18 19:19:05 +03:00
z3APA3A 23623a22ff -fno-strict-aliasing added to gcc options 2018-04-18 19:18:02 +03:00
z3APA3A 5149996b20 Added support for username/groupname
Added support for username/groupname to seuid, setgid, chroot.
2018-04-17 18:46:01 +03:00
z3APA3A 68e05d54d7 -fno-strict-aliasing added to gcc options 2018-04-16 19:35:11 +03:00
z3APA3A be5aa53106 Allow transparent client proxy with 'parent 1000 extip 0.0.0.0' 2018-04-15 00:28:59 +03:00
z3APA3A 95f79e6f02 Transparent plugin documentation updated 2018-04-15 00:05:59 +03:00
z3APA3A 25028ed1b8 support IP_ socket options 2018-04-14 23:52:38 +03:00
z3APA3A 93357d8157 Add openwrt makefile example 2018-04-14 23:52:23 +03:00
z3APA3A a0ae9ee6fa Removing unneeded checks 2018-04-06 17:45:42 +03:00
z3APA3A 7423cd0112 Clearing LdapPlugin compilation issues 2018-04-06 17:45:18 +03:00
z3APA3A dc55d2b724 UDP portmap doesn't resolve hostname in UDP packet 2018-03-06 20:01:03 +03:00
z3APA3A 22ac04576f Change SSLv23_*_method to TLS_*_method for OpenSSL 1.1 2018-02-17 18:14:59 +03:00
z3APA3A 8b548dccc7 Remove "Proxy-Connection" headers as depricated 2018-02-17 18:14:13 +03:00
z3APA3A 19d047dcbe Proxy-Connection is long time depricated, use only Connection 2018-01-26 15:42:12 +03:00
z3APA3A 6e240defdb typo in conf.c leads to infinite loop on some commands 2018-01-25 17:20:36 +03:00
z3APA3A ff91a6fe72 connlim / noconnlim commands added to support connection / connectio rate limits 2018-01-12 19:09:42 +03:00
z3APA3A e076fff33c Example corrected 2018-01-09 15:59:14 +03:00
z3APA3A 2d1720c15f Move RADIUS related code to #ifndef NORADIUS 2017-12-22 18:53:50 +03:00
z3APA3A 9ac7503c4e README update 2017-12-22 18:53:04 +03:00
z3APA3A a816ed2343 force/noforce description usage 2017-12-19 01:22:25 +03:00
z3APA3A 4a553de100 RADIUS accounting added (not optimized yet) 2017-12-19 01:22:07 +03:00
z3APA3A 8702a4c7ab force / noforce commands description added 2017-12-14 14:20:44 +03:00
z3APA3A 0bda7f332e Move sys/timeb.h to Win32 section. 2017-11-24 12:41:01 +03:00
z3APA3A d60d00b7b6 Switch to preprocessor macro for version 2017-11-07 21:56:03 +03:00
z3APA3A 6e715df9e1 Fix IPv4/IPv6 addresses in webadmin 2017-11-07 21:53:04 +03:00
z3APA3A 2a781c4a9d Fix: TransparentPlugin for *BSD ipfw 2017-11-06 18:41:36 +03:00
z3APA3A acb248c035 Remove external CFLAGS from Makefile.FreeBSD 2017-11-06 18:34:24 +03:00
z3APA3A 18e41cfbe9 add hostname logging to tcppm 2017-11-06 17:18:32 +03:00
z3APA3A 930a959779 Do not use SAISNULL in plugin 2017-10-30 18:20:14 +03:00
z3APA3A ff1a560547 Add NULLADDR to prevent dynamic linkage error under Linux 2017-10-30 18:10:25 +03:00
z3APA3A 7ba3e25813 correct makefile for FreeBSD 2017-10-30 17:29:03 +03:00
z3APA3A 4bb706d140 Use parsehostname in TransparentPlugin 2017-10-30 13:43:53 +03:00
z3APA3A 215171ad46 Publish as 0.8.11 2017-10-19 18:08:41 +03:00
z3APA3A c20a04b752 change strdup to mystrdup 2017-10-19 17:54:31 +03:00
z3APA3A 3f859fdb11 Change log location in demo scripts 2017-10-19 17:53:32 +03:00
z3APA3A 556681a829 Change EPSV reply code to 229 2017-10-19 17:49:27 +03:00
z3APA3A ee0bb55c06 EPSV support for ftppr 2017-10-19 17:49:03 +03:00
z3APA3A 2c0bc19f75 Remove static to prevent race conditions 2017-10-19 17:38:28 +03:00
z3APA3A 286aa51e78 Fix: recursion detection was not working 2017-10-19 17:31:30 +03:00
z3APA3A 145eb580e4 Fix: %n terminated log string on IPv6 address 2017-10-19 17:31:12 +03:00
z3APA3A 46211c26d2 Prevent deadlock on thread creation error 2017-10-19 17:30:47 +03:00
z3APA3A e0262c23b0 pthread_attr_destroy added to prevent memory leak on config reload 2017-10-19 17:30:22 +03:00
z3APA3A 7f80f4f958 Fix: invalid reverse check for dnsresolve 2017-10-19 17:29:30 +03:00
z3APA3A 6a54b37181 fix: do not fail external with "0.0.0.0" with NOIPV6 (lite version) 2017-10-19 17:28:42 +03:00
z3APA3A 2c8bf28065 Remove static to prevent race conditions 2017-10-18 17:07:12 +03:00
z3APA3A 8c372572fc Add check for nul address 2017-10-17 18:25:35 +03:00
z3APA3A 18c1ce0a22 Support for transparent / notransparent commands added 2017-10-17 18:00:09 +03:00
z3APA3A b99fa7aaa4 Simplify transparent + add support for BSD PF/IPF 2017-10-17 17:07:35 +03:00
z3APA3A 105522b24e Fix: recursion detection was not working 2017-10-17 15:19:47 +03:00
z3APA3A 41b7b03db2 updated to highload doc 2017-10-10 18:21:50 +03:00
z3APA3A 8e2a87421c Fix: %n terminated log string on IPv6 address 2017-10-10 18:21:34 +03:00
z3APA3A b3b76fe682 RADIUS example added 2017-10-08 23:35:39 +03:00
z3APA3A 695bfc89ac High load documentation update 2017-10-08 23:20:52 +03:00
z3APA3A 2fd9f945c8 SO_PORTSCALABILITY documented 2017-10-06 21:50:52 +03:00
z3APA3A 6bbe4181fc update to high load documentation 2017-10-06 21:39:28 +03:00
z3APA3A 29b834cf56 update for highload documentation 2017-10-06 21:17:15 +03:00
z3APA3A e588dce959 update highload documentation 2017-10-06 20:40:07 +03:00
z3APA3A 2f5265bee6 highload documentation updated 2017-10-06 18:38:27 +03:00
z3APA3A 4d3062c62a highload documentation added 2017-10-06 18:13:26 +03:00
z3APA3A 984efe193b Prevent deadlock on thread creation error 2017-09-25 17:14:13 +03:00
z3APA3A 2554f06759 pthread_attr_destroy added to prevent memory leak on config reload 2017-09-13 22:05:38 +03:00
z3APA3A ff9c94f616 Fix: invalid reverse check for dnsresolve 2017-09-08 15:53:42 +03:00
z3APA3A 8c0dc7d8c9 Change -Do option to -De (external) 2017-09-06 19:19:36 +03:00
z3APA3A b033b150b1 change strdup to mystrdup 2017-08-16 12:08:48 +03:00
z3APA3A 9b4ab2e126 readme updated 2017-08-15 16:26:47 +03:00
z3APA3A 8d5bc73643 readme updated 2017-08-15 12:30:09 +03:00
z3APA3A ea44750268 readme updated 2017-08-15 12:28:46 +03:00
z3APA3A 55c294ac24 README updated 2017-08-15 12:27:06 +03:00
z3APA3A 41ae455ee2 man updated for socket options 2017-08-14 19:46:26 +03:00
z3APA3A b17b36cbce Add support to bind to interface (-Di / -Do) via SO_BINDTODEVICE 2017-08-14 18:22:15 +03:00
z3APA3A 6010190940 fix: do not fail external with "0.0.0.0" with NOIPV6 (lite version) 2017-07-19 19:23:55 +03:00
z3APA3A d9e118e754 Change EPSV reply code to 229 2017-06-28 12:33:08 +03:00
z3APA3A 481b9e389f EPSV support for ftppr 2017-06-27 23:28:17 +03:00
z3APA3A 177fbb1117 Change log location in demo scripts 2017-06-27 13:56:36 +03:00
z3APA3A 7a23f84001 Readding files to change line endings - adding 2017-06-27 11:59:01 +03:00
z3APA3A b118fa6c8f Readding files to change line endings - removing 2017-06-27 11:58:42 +03:00
z3APA3A 305f01acb5 closecoket() is used instead of so._closesocket 2017-06-26 16:46:26 +03:00
z3APA3A 372e5625c3 remove dighosts from Makefiles 2017-06-25 19:54:29 +03:00
z3APA3A c0bb608acc publish as 0.8.10 2017-06-25 19:12:56 +03:00
z3APA3A 4631335aca Fix - sometime request may go to parent proxy where it shouldn't 2017-06-25 18:42:39 +03:00
z3APA3A 94c58b3db4 banlimits for old connection may stop functioning on configuration reload 2017-06-25 18:42:17 +03:00
z3APA3A b4043e944c Unify RADIUS code for logging 2017-06-25 18:40:26 +03:00
z3APA3A 2983575952 banlimits for old connection may stop functioning on configuration reload 2017-06-25 18:37:19 +03:00
z3APA3A 1996b11451 Fix - sometime request may go to parent proxy where it shouldn't 2017-06-25 18:33:28 +03:00
z3APA3A 883784dcc3 add .gitignore to bin to make it syncing 2017-03-08 00:43:24 +03:00
z3APA3A 21ce72dcf0 add /bin 2017-03-08 00:34:57 +03:00
z3APA3A b51465a8d4 remove bin from .gitignore 2017-03-08 00:27:01 +03:00
z3APA3A 513fc1aa20 leave /bin directory 2017-03-08 00:12:24 +03:00
z3APA3A e75b329e62 Fix ACL copy for last patch 2017-03-07 15:06:22 +03:00
z3APA3A 4251322aad Support hostnames for chained socks5+/socks4+/connect+ requests 2017-03-07 01:19:04 +03:00
z3APA3A 4e4c090373 Add Makefile.FreeBSD 2017-02-04 16:54:07 +03:00
z3APA3A d75dcf0b54 Publish as 0.8.9 2017-02-02 01:19:10 +03:00
z3APA3A 28581b1738 FIX: tcppm may not work with parent proxy 2017-02-02 01:08:29 +03:00
z3APA3A d40e5d458c FIX: tcppm may not work with parent proxy 2017-02-02 00:36:59 +03:00
Vladimir Dubrovin dbdeaa337c Merge pull request #135 from johny-bravo/patch-1
Fix 3proxy.pid file check in scripts/rc.d/proxy.sh
2017-01-22 17:14:24 +04:00
johny-bravo 256319bd06 Fix 3proxy.pid file check 2017-01-22 14:55:19 +03:00
z3APA3A 2049886dcf 3proxy-linux-install.sh corrected for location in scripts/ 2016-12-29 16:24:39 +03:00
z3APA3A 1b12f365ba Debian / Ubuntu install script by Evgeniy Solovyev 2016-12-29 14:27:20 +03:00
z3apa3a 34443d6515 Add netinet/tcp.h to includes to support TCP socket options on *nix. 2016-12-25 03:33:15 +03:00
z3APA3A cfc10e9efd Support for few more socket options 2016-12-25 03:22:52 +03:00
z3APA3A c1beee44ef Add support for -os, -oc, -ol
-ocOPTIONS, -osOPTIONS, -olOPTIONS - options for client (oc), server
(os) or listening (ol) socket
e.g.
proxy -ocTCP_NODELAY,SO_KEEPALIVE,SO_DONTROUTE
2016-12-25 02:46:30 +03:00
z3APA3A 2ed83b0d6e set TCP_NODELAY for DNS resolution over TCP 2016-12-25 01:28:16 +03:00
z3APA3A 68deec5bcd Update PCRE version 2016-12-24 01:48:52 +03:00
z3APA3A e2884b182a Add timeout for connect in all modules 2016-12-23 00:56:16 +03:00
z3APA3A 3c9ff54ae8 SSL_Plugin: switch to SHA-256 signature 2016-12-22 19:16:50 +03:00
z3APA3A 16f094168a Correct EINPROGRESS for Windows 2016-12-22 17:46:06 +03:00
z3apa3a 42ca640769 Corrected connect() timeout on *nix 2016-12-22 17:31:17 +03:00
z3APA3A d1d86ed9b3 implement timeout on connect()
STRING_S timeout is used (15 sec by default)
2016-12-22 17:11:44 +03:00
z3APA3A c5f8a8e139 Add support for Reply-Message (may be used to send code with Auth-Reject). 2016-12-21 01:33:34 +03:00
z3APA3A 7b4a34f6fc Support for Framed-IP-Address / Framed-IPv6-Address in RADIUS server's reply 2016-12-21 00:30:05 +03:00
z3APA3A bfe7e89bd0 RADIUS authentication corrected and tested 2016-12-20 23:38:06 +03:00
z3APA3A e7433d633c 'radius' and 'auth radius' support added (not tested yet)
Example:
radius secret 192.168.0.1 192.168.0.2
authcache ip,user
auth cache radius
2016-12-20 19:50:50 +03:00
z3apa3a 5cb3947c45 radauth.c: implements RADIUS authentication for 3proxy 2016-12-20 18:39:06 +03:00
z3APA3A f709255d62 Copyrights cleaned, authradius.c added 2016-12-20 15:47:02 +03:00
z3apa3a d159c57e1f Add splice() support on Linux to proxy, socks, ftppt, smtpp, pop3p
usage example:
proxy -s
proxy -s2
-s - enable splice() for sockets mapping to avoid data to be copied to user space
-s2 - enable splice() and attempt to free user space buffer ASAP
2016-12-19 22:07:34 +03:00
z3APA3A 34876b7616 put usesplice within #ifdef WITHSPLICE 2016-12-19 13:01:34 +03:00
z3apa3a 1ab549036c Changed -a / -s options handling for 'anonymous' after last commit 2016-12-19 03:19:17 +03:00
z3apa3a 6696b35d74 Added -s option support for proxying with splice() for Liux
(without copying network data to
userspace). Currently only for tcppm.
2016-12-19 02:56:23 +03:00
z3APA3A d3395cf649 Commit as 0.8.8 2016-12-13 01:19:55 +03:00
z3APA3A 7b48714993 Merge remote-tracking branch 'refs/remotes/origin/devel' 2016-12-13 01:15:09 +03:00
z3APA3A 945c30c5ee Use pragma aux to export valid names from DLL in Watcom 2016-12-12 19:49:58 +03:00
z3APA3A a9fb0ea969 Correct previous resolver patch 2016-12-12 12:38:33 +03:00
z3APA3A afbc27eac4 Correct resolver to handle non-compressed answers 2016-12-11 03:25:18 +03:00
z3APA3A 953c7efafc Merge branch 'devel' of https://github.com/z3APA3A/3proxy into devel 2016-12-10 03:56:20 +03:00
z3APA3A c650d32206 Compatibility with Watcom's DLL exports for plugins 2016-12-10 03:56:11 +03:00
Vladimir Dubrovin 88af9d6050 handle IPv6/name bind reply from parent 2016-11-20 22:24:04 +03:00
Vladimir Dubrovin 9c8e18f0b5 Merge pull request #99 from alexndlm/patch-1
Update Makefile.Linux
2016-09-21 22:20:34 +04:00
alexndlm 0f695a4248 Update Makefile.Linux 2016-09-19 23:37:04 +03:00
z3APA3A 88263ebde9 Return valid error code for name resolution problem in 'proxy' 2016-09-07 18:50:21 +03:00
z3APA3A a8f8a4d624 'if' is not required 2016-09-07 18:35:01 +03:00
z3APA3A 0b2afa1ba7 switch to 0.8.7 2016-09-04 16:30:40 +03:00
z3APA3A 80b9e18588 Commit as 0.8.7 2016-09-04 16:19:53 +03:00
z3APA3A 63bafa5a62 Merge remote-tracking branch 'refs/remotes/origin/devel'
# Conflicts:
#	src/version.h
2016-09-04 16:16:29 +03:00
z3APA3A fd29e887c3 add optimization to watcom makefile 2016-09-04 15:49:04 +03:00
z3APA3A ec9d556707 Add makefile for OpenWatcom 2.0 2016-09-04 15:33:38 +03:00
z3APA3A 9890823664 fix signess warning 2016-09-04 15:33:20 +03:00
z3APA3A 880255093a minor compilers compatibility issues 2016-09-04 15:11:15 +03:00
z3APA3A 4e96a66093 fix authentication via reverse name 2016-09-04 15:10:45 +03:00
z3APA3A e2b406f27b Addition al fix for Linux (glibc?) specific daemon problem 2016-08-23 18:36:18 +03:00
z3APA3A b242d6df8c Fix daemonize in *nix 2016-08-23 14:19:27 +03:00
z3APA3A 4e4f71712d Fix: 'extip' may fail with 9 error code 2016-08-16 15:21:02 +03:00
z3APA3A 6426ed0c1a fix %i logging 2016-06-07 15:39:14 +03:00
z3APA3A cdc4210a0a Fix '%i' logging 2016-06-07 14:16:55 +03:00
z3APA3A 7742b08ec5 Revert "Delay service exit until new configuration is loaded"
This reverts commit 05f39246bf.
2016-06-07 14:16:17 +03:00
z3APA3A 05f39246bf Delay service exit until new configuration is loaded 2016-06-06 18:01:51 +03:00
z3APA3A 84664a203b support %i in loformat 2016-06-06 17:54:23 +03:00
z3APA3A cd35215532 support -u2 for proxy 2016-05-28 00:24:26 +03:00
z3APA3A f347b37770 support port number in 'nserver' / 'authnserver' 2016-05-18 00:05:23 +03:00
z3APA3A fbcdcf3d7b Correct IP matching in cache auth 2016-05-17 23:27:10 +03:00
z3APA3A 8cdf341d0e workaround for broken getsockname() in FTP proxy 2016-05-14 00:09:51 +03:00
z3APA3A ccbc94e06b Revert "pam_auth; lock only pam_start"
This reverts commit 556fea670e.
2016-05-11 22:05:45 +03:00
z3APA3A 556fea670e pam_auth; lock only pam_start 2016-05-11 20:51:14 +03:00
z3APA3A 32ff114787 Revert "pam_auth: Authenticate all users in single session"
This reverts commit 438a5bac9b.
2016-05-11 20:49:39 +03:00
z3APA3A 438a5bac9b pam_auth: Authenticate all users in single session 2016-05-11 19:56:40 +03:00
z3APA3A 4cb43b438f Use mutex with pam auth, because pam is not thread safe 2016-05-11 19:03:16 +03:00
z3APA3A 8e820b28c0 Documentation correction 2016-05-11 19:02:51 +03:00
z3APA3A cfa4d11027 Do not fail connection with 333 error on configuration reload 2016-04-26 18:50:57 +03:00
z3APA3A 8b1c12005f avoid type mismatch in ?: operator 2016-04-08 15:08:18 +03:00
z3APA3A 3c8c866ac1 Fix counters time check for different platforms 2016-04-08 14:53:15 +03:00
z3APA3A d3f9d80b65 Resolve races on log buffer without mutex 2016-04-05 19:12:18 +03:00
z3APA3A 1d162abec3 Merge branch 'devel' of https://github.com/z3APA3A/3proxy into devel 2016-04-04 13:43:30 +03:00
z3APA3A d6f72a51fe fix race condition on 'log' command processing 2016-04-04 13:43:08 +03:00
Vladimir Dubrovin e210f24194 fix for noforce 2016-04-02 12:00:53 +03:00
Vladimir Dubrovin 9bfae5faaa force / no force commands added 2016-04-02 11:43:25 +03:00
Vladimir Dubrovin 2fed299b9d warning fix 2016-04-02 11:22:33 +03:00
z3APA3A 6cac541e33 fix broken extip functionality 2016-03-30 19:16:12 +03:00
z3APA3A 938b1d1aab re-authenticate connection on configuration change 2016-03-28 17:57:37 +03:00
z3APA3A eeb2d78fb1 re-authenticate user on 2016-03-28 17:49:27 +03:00
z3APA3A dcec2cadaa support external username / password up to 128 octets 2016-03-10 17:05:56 +03:00
z3APA3A f67c9a39f1 Use setreuid/setregid instead of setuid / setgid 2016-03-09 18:28:52 +03:00
z3APA3A a44a32c484 Do not fail for zero address on SOCKSv5 BIND/UDPASSOC 2016-03-08 13:28:29 +03:00
z3APA3A b513584fdb More distinct error codes for SOCKS 2016-03-08 12:43:07 +03:00
z3APA3A ac13a75721 publish as 0.8.6 2016-03-07 16:54:55 +03:00
z3APA3A f74da31fb3 Merge remote-tracking branch 'refs/remotes/origin/devel' 2016-03-04 13:45:46 +03:00
z3APA3A 5d0504cd33 Always reset bind sa on connect 2016-03-04 13:44:53 +03:00
z3APA3A cbe3d0cde9 publish as 0.8.5 2016-03-02 23:12:32 +03:00
z3APA3A 5e850b54c3 Merge remote-tracking branch 'refs/remotes/origin/devel'
# Conflicts:
#	src/version.h
2016-03-02 22:57:05 +03:00
z3APA3A 58a64924dd log_mutex used prior to initialization 2016-03-02 19:00:28 +03:00
z3APA3A 75a7d5bb9e Remove SSLPlugin and PamAuth from default Linux makefile 2016-03-02 19:00:01 +03:00
z3APA3A 10a79faa32 publish as devel 2016-02-28 15:10:38 +03:00
z3APA3A 394ada524a publish as 0.8.4 2016-02-28 13:52:53 +03:00
z3APA3A 1404c63e10 add index.html to repro 2016-02-28 13:40:25 +03:00
z3APA3A 3c751f4b75 add index.html to repro 2016-02-28 13:38:43 +03:00
z3APA3A 09cfc076e2 Merge remote-tracking branch 'refs/remotes/origin/devel' 2016-02-28 13:24:48 +03:00
z3APA3A 5d9c1af5ca Build PamAuth plugin by default in *nix 2016-02-26 13:17:15 +03:00
z3APA3A 6db42f70e9 fix compilation warnings in PamAuth 2016-02-26 13:15:34 +03:00
z3APA3A 99781ceb23 ignore more binary files 2016-02-26 11:44:10 +03:00
z3APA3A 22524d7876 ignore some files under *nix / Mac OS 2016-02-26 11:41:43 +03:00
z3APA3A 9d85bf75ba Ignore *nix binaries 2016-02-23 19:10:32 +03:00
z3APA3A 19643f0d66 Documentation update + add SQL example to git 2016-02-22 23:08:31 +03:00
z3APA3A 68e8530f85 remove contrib because of outdated content 2016-02-22 22:53:50 +03:00
z3APA3A 6a8fee9847 minor 3ps file modification 2016-02-22 22:48:02 +03:00
z3APA3A 364fe22bbb add rus.3ps to git 2016-02-22 22:44:59 +03:00
z3APA3A e2351034e6 Change encoding to utf-8 in strings 2016-02-22 22:43:22 +03:00
z3APA3A 49d382c7db Build PamAuth in Linux by default 2016-02-22 22:41:52 +03:00
z3APA3A 89fd5a95ae minor gitignore modifications 2016-02-22 22:18:15 +03:00
z3APA3A 57f1140734 Changes in makefiles to support LDAP plugin compilation 2016-02-22 21:46:32 +03:00
z3APA3A aa38dd2ad2 Merge remote-tracking branch 'refs/remotes/origin/master' into devel 2016-02-22 21:16:18 +03:00
z3APA3A c96d415020 Defer SSL init to first command in ssl_plugin 2016-02-22 21:14:17 +03:00
z3APA3A 604cc22d16 mark as 0.8.4 2016-02-22 00:53:10 +03:00
z3APA3A 01857354c8 Merge remote-tracking branch 'refs/remotes/origin/devel' 2016-02-22 00:22:01 +03:00
z3APA3A 021a8928bf Avoid windows compilation warnings 2016-02-22 00:18:45 +03:00
z3APA3A cf3bae0f6b Revert "additional memset for hint on retry"
This reverts commit bb206869de.
2016-02-22 00:14:54 +03:00
z3APA3A bb206869de additional memset for hint on retry 2016-02-20 15:45:44 +03:00
z3APA3A 5c5f4e258f Increase default stack size for *nix 2016-02-20 09:11:03 +03:00
z3APA3A f8a7266bdf Handle malformed HTTP headers without \r 2016-02-19 20:47:56 +03:00
z3APA3A ad9b0046d9 Fix thread init bug introduced 2016-02-19 20:21:16 +03:00
z3APA3A b40e8fae4c increase stack size for FreeBSD 2016-02-19 19:44:38 +03:00
z3APA3A 6fcd12cb08 TransparentPlugin - remove debug output 2016-02-19 17:10:15 +03:00
Vladimir Dubrovin 9ddc1fb874 fix *nix warnings 2016-02-18 17:01:18 +03:00
z3APA3A 43a36ec813 Warnings cleanup 2016-02-18 16:43:37 +03:00
z3APA3A 0d02989cce minor man updates 2016-02-17 18:23:29 +03:00
z3APA3A 33e0eb5495 Documentation update for stacksize / -S 2016-02-17 17:52:18 +03:00
z3APA3A 3b8e7741b3 Compilation warnings cleanup 2016-02-16 15:29:51 +03:00
z3APA3A f70a8c0019 Makefile for Windows llvm build 2016-02-16 01:03:15 +03:00
z3APA3A 5fc1d81e5c add stack size configuration
'stacksize' command and -S configuration option added
2016-02-11 16:16:44 +03:00
z3APA3A 3680f2d3b1 Do not negotiate handshake for extip redirection 2016-02-08 14:39:29 +03:00
z3APA3A 6713530fda log_mutex init moved to proxymain 2016-02-05 19:04:16 +03:00
z3APA3A 13a7d6be11 Replace memcpy with assignment where appropriate 2016-02-05 18:31:17 +03:00
z3APA3A 3cc9796583 Support for 'extip' and 'smtp' parent types added 2016-02-05 01:52:45 +03:00
z3APA3A 9db88313c7 minor documentation correction 2016-01-31 23:22:45 +03:00
z3APA3A 0263574655 minor documentation correction 2016-01-31 23:22:02 +03:00
z3APA3A 0e168f17f9 Merge remote-tracking branch 'refs/remotes/origin/devel' 2016-01-31 15:08:21 +03:00
z3APA3A 4f7a82ed92 Update rc for 0.8.4 2016-01-31 15:07:08 +03:00
z3APA3A 4202cee566 Merge remote-tracking branch 'refs/remotes/origin/devel'
# Conflicts:
#	src/version.h
2016-01-31 15:04:22 +03:00
z3APA3A faf7f665c3 do memset for 'external' sockaddr structures 2016-01-31 15:01:17 +03:00
z3APA3A 852f1abecb Documentation for TransparentPlugin added 2016-01-30 00:00:00 +03:00
z3APA3A 485ccb3ab4 publish as devel 2016-01-28 01:21:13 +03:00
z3APA3A e23dd7b746 minor logging changes 2016-01-28 01:18:16 +03:00
z3APA3A 95efeb8a93 Handle accept() errors more accurate 2016-01-28 01:07:09 +03:00
z3APA3A 43da6cc32b remove premake from makefile 2016-01-28 01:04:25 +03:00
z3APA3A 0473e1b2f7 publish as devel 2016-01-27 23:08:17 +03:00
z3APA3A 975b4ac445 Remove date from copyright notice in proxy.h 2016-01-27 17:56:01 +03:00
z3APA3A 48361db51c Add versioning information only to 3proxy.exe 2016-01-27 17:55:40 +03:00
z3APA3A ade0df0956 Add builddate to rc file for devel version 2016-01-27 17:55:11 +03:00
z3APA3A c61533aa54 .rc file updated 2016-01-27 17:30:54 +03:00
z3APA3A 0883fb6e34 Show traffic limit in MBs 2016-01-27 15:38:47 +03:00
z3APA3A 79170af2bc publish as 0.8.3 2016-01-26 12:10:55 +03:00
z3APA3A 331c933508 publish as 0.8.3 2016-01-25 22:55:08 +03:00
z3APA3A 2de3f0c380 publish as devel 2016-01-25 22:48:09 +03:00
z3APA3A d1334e5157 Merge remote-tracking branch 'refs/remotes/origin/devel'
# Conflicts:
#	src/version.h
2016-01-25 15:06:42 +03:00
z3APA3A fec0da52af fixed: use SASIZE() instead of sizeof() in connect() for FreeBSD compatibility 2016-01-25 14:49:17 +03:00
z3APA3A 7a7cd9bc25 README updated 2016-01-23 20:44:01 +03:00
z3APA3A bb8e5832eb update README 2016-01-23 20:38:10 +03:00
z3APA3A c2a7fdc2a2 release as devel 2016-01-23 19:26:20 +03:00
z3APA3A 3cbbe1aef7 publish as 0.8.2 2016-01-23 19:17:36 +03:00
z3APA3A 69cb310481 Merge remote-tracking branch 'refs/remotes/origin/devel' 2016-01-23 18:48:28 +03:00
z3APA3A 375a2c9f6e Do not use SO_REUSEADDR by default
to avoid misbehavior in some glibc versions
2016-01-23 18:43:30 +03:00
z3APA3A 1ed5229a54 Do not use SO_REUSEADDR by default
to avoid misbehavior in some glibc versions
2016-01-23 18:41:20 +03:00
z3APA3A d6f29ac6df reset transparent flag on keep-alive connection 2016-01-23 17:16:49 +03:00
z3APA3A 82e76d1d2a Merge remote-tracking branch 'refs/remotes/origin/devel' 2016-01-22 16:20:12 +03:00
z3APA3A 4af5f2fde7 Use SASIZE() instead of sizeof() in bind() for FreeBSD compatibility 2016-01-22 15:59:40 +03:00
z3APA3A 95a07c1b46 minor documentation update 2016-01-21 16:53:38 +03:00
z3APA3A 3a4f3b5cd1 publish as 0.8.1 2016-01-21 16:26:08 +03:00
z3APA3A a6383bbd10 Merge remote-tracking branch 'refs/remotes/origin/devel'
# Conflicts:
#	src/version.h
2016-01-21 15:50:17 +03:00
z3APA3A 359026cb5f !!Fix: destination IP may be not checked against ACL 2016-01-21 15:45:39 +03:00
z3APA3A 244be50405 publish as 0.8.0
only version number is changed
2016-01-20 01:20:05 +03:00
z3APA3A e3fb268b64 publish as 0.8 2016-01-20 01:08:48 +03:00
z3APA3A 5e440b4482 publish as 0.9-devel 2016-01-20 01:04:03 +03:00
z3APA3A 94f3b1fe30 Merge remote-tracking branch 'refs/remotes/origin/devel' 2016-01-19 17:04:56 +03:00
z3APA3A ee407adf42 update man for -6 2016-01-19 16:41:04 +03:00
z3APA3A e5dd28003c Merge remote-tracking branch 'refs/remotes/origin/devel' 2016-01-17 02:14:16 +03:00
z3APA3A fcbccf39ef Use configured timeouts for DNS operations instead static ones 2016-01-17 02:13:17 +03:00
z3APA3A 928f67aed1 Merge remote-tracking branch 'refs/remotes/origin/devel' 2016-01-16 00:39:58 +03:00
z3APA3A e59ccd22b1 typo corrected in last update 2016-01-16 00:38:53 +03:00
z3APA3A 75c63d2de6 add support for -u2 in socks 2016-01-15 15:29:57 +03:00
z3APA3A 999f9e856b Merge remote-tracking branch 'refs/remotes/origin/devel' 2016-01-15 03:07:59 +03:00
z3APA3A 08be6b9f98 minor documentations updates 2016-01-15 03:06:06 +03:00
z3APA3A 0be4ee932b Merge remote-tracking branch 'refs/remotes/origin/master' into devel 2016-01-15 02:41:55 +03:00
z3APA3A 08aa876ecd minor man changes 2016-01-15 02:41:14 +03:00
z3APA3A 87c947987c Merge remote-tracking branch 'refs/remotes/origin/devel' 2016-01-15 02:27:40 +03:00
z3APA3A 1ef7308cbf Update documentation for connect back 2016-01-15 02:26:56 +03:00
z3APA3A d1f8180eab IPv6 and name resolution documentation updated for 0.8 2016-01-15 01:24:08 +03:00
z3APA3A 1000d80fc0 Merge remote-tracking branch 'refs/remotes/origin/devel' 2016-01-13 23:54:57 +03:00
z3APA3A 27a190cd04 Russian plugin documentation added 2016-01-13 23:53:18 +03:00
z3APA3A e78d9f8327 plugins documentation added 2016-01-13 23:35:35 +03:00
z3APA3A ae25aac635 Merge remote-tracking branch 'refs/remotes/origin/devel' 2016-01-13 02:15:59 +03:00
z3APA3A b6dadc1954 Merge remote-tracking branch 'refs/remotes/origin/devel' 2016-01-13 02:14:15 +03:00
z3APA3A 8b7c95ff93 Update man pages 2016-01-13 02:13:49 +03:00
z3APA3A 5a89997d6e convert russian documentation to UTF-8 2016-01-13 01:53:22 +03:00
z3APA3A c2d012bf71 Merge remote-tracking branch 'refs/remotes/origin/master' into devel 2016-01-13 01:46:07 +03:00
z3APA3A b3923593ed Convert russian documentation to utf-8 2016-01-13 01:41:51 +03:00
z3APA3A 9dd2170d6f publish as 0.8-pre 2016-01-13 00:42:48 +03:00
300 changed files with 37144 additions and 46040 deletions

No files matched your search

+73
View File
@@ -0,0 +1,73 @@
# Exclude top-level dirs not needed for build
/bin/
/bin64/
/build/
/cfg/
/cmake/
/CMakeFiles/
/debian/
/doc/
/man/
# Build artifacts
**/*.o
**/*.obj
**/*.so
**/*.dll
**/*.exe
**/*.exp
**/*.lib
**/*.pdb
**/*.ilk
**/*.idb
**/*.err
**/*.ld.so
**/*.dSYM
**/*.var
build*/
buildlinux.sh
tmp/
# macOS
.DS_Store
# Editor / IDE
**/*.swp
**/*.swo
**/*~
**/*.bak
**/*.tmp
**/*.log
.project
.cproject
.classpath
.settings/
.vscode/
.idea/
# Git
.git
.gitignore
# Claude / docs
CLAUDE.md
.claude/
# Generated version files
version
version.c
version.sh
verfile.sh
# Local config / keys
**/*.key
**/*.pem
**/*.pfx
3proxy.cfg
3proxy-ssl.cfg
3proxy-pcre.cfg
# Misc
res
3proxy.res
copytgz.sh
+11
View File
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
- package-ecosystem: docker
directory: /
schedule:
interval: weekly
+188
View File
@@ -0,0 +1,188 @@
name: RPM/DEB build aarch64
on:
release:
types: [published]
workflow_dispatch:
permissions:
contents: read
jobs:
ci:
permissions:
contents: write
id-token: write
attestations: write
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
BUILDDATE=$(sed -n 's/^#define BUILDDATE "\(.*\)"$/\1/p' src/version.h)
[ -n "$BUILDDATE" ] || BUILDDATE=$(date -u +%y%m%d%H%M%S)
echo "VERSION=$BUILDDATE" >> $GITHUB_ENV
SOURCE_DATE_EPOCH=$(date -u -d "20${BUILDDATE:0:2}-${BUILDDATE:2:2}-${BUILDDATE:4:2} ${BUILDDATE:6:2}:${BUILDDATE:8:2}:${BUILDDATE:10:2}" +%s)
echo "SOURCE_DATE_EPOCH=$SOURCE_DATE_EPOCH" >> $GITHUB_ENV
- name: echo env
run: echo "release $RELEASE version $VERSION"
- 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: |
mkdir -p rpmout
for EL in 8 9 10; do
docker run --rm \
-v "$HOME/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz:/src.tar.gz:ro" \
-v "$PWD/scripts/rh/3proxy.spec:/3proxy.spec:ro" \
-v "$PWD/rpmout:/out" \
-e RELEASE="$RELEASE" -e HOSTUID="$(id -u)" -e HOSTGID="$(id -g)" \
-e SOURCE_DATE_EPOCH="$SOURCE_DATE_EPOCH" \
"almalinux:$EL" bash -c '
set -e
dnf -y install rpm-build gcc make openssl-devel pcre2-devel pam-devel tar gzip
mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
cp /src.tar.gz ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz
ln -sf ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz ~/rpmbuild/SOURCES/$RELEASE.tar.gz
cp /3proxy.spec ~/rpmbuild/SPECS/3proxy-$RELEASE.spec
cd ~/rpmbuild/SPECS
rpmbuild -ba \
--define "use_source_date_epoch_as_buildtime 1" \
--define "clamp_mtime_to_source_date_epoch 1" \
--define "_buildhost 3proxy.org" \
3proxy-$RELEASE.spec
cp ~/rpmbuild/RPMS/*/*.rpm /out/
chown "$HOSTUID:$HOSTGID" /out/*.rpm || chmod 0666 /out/*.rpm'
done
for f in rpmout/*.rpm; do
dist=$(rpm -qp --qf '%{RELEASE}' "$f" | sed 's/^1\.//')
arch=$(rpm -qp --qf '%{ARCH}' "$f")
mv "$f" "3proxy-$RELEASE.$dist.$arch.rpm"
done
rmdir rpmout
ls -l *.rpm
- name: Get artifact rpm
uses: actions/upload-artifact@v7
with:
name: "3proxy-${{ env.RELEASE }}-arm64.rpm"
path: "*.rpm"
- name: debbuild
run: |
docker run --rm \
-v "$HOME/debian:/debian" \
-e RELEASE="$RELEASE" -e VERSION="$VERSION" \
-e SOURCE_DATE_EPOCH="$SOURCE_DATE_EPOCH" \
ubuntu:22.04 bash -c '
set -e
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get install -y build-essential debhelper fakeroot libssl-dev libpcre2-dev libpam0g-dev
cd /debian
tar xzf 3proxy_$RELEASE.orig.tar.gz
cd 3proxy-$RELEASE
{ echo "3proxy ($RELEASE-$VERSION) buster; urgency=medium"
echo " "
echo " *3proxy $RELEASE build"
echo " "
echo " -- z3APA3A <3apa3a@3proxy.org> $(date -R -u -d @$SOURCE_DATE_EPOCH)"
echo ""
} > debian/changelog
dpkg-buildpackage'
cp ~/debian/3proxy_$RELEASE-"$VERSION"_arm64.deb ./3proxy-$RELEASE.arm64.deb
- name: Get artifact deb
uses: actions/upload-artifact@v7
with:
name: "3proxy-${{ env.RELEASE }}-arm64.deb"
path: "*.deb"
- name: Import signing key
if: github.event_name == 'release'
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: |
if [ -z "$GPG_PRIVATE_KEY" ]; then echo "GPG_PRIVATE_KEY is not set"; exit 1; fi
mkdir -p ~/.gnupg && chmod 700 ~/.gnupg
printf 'allow-loopback-pinentry\ndefault-cache-ttl 7200\nmax-cache-ttl 7200\n' > ~/.gnupg/gpg-agent.conf
gpgconf --kill gpg-agent || true
printf '%s' "$GPG_PRIVATE_KEY" | gpg --batch --import
KEYID=$(gpg --list-secret-keys --with-colons | awk -F: '/^sec:/{print $5; exit}')
echo "GPG_KEYID=$KEYID" >> $GITHUB_ENV
echo prime > /tmp/prime.txt
gpg --batch --yes --pinentry-mode loopback --passphrase "$GPG_PASSPHRASE" \
-u "$KEYID" --detach-sign -o /dev/null /tmp/prime.txt
rm -f /tmp/prime.txt
- name: Sign rpm
if: github.event_name == 'release'
env:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: |
GPGBIN=$(command -v gpg)
if [ -z "$GPGBIN" ]; then echo "gpg not found"; exit 1; fi
umask 077
printf '%s' "$GPG_PASSPHRASE" > /tmp/gpgpass
echo test > /tmp/signtest
gpg --batch --yes --pinentry-mode loopback --passphrase-file /tmp/gpgpass \
-u "$GPG_KEYID" --detach-sign -o /tmp/signtest.sig /tmp/signtest
echo "key can sign"
{ echo "%_gpg_name $GPG_KEYID"
echo "%__gpg $GPGBIN"
echo '%__gpg_sign_cmd %{__gpg} gpg --batch --no-armor --pinentry-mode loopback --passphrase-file /tmp/gpgpass --no-secmem-warning --digest-algo sha256 -u "%{_gpg_name}" -sbo %{__signature_filename} %{__plaintext_filename}'
} > ~/.rpmmacros
rpm --addsign *.rpm
rm -f /tmp/gpgpass /tmp/signtest /tmp/signtest.sig
for f in *.rpm; do
sig=$(rpm -qp --qf '%{RSAHEADER:pgpsig}' "$f" 2>/dev/null)
case "$sig" in ""|"(none)")
sig=$(rpm -qp --qf '%{DSAHEADER:pgpsig}' "$f" 2>/dev/null) ;;
esac
case "$sig" in ""|"(none)")
echo "$f is not signed"
echo "--- rpm version ---"; rpm --version
echo "--- sign cmd ---"; rpm --eval '%{__gpg_sign_cmd}'
echo "--- secret keys ---"; gpg --list-secret-keys --with-colons | grep -E '^(sec|ssb):' || true
exit 1 ;;
esac
echo "$f: $sig"
done
- name: Checksums and detached signatures
if: github.event_name == 'release'
env:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: |
sha256sum *.rpm *.deb > SHA256SUMS-arm64
for f in *.deb SHA256SUMS-arm64; do
gpg --batch --yes --pinentry-mode loopback --passphrase "$GPG_PASSPHRASE" \
-u "$GPG_KEYID" --armor --detach-sign "$f"
done
sha256sum -c SHA256SUMS-arm64
gpg --verify SHA256SUMS-arm64.asc SHA256SUMS-arm64
- name: Attest build provenance
if: github.event_name == 'release'
uses: actions/attest-build-provenance@v2
with:
subject-path: |
*.rpm
*.deb
- name: Upload to release
if: github.event_name == 'release'
env:
GH_TOKEN: ${{ github.token }}
TAG: ${{ github.event.release.tag_name }}
run: gh release upload "$TAG" *.rpm *.deb *.deb.asc SHA256SUMS-arm64 SHA256SUMS-arm64.asc
+119
View File
@@ -0,0 +1,119 @@
name: DEB build armhf
on:
release:
types: [published]
workflow_dispatch:
permissions:
contents: read
jobs:
ci:
permissions:
contents: write
id-token: write
attestations: write
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
BUILDDATE=$(sed -n 's/^#define BUILDDATE "\(.*\)"$/\1/p' src/version.h)
[ -n "$BUILDDATE" ] || BUILDDATE=$(date -u +%y%m%d%H%M%S)
echo "VERSION=$BUILDDATE" >> $GITHUB_ENV
SOURCE_DATE_EPOCH=$(date -u -d "20${BUILDDATE:0:2}-${BUILDDATE:2:2}-${BUILDDATE:4:2} ${BUILDDATE:6:2}:${BUILDDATE:8:2}:${BUILDDATE:10:2}" +%s)
echo "SOURCE_DATE_EPOCH=$SOURCE_DATE_EPOCH" >> $GITHUB_ENV
- name: configure 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: debbuild
run: |
docker run --rm \
-v "$HOME/debian:/debian" \
-e RELEASE="$RELEASE" -e VERSION="$VERSION" \
-e SOURCE_DATE_EPOCH="$SOURCE_DATE_EPOCH" \
ubuntu:22.04 bash -c '
set -e
export DEBIAN_FRONTEND=noninteractive
dpkg --add-architecture armhf
sed -i "s|^deb |deb [arch=amd64] |" /etc/apt/sources.list
{ echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports jammy main restricted universe multiverse"
echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports jammy-updates main restricted universe multiverse"
} >> /etc/apt/sources.list
apt-get update
apt-get install -y crossbuild-essential-armhf build-essential debhelper fakeroot \
libssl-dev:armhf libpcre2-dev:armhf libpam0g-dev:armhf
cd /debian
tar xzf 3proxy_$RELEASE.orig.tar.gz
cd 3proxy-$RELEASE
{ echo "3proxy ($RELEASE-$VERSION) buster; urgency=medium"
echo " "
echo " *3proxy $RELEASE build"
echo " "
echo " -- z3APA3A <3apa3a@3proxy.org> $(date -R -u -d @$SOURCE_DATE_EPOCH)"
echo ""
} > debian/changelog
export PATH=/usr/arm-linux-gnueabihf/bin:$PATH
export CC=arm-linux-gnueabihf-gcc
export LD_LIBRARY_PATH=/usr/arm-linux-gnueabihf/lib:$LD_LIBRARY_PATH
dpkg-buildpackage'
cp ~/debian/3proxy_$RELEASE-"$VERSION"_armhf.deb ./3proxy-$RELEASE.arm.deb
- name: Get artifact deb
uses: actions/upload-artifact@v7
with:
name: "3proxy-${{ env.RELEASE }}-arm.deb"
path: "*.deb"
- name: Import signing key
if: github.event_name == 'release'
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: |
if [ -z "$GPG_PRIVATE_KEY" ]; then echo "GPG_PRIVATE_KEY is not set"; exit 1; fi
mkdir -p ~/.gnupg && chmod 700 ~/.gnupg
printf 'allow-loopback-pinentry\ndefault-cache-ttl 7200\nmax-cache-ttl 7200\n' > ~/.gnupg/gpg-agent.conf
gpgconf --kill gpg-agent || true
printf '%s' "$GPG_PRIVATE_KEY" | gpg --batch --import
KEYID=$(gpg --list-secret-keys --with-colons | awk -F: '/^sec:/{print $5; exit}')
echo "GPG_KEYID=$KEYID" >> $GITHUB_ENV
echo prime > /tmp/prime.txt
gpg --batch --yes --pinentry-mode loopback --passphrase "$GPG_PASSPHRASE" \
-u "$KEYID" --detach-sign -o /dev/null /tmp/prime.txt
rm -f /tmp/prime.txt
- name: Checksums and detached signatures
if: github.event_name == 'release'
env:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: |
sha256sum *.deb > SHA256SUMS-arm
for f in *.deb SHA256SUMS-arm; do
gpg --batch --yes --pinentry-mode loopback --passphrase "$GPG_PASSPHRASE" \
-u "$GPG_KEYID" --armor --detach-sign "$f"
done
sha256sum -c SHA256SUMS-arm
gpg --verify SHA256SUMS-arm.asc SHA256SUMS-arm
- name: Attest build provenance
if: github.event_name == 'release'
uses: actions/attest-build-provenance@v2
with:
subject-path: |
*.deb
- name: Upload to release
if: github.event_name == 'release'
env:
GH_TOKEN: ${{ github.token }}
TAG: ${{ github.event.release.tag_name }}
run: gh release upload "$TAG" *.deb *.deb.asc SHA256SUMS-arm SHA256SUMS-arm.asc
+189
View File
@@ -0,0 +1,189 @@
name: RPM/DEB build x86-64
on:
release:
types: [published]
workflow_dispatch:
permissions:
contents: read
jobs:
ci:
permissions:
contents: write
id-token: write
attestations: write
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
BUILDDATE=$(sed -n 's/^#define BUILDDATE "\(.*\)"$/\1/p' src/version.h)
[ -n "$BUILDDATE" ] || BUILDDATE=$(date -u +%y%m%d%H%M%S)
echo "VERSION=$BUILDDATE" >> $GITHUB_ENV
SOURCE_DATE_EPOCH=$(date -u -d "20${BUILDDATE:0:2}-${BUILDDATE:2:2}-${BUILDDATE:4:2} ${BUILDDATE:6:2}:${BUILDDATE:8:2}:${BUILDDATE:10:2}" +%s)
echo "SOURCE_DATE_EPOCH=$SOURCE_DATE_EPOCH" >> $GITHUB_ENV
- name: echo env
run: echo "release $RELEASE version $VERSION"
- 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: |
mkdir -p rpmout
for EL in 8 9 10; do
docker run --rm \
-v "$HOME/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz:/src.tar.gz:ro" \
-v "$PWD/scripts/rh/3proxy.spec:/3proxy.spec:ro" \
-v "$PWD/rpmout:/out" \
-e RELEASE="$RELEASE" -e HOSTUID="$(id -u)" -e HOSTGID="$(id -g)" \
-e SOURCE_DATE_EPOCH="$SOURCE_DATE_EPOCH" \
"almalinux:$EL" bash -c '
set -e
dnf -y install rpm-build gcc make openssl-devel pcre2-devel pam-devel tar gzip
mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
cp /src.tar.gz ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz
ln -sf ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz ~/rpmbuild/SOURCES/$RELEASE.tar.gz
cp /3proxy.spec ~/rpmbuild/SPECS/3proxy-$RELEASE.spec
cd ~/rpmbuild/SPECS
rpmbuild -ba \
--define "use_source_date_epoch_as_buildtime 1" \
--define "clamp_mtime_to_source_date_epoch 1" \
--define "_buildhost 3proxy.org" \
3proxy-$RELEASE.spec
cp ~/rpmbuild/RPMS/*/*.rpm /out/
chown "$HOSTUID:$HOSTGID" /out/*.rpm || chmod 0666 /out/*.rpm'
done
for f in rpmout/*.rpm; do
dist=$(rpm -qp --qf '%{RELEASE}' "$f" | sed 's/^1\.//')
arch=$(rpm -qp --qf '%{ARCH}' "$f")
mv "$f" "3proxy-$RELEASE.$dist.$arch.rpm"
done
rmdir rpmout
ls -l *.rpm
- name: Get artifact rpm
uses: actions/upload-artifact@v7
with:
name: "3proxy-${{ env.RELEASE }}-x86_64.rpm"
path: "*.rpm"
- name: debbuild
run: |
docker run --rm \
-v "$HOME/debian:/debian" \
-e RELEASE="$RELEASE" -e VERSION="$VERSION" \
-e SOURCE_DATE_EPOCH="$SOURCE_DATE_EPOCH" \
ubuntu:22.04 bash -c '
set -e
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get install -y build-essential debhelper fakeroot libssl-dev libpcre2-dev libpam0g-dev
cd /debian
tar xzf 3proxy_$RELEASE.orig.tar.gz
cd 3proxy-$RELEASE
{ echo "3proxy ($RELEASE-$VERSION) buster; urgency=medium"
echo " "
echo " *3proxy $RELEASE build"
echo " "
echo " -- z3APA3A <3apa3a@3proxy.org> $(date -R -u -d @$SOURCE_DATE_EPOCH)"
echo ""
} > debian/changelog
dpkg-buildpackage'
cp ~/debian/3proxy_$RELEASE-"$VERSION"_amd64.deb ./3proxy-$RELEASE.x86_64.deb
- name: Get artifact deb
uses: actions/upload-artifact@v7
with:
name: "3proxy-${{ env.RELEASE }}-x86_64.deb"
path: "*.deb"
- name: Import signing key
if: github.event_name == 'release'
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: |
if [ -z "$GPG_PRIVATE_KEY" ]; then echo "GPG_PRIVATE_KEY is not set"; exit 1; fi
mkdir -p ~/.gnupg && chmod 700 ~/.gnupg
printf 'allow-loopback-pinentry\ndefault-cache-ttl 7200\nmax-cache-ttl 7200\n' > ~/.gnupg/gpg-agent.conf
gpgconf --kill gpg-agent || true
printf '%s' "$GPG_PRIVATE_KEY" | gpg --batch --import
KEYID=$(gpg --list-secret-keys --with-colons | awk -F: '/^sec:/{print $5; exit}')
echo "GPG_KEYID=$KEYID" >> $GITHUB_ENV
echo prime > /tmp/prime.txt
gpg --batch --yes --pinentry-mode loopback --passphrase "$GPG_PASSPHRASE" \
-u "$KEYID" --detach-sign -o /dev/null /tmp/prime.txt
rm -f /tmp/prime.txt
- name: Sign rpm
if: github.event_name == 'release'
env:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: |
GPGBIN=$(command -v gpg)
if [ -z "$GPGBIN" ]; then echo "gpg not found"; exit 1; fi
umask 077
printf '%s' "$GPG_PASSPHRASE" > /tmp/gpgpass
echo test > /tmp/signtest
gpg --batch --yes --pinentry-mode loopback --passphrase-file /tmp/gpgpass \
-u "$GPG_KEYID" --detach-sign -o /tmp/signtest.sig /tmp/signtest
echo "key can sign"
{ echo "%_gpg_name $GPG_KEYID"
echo "%__gpg $GPGBIN"
echo '%__gpg_sign_cmd %{__gpg} gpg --batch --no-armor --pinentry-mode loopback --passphrase-file /tmp/gpgpass --no-secmem-warning --digest-algo sha256 -u "%{_gpg_name}" -sbo %{__signature_filename} %{__plaintext_filename}'
} > ~/.rpmmacros
rpm --addsign *.rpm
rm -f /tmp/gpgpass /tmp/signtest /tmp/signtest.sig
for f in *.rpm; do
sig=$(rpm -qp --qf '%{RSAHEADER:pgpsig}' "$f" 2>/dev/null)
case "$sig" in ""|"(none)")
sig=$(rpm -qp --qf '%{DSAHEADER:pgpsig}' "$f" 2>/dev/null) ;;
esac
case "$sig" in ""|"(none)")
echo "$f is not signed"
echo "--- rpm version ---"; rpm --version
echo "--- sign cmd ---"; rpm --eval '%{__gpg_sign_cmd}'
echo "--- secret keys ---"; gpg --list-secret-keys --with-colons | grep -E '^(sec|ssb):' || true
exit 1 ;;
esac
echo "$f: $sig"
done
- name: Checksums and detached signatures
if: github.event_name == 'release'
env:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: |
sha256sum *.rpm *.deb > SHA256SUMS-x86_64
for f in *.deb SHA256SUMS-x86_64; do
gpg --batch --yes --pinentry-mode loopback --passphrase "$GPG_PASSPHRASE" \
-u "$GPG_KEYID" --armor --detach-sign "$f"
done
sha256sum -c SHA256SUMS-x86_64
gpg --verify SHA256SUMS-x86_64.asc SHA256SUMS-x86_64
- name: Attest build provenance
if: github.event_name == 'release'
uses: actions/attest-build-provenance@v2
with:
subject-path: |
*.rpm
*.deb
- name: Upload to release
if: github.event_name == 'release'
env:
GH_TOKEN: ${{ github.token }}
TAG: ${{ github.event.release.tag_name }}
run: gh release upload "$TAG" *.rpm *.deb *.deb.asc SHA256SUMS-x86_64 SHA256SUMS-x86_64.asc
+119
View File
@@ -0,0 +1,119 @@
name: Build Win32 3proxy-lite with Watcom
on:
release:
types: [published]
workflow_dispatch:
permissions:
contents: read
jobs:
ci:
permissions:
contents: write
id-token: write
attestations: write
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: Checksums and detached signature
if: github.event_name == 'release'
shell: bash
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: |
if [ -z "$GPG_PRIVATE_KEY" ]; then echo "GPG_PRIVATE_KEY is not set"; exit 1; fi
printf '%s' "$GPG_PRIVATE_KEY" | gpg --batch --import
KEYID=$(gpg --list-secret-keys --with-colons | awk -F: '/^sec:/{print $5; exit}')
sha256sum *.zip > SHA256SUMS-win-lite
gpg --batch --yes --pinentry-mode loopback --passphrase "$GPG_PASSPHRASE" \
-u "$KEYID" --armor --detach-sign SHA256SUMS-win-lite
sha256sum -c SHA256SUMS-win-lite
- name: Attest build provenance
if: github.event_name == 'release'
uses: actions/attest-build-provenance@v2
with:
subject-path: |
*.zip
- name: Upload to release
if: github.event_name == 'release'
shell: bash
env:
GH_TOKEN: ${{ github.token }}
TAG: ${{ github.event.release.tag_name }}
run: gh release upload "$TAG" *.zip SHA256SUMS-win-lite SHA256SUMS-win-lite.asc
@@ -0,0 +1,72 @@
name: Build 3proxy with MSYS2 UCRT64
on:
workflow_dispatch:
permissions:
contents: read
jobs:
ci:
name: "msys2-ucrt64"
runs-on: windows-2022
steps:
- uses: actions/checkout@v7
- name: Setup MSYS2 (UCRT64)
uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
update: true
install: >-
make
mingw-w64-ucrt-x86_64-gcc
mingw-w64-ucrt-x86_64-pcre2
mingw-w64-ucrt-x86_64-openssl
mingw-w64-ucrt-x86_64-zlib
- name: set date
shell: pwsh
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
- name: make Windows (Makefile.win)
shell: msys2 {0}
env:
LIBSTATIC: 'true'
run: make -f Makefile.win
- 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 }}-msys2-ucrt64"
path: dist/
+134
View File
@@ -0,0 +1,134 @@
name: Build Win32 3proxy with MSVC
on:
release:
types: [published]
workflow_dispatch:
permissions:
contents: read
jobs:
ci:
permissions:
contents: write
id-token: write
attestations: write
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 wolfssl: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 WOLFSSL=1
- 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 }}-x86"
path: dist/
- name: Create zip
if: github.event_name == 'release'
shell: pwsh
run: Compress-Archive -Path dist/* -DestinationPath 3proxy-${{ env.RELEASE }}-x86.zip
- name: Checksums and detached signature
if: github.event_name == 'release'
shell: bash
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: |
if [ -z "$GPG_PRIVATE_KEY" ]; then echo "GPG_PRIVATE_KEY is not set"; exit 1; fi
printf '%s' "$GPG_PRIVATE_KEY" | gpg --batch --import
KEYID=$(gpg --list-secret-keys --with-colons | awk -F: '/^sec:/{print $5; exit}')
sha256sum *.zip > SHA256SUMS-win-x86
gpg --batch --yes --pinentry-mode loopback --passphrase "$GPG_PASSPHRASE" \
-u "$KEYID" --armor --detach-sign SHA256SUMS-win-x86
sha256sum -c SHA256SUMS-win-x86
- name: Attest build provenance
if: github.event_name == 'release'
uses: actions/attest-build-provenance@v2
with:
subject-path: |
*.zip
- name: Upload to release
if: github.event_name == 'release'
shell: bash
env:
GH_TOKEN: ${{ github.token }}
TAG: ${{ github.event.release.tag_name }}
run: gh release upload "$TAG" *.zip SHA256SUMS-win-x86 SHA256SUMS-win-x86.asc
+135
View File
@@ -0,0 +1,135 @@
name: Build Win64 3proxy with MSVC
on:
release:
types: [published]
workflow_dispatch:
permissions:
contents: read
jobs:
ci:
permissions:
contents: write
id-token: write
attestations: write
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 wolfssl: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 WOLFSSL=1
- 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: Checksums and detached signature
if: github.event_name == 'release'
shell: bash
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: |
if [ -z "$GPG_PRIVATE_KEY" ]; then echo "GPG_PRIVATE_KEY is not set"; exit 1; fi
printf '%s' "$GPG_PRIVATE_KEY" | gpg --batch --import
KEYID=$(gpg --list-secret-keys --with-colons | awk -F: '/^sec:/{print $5; exit}')
sha256sum *.zip > SHA256SUMS-win-x64
gpg --batch --yes --pinentry-mode loopback --passphrase "$GPG_PASSPHRASE" \
-u "$KEYID" --armor --detach-sign SHA256SUMS-win-x64
sha256sum -c SHA256SUMS-win-x64
- name: Attest build provenance
if: github.event_name == 'release'
uses: actions/attest-build-provenance@v2
with:
subject-path: |
*.zip
- name: Upload to release
if: github.event_name == 'release'
shell: bash
env:
GH_TOKEN: ${{ github.token }}
TAG: ${{ github.event.release.tag_name }}
run: gh release upload "$TAG" *.zip SHA256SUMS-win-x64 SHA256SUMS-win-x64.asc
+134
View File
@@ -0,0 +1,134 @@
name: Build Win-arm64 3proxy with MSVC
on:
release:
types: [published]
workflow_dispatch:
permissions:
contents: read
jobs:
ci:
permissions:
contents: write
id-token: write
attestations: write
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 wolfssl: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 WOLFSSL=1
- 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: Checksums and detached signature
if: github.event_name == 'release'
shell: bash
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: |
if [ -z "$GPG_PRIVATE_KEY" ]; then echo "GPG_PRIVATE_KEY is not set"; exit 1; fi
printf '%s' "$GPG_PRIVATE_KEY" | gpg --batch --import
KEYID=$(gpg --list-secret-keys --with-colons | awk -F: '/^sec:/{print $5; exit}')
sha256sum *.zip > SHA256SUMS-win-arm64
gpg --batch --yes --pinentry-mode loopback --passphrase "$GPG_PASSPHRASE" \
-u "$KEYID" --armor --detach-sign SHA256SUMS-win-arm64
sha256sum -c SHA256SUMS-win-arm64
- name: Attest build provenance
if: github.event_name == 'release'
uses: actions/attest-build-provenance@v2
with:
subject-path: |
*.zip
- name: Upload to release
if: github.event_name == 'release'
shell: bash
env:
GH_TOKEN: ${{ github.token }}
TAG: ${{ github.event.release.tag_name }}
run: gh release upload "$TAG" *.zip SHA256SUMS-win-arm64 SHA256SUMS-win-arm64.asc
+36
View File
@@ -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-get update && sudo apt-get install -y 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
+33
View File
@@ -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
+43
View File
@@ -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 wolfssl:x64-windows-static && c:\msys64\usr\bin\pacman.exe -S --noconfirm mingw-w64-x86_64-pcre2 mingw-w64-x86_64-wolfssl
- 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:/vcpkg/installed/x64-windows-static/lib;c:/vcpkg/installed/x64-windows/lib"
set "INCLUDE=%INCLUDE%;c:/vcpkg/installed/x64-windows-static/include;c:/vcpkg/installed/x64-windows/include"
nmake /F Makefile.msvc WOLFSSL=1 || exit /b 1
nmake /F Makefile.msvc clean
+74
View File
@@ -0,0 +1,74 @@
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-get update && sudo apt-get install -y 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
wolfssl:
name: "ubuntu-latest (wolfSSL)"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Install wolfSSL
run: sudo apt-get update && sudo apt-get install -y libwolfssl-dev
- name: make with CMake (wolfSSL preferred)
run: |
mkdir build
cd build
cmake ..
cmake --build .
cd .. && rm -rf build/
+35
View File
@@ -0,0 +1,35 @@
name: Build Docker images (test, no publish)
on:
workflow_dispatch:
permissions:
contents: read
jobs:
build:
name: Build ${{ matrix.file }} (${{ matrix.platform }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
file: [Dockerfile.minimal, Dockerfile.busybox, Dockerfile.full]
platform: [linux/amd64, linux/arm64]
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Set up QEMU
uses: docker/setup-qemu-action@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Build image
uses: docker/build-push-action@v7
with:
context: .
file: ${{ matrix.file }}
platforms: ${{ matrix.platform }}
push: false
load: ${{ matrix.platform == 'linux/amd64' }}
+193
View File
@@ -0,0 +1,193 @@
name: Build Docker images
on:
release:
types: [published]
workflow_dispatch:
permissions:
contents: read
env:
DOCKERHUB_IMAGE: docker.io/3proxy/3proxy
GHCR_IMAGE: ghcr.io/3proxy/3proxy
jobs:
build:
name: ${{ matrix.image }} ${{ matrix.platform }}
permissions:
contents: read
packages: write
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
image: [full, busybox, minimal]
platform: [linux/amd64, linux/arm64, linux/arm/v7]
include:
- platform: linux/amd64
runner: ubuntu-latest
- platform: linux/arm64
runner: ubuntu-24.04-arm
- platform: linux/arm/v7
runner: ubuntu-24.04-arm
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Platform name
id: platform
run: echo "pair=$(echo '${{ matrix.platform }}' | tr / -)" >> "$GITHUB_OUTPUT"
- name: Set up QEMU
if: matrix.platform == 'linux/arm/v7'
uses: docker/setup-qemu-action@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Login to GHCR
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push by digest
id: build
uses: docker/build-push-action@v7
with:
context: .
file: Dockerfile.${{ matrix.image }}
platforms: ${{ matrix.platform }}
provenance: false
sbom: false
outputs: type=image,name=${{ env.GHCR_IMAGE }},push-by-digest=true,name-canonical=true,push=true
- name: Export digest
env:
DIGEST: ${{ steps.build.outputs.digest }}
run: |
mkdir -p /tmp/digests
touch "/tmp/digests/${DIGEST#sha256:}"
- name: Upload digest
uses: actions/upload-artifact@v7
with:
name: digests-${{ matrix.image }}-${{ steps.platform.outputs.pair }}
path: /tmp/digests/*
if-no-files-found: error
retention-days: 1
publish:
name: Publish ${{ matrix.image }}
permissions:
contents: read
packages: write
id-token: write
attestations: write
runs-on: ubuntu-latest
needs: build
strategy:
fail-fast: false
matrix:
include:
- image: full
suffix: ''
floating: latest
- image: busybox
suffix: .busybox
floating: busybox
- image: minimal
suffix: .minimal
floating: minimal
steps:
- name: Download digests
uses: actions/download-artifact@v7
with:
path: /tmp/digests
pattern: digests-${{ matrix.image }}-*
merge-multiple: true
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Install cosign
uses: sigstore/cosign-installer@v3
with:
cosign-release: v2.4.3
- name: Login to Docker Hub
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GHCR
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Determine tags
id: tags
env:
RELEASE_TAG: ${{ github.event.release.tag_name }}
SUFFIX: ${{ matrix.suffix }}
FLOATING: ${{ matrix.floating }}
run: |
if [[ "$RELEASE_TAG" != "" ]]; then
RELEASE="${RELEASE_TAG#v}"
echo "versioned=${RELEASE}${SUFFIX}" >> "$GITHUB_OUTPUT"
echo "moving=${FLOATING}" >> "$GITHUB_OUTPUT"
else
DATETIME=$(date +%d%m%y%H%M%S)
BRANCH=$(echo "${GITHUB_REF#refs/heads/}" | tr "/" "-")
echo "versioned=${DATETIME}-${BRANCH}${SUFFIX}" >> "$GITHUB_OUTPUT"
echo "moving=${BRANCH}${SUFFIX}" >> "$GITHUB_OUTPUT"
fi
- name: Create manifest list and push
working-directory: /tmp/digests
env:
VERSIONED: ${{ steps.tags.outputs.versioned }}
MOVING: ${{ steps.tags.outputs.moving }}
run: |
docker buildx imagetools create \
-t "${DOCKERHUB_IMAGE}:${VERSIONED}" \
-t "${DOCKERHUB_IMAGE}:${MOVING}" \
-t "${GHCR_IMAGE}:${VERSIONED}" \
-t "${GHCR_IMAGE}:${MOVING}" \
$(printf "${GHCR_IMAGE}@sha256:%s " *)
- name: Get pushed digest
id: digest
env:
VERSIONED: ${{ steps.tags.outputs.versioned }}
run: |
DIGEST=$(docker buildx imagetools inspect "${DOCKERHUB_IMAGE}:${VERSIONED}" \
--format '{{json .Manifest}}' | jq -r .digest)
echo "digest=${DIGEST}" >> "$GITHUB_OUTPUT"
- name: Attest Docker Hub image
uses: actions/attest-build-provenance@v2
with:
subject-name: ${{ env.DOCKERHUB_IMAGE }}
subject-digest: ${{ steps.digest.outputs.digest }}
push-to-registry: false
- name: Attest GHCR image
uses: actions/attest-build-provenance@v2
with:
subject-name: ${{ env.GHCR_IMAGE }}
subject-digest: ${{ steps.digest.outputs.digest }}
push-to-registry: false
- name: Sign images
env:
DIGEST: ${{ steps.digest.outputs.digest }}
run: |
cosign sign --yes "${DOCKERHUB_IMAGE}@${DIGEST}"
cosign sign --yes "${GHCR_IMAGE}@${DIGEST}"
+51
View File
@@ -0,0 +1,51 @@
name: Update HTML documentation
on:
push:
paths:
- 'man/**'
workflow_dispatch:
permissions:
contents: read
jobs:
docs:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Install groff
run: |
sudo apt-get update
sudo apt-get install -y groff
- name: Generate HTML from man pages
run: |
mkdir -p doc/html/man5 doc/html/man8
echo \<html\>\<title\>3proxy documentation\</title\>\<body\>\<h2\>3proxy documentation\</h2\> >doc/html/index.html
echo \<a href=\"securityen.html\"\>Security recommendations\</a\>\<br\> >>doc/html/index.html
echo \<a href=\"highload.html\"\>Optimizing 3proxy for high loads\</a\>\<br\> >>doc/html/index.html
echo \<a href=\"howtoe.html\"\>How To \(English, very incomplete\)\</a\>\<br\> >>doc/html/index.html
echo \<a href=\"howtor.html\"\>How To \(Russian\)\</a\>\<br\> >>doc/html/index.html
echo \<a href=\"devref.html\"\>Developer reference\</a\>\<br\> >>doc/html/index.html
echo \<h3\>Man pages:\</h3\> >>doc/html/index.html
cd man
for i in *.8; do ((bash -c "groff -mandoc -Thtml $i | grep -v DOCTYPE| grep -v text/css| grep -v 'meta ' | grep -v /style | grep -v { | grep -v /title | grep -v www.w3.org | grep -v CreationDate" > ../doc/html/man8/$i.html ) && echo \<br\>\<A HREF=\"man8/$i.html\"\>$i\</A\> >> ../doc/html/index.html); done
for i in *.5; do ((bash -c "groff -mandoc -Thtml $i | grep -v DOCTYPE| grep -v text/css| grep -v 'meta ' | grep -v /style | grep -v { | grep -v /title | grep -v www.w3.org | grep -v CreationDate" > ../doc/html/man5/$i.html ) && echo \<br\>\<A HREF=\"man5/$i.html\"\>$i\</A\> >> ../doc/html/index.html); done
cd ..
echo \</body\>\</html\> >>doc/html/index.html
- name: Commit
run: |
if [ -z "$(git status --porcelain doc/html)" ]; then
echo "documentation already up to date"
exit 0
fi
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add doc/html
git commit -m "Update HTML documentation from man pages"
git push
+94
View File
@@ -0,0 +1,94 @@
name: Update version files
on:
push:
paths:
- RELEASE
workflow_dispatch:
permissions:
contents: read
jobs:
version:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Regenerate version files
run: |
RELEASE=$(tr -d ' \t\r\n' < RELEASE)
if [ -z "$RELEASE" ]; then echo "RELEASE is empty"; exit 1; fi
MAJOR=$(echo "$RELEASE" | cut -d . -f 1)
SUBMAJOR=$(echo "$RELEASE" | cut -d . -f 2)
MINOR=$(echo "$RELEASE" | cut -d . -f 3)
SUBMINOR=$(echo "$RELEASE" | cut -d . -f 4)
[ -n "$SUBMAJOR" ] || SUBMAJOR=0
[ -n "$MINOR" ] || MINOR=0
[ -n "$SUBMINOR" ] || SUBMINOR=0
# The build date is minted once per release and then carried in
# version.h, so that rebuilding the same commit yields the same
# version string and the same package names.
OLDRELEASE=$(sed -n 's/^#define VERSION "3proxy-\(.*\)"$/\1/p' src/version.h 2>/dev/null)
OLDBUILDDATE=$(sed -n 's/^#define BUILDDATE "\(.*\)"$/\1/p' src/version.h 2>/dev/null)
if [ "$OLDRELEASE" = "$RELEASE" ] && [ -n "$OLDBUILDDATE" ]; then
BUILDDATE="$OLDBUILDDATE"
else
BUILDDATE=$(date -u +%y%m%d%H%M%S)
fi
echo "release $RELEASE -> $MAJOR $SUBMAJOR $MINOR $SUBMINOR, build date $BUILDDATE"
SOURCE_DATE_EPOCH=$(date -u -d "20${BUILDDATE:0:2}-${BUILDDATE:2:2}-${BUILDDATE:4:2} ${BUILDDATE:6:2}:${BUILDDATE:8:2}:${BUILDDATE:10:2}" +%s)
YEAR=$(date -u -d @$SOURCE_DATE_EPOCH +%Y)
DEBVERSION=$(head -1 debian/changelog | cut -d "(" -f 2 | cut -d ")" -f 1)
if [ "$DEBVERSION" != "$RELEASE-1" ]; then
mv debian/changelog debian/changelog.old
{ echo "3proxy ($RELEASE-1) buster; urgency=medium"
echo ""
echo " *3proxy $RELEASE initial build"
echo ""
echo " -- z3APA3A <3apa3a@3proxy.org> $(date -R -u -d @$SOURCE_DATE_EPOCH)"
echo ""
cat debian/changelog.old
} > debian/changelog
rm -f debian/changelog.old
fi
mv scripts/rh/3proxy.spec scripts/rh/3proxy.spec.old
{ echo "Name: 3proxy"
echo "Version: $RELEASE"
echo "Release: 1%{?dist}"
tail --lines=+4 scripts/rh/3proxy.spec.old
} > scripts/rh/3proxy.spec
rm -f scripts/rh/3proxy.spec.old
{ echo "#ifndef VERSION"
echo "#define VERSION \"3proxy-$RELEASE\""
echo "#endif"
echo "#ifndef BUILDDATE"
echo "#define BUILDDATE \"$BUILDDATE\""
echo "#endif"
echo "#define MAJOR3PROXY $MAJOR"
echo "#define SUBMAJOR3PROXY $SUBMAJOR"
echo "#define MINOR3PROXY $MINOR"
echo "#define SUBMINOR3PROXY $SUBMINOR"
echo "#define RELEASE3PROXY \"3proxy-$RELEASE(\" BUILDDATE \")\\0\""
echo "#ifndef YEAR3PROXY"
echo "#define YEAR3PROXY \"$YEAR\""
echo "#endif"
} > src/version.h
- name: Commit
run: |
if [ -z "$(git status --porcelain debian/changelog scripts/rh/3proxy.spec src/version.h)" ]; then
echo "version files already up to date"
exit 0
fi
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add debian/changelog scripts/rh/3proxy.spec src/version.h
git commit -m "Update version files for $(tr -d ' \t\r\n' < RELEASE)"
git push
+72
View File
@@ -0,0 +1,72 @@
name: Update wiki
on:
push:
paths:
- 'doc/html/**'
workflow_run:
workflows: ["Update HTML documentation"]
types: [completed]
workflow_dispatch:
permissions:
contents: write
concurrency:
group: update-wiki
cancel-in-progress: false
jobs:
wiki:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
ref: master
- name: Clone wiki
run: |
git clone --quiet \
"https://x-access-token:${{ github.token }}@github.com/${{ github.repository }}.wiki.git" wiki
- name: Copy documentation
run: |
cp -f doc/html/man8/3proxy.8.html wiki/3proxy.md
cp -f doc/html/man8/3proxy_crypt.8.html wiki/3proxy_crypt.md
cp -f doc/html/man8/ftppr.8.html wiki/ftppr.md
cp -f doc/html/man8/pop3p.8.html wiki/pop3p.md
cp -f doc/html/man8/imapp.8.html wiki/imapp.md
cp -f doc/html/man8/proxy.8.html wiki/proxy.md
cp -f doc/html/man8/smtpp.8.html wiki/smtpp.md
cp -f doc/html/man8/socks.8.html wiki/socks.md
cp -f doc/html/man8/tlspr.8.html wiki/tlspr.md
cp -f doc/html/man8/tcppm.8.html wiki/tcppm.md
cp -f doc/html/man8/udppm.8.html wiki/udppm.md
cp -f doc/html/man5/3proxy.cfg.5.html wiki/3proxy.cfg.md
cp -f doc/html/highload.html wiki/High-Load.md
cp -f doc/html/howtoe.html wiki/How-To.md
cp -f doc/html/howtor.html "wiki/How-To-(русский).md"
cp -f doc/html/securityen.html wiki/Security-recommendations.md
cp -f doc/html/devel/devref.html wiki/DevelopeReference.md
cp -f doc/html/plugins/TransparentPlugin.html wiki/TransparentPlugin.md
cp -f doc/html/plugins/StringsPlugin.html wiki/StringsPlugin.md
cp -f doc/html/plugins/TrafficPlugin.html wiki/TrafficPlugin.md
cp -f doc/html/plugins/WindowsAuthentication.html wiki/WindowsAuthentication.md
cp -f doc/html/plugins/TransparentPlugin.ru.html "wiki/TransparentPlugin-(русский).md"
cp -f doc/html/plugins/StringsPlugin.ru.html "wiki/StringsPlugin-(русский).md"
cp -f doc/html/plugins/TrafficPlugin.ru.html "wiki/TrafficPlugin-(русский).md"
cp -f doc/html/plugins/WindowsAuthentication.ru.html "wiki/WindowsAuthentication-(русский).md"
- name: Commit
run: |
cd wiki
if [ -z "$(git status --porcelain)" ]; then
echo "wiki already up to date"
exit 0
fi
git status --short
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add -A
git commit -m "Update documentation from master"
git push
+53 -10
View File
@@ -5,7 +5,24 @@
*.pydevproject
.project
.metadata
bin/
*.exe
*.dll
*.exp
*.lib
*.key
*.pem
*.so
bin/3proxy
bin/proxy
bin/socks
bin/tcppm
bin/udppm
bin/pop3p
bin/imapp
bin/smtpp
bin/ftppr
bin/mycrypt
bin/tlspr
bin64/
dll/
tmp/
@@ -15,17 +32,31 @@ tmp/
*.swp
*.o
*.idb
src/res
*.err
res
version.c
version
version.sh
buildlinux.sh
3proxy.res
doc/html/man3/
doc/html/man8/
doc/html/index.html
src/3proxy
src/proxy
src/socks
src/tcppm
src/udppm
src/pop3p
src/imapp
src/smtpp
src/ftppr
src/icqpr
src/mycrypt
src/dighosts
*.ld.so
*.dSYM
*.var
verfile.sh
Makefile
Changelog
res
/Makefile
copytgz.sh
*~.nib
local.properties
@@ -64,7 +95,6 @@ local.properties
[Rr]elease/
x64/
build/
[Bb]in/
[Oo]bj/
# MSTest test Results
@@ -157,7 +187,6 @@ csx
AppPackages/
# Others
sql/
*.Cache
ClientBin/
[Ss]tyle[Cc]op.*
@@ -230,3 +259,17 @@ pip-log.txt
#Mr Developer
.mr.developer.cfg
CLAUDE.md
bin/3proxy_crypt
bin/3proxy_ftppr
bin/3proxy_pop3p
bin/3proxy_imapp
bin/3proxy_proxy
bin/3proxy_smtpp
bin/3proxy_socks
bin/3proxy_tcppm
bin/3proxy_tlspr
bin/3proxy_udppm
build*/*
testcerts/
/.claude
+29
View File
@@ -0,0 +1,29 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBGqIZCIBEADF3zxdMo2dvUGAlQm3aIcQiqmpLMHucvLfSK3fHtwagO8f03CO
bEx9EfIK/U6BzLwEJ0CxyClzfvgo9COVpi5EjES9sI2LXzcgc4hGaYO0Q4Unj//0
W/G8aarDaLF2NRKMLf07eaYGBRJjqHnmeHgOHdr+SnN0JtMSadWMHoliB8esnabz
5CO4JabTrhwoez3DMLSgJNIod7wL6PJJv/2BeRahwNr2CjaXmzZKr/j7fc1MKLij
bsvJ5OmLmngZr6CHDa9cBhVhiH+7RgWLCsRlEGxEv7w0afp/T0xDwNAPkGzk5ObC
BrdXvypTAbNyUoVT8qSVJwkneZ4S0Ts4rRRNfNpaus4tsCmgyGKzsrbxvbiBOTPW
jB/fjkgr6X9M/AQ3yGpXrwXRJrM/nSfjUyOEHXttTC9HpGt41NH/mpC4mDWa1Kxi
FMxuo1+dw2kpDKl0Bp78IGdCo5akHwftFr8aHgmfZoGXAGJRHPAWbJGjC2ARy8yp
QOpxba0S3VlCU6bs8MDKl6cpWItnlXcl/GD/Qc55bjLXjFv1pbn2RUSYZS+n9wDX
64syZf3dZ/N5U4ydmybWfiLFUXqKQLtdO8QAWQGt4TSwKptTmI581/MMCTQ8qWZL
zgFj6C/8K0SZ4lMOv+5zfc2+QOoWw7E2Ws3stEKTyWjOMm/QMJAGumqvqwARAQAB
tCozcHJveHkgcmVsZWFzZSBzaWduaW5nIDwzcHJveHlAM3Byb3h5Lm9yZz6JAm0E
EwEIAFcWIQT8EiFEmfzHuhz/bNwDEjhOOnOUCwUCaohkIhsUgAAAAAAEAA5tYW51
MiwyLjUrMS4xMiwwLDMCGwMFCwkIBwICIgIGFQoJCAsCBBYCAwECHgcCF4AACgkQ
AxI4TjpzlAsCwRAAtH3OO42yCd2B8Od4yS1yBDkaIFwEm8hF68eou6uaSDkKG8YZ
C3DUH7qk0nXEMQu/5J6RWZKlW1C8D3AkUR9A1g54o6mUg4IL5196XsrQRdVu64YF
nLCk17Piku1lMk+Re6bZ6uJv5UlSv8d0dvxmAYzjusyPyBC2VXy7B0CoDif6AmXt
aw2/V6m0dRrfFo4W9mJKUqTAJcdBOKzEiQb7qLnzuwy4CB5qsvnEQTqymoCXFXzg
VDCSKRLXnbDPbIs0TvsCmthn/w1hCgftPq4W0s7EUJBOhbrjF59+AuTb+U1wIXNR
1+DPF+V+5RlwWjOWMlsOVGk2jaxjVY8wuaD3rE6ISJkt1pRv/WVdY984rT7Eu94J
ZHnxPjFrb2ohFKjoBCt60kbgZbuQ6yvEma5lAF9K63gwMNNyGZvq6QWl58iouzuS
3B9t7EwGwFstJfaXVhn/rnIHoExgxVZMbbsmXiGJyE2KcfVmlZcEi0MIyqEeBSDD
gjpE4yVO6StBtJKfXra8rMwtsbWBw9MptPhcLvdWtN6TG0CxDyTHhdL1pSLNcwX1
CTVpwi6+WmGogcv0WFNn5caQUpu9le/v/5qLRK08KWOH8inMJmTfpJg/9869YJuF
vDKdzJd6jug5YQRfV/7YVC2hdSOBLvBuDpRINePrj9CKJ34qG+jRSJ5xwYk=
=IS3Y
-----END PGP PUBLIC KEY BLOCK-----
-31
View File
@@ -1,31 +0,0 @@
#include "src/version.h"
LANGUAGE 0x09, 0x01
VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,8,0,0
PRODUCTVERSION 0,8,0,0
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "000004b0"
BEGIN
VALUE "Comments", "3proxy - tiny proxy server, http://3proxy.ru/"
VALUE "CompanyName", "Vladimir Dubrovin"
VALUE "FileDescription", "3proxy - tiny proxy server"
VALUE "FileVersion", VERSION "-" BUILDDATE
VALUE "InternalName", "3proxy"
VALUE "LegalCopyright", "Copyright (C) 2002-2014 Vladimir Dubrovin"
VALUE "OriginalFilename", "3proxy.exe"
VALUE "ProductName", "3proxy - tiny proxy server"
VALUE "ProductVersion", VERSION
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x0, 1200
END
END
0 ICON DISCARDABLE "3proxy.ico"
+13
View File
@@ -0,0 +1,13 @@
3proxy-1.0.0 Released August, 22 2026
No changes in 3proxy code, this release only changes how packages are built, signed and published.
! Fix: TLS, PCRE2 and PAM support was silently left out when 3proxy was built on a system whose /bin/sh is not dash, which is every RPM based distribution and macOS; the library checks built their test program with echo and escape sequences, which only dash expands, so every check failed and the features were dropped without a diagnostic
! Fix: rpm packages were built on Ubuntu and required glibc 2.38, libssl.so.3 and libpcre2-8, which no RPM based distribution provides, so they could not be installed anywhere; they are built against AlmaLinux 8, 9 and 10 now and carry an el8, el9 or el10 tag, covering RHEL, AlmaLinux, Rocky and CentOS Stream of the same version
! Fix: the rpm package depended on its own interpreter, /bin/3proxy, taken from the first line of the installed configuration file, and could not be installed on el9 or el10 because rpm resolves that dependency to /usr/bin/3proxy
! Fix: deb packages required glibc 2.38 and libssl3t64 and installed on Ubuntu 24.04 and newer only; they are built against Ubuntu 22.04 now and install on Ubuntu 22.04 and later as well as Debian 12 and later
+ Signed apt and dnf repositories are published at https://3proxy.org/repo/ in two channels: current, built from the master branch, and lts, built from the 0.9 branch; packages and repository metadata are both signed
+ Release binaries are published with SHA256 checksums, an OpenPGP signature and a GitHub build provenance attestation; docker images are signed and attested as well
+ The release signing key is an RSA-4096 key published as 3proxy-release-key.asc in the repository; rpm 4.14 and earlier can not import an Ed25519 key at all, which would leave RHEL 8 and its derivatives unable to verify anything
+ Packages are reproducible: rebuilding a release produces byte identical deb and rpm files, every timestamp is derived from the build date recorded for the release
- 32-bit ARM (armhf) is published as a deb package only, Enterprise Linux has no 32-bit ARM build
+13
View File
@@ -0,0 +1,13 @@
3proxy-1.0.0 Вышел 22 Августа 2026
Изменений в коде 3proxy нет, этот выпуск меняет только сборку, подписывание и публикацию пакетов.
! Исправление: поддержка TLS, PCRE2 и PAM молча не включалась при сборке в системах, где /bin/sh не dash, то есть во всех дистрибутивах на основе RPM и в macOS; проверки наличия библиотек формировали тестовую программу через echo с escape-последовательностями, которые раскрывает только dash, поэтому все проверки завершались неудачно и возможности отключались без каких-либо сообщений
! Исправление: пакеты rpm собирались в Ubuntu и требовали glibc 2.38, libssl.so.3 и libpcre2-8, которых нет ни в одном дистрибутиве на основе RPM, поэтому установить их было невозможно нигде; теперь они собираются в AlmaLinux 8, 9 и 10 и содержат метку el8, el9 или el10, что покрывает RHEL, AlmaLinux, Rocky и CentOS Stream соответствующей версии
! Исправление: пакет rpm зависел от собственного интерпретатора /bin/3proxy, взятого из первой строки устанавливаемого файла конфигурации, и не устанавливался в el9 и el10, поскольку rpm приводит эту зависимость к /usr/bin/3proxy
! Исправление: пакеты deb требовали glibc 2.38 и libssl3t64 и устанавливались только в Ubuntu 24.04 и новее; теперь они собираются в Ubuntu 22.04 и устанавливаются в Ubuntu 22.04 и новее, а также в Debian 12 и новее
+ Подписанные репозитории apt и dnf публикуются на https://3proxy.org/repo/ в двух каналах: current, собираемый из ветки master, и lts, собираемый из ветки 0.9; подписываются и пакеты, и метаданные репозитория
+ Двоичные файлы релиза публикуются с контрольными суммами SHA256, подписью OpenPGP и подтверждением происхождения сборки GitHub (build provenance attestation); образы docker также подписываются и снабжаются подтверждением
+ Ключ подписи релизов — RSA-4096, опубликован в репозитории как 3proxy-release-key.asc; rpm версии 4.14 и более ранние вообще не могут импортировать ключ Ed25519, что лишило бы RHEL 8 и производные от него возможности проверки
+ Пакеты воспроизводимы: повторная сборка релиза даёт побайтово идентичные файлы deb и rpm, все отметки времени берутся из даты сборки, записанной для релиза
- Для 32-битной ARM (armhf) публикуется только пакет deb, в Enterprise Linux нет сборки для 32-битной ARM
+953
View File
@@ -0,0 +1,953 @@
#
# 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_WOLFSSL "Enable TLS/SSL support via wolfSSL (preferred when detected)" ON)
option(3PROXY_USE_OPENSSL "Enable TLS/SSL support via OpenSSL (fallback when wolfSSL unavailable)" 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 "Build Linux splice() support, slower than read/write for most traffic (Linux only)" OFF)
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_IMAPP "Build standalone imapp 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 IMAPP 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()
# Unix domain sockets off: NO_UN also undefines WITH_UN if it arrives from
# elsewhere, e.g. CFLAGS
if(NOT 3PROXY_USE_UNIX_SOCKETS)
add_compile_definitions(NO_UN)
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
# TLS/SSL backend: prefer wolfSSL when detected, fall back to OpenSSL.
set(3PROXY_SSL_ENABLED FALSE)
set(3PROXY_SSL_WOLFSSL FALSE)
set(OPENSSL_FOUND FALSE)
set(WOLFSSL_FOUND FALSE)
if(3PROXY_USE_WOLFSSL)
find_path(WOLFSSL_INCLUDE_DIR NAMES wolfssl/options.h wolfssl/ssl.h)
find_library(WOLFSSL_LIBRARIES NAMES wolfssl)
if(WOLFSSL_INCLUDE_DIR AND WOLFSSL_LIBRARIES)
set(WOLFSSL_FOUND TRUE)
set(3PROXY_SSL_ENABLED TRUE)
set(3PROXY_SSL_WOLFSSL TRUE)
add_compile_definitions(WITH_SSL WITH_WOLFSSL)
message(STATUS "wolfSSL found: ${WOLFSSL_LIBRARIES} (preferred backend)")
else()
message(STATUS "wolfSSL not found, falling back to OpenSSL if enabled")
endif()
endif()
if(NOT 3PROXY_SSL_ENABLED AND 3PROXY_USE_OPENSSL)
find_package(OpenSSL REQUIRED)
if(OpenSSL_FOUND)
set(OPENSSL_FOUND TRUE)
set(3PROXY_SSL_ENABLED TRUE)
add_compile_definitions(WITH_SSL)
message(STATUS "OpenSSL found: ${OPENSSL_VERSION}")
endif()
elseif(NOT 3PROXY_SSL_ENABLED)
message(STATUS "SSL disabled (neither wolfSSL nor OpenSSL enabled/found)")
elseif(3PROXY_SSL_WOLFSSL)
message(STATUS "OpenSSL skipped (wolfSSL in use)")
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 no SSL backend is available (RADIUS MD5 uses bundled md5, but
# keep the historical gate tied to SSL availability).
if(NOT 3PROXY_SSL_ENABLED)
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
)
# Bundled hash implementations (md4.c, md5.c, blake2b-ref.c) self-disable
# via preprocessor guards when wolfSSL provides them natively.
# ============================================================================
# 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)
# mdhash object library. md4.c/md5.c self-disable via NO_MD4/NO_MD5 guards
# when wolfSSL provides them; always compiled for fallback.
add_library(mdhash_obj OBJECT src/mdhash.c src/libs/md4.c src/libs/md5.c src/libs/blake2b-ref.c)
target_include_directories(mdhash_obj PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src)
if(3PROXY_SSL_WOLFSSL)
target_include_directories(mdhash_obj PRIVATE ${WOLFSSL_INCLUDE_DIR})
endif()
# ============================================================================
# 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/imapp.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(3PROXY_SSL_ENABLED)
if(3PROXY_SSL_WOLFSSL)
target_include_directories(3proxy_crypt_obj PRIVATE ${WOLFSSL_INCLUDE_DIR})
else()
target_include_directories(3proxy_crypt_obj PRIVATE ${OPENSSL_INCLUDE_DIR})
endif()
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:mdhash_obj>
$<TARGET_OBJECTS:ftp_obj>
$<TARGET_OBJECTS:3proxy_crypt_obj>
)
if(3PROXY_SSL_ENABLED)
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(3PROXY_SSL_ENABLED)
if(3PROXY_SSL_WOLFSSL)
target_include_directories(3proxy PRIVATE ${WOLFSSL_INCLUDE_DIR})
else()
target_include_directories(3proxy PRIVATE ${OPENSSL_INCLUDE_DIR})
endif()
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()
# SSL linking
if(3PROXY_SSL_ENABLED)
if(3PROXY_SSL_WOLFSSL)
if(3PROXY_STATIC_LINK)
# Will be linked statically below (if static library is found)
else()
target_link_libraries(3proxy PRIVATE ${WOLFSSL_LIBRARIES})
endif()
elseif(3PROXY_STATIC_LINK)
# OpenSSL static linking handled below
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 SSL backend and PCRE2 (when option is enabled)
if(3PROXY_STATIC_LINK AND ((3PROXY_SSL_ENABLED AND NOT 3PROXY_SSL_WOLFSSL) OR (3PROXY_SSL_WOLFSSL) OR PCRE2_FOUND))
set(_saved_cmake_find_library_suffixes ${CMAKE_FIND_LIBRARY_SUFFIXES})
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
set(_static_libs "")
if(3PROXY_SSL_WOLFSSL)
find_library(_wolfssl_static_lib NAMES wolfssl)
if(_wolfssl_static_lib)
list(APPEND _static_libs ${_wolfssl_static_lib})
endif()
elseif(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 SSL backend/PCRE2")
else()
message(WARNING "3PROXY_STATIC_LINK is ON but static libraries not found, falling back to dynamic")
if(3PROXY_SSL_WOLFSSL)
target_link_libraries(3proxy PRIVATE ${WOLFSSL_LIBRARIES})
elseif(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_OBJECTS:mdhash_obj>
)
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(3PROXY_SSL_ENABLED)
if(3PROXY_SSL_WOLFSSL)
target_include_directories(3proxy_crypt PRIVATE ${WOLFSSL_INCLUDE_DIR})
else()
target_include_directories(3proxy_crypt PRIVATE ${OPENSSL_INCLUDE_DIR})
endif()
endif()
target_link_libraries(3proxy_crypt PRIVATE Threads::Threads)
if(3PROXY_SSL_ENABLED)
if(3PROXY_SSL_WOLFSSL)
if(3PROXY_STATIC_LINK)
set(_saved_cmake_find_library_suffixes ${CMAKE_FIND_LIBRARY_SUFFIXES})
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
find_library(_wolfssl_static_lib_c NAMES wolfssl)
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_saved_cmake_find_library_suffixes})
if(_wolfssl_static_lib_c)
target_link_libraries(3proxy_crypt PRIVATE -Wl,-Bstatic ${_wolfssl_static_lib_c} -Wl,-Bdynamic)
message(STATUS "3proxy_crypt: static wolfSSL")
else()
message(WARNING "3PROXY_STATIC_LINK is ON but static wolfSSL not found, using dynamic")
target_link_libraries(3proxy_crypt PRIVATE ${WOLFSSL_LIBRARIES})
endif()
else()
target_link_libraries(3proxy_crypt PRIVATE ${WOLFSSL_LIBRARIES})
endif()
else()
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()
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 imapp 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" OR PROXY_NAME STREQUAL "imapp")
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 imapp 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
# Use install(DIRECTORY ... FILES_MATCHING) so the glob resolves at install
# time, after plugin targets have been built. A configure-time file(GLOB)
# would run before any plugin exists and install nothing.
if(WIN32)
install(DIRECTORY ${PLUGIN_OUTPUT_DIR}/
DESTINATION ${CMAKE_INSTALL_BINDIR}
FILES_MATCHING PATTERN "*${PLUGIN_SUFFIX}"
)
else()
install(DIRECTORY ${PLUGIN_OUTPUT_DIR}/
DESTINATION ${CMAKE_INSTALL_LIBDIR}/3proxy
FILES_MATCHING PATTERN "*${PLUGIN_SUFFIX}"
)
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 imapp 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_WOLFSSL: ${3PROXY_USE_WOLFSSL}")
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 " wolfSSL: ${WOLFSSL_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 imapp smtpp ftppr tcppm udppm tlspr)
string(TOUPPER "${_M}" _MO)
message(STATUS " BUILD_${_MO}: ${3PROXY_BUILD_${_MO}}")
endforeach()
message(STATUS "")
+67
View File
@@ -0,0 +1,67 @@
# 3proxy.busybox is fully functional 3proxy build based on busybox:musl
# built against wolfSSL and PCRE2.
#
# 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/alpine:latest AS wolfssl
RUN apk add --no-cache build-base curl autoconf automake libtool linux-headers
RUN TAG=$(curl -s https://api.github.com/repos/wolfSSL/wolfssl/releases/latest \
| sed -n 's/.*"tag_name": *"\([^"]*\)".*/\1/p') && \
echo "wolfssl tag: $TAG" && \
curl -sL https://api.github.com/repos/wolfSSL/wolfssl/tarball/$TAG -o /tmp/w.tar.gz && \
mkdir /src && tar -xzf /tmp/w.tar.gz -C /src --strip-components=1 && \
cd /src && \
autoreconf -i && \
./configure --enable-opensslextra --enable-certgen \
--enable-tls13 --enable-sni --enable-session-ticket \
--enable-static --disable-shared --prefix=/usr/local && \
make -j$(nproc) && make install
FROM docker.io/alpine:latest AS buildenv
RUN apk add --no-cache gcc make musl-dev pcre2-dev
COPY --from=wolfssl /usr/local /usr/local
COPY . 3proxy
RUN cd 3proxy && mkdir -p bin &&\
make -f Makefile.Linux LIBSTATIC=true PAM_CHECK=false WOLFSSL_CHECK=true \
EXTRA_LDFLAGS="-L/usr/local/lib" &&\
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-musl-*.so.* /dist/usr/local/3proxy/libexec || true
FROM docker.io/busybox:musl
COPY --from=buildenv /dist /
RUN mkdir -p /lib /lib64 && 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"]
+62
View File
@@ -0,0 +1,62 @@
# 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 &&\
mkdir -p bin &&\
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"]
+54
View File
@@ -0,0 +1,54 @@
# 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 a scratch-based docker with statically linked 3proxy executable
# built against musl and wolfSSL.
#
# 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/alpine:latest AS wolfssl
RUN apk add --no-cache build-base curl autoconf automake libtool linux-headers
RUN TAG=$(curl -s https://api.github.com/repos/wolfSSL/wolfssl/releases/latest \
| sed -n 's/.*"tag_name": *"\([^"]*\)".*/\1/p') && \
echo "wolfssl tag: $TAG" && \
curl -sL https://api.github.com/repos/wolfSSL/wolfssl/tarball/$TAG -o /tmp/w.tar.gz && \
mkdir /src && tar -xzf /tmp/w.tar.gz -C /src --strip-components=1 && \
cd /src && \
autoreconf -i && \
./configure --enable-opensslextra --enable-certgen \
--enable-tls13 --enable-sni --enable-session-ticket \
--enable-static --disable-shared --prefix=/usr/local && \
make -j$(nproc) && make install
FROM docker.io/alpine:latest AS buildenv
RUN apk add --no-cache gcc make musl-dev
COPY --from=wolfssl /usr/local /usr/local
COPY . 3proxy
RUN cd 3proxy && mkdir -p bin &&\
make -f Makefile.Linux STATIC=true WOLFSSL_CHECK=true \
EXTRA_LDFLAGS="-L/usr/local/lib" &&\
strip bin/3proxy
FROM scratch
COPY --from=buildenv 3proxy/bin/3proxy /bin/3proxy
CMD ["/bin/3proxy"]
+121
View File
@@ -0,0 +1,121 @@
#
# 3 proxy Makefile for GCC/Unix
#
# 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/
PREFIX ?= 3proxy_
CRYPT_PREFIX ?= $(PREFIX)
MANDIR ?= /usr/share/man
CC ?= cc
CFLAGS ?= -O3 -flto
CFLAGS += -c -fno-strict-aliasing -DFD_SETSIZE=4096 -DWITH_POLL -DWITH_UN
COUT = -o
LN ?= ${CC}
LDFLAGS ?= -O3 -flto
LDFLAGS += -pthread -fno-strict-aliasing
# Use EXTRA_CFLAGS/EXTRA_LDFLAGS to add flags from the make command line.
# Setting CFLAGS or LDFLAGS there instead overrides every assignment in this
# makefile, including the += above and the STATIC/LIBSTATIC handling below.
CFLAGS += $(EXTRA_CFLAGS)
LDFLAGS += $(EXTRA_LDFLAGS)
# -lpthreads may be reuiured on some platforms instead of -pthreads
# -ldl or -lld may be required for some platforms
DCFLAGS ?= -fPIC
DLFLAGS ?= -shared
DLSUFFICS = .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 -perm +111 -delete) || true
TYPECOMMAND = cat
COMPATLIBS =
MAKEFILE = Makefile.FreeBSD
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
WOLFSSL_CHECK ?= $(shell printf "\#include <wolfssl/options.h>\\n\#include <wolfssl/openssl/ssl.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testwssl.o - 2>/dev/null && $(CC) $(LDFLAGS) -otestwssl testwssl.o $(STATIC_PREFIX) -lwolfssl $(STATIC_SUFFIX) 2>/dev/null && rm testwssl testwssl.o && echo true||echo false)
ifeq ($(WOLFSSL_CHECK), true)
LIBS += $(STATIC_PREFIX) -lwolfssl $(STATIC_SUFFIX)
CFLAGS += -DWITH_SSL -DWITH_WOLFSSL
SSL_OBJS = ssllib$(OBJSUFFICS) ssl$(OBJSUFFICS)
ZLIB :=
else
OPENSSL_CHECK ?= $(shell printf "\#include <openssl/ssl.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testssl.o - 2>/dev/null && $(CC) $(LDFLAGS) -otestssl testssl.o $(STATIC_PREFIX) $(ZLIB) -lcrypto -lssl $(STATIC_SUFFIX) 2>/dev/null && rm testssl testssl.o && echo true||echo false)
ifeq ($(OPENSSL_CHECK), true)
LIBS += $(STATIC_PREFIX) $(ZLIB) -l crypto -l ssl $(STATIC_SUFFIX)
CFLAGS += -DWITH_SSL
SSL_OBJS = ssllib$(OBJSUFFICS) ssl$(OBJSUFFICS)
else
ZLIB :=
endif
endif
PCRE_CHECK ?= $(shell printf "\#define PCRE2_CODE_UNIT_WIDTH 8\\n\#include <pcre2.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testpcre.o - 2>/dev/null && $(CC) -o testpcre testpcre.o $(LDFLAGS) -lpcre2-8 2>/dev/null && rm testpcre testpcre.o && echo true||echo false)
ifeq ($(PCRE_CHECK), true)
CFLAGS += -DWITH_PCRE
PCRE_OBJS = pcre$(OBJSUFFICS)
PCRE_LIBS = $(STATIC_PREFIX) -lpcre2-8 $(STATIC_SUFFIX)
endif
PAM_CHECK ?= $(shell printf "\#include <security/pam_appl.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testpam.o - 2>/dev/null && $(CC) $(LDFLAGS) -o testpam testpam.o -lpam 2>/dev/null && rm testpam testpam.o && echo true||echo false)
ifeq ($(PAM_CHECK), true)
PLUGINS += PamAuth
endif
include Makefile.inc
DESTDIR ?=
prefix ?= /usr/local
BINPREFIX ?= $(prefix)/bin
install: all
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 imapp 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 imapp 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
+140 -45
View File
@@ -1,96 +1,191 @@
#
# 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 LDFLAGS 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.
#
# Linux splice() support is not built by default, it is slower than the
# read/write path for most traffic. Add -DWITHSPLICE to CFLAGS to build it,
# it must additionally be enabled per service with the -s option.
BUILDDIR =
CC = gcc
BUILDDIR = ../bin/
PREFIX ?= 3proxy_
CRYPT_PREFIX ?= $(PREFIX)
CC ?= gcc
CFLAGS = -g -O2 -c -pthread -DGETHOSTBYNAME_R -D_THREAD_SAFE -D_REENTRANT -DNOODBC -DWITH_STD_MALLOC -DFD_SETSIZE=4096 -DWITH_POLL
CFLAGS ?= -O3 -flto
CFLAGS += -fno-strict-aliasing -c -pthread -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 = -fpic
LDFLAGS = -O2 -pthread
DLFLAGS = -shared
LN ?= ${CC}
DCFLAGS ?= -fPIC
LDFLAGS ?= -O3 -flto
LDFLAGS += -fno-strict-aliasing -pthread
# Use EXTRA_CFLAGS/EXTRA_LDFLAGS to add flags from the make command line.
# Setting CFLAGS or LDFLAGS there instead overrides every assignment in this
# makefile, including the += above and the STATIC/LIBSTATIC handling below.
CFLAGS += $(EXTRA_CFLAGS)
LDFLAGS += $(EXTRA_LDFLAGS)
DLFLAGS ?= -shared
DLSUFFICS = .ld.so
# -lpthreads may be reuqired on some platforms instead of -pthreads
LIBS = -lcrypto -lssl -ldl
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.Linux
PLUGINS = SSLPlugin StringsPlugin TrafficPlugin PCREPlugin TransparentPlugin
# PamAuth requires libpam, you may require pam-devel package to be installed
# SSLPlugin requires -lcrypto -lssl
#LIBS = -lcrypto -lssl -ldl
#PLUGINS = SSLPlugin StringsPlugin TrafficPlugin PCREPlugin TransparentPlugin PamAuth
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
WOLFSSL_CHECK ?= $(shell printf "\#include <wolfssl/options.h>\\n\#include <wolfssl/openssl/ssl.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testwssl.o - 2>/dev/null && $(CC) $(LDFLAGS) -otestwssl testwssl.o $(STATIC_PREFIX) -lwolfssl $(STATIC_SUFFIX) 2>/dev/null && rm testwssl testwssl.o && echo true||echo false)
ifeq ($(WOLFSSL_CHECK), true)
LIBS += $(STATIC_PREFIX) -lwolfssl $(STATIC_SUFFIX)
CFLAGS += -DWITH_SSL -DWITH_WOLFSSL
SSL_OBJS = ssllib$(OBJSUFFICS) ssl$(OBJSUFFICS)
ZLIB :=
else
OPENSSL_CHECK ?= $(shell printf "\#include <openssl/ssl.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testssl.o - 2>/dev/null && $(CC) $(LDFLAGS) -otestssl testssl.o $(STATIC_PREFIX) $(ZLIB) -lcrypto -lssl $(STATIC_SUFFIX) 2>/dev/null && rm testssl testssl.o && echo true||echo false)
ifeq ($(OPENSSL_CHECK), true)
LIBS += $(STATIC_PREFIX) $(ZLIB) -lcrypto -lssl $(STATIC_SUFFIX)
CFLAGS += -DWITH_SSL
SSL_OBJS = ssllib$(OBJSUFFICS) ssl$(OBJSUFFICS)
else
ZLIB :=
endif
endif
PCRE_CHECK ?= $(shell printf "\#define PCRE2_CODE_UNIT_WIDTH 8\\n\#include <pcre2.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testpcre.o - 2>/dev/null && $(CC) -o testpcre testpcre.o $(LDFLAGS) $(STATIC_PREFIX) -lpcre2-8 $(STATIC_SUFFIX) 2>/dev/null && rm testpcre testpcre.o && echo true||echo false)
ifeq ($(PCRE_CHECK), true)
CFLAGS += -DWITH_PCRE
PCRE_OBJS = pcre$(OBJSUFFICS)
PCRE_LIBS = $(STATIC_PREFIX) -lpcre2-8 $(STATIC_SUFFIX)
endif
PAM_CHECK ?= $(shell printf "\#include <security/pam_appl.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testpam.o - 2>/dev/null && $(CC) $(LDFLAGS) -o testpam testpam.o -lpam 2>/dev/null && rm testpam testpam.o && echo true||echo false)
ifeq ($(PAM_CHECK), true)
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 = /usr/local
exec_prefix = $(prefix)
man_prefix = $(prefix)/share
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 = src/3proxy \
src/dighosts \
src/ftppr \
src/mycrypt \
src/pop3p \
src/proxy \
src/socks \
src/tcppm \
src/udppm
INSTALL_OBJS = bin/3proxy \
bin/$(CRYPT_PREFIX)crypt \
bin/$(PREFIX)ftppr \
bin/$(PREFIX)imapp \
bin/$(PREFIX)pop3p \
bin/$(PREFIX)proxy \
bin/$(PREFIX)smtpp \
bin/$(PREFIX)socks \
bin/$(PREFIX)tcppm \
bin/$(PREFIX)tlspr \
bin/$(PREFIX)udppm
INSTALL_CFG_OBJS = scripts/3proxy.cfg \
scripts/add3proxyuser.sh
INSTALL_CFG_DEST = config
INSTALL_CFG = scripts/3proxy.cfg.chroot
INSTALL_CFG_INCHROOT = scripts/3proxy.cfg.inchroot
INSTALL_CFG_OBJS2 = passwd counters bandlimiters
INSTALL_CFG_OBJS2 = counters bandlimiters
MANDIR1 = $(DESTDIR)$(man_prefix)/man/man1
MANDIR3 = $(DESTDIR)$(man_prefix)/man/man3
INSTALL_INITD_SCRIPT = scripts/init.d/3proxy.in
INSTALL_SYSTEMD_SCRIPT = scripts/3proxy.service.in
CHROOTDIR = $(DESTDIR)$(chroot_prefix)/3proxy
CHROOTREL = ../..$(chroot_prefix)/3proxy
MANDIR5 = $(DESTDIR)$(man_prefix)/man/man5
MANDIR8 = $(DESTDIR)$(man_prefix)/man/man8
BINDIR = $(DESTDIR)$(exec_prefix)/bin
ETCDIR = $(DESTDIR)$(prefix)/etc/3proxy
ETCDIR = $(DESTDIR)/etc/3proxy
INITDDIR = $(DESTDIR)/etc/init.d
LOGBASE = $(DESTDIR)/var/log
LOGDIR = $(LOGBASE)/3proxy
INSTALL_CFG_DEST = $(ETCDIR)/conf
SYSTEMDDIR = $(DESTDIR)/usr/lib/systemd/system/
install-bin:
$(INSTALL_BIN) -d $(BINDIR)
$(INSTALL_BIN) -s $(INSTALL_OBJS) $(BINDIR)
$(INSTALL_BIN) -s bin/*.ld.so $(CHROOTDIR)/libexec
$(INSTALL_BIN) scripts/add3proxyuser.sh.in $(BINDIR)/add3proxyuser
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) \
install-chroot-dir:
$(INSTALL_BIN) -d $(CHROOTDIR)
$(INSTALL_BIN) -d $(CHROOTDIR)/conf
$(INSTALL_BIN) -d $(CHROOTDIR)/logs
$(INSTALL_BIN) -d $(CHROOTDIR)/count
$(INSTALL_BIN) -d $(CHROOTDIR)/libexec
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_INCHROOT) $(INSTALL_CFG_DEST)/3proxy.cfg; \
fi
install-etc: install-etc-dir
install-etc: install-etc-dir install-etc-default-config
for file in $(INSTALL_CFG_OBJS2); \
do \
touch $(ETCDIR)/$$file; chmod 0600 $(ETCDIR)/$$file; \
touch $(INSTALL_CFG_DEST)/$$file; chmod 0600 $(INSTALL_CFG_DEST)/$$file; \
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 imapp 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: install-bin install-etc install-man
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-log:
$(INSTALL_BIN) -d $(LOGBASE)
@if [ ! -d $(LOGDIR) ]; then \
ln -s $(CHROOTREL)/logs $(LOGDIR);\
fi
install: install-chroot-dir install-bin install-etc install-log install-man install-init
@if [ "$(DESTDIR)" = "" ]; then \
sh debian/preinst; \
sh debian/postinst; \
fi
+32 -9
View File
@@ -1,32 +1,55 @@
#
# 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 =
CC = cc
CFLAGS = -xO3 -c -D_SOLARIS -D_THREAD_SAFE -DGETHOSTBYNAME_R -D_REENTRANT -DNOODBC -DWITH_STD_MALLOC -DFD_SETSIZE=4096 -DWITH_POLL
BUILDDIR = ../bin/
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
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
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
PLUGINS = StringsPlugin TrafficPlugin TransparentPlugin FilePlugin
WOLFSSL_CHECK = $(shell printf "\#include <wolfssl/options.h>\\n\#include <wolfssl/openssl/ssl.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testwssl.o - 2>/dev/null && $(CC) $(LDFLAGS) -o testwssl testwssl.o -lwolfssl 2>/dev/null && rm testwssl testwssl.o && echo true||echo false)
ifeq ($(WOLFSSL_CHECK), true)
LIBS += -lwolfssl
CFLAGS += -DWITH_SSL -DWITH_WOLFSSL
SSL_OBJS = ssllib$(OBJSUFFICS) ssl$(OBJSUFFICS)
else
OPENSSL_CHECK = $(shell printf "\#include <openssl/ssl.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testssl.o - 2>/dev/null && $(CC) $(LDFLAGS) -o testssl testssl.o -lcrypto -lssl 2>/dev/null && rm testssl testssl.o && echo true||echo false)
ifeq ($(OPENSSL_CHECK), true)
LIBS += -l crypto -l ssl
CFLAGS += -DWITH_SSL
SSL_OBJS = ssllib$(OBJSUFFICS) ssl$(OBJSUFFICS)
endif
endif
PCRE_CHECK = $(shell printf "\#define PCRE2_CODE_UNIT_WIDTH 8\\n\#include <pcre2.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testpcre.o - 2>/dev/null && $(CC) -o testpcre testpcre.o $(LDFLAGS) -Wl,-Bstatic -lpcre2-8 -Wl,-Bdynamic 2>/dev/null && rm testpcre testpcre.o && echo true||echo false)
ifeq ($(PCRE_CHECK), true)
CFLAGS += -DWITH_PCRE
PCRE_OBJS = pcre$(OBJSUFFICS)
PCRE_LIBS = -Wl,-Bstatic -lpcre2-8 -Wl,-Bdynamic
endif
include Makefile.inc
-35
View File
@@ -1,35 +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 =
CC = gcc
CFLAGS = -O3 -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
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
-2
View File
@@ -1,2 +0,0 @@
SUBDIRS = src man
EXTRA_DIST = doc cfg
-34
View File
@@ -1,34 +0,0 @@
#
# 3 proxy Makefile for Compaq C Compiler
#
# 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 =
CC = ccc
CFLAGS = -O2 -c -pthread -D_THREAD_SAFE -DNOODBC -DWITH_STD_MALLOC -DFD_SETSIZE=4096 -WITH_POLL
COUT = -o
LN = ccc
LDFLAGS = -O2 -pthread
DCFLAGS = -fpic
DLFLAGS = -shared
DLSUFFICS = .ld.so
LIBS =
LNOUT = -o
EXESUFFICS =
OBJSUFFICS = .o
DEFINEOPTION = -D
COMPFILES = *~
REMOVECOMMAND = rm -f
TYPECOMMAND = cat
COMPATLIBS =
MAKEFILE = Makefile.ccc
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
-26
View File
@@ -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
View File
@@ -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)
-33
View File
@@ -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 ..\..)
+28 -16
View File
@@ -1,41 +1,53 @@
#
# 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 "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_WIN32" /Fp"proxy.pch" /FD /c
VERSION = $(VERSION)
BUILDDATE = $(BUILDDATE)
!IFDEF WOLFSSL
SSL_DEFS = /D "WITH_SSL" /D "WITH_WOLFSSL"
SSL_LIBS = wolfssl.lib
!ELSE
SSL_DEFS = /D "WITH_SSL"
SSL_LIBS = libcrypto.lib libssl.lib
!ENDIF
CFLAGS = /nologo /MT /W3 /Ox /GS /EHs- /GA /GF /D "MSVC" /D "WITH_WSAPOLL" /D "NDEBUG" /D "WIN32" $(SSL_DEFS) /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 libeay32MT.lib ssleay32MT.lib
LIBSOLD = libeay32MT.lib ssleay32MT.lib
LIBEXT = .lib
LIBS = ws2_32.lib advapi32.lib odbc32.lib user32.lib kernel32.lib Gdi32.lib Crypt32.lib $(SSL_LIBS) pcre2-8.lib
LIBSPREFIX =
LIBSSUFFIX = .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)
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
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 ..\..)
-49
View File
@@ -1,49 +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 "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_WIN32" /Fp"proxy.pch" /FD /c
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 libeay32MT.lib ssleay32MT.lib
LIBSOLD = libeay32MT.lib ssleay32MT.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
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 ..\..)
-35
View File
@@ -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" /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 ..\..)
+95 -29
View File
@@ -1,57 +1,123 @@
#
# 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 =
CC = gcc
BUILDDIR = ../bin/
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 -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 -pthread
LN ?= $(CC)
LDFLAGS ?= -O3 -flto
LDFLAGS += -pthread -fno-strict-aliasing
# Use EXTRA_CFLAGS/EXTRA_LDFLAGS to add flags from the make command line.
# Setting CFLAGS or LDFLAGS there instead overrides every assignment in this
# makefile, including the += above and the STATIC/LIBSTATIC handling below.
CFLAGS += $(EXTRA_CFLAGS)
LDFLAGS += $(EXTRA_LDFLAGS)
# -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 =
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
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
WOLFSSL_CHECK ?= $(shell printf "\#include <wolfssl/options.h>\\n\#include <wolfssl/openssl/ssl.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testwssl.o - 2>/dev/null && $(CC) $(LDFLAGS) -otestwssl testwssl.o $(STATIC_PREFIX) -lwolfssl $(STATIC_SUFFIX) 2>/dev/null && rm testwssl testwssl.o && echo true||echo false)
ifeq ($(WOLFSSL_CHECK), true)
LIBS += $(STATIC_PREFIX) -lwolfssl $(STATIC_SUFFIX)
CFLAGS += -DWITH_SSL -DWITH_WOLFSSL
SSL_OBJS = ssllib$(OBJSUFFICS) ssl$(OBJSUFFICS)
ZLIB :=
else
OPENSSL_CHECK ?= $(shell printf "\#include <openssl/ssl.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testssl.o - 2>/dev/null && $(CC) $(LDFLAGS) -otestssl testssl.o $(STATIC_PREFIX) $(ZLIB) -lcrypto -lssl $(STATIC_SUFFIX) 2>/dev/null && rm testssl testssl.o && echo true||echo false)
ifeq ($(OPENSSL_CHECK), true)
LIBS += $(STATIC_PREFIX) $(ZLIB) -lcrypto -lssl $(STATIC_SUFFIX)
CFLAGS += -DWITH_SSL
SSL_OBJS = ssllib$(OBJSUFFICS) ssl$(OBJSUFFICS)
else
ZLIB :=
endif
endif
PCRE_CHECK ?= $(shell printf "\#define PCRE2_CODE_UNIT_WIDTH 8\\n\#include <pcre2.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testpcre.o - 2>/dev/null && $(CC) -o testpcre testpcre.o $(LDFLAGS) $(STATIC_PREFIX) -lpcre2-8 $(STATIC_SUFFIX) 2>/dev/null && rm testpcre testpcre.o && echo true||echo false)
ifeq ($(PCRE_CHECK), true)
CFLAGS += -DWITH_PCRE
PCRE_OBJS = pcre$(OBJSUFFICS)
PCRE_LIBS = $(STATIC_PREFIX) -lpcre2-8 $(STATIC_SUFFIX)
endif
PAM_CHECK ?= $(shell printf "\#include <security/pam_appl.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testpam.o - 2>/dev/null && $(CC) $(LDFLAGS) -o testpam testpam.o -lpam 2>/dev/null && rm testpam testpam.o && echo true||echo false)
ifeq ($(PAM_CHECK), true)
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 src/3proxy /usr/local/etc/3proxy/bin/3proxy
install src/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 imapp 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 imapp 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
-60
View File
@@ -1,60 +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 = src/3proxy \
src/dighosts \
src/ftppr \
src/mycrypt \
src/pop3p \
src/proxy \
src/socks \
src/tcppm \
src/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
+65
View File
@@ -0,0 +1,65 @@
#
# 3 proxy Makefile for Open Watcom 2
#
#
# 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 "NO_UN" /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
LIBSPREFIX =
LIBSSUFFIX = .lib
LIBEXT = .lib
LNOUT = /out:
EXESUFFICS = .exe
OBJSUFFICS = .obj
DEFINEOPTION = /D
COMPFILES = *.pch *.idb *.err
REMOVECOMMAND = del 2>NUL >NUL
TYPECOMMAND = type
COMPATLIBS =
MAKEFILE = Makefile.watcom
PLUGINS = utf8tocp1251 WindowsAuthentication TrafficPlugin StringsPlugin
VERFILE = $(VERFILE)
VERSION = $(VERSION)
VERSIONDEP = 3proxy.res $(VERSIONDEP)
BUILDDATE = $(BUILDDATE)
include Makefile.inc
3proxy.res:
rc 3proxy.rc
allplugins:
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 ../../
+63 -12
View File
@@ -1,22 +1,30 @@
#
# 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
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
# Use EXTRA_CFLAGS/EXTRA_LDFLAGS to add flags from the make command line.
# Setting CFLAGS or LDFLAGS there instead overrides every assignment in this
# makefile, including the += above and the STATIC/LIBSTATIC handling below.
CFLAGS += $(EXTRA_CFLAGS)
LDFLAGS += $(EXTRA_LDFLAGS)
DLFLAGS ?= -shared
DLSUFFICS = .dll
LIBS = -lws2_32 -lodbc32 -ladvapi32
LIBS += -lws2_32 -lodbc32 -ladvapi32 -luser32 -lbcrypt
LIBSPREFIX = -l
LIBSSUFFIX =
LNOUT = -o
EXESUFFICS = .exe
OBJSUFFICS = .o
@@ -26,9 +34,52 @@ 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
ifeq ($(LIBSTATIC), true)
STATIC_PREFIX = -Wl,-Bstatic
STATIC_SUFFIX = -Wl,-Bdynamic
ZLIB = -lz
endif
WOLFSSL_CHECK = $(shell printf "\#include <wolfssl/options.h>\\n\#include <wolfssl/openssl/ssl.h>\\n int main(){return 0;}" | tr -d '\\\\' | $(CC) -x c $(CFLAGS) $(LDFLAGS) $(STATIC_PREFIX) -lwolfssl $(STATIC_SUFFIX) -o testwssl - 2>/dev/null && rm testwssl && echo true||echo false)
ifeq ($(WOLFSSL_CHECK), true)
LIBS += $(STATIC_PREFIX) -lwolfssl $(STATIC_SUFFIX) -lws2_32
CFLAGS += -DWITH_SSL -DWITH_WOLFSSL
SSL_OBJS = ssllib$(OBJSUFFICS) ssl$(OBJSUFFICS)
ZLIB :=
else
OPENSSL_CHECK = $(shell printf "\#include <openssl/ssl.h>\\n int main(){return 0;}" | tr -d '\\\\' | $(CC) -x c $(CFLAGS) $(LDFLAGS) $(STATIC_PREFIX) $(ZLIB) -l crypto -l ssl $(STATIC_SUFFIX) -o testssl - 2>/dev/null && rm testssl && echo true||echo false)
ifeq ($(OPENSSL_CHECK), true)
LIBS += $(STATIC_PREFIX) $(ZLIB) -l crypto -l ssl $(STATIC_SUFFIX) -lcrypt32
CFLAGS += -DWITH_SSL
SSL_OBJS = ssllib$(OBJSUFFICS) ssl$(OBJSUFFICS)
else
ZLIB :=
endif
endif
PAM_CHECK = $(shell printf "\#include <security/pam_appl.h>\\n int main(){return 0;}" | tr -d '\\\\' | $(CC) -x c $(CFLAGS) $(LDFLAGS) -l pam -o testpam - 2>/dev/null && rm testpam && echo true||echo false)
ifeq ($(PAM_CHECK), true)
PLUGINS += PamAuth
endif
PCRE_CHECK = $(shell printf "\#define PCRE2_CODE_UNIT_WIDTH 8\\n#include <pcre2.h>\\n int main(){return 0;}" | tr -d '\\\\' | $(CC) -x c $(CFLAGS) $(LDFLAGS) $(STATIC_PREFIX) -lpcre2-8 $(STATIC_SUFFIX) -o testpcre - 2>/dev/null && rm testpcre && echo true||echo false)
ifeq ($(PCRE_CHECK), true)
CFLAGS += -DWITH_PCRE
PCRE_OBJS = pcre$(OBJSUFFICS)
PCRE_LIBS = $(STATIC_PREFIX) -lpcre2-8 $(STATIC_SUFFIX)
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
-34
View File
@@ -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 -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
-64
View File
@@ -1,64 +0,0 @@
/*
3APA3A 3proxy tiny proxy server
(c) 2002-2016 by Vladimir '3APA3A' Dubrovin <3proxy@3proxy.ru>
please read License Agreement
*/
Please read doc/html/index.html and man pages.
3proxy Combined proxy server may be used as
Windows 95/98/NT/2000/XP/2003/Vista
executable or service (supports installation and removal).
It uses config file to read it's configuration (see
3proxy.cfg.sample for details).
--install installs and starts proxy as NT/2000/XP service
(config file should be located in the same directory)
--remove removes the service (should be stopped before via
net stop 3proxy).
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.somehost.ru, 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.somehost.ru, to send mail as someuser
via mail.somehost.ru via proxy.
icqpr ICQ/AIM proxy. Maps some TCP port to TCP port of ICQ
server and performs packets translation. Example:
icqpr 5190 login.icq.com 5190
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 http://3proxy.ru/
Want to donate the project? http://3proxy.ru/donations/
+420
View File
@@ -0,0 +1,420 @@
# 3APA3A 3proxy tiny proxy server
(c) 2002-2026 by Vladimir '3APA3A' Dubrovin <vlad@3proxy.org>
## Repository
### Branches
- **Master** (current/latest) branch - 3proxy 1.0
- **0.9** (LTS) branch - 3proxy 0.9.9.x
- **Devel** branch - 3proxy 2.0-devel (don't use it)
### Binaries (deb / rpm / Windows zip)
https://github.com/3proxy/3proxy/releases
### Package repository (apt / dnf)
Signed apt and dnf repositories are published at https://3proxy.org/repo/ in
two channels: `current` (master) and `lts` (0.9 branch).
Debian 12 and Ubuntu 22.04 or newer:
```
sudo curl -fsSL https://3proxy.org/repo/3proxy-release-key.asc \
-o /usr/share/keyrings/3proxy.asc
sudo tee /etc/apt/sources.list.d/3proxy.sources <<EOF
Types: deb
URIs: https://3proxy.org/repo/deb
Suites: current
Components: main
Signed-By: /usr/share/keyrings/3proxy.asc
EOF
sudo apt update && sudo apt install 3proxy
```
AlmaLinux, RHEL, Rocky and CentOS Stream 8, 9 and 10:
```
sudo tee /etc/yum.repos.d/3proxy.repo <<EOF
[3proxy]
name=3proxy
baseurl=https://3proxy.org/repo/rpm/current/el\$releasever/\$basearch/
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://3proxy.org/repo/3proxy-release-key.asc
EOF
sudo dnf install 3proxy
```
Both the packages and the repository metadata are signed. See
https://3proxy.org/repo/ for the `lts` channel and for release key details.
### Docker images
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. Images are based on current (master) branch.
Images marked as LTS (`:lts`, `:lts-busybox`, `:lts-minimal`) are built from LTS branch (0.9.9.x)
### Default image (`:latest`):
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
View File
@@ -0,0 +1 @@
1.0.0
-106
View File
@@ -1,106 +0,0 @@
08/04/2014 3[APA3A]tiny proxy 0.7
Features:
1. General
+ HTTP/1.1 Proxy with keep-alive client and server support,
transparent proxy support.
+ Anonymous and random client emulation HTTP proxy mode
+ FTP over HTTP support.
+ DNS caching with built-in resolver
+ HTTPS (CONNECT) proxy
+ SOCKSv4/4.5 Proxy
+ SOCKSv5 Proxy
+ UDP and bind support for SOCKSv5 (fully compatible with
SocksCAP/FreeCAP for UDP)
+ Transparent SOCKS redirection for HTTP, POP3, FTP, SMTP, ICQ
+ POP3 Proxy
+ FTP proxy
+ DNS proxy
+ TCP port mapper
+ UDP port mapper
+ SMTP proxy
+ ICQ/AOL proxy
+ MSN proxy
+ Threaded application (no child process).
+ Web administration and statistics
+ Plugins for functionality extension
+ Native 64 bit application for 64 bit OS, including 64-bit editions of
Windows XP, Vista, 2003, 2008.
2. Proxy chaining and network connections
+ Parent proxy support for any type of incoming connection
+ Username/password authentication for parent proxy(s).
+ HTTPS/SOCKS4/SOCKS5 and redirection parent support
+ Random parent selection
+ Chain building (multihop proxing)
+ Load balancing between few network connections by choosing network
interface
3. Logging
+ turnable log format compatible with any log parser
+ stdout logging
+ file logging
+ syslog logging (Unix)
+ ODBC logging (Windows and Unix)
+ log file rotation (hourly, daily, weekly, monthly)
+ automatic log file comperssion with external archiver (for files)
+ automatic removal of older log files
+ Character filtering for log files
+ different log files for different servces are supported
4. Access control
+ ACL-driven (user/source/destination/protocol/weekday/daytime or
combined) bandwith limitation for incoming and (!)outgoing trafic.
+ ACL-driven (user/source/destination/protocol/weekday/daytime or
combined) traffic limitation per day, week or month for incoming and
(!) outgoing traffic
+ User authorization by NetBIOS messanger name
+ Access control by username, source IP, destination IP, destination
port and destination action (POST, PUT, GET, etc), weekday and daytime.
+ 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).
+ NTLM (v1 only) authentication for HTTP proxy access
+ 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
currently HTTP traffic only for URLs, HTTP headers and HTTP data.
+ Authentication with Windows username/password (cleartext only!)
6. Configuration
+ support for configuration files
+ support for includes in configuration files
+ interface binding
+ 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
Windows NT/2K/XP/2K3
+ 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)
+ Intel Windows Compiler (msvcrt.dll)
+ Windows/gcc (msvcrt.dll)
+ Cygwin/gcc (cygwin.dll)
+ Unix/gcc
+ Unix/ccc
+ Solaris
+ Mac OS X, iPhone OS
Planned for future (0.8) release:
- SSL handling / SSL decryption by certificate spoofing
- NAT support under *nix
- Addon antiviral, HTTP cache filters modules, authentication
modules for different protocols (RADIUS, PAM etc).
+64
View File
@@ -0,0 +1,64 @@
# Security Policy
## Supported Versions
| Version | Supported |
| ------- | ------------------ |
| 0.9.8 | :white_check_mark: |
| < 0.9.8 | :x: |
## Reporting a Vulnerability
Report to 3proxy@3proxy.org or via [GitHub security reporting](https://github.com/3proxy/3proxy/security)
For High/Critical patched version is released within 2 weeks
## Verifying downloads
Release binaries are published with SHA256 checksums, an OpenPGP signature and
a GitHub build provenance attestation.
The release signing key is `3proxy-release-key.asc` in the root of this
repository, an RSA-4096 key:
```
pub rsa4096 2026-08-21 [SC]
FC12 2144 99FC C7BA 1CFF 6CDC 0312 384E 3A73 940B
uid 3proxy release signing <3proxy@3proxy.org>
```
Import it once:
```
gpg --import 3proxy-release-key.asc
```
Checksums and the checksum file signature:
```
gpg --verify SHA256SUMS-x86_64.asc SHA256SUMS-x86_64
sha256sum -c SHA256SUMS-x86_64
```
RPM packages are signed, the signature is checked by rpm itself:
```
sudo rpm --import 3proxy-release-key.asc
rpm -K 3proxy-0.9.9.x86_64.rpm
```
DEB packages are published with a detached signature:
```
gpg --verify 3proxy-0.9.9.x86_64.deb.asc 3proxy-0.9.9.x86_64.deb
```
Build provenance (which workflow, commit and runner produced the file) is
verified with the GitHub CLI:
```
gh attestation verify 3proxy-0.9.9.x86_64.rpm --owner 3proxy
gh attestation verify oci://docker.io/3proxy/3proxy:latest --owner 3proxy
```
Windows binaries are Authenticode signed in addition to the above.
+1 -1
View File
@@ -1 +1 @@
(c) 2002-2014 by Vladimir '3APA3A' Dubrovin <3proxy@3proxy.ru>
(c) 2002-2025 by Vladimir '3APA3A' Dubrovin <vlad@3proxy.org>
+2
View File
@@ -0,0 +1,2 @@
*.cfg
*.old
+30 -30
View File
@@ -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
@@ -37,9 +37,9 @@ users 3APA3A:CL:3apa3a "test:CR:$1$qwer$CHFTUFGqkjue9HyhcMHEe1"
service
# service is required under NT if you want 3proxy to start as service
#log /usr/local/etc/3proxy/logs/3proxy.log D
#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
+53
View File
@@ -0,0 +1,53 @@
# By Mark Dreuband
nserver 10.1.2.1
nscache 65536
# we can grab wpad file from provider and feed it to dighosts
# to build list of free networks
# system "c:\3proxy\dighosts.exe -m http://wpad.security.nnov.ru/wpad.dat c:\3proxy\freenetworks.net"
service
internal 192.168.1.1
external 10.1.1.1
dnspr
log &3proxylog,root
#log c:\3proxy\logs\proxy.log D
#logformat "Linsert into log (timestamp, username, service, clientip, remoteip, remoteport, bytesin, bytesout,request,error) values (
#logformat "%t '%U' '%N' '%C' '%R' %r %I %O '%T' %E"
logformat "-\'+_Linsert into log (time, bytesin, bytesout, username, url, host, port, service) values ('%Y-%m-%d %H:%M:%S', %I, %O, '%U', '%T', '%n', %r, '%N');"
archiver zip c:\3proxy\zip.exe -m -qq %A %F
rotate 50
auth strong
users temp:CL:password root:CL:password
# access free networks directly
allow * * $c:\3proxy\freenetworks.net
# redirect web traffic for non-free networks to provider's proxy
allow * * * 80
parent 1000 http 10.1.2.5 3128
# allow rest of traffic
allow *
proxy
flush
auth iponly
allow *
pop3p
tcppm 25 mail.security.nnov.ru 25
flush
# redirect port 80 traffic via SOCKS server to local HTTP proxy to
# have URLs logged
allow * * * 80
parent 1000 http 0.0.0.0 0
allow *
socks
#daemon
+56
View File
@@ -0,0 +1,56 @@
# Connection: localhost
# Host: 127.0.0.1
# Saved: 2004-04-09 18:53:52
#
# Host: 127.0.0.1
# Database: 3proxy
# Table: 'log'
#
CREATE TABLE `log` (
`time` datetime NOT NULL default '0000-00-00 00:00:00',
`bytesin` int(11) NOT NULL default '0',
`bytesout` int(11) NOT NULL default '0',
`username` varchar(20) NOT NULL default '',
`service` varchar(7) NOT NULL default '',
`host` varchar(100) NOT NULL default '',
`port` int(11) NOT NULL default '0',
`url` varchar(255) NOT NULL default ''
) TYPE=MyISAM;
CREATE TABLE `services` (
`startport` int(11) NOT NULL default '0',
`endport` int(11) NOT NULL default '0',
`service` varchar(100) NOT NULL default '',
`description` varchar(100) NOT NULL default ''
) TYPE=MyISAM;
CREATE TABLE `timelimit` (
`datefrom` datetime NOT NULL default '0000-00-00 00:00:00',
`dateto` datetime NOT NULL default '0000-00-00 00:00:00'
) TYPE=MyISAM;
INSERT INTO services (80, 80, NULL, 'Access to Web Server');
INSERT INTO services (443, 443, NULL, 'Secure Access to Web Server');
INSERT INTO services (3128, 3128, NULL, 'Access to Web server via external Proxy');
INSERT INTO services (1080, 1080, NULL, 'Access to external SOCKS server');
INSERT INTO services (5190, 5190, NULL, 'Access to ICQ');
INSERT INTO services (6666, 6668, NULL, 'Access to IRC');
INSERT INTO services (119, 119, NULL, 'Access to news server');
INSERT INTO services (25, 25, NULL, 'Sent Mail');
INSERT INTO services (0, 0, 'POP3P', 'Received Mail');
INSERT INTO services (0, 0, 'SMTPP', 'Sent Mail');
INSERT INTO services (0, 0, 'TCPPM', 'Access to external server via TCP');
INSERT INTO services (0, 0, 'UDPPM', 'Access to external server via UDP');
INSERT INTO services (0, 0, 'PROXY', 'Access to external server via Proxy');
INSERT INTO services (0, 0, 'FTPPR', 'Access to external server via FTP Proxy');
INSERT INTO services (0, 0, 'ICQPR', 'Access to external server via ICQ Proxy');
INSERT INTO services (0, 0, 'SOCKS4', 'Access to external server via Socks v4');
INSERT INTO services (0, 0, 'SOCKS5', 'Access to external server via Socks v5');
INSERT INTO services (0, 0, 'DNSPR', 'Name resolution');
INSERT INTO services (0, 0, NULL, 'Unknown');
Binary file not shown.
+63
View File
@@ -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)
+45
View File
@@ -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)
+69
View File
@@ -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)
+52
View File
@@ -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()
-6
View File
@@ -1,6 +0,0 @@
all: isqlodbc$(EXESUFFICS)
clean:
@$(REMOVECOMMAND) *$(OBJSUFFICS) $(COMPFILES)
isqlodbc$(EXESUFFICS): isqlodbc$(OBJSUFFICS)
$(LN) $(LNOUT)isqlodbc$(EXESUFFICS) $(LDFLAGS) $(VERFILE) isqlodbc$(OBJSUFFICS) $(COMPATLIBS) $(LIBS)
-15
View File
@@ -1,15 +0,0 @@
CC = gcc
CFLAGS = -I /usr/local/include -DUNIX
COUT = -o
LN = gcc
LDFLAGS =
LIBS =-L /usr/local/lib -lodbc
LNOUT = -o
EXESUFFICS =
OBJSUFFICS = .o
DEFINEOPTION = -D
COMPFILES = *~
REMOVECOMMAND = rm -f
COMPATLIBS =
include Makefile.inc
-15
View File
@@ -1,15 +0,0 @@
CC = gcc
CFLAGS = -DWIN32
COUT = -o
LN = gcc
LDFLAGS =
LIBS = -lodbc32
LNOUT = -o
EXESUFFICS =
OBJSUFFICS = .o
DEFINEOPTION = -D
COMPFILES = *~
REMOVECOMMAND = rm -f
COMPATLIBS =
include Makefile.inc
-191
View File
@@ -1,191 +0,0 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef WIN32
#include <io.h>
#include <windows.h>
#endif
#ifdef UNIX
#include <sqltypes.h>
#endif
#include <sql.h>
#include <sqlext.h>
#define BUF_LENGTH 65000
/* environment variable */
SQLHENV env=NULL;
SQLHDBC dbc=NULL;
SQLHSTMT stmt=NULL;
SQLHSTMT cstmt=NULL;
unsigned char *dsn;
unsigned char *user;
unsigned char *pass;
RETCODE retcod;
/*description a columns of result of request */
SQLSMALLINT ColumnCount;
unsigned int ColNumber;
unsigned char ColName[SQL_MAX_COLUMN_NAME_LEN];
unsigned int Length;
unsigned int Type;
unsigned int Size;
unsigned int Digits;
unsigned int Nullable;
unsigned char data_buf[BUF_LENGTH];
unsigned long OutData;
/* function print error message*/
void PrintError(HENV env,HDBC dbc,HSTMT stmt,RETCODE retcod)
{
SQLINTEGER nError;
SQLSMALLINT TextLength;
unsigned char BufErrMsg[SQL_MAX_MESSAGE_LENGTH+1];
unsigned char SqlState[128];
SQLError(env,dbc,stmt,SqlState,&nError,BufErrMsg,512, &TextLength);
printf("%s\n" ,BufErrMsg);
}
void sqlquery(SQLHDBC dbc,SQLHSTMT stmt, unsigned char *strquery)
{
retcod=SQLAllocStmt(dbc, &stmt);
retcod=SQLExecDirect(stmt,strquery,SQL_NTS);
if(retcod!=SQL_SUCCESS)
{ PrintError(env,dbc,stmt,retcod);}
SQLNumResultCols(stmt,&ColumnCount);
while(SQLFetch(stmt)==SQL_SUCCESS)
{
for(ColNumber=1; ColNumber<=ColumnCount ; ColNumber++)
{
SQLGetData(stmt,ColNumber,SQL_CHAR,data_buf,BUF_LENGTH,&OutData);
printf("%s|",data_buf);
}
printf("\n",data_buf);
strcpy(data_buf,"");
}
SQLFreeStmt( stmt, SQL_DROP );
}
/* isqlodbc dsn[[,user][,pass]] ["SQLCMD"] */
int main(int argc, char *argv[])
{
unsigned char qbuf[64000];
unsigned char *ptr=NULL;
/* Allocate environment and database connection handles */
retcod=SQLAllocEnv( &env );
if(retcod!=SQL_SUCCESS)
{
PrintError(env,dbc,stmt,retcod);
SQLFreeEnv(env);
return (-1);
}
retcod = SQLAllocConnect( env, &dbc );
if(retcod!=SQL_SUCCESS)
{
PrintError(env,dbc,stmt,retcod);
SQLFreeConnect( dbc );
return (-1);
}
if(argc > 1 )
{
/* parsing command line and get parametrs */
dsn = strtok(argv[1],",");
user = strtok(NULL, ",");
pass = strtok(NULL, ",");
/* Connect from DSN */
retcod=SQLConnect(dbc,dsn,SQL_NTS,user,SQL_NTS,pass,SQL_NTS);
if(retcod!=SQL_SUCCESS)
{ PrintError(env,dbc,stmt,retcod); }
else
{
if (argc > 2)
{
/*sql cmd from command line*/
sqlquery(dbc,stmt,argv[2]);
}
else
{
/*sql cmd from stdin */
if( isatty(0) ){ printf(".tables - list table\n.q - exit\nsql>"); }
while(fgets(qbuf,63000,stdin) != NULL )
{
ptr=strrchr(qbuf,';');
if (ptr!=NULL)
{
sqlquery(dbc,stmt,qbuf);
}
else
{
/*cmd exit*/
if (strstr(qbuf,".q")){ break; };
/*cmd table list*/
if (strstr(qbuf,".tables"))
{
retcod=SQLAllocStmt(dbc, &stmt);
if(retcod!=SQL_SUCCESS){ PrintError(env,dbc,stmt,retcod); }
else
{
retcod=SQLTables(stmt,NULL,0,NULL,0,NULL,0,NULL,0);
if(retcod !=SQL_SUCCESS) { PrintError(env,dbc,stmt,retcod);}
while(SQLFetch(stmt)==SQL_SUCCESS)
{
SQLGetData(stmt,3,SQL_CHAR,data_buf,BUF_LENGTH,&OutData);
printf("%s|",data_buf);
/*list columns */
retcod=SQLAllocStmt(dbc, &cstmt);
retcod=SQLColumns(cstmt,NULL,0,NULL,0,data_buf,strlen(data_buf),NULL,0);
if(retcod !=SQL_SUCCESS) { PrintError(env,dbc,stmt,retcod);}
else
{
printf("create table %s (",data_buf);
while(SQLFetch(cstmt)==SQL_SUCCESS)
{
SQLGetData(cstmt,4,SQL_CHAR,data_buf,BUF_LENGTH,&OutData);
printf("%s ",data_buf);
SQLGetData(cstmt,6,SQL_CHAR,data_buf,BUF_LENGTH,&OutData);
printf("%s, ",data_buf);
}
printf(");\n");
SQLFreeStmt( cstmt, SQL_DROP );
}/*end list columns*/
}/*end while SQLFetch */
SQLFreeStmt( stmt, SQL_DROP );
}
}/*end if (strstr(qbuf,".tables")) */
} /*end else cmd*/
if( isatty(0) ){ printf("sql>"); }
} /*end while*/
}
}
SQLDisconnect(dbc);
} /* if (argc > 2) */
else
{
printf("isqlodbc dsn[[,user][,pass]] [\"SQLCMD\"]\n");
}
SQLFreeConnect( dbc );
SQLFreeEnv( env );
return 0;
}
-22
View File
@@ -1,22 +0,0 @@
create table log (ldate date,ltime time,username char (30),userip char (16),bytein integer (10),byteout integer (10),service char (8), host char(255), hostport integer (10), url char (255) );
create index idate on log (ldate);
create index iusername on log (username);
create index iuserip on log (userip);
create index ihost on log (host);
create table services (port integer(10),service char(100),description char (100));
INSERT INTO services values (80,'PROXY', 'Access to Web Server');
INSERT INTO services values (21,'PROXY', 'Access to Ftp Server via HTTP proxy');
INSERT INTO services values (5190,'PROXY', 'Access to ICQ via HTTP proxy');
INSERT INTO services values (0, 'POP3P', 'Received Mail via POP3');
INSERT INTO services values (0,'FTPPR', 'Access to Ftp server via FTP proxy');
INSERT INTO services values (0,'SOCKS4', 'Access to external server via Socks v4');
INSERT INTO services values (0,'SOCKS5', 'Access to external server via Socks v5');
INSERT INTO services values (0,'TCPPM', 'Access to external server via TCP mapping');
INSERT INTO services values (0,'UDPPM', 'Access to external server via UDP mapping');
INSERT INTO services values (0, 0, NULL, 'Unknown');
-63
View File
@@ -1,63 +0,0 @@
------------------------------ KOI8-R ------------------------------------
Этот архив содержит набор CGI cкриптов и программ для получения
статистики работы пользователей прокси сервера "3proxy", посредством анализа
лога расположенного в ODBC источнике(базе), через Web интерфейс.
stat.awk - основной CGI скрипт (Для его испольнения под Win9X/2000 необходима
программа awk.exe ,в linux/freebsd она как правило входит в сиситему
по умолчанию).
isqlodbc - программа для выполнения SQL запросов к базам ODBC
(вызывается из stat.awk). компилируется gcc и работает как в
win9X/2000 так и в linux/freebsd. (Так же может
использоваться независимо от stat.awk как отдельная
программа..)
log.sql - SQL скрипт создания базы для лога сервера.
awk.exe - awk интерпретатор под Win9X/2000.
Настройка скриптов статистики .
Для работы вам потребуется:
1) любой http сервер подерживающий CGI
2) odbc менеджер (под win32 ) или iodbc менеджер (под unix)
любая база данных например : sqlite, mysql, postgress или любые другие
имеющие ODBC драйвера.(Как настраивать iODBC под linux/freebsd смотрите в
файле iodbc.txt в каталоге /doc/ru архива 3proxy.)
Шаг настройки N1:
Создаем базу данных и DSN для хранения лога. ( в нашем случае DSN будет
называться "sqlite".) далее выполняя скрипт log.sql создаем необходимые
таблицы и индексы:
isqlodbc sqlite < log.sql
Шаг настройки N2:
Устанавливаем DSN и формат таблицы с логом в файле 3proxy.cfg следующего вида:
-----------
# create table log (
# ldate date,
# ltime time,
# username char (30),
# userip char (16),
# bytein integer (10),
# byteout integer (10),
# service char (8),
# host char(255),
# hostport integer (10),
# url char (255)
# );
log &sqlite
logformat "Linsert into log values ('%Y-%m-%d','%H:%M:%S','%U','%C','%I','%O','%N','%n','%r','%T');"
-----------
Шаг настройки N3:
Копируем файлы isqlodbc и stat.awk в каталог с CGI скриптами http сервера
и меняем в stat.awk путь вызова и DSN на свои значения , например:
isql="./isqlodbc.exe sqlite "
Шаг настройки N4:
Пробуем вызвать скрипт из web браузера , например
http://localhost/cgi/stat.awk?
------------------------------ KOI8-R ------------------------------------
-129
View File
@@ -1,129 +0,0 @@
#!/usr/bin/awk -f
BEGIN {
scriptname = ENVIRON["SCRIPT_NAME"]
#for win32
isql=".\\isqlodbc.exe sqlite "
#for unix
#isql="./isqlodbc sqlite "
print "Content-Type: text/html; charset=koi8-r \n\n"
print "<HTML>\n<BODY>\n";
# query parse
query_str = ENVIRON["QUERY_STRING"]
n = split(query_str, querys, "&")
for (i=1; i<=n; i++)
{
split(querys[i], data, "=")
qr[data[1]] = data[2]
}
printf "<FORM METHOD=PUT action=\"" scriptname "?rep=1\">"
printf "datefrom:<INPUT name=\"datefrom\" value=\"2004-06-01\"> "
printf "dateto:<INPUT name=\"dateto\" value=\"2004-07-30\"> <br>"
printf "<INPUT type=\"radio\" name=\"userid\" value=\"username\" checked> LOGIN user <br>"
printf "<INPUT type=\"radio\" name=\"userid\" value=\"userip\"> IP user <br>"
printf "<INPUT type=\"hidden\" name=\"rep\" value=\"user\">"
printf "<INPUT type=\"submit\" value=\"Report\">"
printf "</FORM>"
#printf "query_str=%s\n<br>",query_str
#print qr["rep"]
if(qr["rep"]=="user")
{
cmd = isql " \"select " qr["userid"] ",sum(bytein),sum(byteout),sum(bytein+byteout) from log \
where ldate > '" qr["datefrom"] "' AND ldate < '" qr["dateto"] \
"' group by " qr["userid"] " order by sum(bytein+byteout) desc;\""
printf " <table WIDTH=100%% BORDER=1><tr><td><b>user</b></td> <td><b>bytein</b></td> <td><b>byteout</b> </td> <td> <b>bytesum</b></td></tr>"
while( (cmd|getline result)>0)
{
split(result, rt, "|")
printf "<tr> <td><a href=\"%s?rep=host&datefrom=%s&dateto=%s&userid=%s&selectid=%s\"> %s <\/a></td><td>%d</td><td>%d</td><td>%d</td></tr>",
scriptname,qr["datefrom"],qr["dateto"],qr["userid"],rt[1],rt[1],rt[2],rt[3],rt[4]
totalbytein=totalbytein+rt[2];
totalbyteout=totalbyteout+rt[3];
totalbytesum=totalbytesum+rt[4];
}
printf "<tr> <td><br>Total users</td> <td><br>%d</td> <td><br>%d</td> \
<td><br>%d</td></tr> </table> ",totalbytein,totalbyteout, totalbytesum
close(cmd)
}
if(qr["rep"]=="host")
{
cmd = isql "\"select sum(bytein+byteout), sum(bytein), sum(byteout),host from log \
where ldate > '" qr["datefrom"] "' AND ldate < '"qr["dateto"] \
"' AND " qr["userid"] " = '" qr["selectid"] \
"' group by host order by sum(bytein+byteout) desc;\""
printf "<center><b>Detail statistic for user: %s</b></center>",qr["selectid"]
printf " <table WIDTH=100%% BORDER=1> <tr><td><b>sum byte</b></td> <td><b>bytein</b></td> <td><b>byteout</b></td><td><b>host</b></td></tr>"
while( (cmd|getline result)>0)
{
split(result, rt, "|")
printf "<tr><td>%d</td><td>%d</td><td>%d</td><td>%s</td></tr>",rt[1],rt[2],rt[3],rt[4]
totalbytein=totalbytein+rt[1];
totalbyteout=totalbyteout+rt[2];
totalbytesum=totalbytesum+rt[3];
}
printf "<tr> <td><br>%d</td> <td><br>%d</td> \
<td><br>%d</td><td><br>Total host</td></tr> </table> ",totalbytein,totalbyteout, totalbytesum
printf " </table> "
close(cmd)
}
printf " </BODY> </HTML>";
} # end BEGIN
# decode urlencoded string
function decode(text, hex, i, hextab, decoded, len, c, c1, c2, code) {
split("0 1 2 3 4 5 6 7 8 9 a b c d e f", hex, " ")
for (i=0; i<16; i++) hextab[hex[i+1]] = i
# urldecode function from Heiner Steven
# http://www.shelldorado.com/scripts/cmds/urldecode
# decode %xx to ASCII char
decoded = ""
i = 1
len = length(text)
while ( i <= len ) {
c = substr (text, i, 1)
if ( c == "%" )
{
if ( i+2 <= len )
{
c1 = tolower(substr(text, i+1, 1))
c2 = tolower(substr(text, i+2, 1))
if ( hextab [c1] != "" || hextab [c2] != "" ) {
if ( (c1 >= 2 && (c1 != 7 && c2 != "F")) || (c1 == 0 && c2 ~ "[9acd]") )
{
code = 0 + hextab [c1] * 16 + hextab [c2] + 0
c = sprintf ("%c", code)
}
else { c = " " }
i = i + 2
}
}
} else if ( c == "+" ) { # special handling: "+" means " "
c = " "
}
decoded = decoded c
++i
}
# change linebreaks to \n
gsub(/\r\n/, "\n", decoded)
# remove last linebreak
sub(/[\n\r]*$/,"",decoded)
return decoded
}
-185
View File
@@ -1,185 +0,0 @@
#!/usr/bin/perl
eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
if $running_under_some_shell;
# this emulates #! processing on NIH machines.
# (remove #! line above if indigestible)
eval '$'.$1.'$2;' while $ARGV[0] =~ /^([A-Za-z_0-9]+=)(.*)/ && shift;
# process any FOO=bar switches
$[ = 1; # set array base to 1
$, = ' '; # set output field separator
$\ = "\n"; # set output record separator
$scriptname = $ENVIRON{'SCRIPT_NAME'};
#for win32
$isql = ".\\isqlodbc.exe sqlite ";
#for unix
#isql="./isqlodbc sqlite "
print "Content-Type: text/html; charset=koi8-r \n\n";
print "<HTML>\n<BODY>\n";
# query parse
$query_str = $ENVIRON{'QUERY_STRING'};
$n = (@querys = split(/&/, $query_str, 9999));
for ($i = 1; $i <= $n; $i++) {
@data = split(/=/, $querys[$i], 9999);
$qr{$data[1]} = $data[2];
}
printf "<FORM METHOD=PUT action=\"" . $scriptname . "?rep=1\">";
printf "datefrom:<INPUT name=\"datefrom\" value=\"2004-06-01\"> ";
printf "dateto:<INPUT name=\"dateto\" value=\"2004-07-30\"> <br>";
printf
"<INPUT type=\"radio\" name=\"userid\" value=\"username\" checked> LOGIN user <br>";
printf
"<INPUT type=\"radio\" name=\"userid\" value=\"userip\"> IP user <br>";
printf "<INPUT type=\"hidden\" name=\"rep\" value=\"user\">";
printf "<INPUT type=\"submit\" value=\"Report\">";
printf '</FORM>';
#printf "query_str=%s\n<br>",query_str
#print qr["rep"]
if ($qr{'rep'} eq 'user') {
$cmd = $isql . " \"select " . $qr{'userid'} .
",sum(bytein),sum(byteout),sum(bytein+byteout) from log where ldate > '"
. $qr{'datefrom'} . "' AND ldate < '" . $qr{'dateto'} . "' group by " .
$qr{'userid'} . " order by sum(bytein+byteout) desc;\"";
printf
' <table WIDTH=100%% BORDER=1><tr><td><b>user</b></td> <td><b>bytein</b></td> <td><b>byteout</b> </td> <td> <b>bytesum</b></td></tr>';
while ((($result = &Getline3($cmd, '|'),$getline_ok)) > 0) {
@rt = split(/\|/, $result, 9999);
printf
"<tr> <td><a href=\"%s?rep=host&datefrom=%s&dateto=%s&userid=%s&selectid=%s\"> %s <\\/a></td><td>%d</td><td>%d</td><td>%d</td></tr>",
$scriptname, $qr{'datefrom'}, $qr{'dateto'}, $qr{'userid'}, $rt[1],
$rt[1], $rt[2], $rt[3], $rt[4];
$totalbytein = $totalbytein + $rt[2];
$totalbyteout = $totalbyteout + $rt[3];
$totalbytesum = $totalbytesum + $rt[4];
}
printf
'<tr> <td><br>Total users</td> <td><br>%d</td> <td><br>%d</td> <td><br>%d</td></tr> </table> ',
$totalbytein, $totalbyteout, $totalbytesum;
delete $opened{$cmd} && close($cmd);
}
if ($qr{'rep'} eq 'host') {
$cmd = $isql .
"\"select sum(bytein+byteout), sum(bytein), sum(byteout),host from log where ldate > '"
. $qr{'datefrom'} . "' AND ldate < '" . $qr{'dateto'} . "' AND " .
$qr{'userid'} . " = '" . $qr{'selectid'} .
"' group by host order by sum(bytein+byteout) desc;\"";
printf '<center><b>Detail statistic for user: %s</b></center>',
$qr{'selectid'};
printf
' <table WIDTH=100%% BORDER=1> <tr><td><b>sum byte</b></td> <td><b>bytein</b></td> <td><b>byteout</b></td><td><b>host</b></td></tr>';
while ((($result = &Getline3($cmd, '|'),$getline_ok)) > 0) {
@rt = split(/\|/, $result, 9999);
printf '<tr><td>%d</td><td>%d</td><td>%d</td><td>%s</td></tr>',
$rt[1], $rt[2], $rt[3], $rt[4];
$totalbytein = $totalbytein + $rt[1];
$totalbyteout = $totalbyteout + $rt[2];
$totalbytesum = $totalbytesum + $rt[3];
}
printf
'<tr> <td><br>%d</td> <td><br>%d</td> <td><br>%d</td><td><br>Total host</td></tr> </table> ',
$totalbytein, $totalbyteout, $totalbytesum;
printf ' </table> ';
delete $opened{$cmd} && close($cmd);
}
printf ' </BODY> </HTML>';
# end BEGIN
# decode urlencoded string
sub decode {
local($text, *Hex, $i, *hextab, $decoded, $len, $c, $c1, $c2, $code) = @_;
@Hex = split(' ', '0 1 2 3 4 5 6 7 8 9 a b c d e f', 9999);
for ($i = 0; $i < 16; $i++) {
$hextab{$Hex[$i + 1]} = $i;
# urldecode function from Heiner Steven
# http://www.shelldorado.com/scripts/cmds/urldecode
# decode %xx to ASCII char
;
}
$decoded = '';
$i = 1;
$len = length($text);
while ($i <= $len) { #???
$c = substr($text, $i, 1);
if ($c eq '%') {
if ($i + 2 <= $len) {
$c1 = &tolower(substr($text, $i + 1, 1));
$c2 = &tolower(substr($text, $i + 2, 1));
if ($hextab{$c1} ne '' || $hextab{$c2} ne '') {
if (($c1 >= 2 && ($c1 != 7 && $c2 ne 'F')) ||
($c1 == 0 && $c2 =~ '[9acd]')) {
$code = 0 + $hextab{$c1} * 16 + $hextab{$c2} + 0;
$c = sprintf('%c', $code);
}
else {
$c = ' ';
}
$i = $i + 2;
}
}
}
elsif ($c eq '+') {
# special handling: "+" means " "
$c = ' ';
}
$decoded = $decoded . $c;
++$i;
}
# change linebreaks to \n
$decoded =~ s/\r\n/\n/g;
# remove last linebreak
$decoded =~ s/[\n\r]*$//;
$decoded;
}
sub Getline3 {
&Pick('',@_);
local($_);
if ($getline_ok = (($_ = <$fh>) ne '')) {
;
}
$_;
}
sub Pick {
local($mode,$name,$pipe) = @_;
$fh = $name;
open($name,$mode.$name.$pipe) unless $opened{$name}++;
}
+8 -12
View File
@@ -1,12 +1,8 @@
3proxy 0.7 Public License Agreement
3proxy 0.9 Public License Agreement
(c) 2000-2014 by 3APA3A (3APA3A@security.nnov.ru)
(c) 2000-2014 by SecurityVulns.com (http://3proxy.ru/)
(c) 2000-2014 by Vladimir Dubrovin (vlad@sandy.ru)
This software uses:
RSA Data Security, Inc. MD4 Message-Digest Algorithm
RSA Data Security, Inc. MD5 Message-Digest Algorithm
(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
@@ -39,23 +35,23 @@ are met (BSD style license):
Instead of this license, you can also use and redistribute this software under
terms of compatible license, including:
1. Apache License, Version 2.0
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
View File
Whitespace-only changes.
+54
View File
@@ -0,0 +1,54 @@
3proxy (1.0.0-1) buster; urgency=medium
*3proxy 1.0.0 initial build
-- z3APA3A <3apa3a@3proxy.org> Sat, 22 Aug 2026 12:13:00 +0000
3proxy (0.9.9-1) buster; urgency=medium
*3proxy 0.9.9 initial build
-- z3APA3A <3apa3a@3proxy.org> Thu, 20 Aug 2026 18:29:37 +0300
3proxy (0.9.8-1) buster; urgency=medium
*3proxy 0.9.8 initial build
-- z3APA3A <3apa3a@3proxy.org> Fri, 07 Aug 2026 17:44:30 +0300
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
+1
View File
@@ -0,0 +1 @@
9
+4
View File
@@ -0,0 +1,4 @@
/etc/3proxy/3proxy.cfg
/usr/local/3proxy/conf/3proxy.cfg
/usr/local/3proxy/conf/bandlimiters
/usr/local/3proxy/conf/counters
+18
View File
@@ -0,0 +1,18 @@
Source: 3proxy
Maintainer: z3APA3A <3apa3a@3proxy.org>
Section: net
Priority: optional
Standards-Version: 4.0.0
Build-Depends: debhelper (>=10)
Homepage: https://3proxy.org/
Vcs-Git: https://github.com/z3APA3A/3proxy
Vcs-Browser: https://github.com/z3APA3A/3proxy
Package: 3proxy
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: tiny free proxy server
3Proxy tiny free proxy server is really tiny freeware proxy servers set.
It includes HTTP proxy with HTTPS and FTP support, SOCKSv4/SOCKSv4.5/SOCKSv5 proxy (socks/socks.exe), POP3 proxy, SMTP proxy, FTP proxy, caching DNS proxy, TCP and UDP portmappers.
You can use every proxy as a standalone program (socks, proxy, tcppm, udppm, pop3p) or use combined program (3proxy). Combined proxy additionally supports features like access control, bandwidth limiting, limiting daily/weekly/monthly traffic amount, proxy chaining, log rotation, syslog and ODBC logging, etc.
It's created to be small, simple and yet very functional.
+13
View File
@@ -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
+43
View File
@@ -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
+4
View File
@@ -0,0 +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 -Mr -s /bin/false -g proxy -c 3proxy proxy || true); \
fi
+23
View File
@@ -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
+1
View File
@@ -0,0 +1 @@
3.0 (quilt)
+26
View File
@@ -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.
+35
View File
@@ -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
+9
View File
@@ -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
+1
View File
@@ -0,0 +1 @@
!!Fix: destination IP may be not checked against ACL
+2
View File
@@ -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
+9
View File
@@ -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
+5
View File
@@ -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.
+3
View File
@@ -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
+3
View File
@@ -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
+1
View File
@@ -0,0 +1 @@
! fixed: use SASIZE() instead of sizeof() in connect() for FreeBSD compatibility
+5
View File
@@ -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
+1
View File
@@ -0,0 +1 @@
!Fix: mutex was used prior to initialization on 'log' command processing
+1
View File
@@ -0,0 +1 @@
! Fix: random 00012 errors in some configurations
+15
View File
@@ -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
+3
View File
@@ -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
+1
View File
@@ -0,0 +1 @@
! Fix: tcppm may fail if used with parent proxy
+6
View File
@@ -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
+8
View File
@@ -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)
+9
View File
@@ -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
+11
View File
@@ -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
+4
View File
@@ -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
Loaded 100 of 300 files, more files were not shown because too many files have changed in this diff. Show more