From 3c31f5f44049505157ec80959fb2a08c38f75782 Mon Sep 17 00:00:00 2001 From: "Philipp Lamp (DE-821)" Date: Tue, 29 Sep 2020 07:20:01 +0000 Subject: [PATCH 1/7] Added Dockerfile --- Dockerfile | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..17b97fb --- /dev/null +++ b/Dockerfile @@ -0,0 +1,6 @@ +FROM node:latest +RUN npm install -g http-proxy-to-socks +ENV SOCKS_HOST=localhost +ENV SOCKS_PORT=1081 +ENV HTTP_PROXY_PORT=8081 +CMD ["sh", "-c", "hpts -s ${SOCKS_HOST}:${SOCKS_PORT} -p ${HTTP_PROXY_PORT}"] \ No newline at end of file From fc8ae6181b2573097a7f8258e805b0b778918bde Mon Sep 17 00:00:00 2001 From: "Philipp Lamp (DE-821)" Date: Tue, 29 Sep 2020 07:34:28 +0000 Subject: [PATCH 2/7] fix listening IP in Dockerfile --- Dockerfile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 17b97fb..03a7165 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ -FROM node:latest -RUN npm install -g http-proxy-to-socks -ENV SOCKS_HOST=localhost -ENV SOCKS_PORT=1081 -ENV HTTP_PROXY_PORT=8081 -CMD ["sh", "-c", "hpts -s ${SOCKS_HOST}:${SOCKS_PORT} -p ${HTTP_PROXY_PORT}"] \ No newline at end of file +FROM node:latest +RUN npm install -g http-proxy-to-socks +ENV SOCKS_HOST=localhost +ENV SOCKS_PORT=1080 +ENV HTTP_PROXY_PORT=8080 +CMD ["sh", "-c", "hpts --socks ${SOCKS_HOST}:${SOCKS_PORT} --host 0.0.0.0 --port ${HTTP_PROXY_PORT}"] \ No newline at end of file From 3f82b6d74c1548051475982de1b24336b6f64646 Mon Sep 17 00:00:00 2001 From: "Philipp Lamp (DE-821)" Date: Tue, 29 Sep 2020 07:40:30 +0000 Subject: [PATCH 3/7] updated readme with docker start informations --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 7e7abe6..57e3338 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,15 @@ You can specify a `json` config file with `-c`: } ``` +### QUICK START WITH DOCKER +```bash +docker run -itd --name http-proxy-to-socks \ + -e SOCKS_HOST=socks.proxy.host \ + -e SOCKS_PORT=1080 \ + -e HTTP_PROXY_PORT=8080 \ + -p 8080:8080 \ + peez/http-proxy-to-socks +``` ## CONTRIBUTE Please add more tests for corresponding features when you send a PR: From ecae6bf352fb83a6784abe9be284b6a7f362d72e Mon Sep 17 00:00:00 2001 From: "Philipp Lamp (DE-821)" Date: Tue, 29 Sep 2020 07:41:18 +0000 Subject: [PATCH 4/7] updated readme with docker start informations --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 57e3338..d3bcee0 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ You can specify a `json` config file with `-c`: } ``` -### QUICK START WITH DOCKER +### Quick start with Docker ```bash docker run -itd --name http-proxy-to-socks \ -e SOCKS_HOST=socks.proxy.host \ From fdf89612b1477d3d10a975c074a2e1102ce91db8 Mon Sep 17 00:00:00 2001 From: "Philipp Lamp (DE-821)" Date: Wed, 18 Nov 2020 06:36:25 +0000 Subject: [PATCH 5/7] add more logging to standard command --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 03a7165..e6e8176 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,4 +3,4 @@ RUN npm install -g http-proxy-to-socks ENV SOCKS_HOST=localhost ENV SOCKS_PORT=1080 ENV HTTP_PROXY_PORT=8080 -CMD ["sh", "-c", "hpts --socks ${SOCKS_HOST}:${SOCKS_PORT} --host 0.0.0.0 --port ${HTTP_PROXY_PORT}"] \ No newline at end of file +CMD ["sh", "-c", "hpts --socks ${SOCKS_HOST}:${SOCKS_PORT} --host 0.0.0.0 --port ${HTTP_PROXY_PORT} --level info"] \ No newline at end of file From 940bcb5ef4890208927f3aeacfbe51b98ff52c3b Mon Sep 17 00:00:00 2001 From: "Philipp Lamp (DE-821)" Date: Wed, 18 Nov 2020 06:46:37 +0000 Subject: [PATCH 6/7] Using fixed node version to ensure stable builds also in the future --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e6e8176..243e0c4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:latest +FROM node:15 RUN npm install -g http-proxy-to-socks ENV SOCKS_HOST=localhost ENV SOCKS_PORT=1080 From 922aabc4d904f328a40793a06acaf50d9e02f08c Mon Sep 17 00:00:00 2001 From: Philipp Lamp Date: Mon, 15 Mar 2021 11:24:40 +0000 Subject: [PATCH 7/7] update gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 5d3553d..15a90a1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ node_modules test.json lib/ +.idea +*.iml