16 Commits

Author SHA1 Message Date
Paramtamtam
4f60889624 feat: EXTRA_CONFIG environment variable is supported 2024-03-16 18:43:37 +04:00
dependabot[bot]
298e65c0b0 Bump peter-evans/dockerhub-description from 3 to 4 (#45) 2024-02-01 22:49:23 +00:00
dependabot[bot]
f3596b86ea Bump actions/download-artifact from 3 to 4 (#44) 2024-01-02 08:11:28 +00:00
dependabot[bot]
513a467b11 Bump actions/upload-artifact from 3 to 4 (#43)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  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>
2024-01-02 12:09:00 +04:00
Pаramtamtām
7b2e6ac6da Update dependabot.yml 2023-10-05 11:15:06 +04:00
Pаramtamtām
a44fde46e6 Update dependabot.yml 2023-10-02 12:30:48 +04:00
Pаramtamtām
283a52abe6 Update dependabot.yml 2023-10-02 11:36:41 +04:00
dependabot[bot]
63731eca8c Bump docker/setup-buildx-action from 2 to 3 (#39) 2023-10-02 07:10:12 +00:00
dependabot[bot]
7dd058d8aa Bump docker/login-action from 2 to 3 (#38) 2023-10-02 06:54:11 +00:00
dependabot[bot]
7490d4dce8 Bump docker/build-push-action from 4 to 5 (#40) 2023-10-02 06:53:50 +00:00
dependabot[bot]
6d215e502c Bump actions/checkout from 3 to 4 (#41) 2023-10-02 06:53:37 +00:00
dependabot[bot]
d8f9aa2024 Bump docker/setup-qemu-action from 2 to 3 (#42) 2023-10-02 06:53:27 +00:00
dependabot[bot]
98a8747a3c Bump gcc from 12.2.0 to 13.2.0 (#37) 2023-09-02 15:25:54 +00:00
Pаramtamtām
1febd8abe7 Create dependabot.yml 2023-09-02 06:51:05 -07:00
Paramtamtam
e5e9f108eb Fix: Missing port definitions when EXTRA_ACCOUNTS is set 2023-08-24 19:31:57 +04:00
dependabot[bot]
7b6870751c Bump docker/build-push-action from 3 to 4 (#33) 2023-02-01 17:11:51 +00:00
10 changed files with 72 additions and 28 deletions

View File

@@ -6,11 +6,9 @@ updates:
- package-ecosystem: github-actions - package-ecosystem: github-actions
directory: / directory: /
schedule: {interval: monthly} schedule: {interval: monthly}
reviewers: [tarampampam]
assignees: [tarampampam] assignees: [tarampampam]
- package-ecosystem: docker - package-ecosystem: docker
directory: / directory: /
schedule: {interval: monthly} schedule: {interval: monthly}
reviewers: [tarampampam]
assignees: [tarampampam] assignees: [tarampampam]

25
.github/workflows/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,25 @@
name: dependabot
on:
pull_request: {}
permissions:
contents: write
pull-requests: write
jobs:
dependabot: # https://tinyurl.com/e69djmen
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- uses: dependabot/fetch-metadata@v1
id: metadata
with: {github-token: "${{ secrets.GITHUB_TOKEN }}"}
- name: Enable auto-merge for Dependabot PRs
if: ${{ contains(fromJSON('["version-update:semver-minor", "version-update:semver-patch"]'), steps.metadata.outputs.update-type) }}
run: gh pr merge --auto --merge "$PR_URL"
continue-on-error: true
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -10,9 +10,9 @@ jobs:
name: Docker Hub Description name: Docker Hub Description
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: peter-evans/dockerhub-description@v3 # Action page: <https://github.com/peter-evans/dockerhub-description> - uses: peter-evans/dockerhub-description@v4 # Action page: <https://github.com/peter-evans/dockerhub-description>
with: with:
username: ${{ secrets.DOCKER_LOGIN }} username: ${{ secrets.DOCKER_LOGIN }}
password: ${{ secrets.DOCKER_USER_PASSWORD }} password: ${{ secrets.DOCKER_USER_PASSWORD }}

View File

@@ -9,26 +9,26 @@ jobs:
name: Build docker image name: Build docker image
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- {uses: gacts/github-slug@v1, id: slug} - {uses: gacts/github-slug@v1, id: slug}
- uses: docker/setup-qemu-action@v2 - uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v2 - uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v2 # Action page: <https://github.com/docker/login-action> - uses: docker/login-action@v3 # Action page: <https://github.com/docker/login-action>
with: with:
username: ${{ secrets.DOCKER_LOGIN }} username: ${{ secrets.DOCKER_LOGIN }}
password: ${{ secrets.DOCKER_PASSWORD }} password: ${{ secrets.DOCKER_PASSWORD }}
- uses: docker/login-action@v2 # Action page: <https://github.com/docker/login-action> - uses: docker/login-action@v3 # Action page: <https://github.com/docker/login-action>
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ github.actor }} username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/build-push-action@v3 # Action page: <https://github.com/docker/build-push-action> - uses: docker/build-push-action@v5 # Action page: <https://github.com/docker/build-push-action>
with: with:
context: . context: .
push: true push: true

View File

@@ -15,7 +15,7 @@ jobs: # Docs: <https://git.io/JvxXE>
name: Gitleaks name: Gitleaks
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
with: {fetch-depth: 0} with: {fetch-depth: 0}
- uses: gacts/gitleaks@v1 - uses: gacts/gitleaks@v1
@@ -24,7 +24,7 @@ jobs: # Docs: <https://git.io/JvxXE>
name: Build docker image name: Build docker image
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Build docker image - name: Build docker image
run: docker build -f ./Dockerfile --tag 3proxy:local . run: docker build -f ./Dockerfile --tag 3proxy:local .
@@ -33,7 +33,7 @@ jobs: # Docs: <https://git.io/JvxXE>
run: docker save 3proxy:local > ./docker-image.tar run: docker save 3proxy:local > ./docker-image.tar
- name: Upload artifact - name: Upload artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
with: with:
name: docker-image name: docker-image
path: ./docker-image.tar path: ./docker-image.tar
@@ -49,7 +49,7 @@ jobs: # Docs: <https://git.io/JvxXE>
needs: [build-image] needs: [build-image]
steps: steps:
- name: Download built docker image - name: Download built docker image
uses: actions/download-artifact@v3 uses: actions/download-artifact@v4
with: with:
name: docker-image name: docker-image
path: .artifact path: .artifact

View File

@@ -19,5 +19,6 @@
"ports": { "ports": {
"proxy": "${PROXY_PORT:-3128}", "proxy": "${PROXY_PORT:-3128}",
"socks": "${SOCKS_PORT:-1080}" "socks": "${SOCKS_PORT:-1080}"
} },
"extra_config": "${EXTRA_CONFIG}"
} }

View File

@@ -30,4 +30,9 @@ allow {{ auth.login }}{{#auth.extra_accounts.*}},{{ * }}{{/auth.extra_accounts.*
proxy -a -p{{ ports.proxy }} proxy -a -p{{ ports.proxy }}
socks -a -p{{ ports.socks }} socks -a -p{{ ports.socks }}
flush flush{{^extra_config=}}
# Additional configuration
{{extra_config}}
{{/extra_config=}}

View File

@@ -4,6 +4,20 @@ All notable changes to this package will be documented in this file.
The format is based on [Keep a Changelog][keepachangelog] and this project adheres to [Semantic Versioning][semver]. The format is based on [Keep a Changelog][keepachangelog] and this project adheres to [Semantic Versioning][semver].
## v1.9.0
### Added
- `EXTRA_CONFIG` environment variable is supported now [#47]
[#47]:https://github.com/tarampampam/3proxy-docker/issues/47
## v1.8.3
### Fixed
- Missing port definitions when `EXTRA_ACCOUNTS` is set
## v1.8.2 ## v1.8.2
### Removed ### Removed

View File

@@ -1,5 +1,5 @@
# Image page: <https://hub.docker.com/_/gcc> # Image page: <https://hub.docker.com/_/gcc>
FROM gcc:12.2.0 as builder FROM gcc:13.2.0 as builder
# renovate: source=github-tags name=z3APA3A/3proxy # renovate: source=github-tags name=z3APA3A/3proxy
ARG Z3PROXY_VERSION=0.9.4 ARG Z3PROXY_VERSION=0.9.4
@@ -55,7 +55,7 @@ RUN set -x \
COPY --from=builder /lib/*-linux-gnu/libdl.so.* ./lib/ COPY --from=builder /lib/*-linux-gnu/libdl.so.* ./lib/
COPY --from=builder /tmp/3proxy/bin/3proxy ./bin/3proxy COPY --from=builder /tmp/3proxy/bin/3proxy ./bin/3proxy
COPY --from=builder /tmp/3proxy/bin/*.ld.so ./usr/local/3proxy/libexec/ COPY --from=builder /tmp/3proxy/bin/*.ld.so ./usr/local/3proxy/libexec/
COPY --from=ghcr.io/tarampampam/mustpl:0.1.0 /bin/mustpl ./bin/mustpl COPY --from=ghcr.io/tarampampam/mustpl:0.1.1 /bin/mustpl ./bin/mustpl
COPY 3proxy.cfg.json ./etc/3proxy/3proxy.cfg.json COPY 3proxy.cfg.json ./etc/3proxy/3proxy.cfg.json
COPY 3proxy.cfg.mustach ./etc/3proxy/3proxy.cfg.mustach COPY 3proxy.cfg.mustach ./etc/3proxy/3proxy.cfg.mustach

View File

@@ -45,16 +45,17 @@ Image: ghcr.io/tarampampam/3proxy:1.8.2
## Supported environment variables ## Supported environment variables
| Variable name | Description | Example | | Variable name | Description | Example |
|----------------------|-----------------------------------------------------------|-----------------------------------| |----------------------|-----------------------------------------------------------------------------------|-----------------------------------|
| `PROXY_LOGIN` | Authorization login (empty by default) | `username` | | `PROXY_LOGIN` | Authorization login (empty by default) | `username` |
| `PROXY_PASSWORD` | Authorization password (empty by default) | `password` | | `PROXY_PASSWORD` | Authorization password (empty by default) | `password` |
| `EXTRA_ACCOUNTS` | Additional proxy users | `{"evil":"live", "guest":"pass"}` | | `EXTRA_ACCOUNTS` | Additional proxy users | `{"evil":"live", "guest":"pass"}` |
| `PRIMARY_RESOLVER` | Primary nameserver (dns resolver; `1.0.0.1` by default) | `8.8.8.8:5353/tcp` | | `PRIMARY_RESOLVER` | Primary nameserver (dns resolver; `1.0.0.1` by default) | `8.8.8.8:5353/tcp` |
| `SECONDARY_RESOLVER` | Secondary nameserver (dns resolver; `8.8.4.4` by default) | `2001:4860:4860::8844` | | `SECONDARY_RESOLVER` | Secondary nameserver (dns resolver; `8.8.4.4` by default) | `2001:4860:4860::8844` |
| `MAX_CONNECTIONS` | Maximal connections count (`1024` by default) | `2056` | | `MAX_CONNECTIONS` | Maximal connections count (`1024` by default) | `2056` |
| `PROXY_PORT` | HTTP proxy port number (`3128` by default) | `8080` | | `PROXY_PORT` | HTTP proxy port number (`3128` by default) | `8080` |
| `SOCKS_PORT` | SOCKS proxy port number (`1080` by default) | `8888` | | `SOCKS_PORT` | SOCKS proxy port number (`1080` by default) | `8888` |
| `EXTRA_CONFIG` | Additional 3proxy configuration (will be added to the **end** of the config file) | `log /dev/stdout` |
## How can I use this? ## How can I use this?