feat: EXTRA_CONFIG environment variable is supported

This commit is contained in:
Paramtamtam 2024-03-16 18:43:37 +04:00
parent 298e65c0b0
commit 4f60889624
No known key found for this signature in database
GPG Key ID: 366371698FAD0A2B
4 changed files with 27 additions and 12 deletions

View File

@ -19,5 +19,6 @@
"ports": {
"proxy": "${PROXY_PORT:-3128}",
"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 }}
socks -a -p{{ ports.socks }}
flush
flush{{^extra_config=}}
# Additional configuration
{{extra_config}}
{{/extra_config=}}

View File

@ -4,6 +4,14 @@ 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].
## 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

View File

@ -46,7 +46,7 @@ Image: ghcr.io/tarampampam/3proxy:1.8.2
## Supported environment variables
| Variable name | Description | Example |
|----------------------|-----------------------------------------------------------|-----------------------------------|
|----------------------|-----------------------------------------------------------------------------------|-----------------------------------|
| `PROXY_LOGIN` | Authorization login (empty by default) | `username` |
| `PROXY_PASSWORD` | Authorization password (empty by default) | `password` |
| `EXTRA_ACCOUNTS` | Additional proxy users | `{"evil":"live", "guest":"pass"}` |
@ -55,6 +55,7 @@ Image: ghcr.io/tarampampam/3proxy:1.8.2
| `MAX_CONNECTIONS` | Maximal connections count (`1024` by default) | `2056` |
| `PROXY_PORT` | HTTP proxy port number (`3128` by default) | `8080` |
| `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?