1
1
# Docker Rotating Proxy Config Generator
2
2
3
3
- Fully Optimized for Web Scraping Usage.
4
- - HTTP/HTTPS Support
4
+ - HTTP/HTTPS Support (see wiki)
5
5
- socks5 with Authorization Proxy to HTTP(S) proxy convert compatible by [ Gost] ( https://github.com/ginuerzh/gost )
6
- - You can use a VPN as an HTTP proxy.
6
+ - You can use a VPN as an HTTP proxy.(powered by [ gluetun ] ( https://github.com/qdm12/gluetun ) )
7
7
- Making it IP address based authentication makes it easier to use in your program.(selenium,puppeteer etc)
8
8
9
9
@@ -109,31 +109,37 @@ zproxy.lum-superproxy.io:22225:httpsquid:yourLuminatiUsername:Password
109
109
110
110
## Generated docker-compose.yml example
111
111
```
112
- version: '3.3 '
112
+ version: '3.4 '
113
113
services:
114
114
squid:
115
115
ports:
116
116
- '3128:3128'
117
- image: 'b4tman/squid:5.3.0 '
117
+ image: 'b4tman/squid:5.8 '
118
118
volumes:
119
119
- './config:/etc/squid/conf.d:ro'
120
120
container_name: dockersquid_rotate
121
121
environment:
122
122
- SQUID_CONFIG_FILE=/etc/squid/conf.d/squid.conf
123
123
extra_hosts:
124
124
- 'host.docker.internal:host-gateway'
125
+ healthcheck:
126
+ test: [CMD-SHELL, 'export https_proxy=127.0.0.1:3128 && export http_proxy=127.0.0.1:3128 && wget -q -Y on -O - https://checkip.amazonaws.com || exit 1']
127
+ retries: 5
128
+ timeout: 10s
129
+ start_period: 10s
130
+ interval: 300s
125
131
proxy1:
126
132
ports:
127
133
- '30000:30000'
128
134
image: 'ginuerzh/gost:latest'
129
135
container_name: dockergost_1
130
- command: '-L=:30000 -F=socks5://vpn:unlimited@159.89.206.161 :2434'
131
- vpn3 :
136
+ command: '-L=:30000 -F=socks5://vpn:unlimited@82.196.7.200 :2434'
137
+ vpn2 :
132
138
ports:
133
- - '127.0.0.1: 30001:8888/tcp'
134
- - '127.0.0.1: 50000:8388'
139
+ - '30001:8888/tcp'
140
+ - '50000:8388'
135
141
image: qmcgaw/gluetun
136
- container_name: dockervpn_3
142
+ container_name: dockervpn_2
137
143
devices:
138
144
- '/dev/net/tun:/dev/net/tun'
139
145
cap_add:
@@ -148,14 +154,14 @@ services:
148
154
- HTTPPROXY_USER=
149
155
- HTTPPROXY_PASSWORD=
150
156
- HTTPPROXY_STEALTH=on
151
- - OPENVPN_USER=xxxx
152
- - OPENVPN_PASSWORD=yyyy
153
- vpn4 :
157
+ - OPENVPN_USER=xxxxx
158
+ - OPENVPN_PASSWORD=yyyyy
159
+ vpn3 :
154
160
ports:
155
161
- '30002:8888/tcp'
156
162
- '50001:8388'
157
163
image: qmcgaw/gluetun
158
- container_name: dockervpn_4
164
+ container_name: dockervpn_3
159
165
devices:
160
166
- '/dev/net/tun:/dev/net/tun'
161
167
cap_add:
@@ -170,24 +176,26 @@ services:
170
176
- HTTPPROXY_USER=
171
177
- HTTPPROXY_PASSWORD=
172
178
- HTTPPROXY_STEALTH=on
173
- - OPENVPN_USER=xxxx
174
- - OPENVPN_PASSWORD=yyyy
179
+ - OPENVPN_USER=xxxxx
180
+ - OPENVPN_PASSWORD=yyyyy
175
181
```
176
182
177
183
## Now try it out
178
184
```
179
185
port 3128 is rotation port.
186
+ Recommended for one-time requests that do not require browser rendering, such as curl
187
+
180
188
sh-4.2# curl https://httpbin.org/ip --proxy https://127.0.0.1:3128
181
189
{
182
- "origin": "209.197.26.75 "
190
+ "origin": "82.196.7.200 "
183
191
}
184
192
sh-4.2# curl https://httpbin.org/ip --proxy https://127.0.0.1:3128
185
193
{
186
- "origin": "185.155.98.168 "
194
+ "origin": "89.187.161.56 "
187
195
}
188
196
sh-4.2# curl https://httpbin.org/ip --proxy https://127.0.0.1:3128
189
197
{
190
- "origin": "173.245.217.48 "
198
+ "origin": "84.17.37.159 "
191
199
}
192
200
sh-4.2# curl https://httpbin.org/ip --proxy https://127.0.0.1:3128
193
201
{
@@ -196,23 +204,24 @@ sh-4.2# curl https://httpbin.org/ip --proxy https://127.0.0.1:3128
196
204
sh-4.2#
197
205
198
206
and.. try static ip gateway
207
+ Recommended in selenium, puppeteer and playwright
199
208
200
- # curl httpbin.org/ip --proxy http://127.0.0.1:49152
209
+ # curl httpbin.org/ip --proxy http://127.0.0.1:30000
201
210
{
202
- "origin": "139.99.54.109 "
211
+ "origin": "82.196.7.200 "
203
212
}
204
- # curl httpbin.org/ip --proxy http://127.0.0.1:49152
213
+ # curl httpbin.org/ip --proxy http://127.0.0.1:30000
205
214
{
206
- "origin": "139.99.54.109 "
215
+ "origin": "82.196.7.200 "
207
216
}
208
217
209
- # curl httpbin.org/ip --proxy http://127.0.0.1:49153
218
+ # curl httpbin.org/ip --proxy http://127.0.0.1:30001
210
219
{
211
- "origin": "159.89.206.161 "
220
+ "origin": "84.17.37.159 "
212
221
}
213
- # curl httpbin.org/ip --proxy http://127.0.0.1:49153
222
+ # curl httpbin.org/ip --proxy http://127.0.0.1:30001
214
223
{
215
- "origin": "159.89.206.161 "
224
+ "origin": "84.17.37.159 "
216
225
}
217
226
```
218
227
0 commit comments