forked from datawookie/docker-tor-privoxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
84 lines (65 loc) · 1.94 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# VERSIONS ---------------------------------------------------------------------
IMG_VER=0.2.0
IMG_NAME=mcgr0g/talpa-altaica
BUILD_DATE:=$(shell date '+%Y-%m-%d')
GOLANG_VER=1.22.1
ALPINE_VER=3.19.1
SQUID_VER=6.6-r0
TOR_VER=0.4.8.10-r0
SNOWFLAKE_VER=v2.9.1
# BUILD FLAGS -----------------------------------------------------------------
BFLAGS=docker build \
--build-arg img_ver=$(IMG_VER) \
--build-arg build_date=$(BUILD_DATE) \
--build-arg golang_ver=$(GOLANG_VER) \
--build-arg alpine_ver=$(ALPINE_VER) \
--build-arg squid_ver=$(SQUID_VER) \
--build-arg tor_ver=$(TOR_VER) \
--build-arg snowflake_ver=$(SNOWFLAKE_VER) \
-t $(IMG_NAME):$(IMG_VER)
BUILD_FAST=$(BFLAGS) .
BUILD_FULL=$(BFLAGS) --no-cache .
UPGRAGE_PKGS=$(BFLAGS) --build-arg UPGRADE=true .
RECONF=$(BFLAGS) --build-arg RECONFIGURED=true .
SNOWONLY=$(BFLAGS) --target build-env-snowflake .
# IMAGE -----------------------------------------------------------------------
build:
$(BUILD_FAST)
build-full:
$(BUILD_FULL)
upgrade packages:
$(UPGRAGE_PKGS)
reconf:
$(RECONF)
# stop after build stage "build-env-snowflake"
# you can get and test binaries on other host
snowflake:
$(SNOWONLY)
login:
docker login
prepush:
docker tag $(IMG_NAME):$(IMG_VER) $(IMG_NAME):latest
# First need to login.
push:
docker push $(IMG_NAME) --all-tags
pull:
docker pull $(IMG_NAME)
# CONTAINER -------------------------------------------------------------------
example:
docker run --rm --name torproxy \
-e IP_CHANGE_SECONDS=120 \
-e EXIT_NODE={ua},{ug},{uk},{ie} \
-p 127.0.0.1:8888:8888 \
-p 127.0.0.1:9050:9050 \
$(IMG_NAME):$(IMG_VER)
run:
docker run --rm --name torproxy \
-e EXCLUDE_NODE={RU},{UA},{AM},{KG},{BY} \
-e BRIDGE="webtunnel 1.2.3.4:443 url=https://kek.lol/ololo ver=0.0.1" \
-p 127.0.0.1:8888:8888 \
-p 127.0.0.1:9050:9050 \
$(IMG_NAME):$(IMG_VER)
container-flop:
docker container run -it $(IMG_NAME):$(IMG_VER) /bin/sh
runner-flop:
docker exec -it torproxy /bin/sh