2017-04-25 00:03:06 +03:00
|
|
|
# go-socks5-proxy
|
2016-12-20 13:13:22 +03:00
|
|
|
|
2020-03-21 22:01:13 +03:00
|
|
|
![Latest tag from master branch](https://github.com/serjs/socks5-server/workflows/Latest%20tag%20from%20master%20branch/badge.svg)
|
|
|
|
![Release tag](https://github.com/serjs/socks5-server/workflows/Release%20tag/badge.svg)
|
|
|
|
|
2019-08-27 18:08:35 +03:00
|
|
|
Simple socks5 server using go-socks5 with authentication options
|
2016-12-20 13:13:22 +03:00
|
|
|
|
2018-04-24 21:00:14 +03:00
|
|
|
## Start container with proxy
|
2016-12-20 13:13:22 +03:00
|
|
|
|
2021-07-24 14:22:03 +03:00
|
|
|
```
|
|
|
|
docker run -d --name socks5 -p 1080:1080 \
|
|
|
|
-e PROXY_USER=<PROXY_USER> \
|
|
|
|
-e PROXY_PASSWORD=<PROXY_PASSWORD> \
|
|
|
|
-e ALLOWED_DEST_FQDN=<REGEX_PATTERN> \
|
|
|
|
serjs/go-socks5-proxy
|
|
|
|
```
|
2017-04-25 00:03:06 +03:00
|
|
|
|
2019-08-27 18:08:35 +03:00
|
|
|
Leave `PROXY_USER` and `PROXY_PASSWORD` empty for skip authentication options while running socks5 server.
|
2018-04-24 21:00:14 +03:00
|
|
|
|
2018-06-13 22:53:27 +03:00
|
|
|
## List of all supported config parameters
|
|
|
|
|
|
|
|
|ENV variable|Type|Default|Description|
|
|
|
|
|------------|----|-------|-----------|
|
|
|
|
|PROXY_USER|String|EMPTY|Set proxy user (also required existed PROXY_PASS)|
|
|
|
|
|PROXY_PASSWORD|String|EMPTY|Set proxy password for auth, used with PROXY_USER|
|
2019-08-27 18:08:35 +03:00
|
|
|
|PROXY_PORT|String|1080|Set listen port for application inside docker container|
|
2021-07-24 14:22:03 +03:00
|
|
|
|ALLOWED_DEST_FQDN|String|EMPTY|Allowed destination address regular expression pattern. Default allows all.|
|
2021-07-07 19:10:10 +03:00
|
|
|
|TZ|String|UTC|Set Timezone like in many common Operation Systems|
|
2023-03-06 00:48:21 +03:00
|
|
|
|ALLOWED_IPS|String|Empty|Set allowed IP's that can connect to proxy, separator `,`|
|
|
|
|
|
|
|
|
`ALLOWED_IPS` parameter is not included in `serjs/go-socks5-proxy` image.\
|
|
|
|
You can build your image with:
|
|
|
|
`docker-compose -f docker-compose.build.yml up -d`\
|
|
|
|
Just don't forget to set parameters in the `.env` file.
|
2018-06-13 22:53:27 +03:00
|
|
|
|
2018-04-24 21:00:14 +03:00
|
|
|
## Test running service
|
|
|
|
|
2019-08-27 18:08:35 +03:00
|
|
|
Without authentication
|
2018-04-24 21:00:14 +03:00
|
|
|
|
|
|
|
```curl --socks5 <docker host ip>:1080 http://ifcfg.co``` - result must show docker host ip (for bridged network)
|
|
|
|
|
2019-08-27 18:08:35 +03:00
|
|
|
or
|
2018-04-24 21:00:14 +03:00
|
|
|
|
2020-01-30 14:07:52 +03:00
|
|
|
```docker run --rm curlimages/curl:7.65.3 -s --socks5 <docker host ip>:1080 http://ifcfg.co```
|
2019-08-27 18:08:35 +03:00
|
|
|
|
|
|
|
With authentication - result must show docker host ip (for bridged network)
|
|
|
|
|
2020-01-30 14:06:02 +03:00
|
|
|
```curl --socks5 <docker host ip>:1080 -U <PROXY_USER>:<PROXY_PASSWORD> http://ifcfg.co```
|
2019-08-27 18:08:35 +03:00
|
|
|
|
|
|
|
or
|
|
|
|
|
2020-01-30 14:07:52 +03:00
|
|
|
```docker run --rm curlimages/curl:7.65.3 -s --socks5 <PROXY_USER>:<PROXY_PASSWORD>@<docker host ip>:1080 http://ifcfg.co```
|
2018-04-24 21:00:14 +03:00
|
|
|
|
|
|
|
## Authors
|
|
|
|
|
|
|
|
* **Sergey Bogayrets**
|
|
|
|
|
|
|
|
See also the list of [contributors](https://github.com/serjs/socks5-server/graphs/contributors) who participated in this project.
|