Last active
November 4, 2018 13:02
-
-
Save Eduard-gan/58b9061114b668dd6b0bf7ce893e093a to your computer and use it in GitHub Desktop.
Delegated Socks proxy in Docker container
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-f | |
ADMIN=admin@domain | |
DGROOT=/tmp | |
-Q53120 | |
SERVER=socks5 | |
HOSTLIST=.localnet:*.*.*.* | |
AUTHORIZER=-list{gee:password,rka:password,aug:password,batya:password,kaa:password,tikva:password,vea:password,vei:password} | |
-va |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Dockerfile for delegated | |
# | |
FROM debian | |
MAINTAINER kev <[email protected]> | |
ENV DG_VERSION 9_9_13 | |
ENV DG_FILE linux2.6-dg${DG_VERSION}.tar.gz | |
ENV DG_DIR dg${DG_VERSION} | |
ENV DG_URL http://delegate.hpcc.jp/anonftp/DeleGate/bin/linux/latest/${DG_FILE} | |
RUN set -xe \ | |
&& apt-get update \ | |
&& apt-get install -y wget \ | |
&& wget ${DG_URL} -O ${DG_FILE} \ | |
&& tar xzf ${DG_FILE} \ | |
&& cp ${DG_DIR}/DGROOT/bin/${DG_DIR} /bin/delegated \ | |
&& apt-get remove -y wget \ | |
&& rm -rf ${DG_FILE} \ | |
${DG_DIR} \ | |
/var/lib/apt/lists/* | |
COPY delegated.conf /etc/ | |
ENTRYPOINT ["/bin/delegated"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Docker image: https://hub.docker.com/r/vimagick/delegated/ | |
Dockerfile saved in case image repo will dissapear. | |
Usage: copy delegated.conf in your /etc and start a container: | |
docker run -dit --name delegated -p 53120:53120 \ | |
-v /etc/delegated.conf:/etc/delegated.conf \ | |
-v /var/log/delegated/:/tmp/log/ \ | |
--restart=always vimagick/delegated | |
It uses TCP-port 53120 so make sure its availible. | |
It stores it's log in host's /var/log/delegated/PORT_NUMBER file. Fail2ban using it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment