Skip to content

Commit 4f60889

Browse files
committed
feat: EXTRA_CONFIG environment variable is supported
1 parent 298e65c commit 4f60889

File tree

4 files changed

+27
-12
lines changed

4 files changed

+27
-12
lines changed

3proxy.cfg.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,6 @@
1919
"ports": {
2020
"proxy": "${PROXY_PORT:-3128}",
2121
"socks": "${SOCKS_PORT:-1080}"
22-
}
22+
},
23+
"extra_config": "${EXTRA_CONFIG}"
2324
}

3proxy.cfg.mustach

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,9 @@ allow {{ auth.login }}{{#auth.extra_accounts.*}},{{ * }}{{/auth.extra_accounts.*
3030
proxy -a -p{{ ports.proxy }}
3131
socks -a -p{{ ports.socks }}
3232

33-
flush
33+
flush{{^extra_config=}}
34+
35+
# Additional configuration
36+
{{extra_config}}
37+
{{/extra_config=}}
38+

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ All notable changes to this package will be documented in this file.
44

55
The format is based on [Keep a Changelog][keepachangelog] and this project adheres to [Semantic Versioning][semver].
66

7+
## v1.9.0
8+
9+
### Added
10+
11+
- `EXTRA_CONFIG` environment variable is supported now [#47]
12+
13+
[#47]:https://github.com/tarampampam/3proxy-docker/issues/47
14+
715
## v1.8.3
816

917
### Fixed

README.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,17 @@ Image: ghcr.io/tarampampam/3proxy:1.8.2
4545

4646
## Supported environment variables
4747

48-
| Variable name | Description | Example |
49-
|----------------------|-----------------------------------------------------------|-----------------------------------|
50-
| `PROXY_LOGIN` | Authorization login (empty by default) | `username` |
51-
| `PROXY_PASSWORD` | Authorization password (empty by default) | `password` |
52-
| `EXTRA_ACCOUNTS` | Additional proxy users | `{"evil":"live", "guest":"pass"}` |
53-
| `PRIMARY_RESOLVER` | Primary nameserver (dns resolver; `1.0.0.1` by default) | `8.8.8.8:5353/tcp` |
54-
| `SECONDARY_RESOLVER` | Secondary nameserver (dns resolver; `8.8.4.4` by default) | `2001:4860:4860::8844` |
55-
| `MAX_CONNECTIONS` | Maximal connections count (`1024` by default) | `2056` |
56-
| `PROXY_PORT` | HTTP proxy port number (`3128` by default) | `8080` |
57-
| `SOCKS_PORT` | SOCKS proxy port number (`1080` by default) | `8888` |
48+
| Variable name | Description | Example |
49+
|----------------------|-----------------------------------------------------------------------------------|-----------------------------------|
50+
| `PROXY_LOGIN` | Authorization login (empty by default) | `username` |
51+
| `PROXY_PASSWORD` | Authorization password (empty by default) | `password` |
52+
| `EXTRA_ACCOUNTS` | Additional proxy users | `{"evil":"live", "guest":"pass"}` |
53+
| `PRIMARY_RESOLVER` | Primary nameserver (dns resolver; `1.0.0.1` by default) | `8.8.8.8:5353/tcp` |
54+
| `SECONDARY_RESOLVER` | Secondary nameserver (dns resolver; `8.8.4.4` by default) | `2001:4860:4860::8844` |
55+
| `MAX_CONNECTIONS` | Maximal connections count (`1024` by default) | `2056` |
56+
| `PROXY_PORT` | HTTP proxy port number (`3128` by default) | `8080` |
57+
| `SOCKS_PORT` | SOCKS proxy port number (`1080` by default) | `8888` |
58+
| `EXTRA_CONFIG` | Additional 3proxy configuration (will be added to the **end** of the config file) | `log /dev/stdout` |
5859

5960
## How can I use this?
6061

0 commit comments

Comments
 (0)