[add] MVP
This commit is contained in:
commit
dc0f8dccaa
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
venv/
|
||||
proxies.txt
|
12
README.md
Normal file
12
README.md
Normal file
@ -0,0 +1,12 @@
|
||||
# Proxy
|
||||
|
||||
## Running the project
|
||||
First create a list of live proxies
|
||||
```bash
|
||||
python3 scrape_proxies.py proxies.txt
|
||||
```
|
||||
|
||||
Then run the mubeng instance through docker-compose
|
||||
```bash
|
||||
docker-compose up
|
||||
```
|
11
docker-compose.yml
Normal file
11
docker-compose.yml
Normal file
@ -0,0 +1,11 @@
|
||||
version: '3.7'
|
||||
services:
|
||||
mubeng:
|
||||
image: kitabisa/mubeng:v0.10.0
|
||||
container_name: mubeng
|
||||
restart: always
|
||||
ports:
|
||||
- "8080:8080"
|
||||
volumes:
|
||||
- .:/mubeng
|
||||
command: '--check --address 0.0.0.0:8080 --rotate 1 --method random --file /mubeng/proxies.txt --watch --timeout 10s'
|
6
example.py
Normal file
6
example.py
Normal file
@ -0,0 +1,6 @@
|
||||
import requests
|
||||
|
||||
proxies = {'https': 'http://localhost:8080', 'http': 'http://localhost:8080'}
|
||||
ip = requests.get(url='http://canhasip.com/', proxies=proxies).text
|
||||
|
||||
print(ip)
|
1
requirements.txt
Normal file
1
requirements.txt
Normal file
@ -0,0 +1 @@
|
||||
requests==2.28.1
|
12
scrape_proxies.py
Normal file
12
scrape_proxies.py
Normal file
@ -0,0 +1,12 @@
|
||||
import requests
|
||||
import json
|
||||
|
||||
r = requests.get('https://raw.githubusercontent.com/fate0/proxylist/master/proxy.list')
|
||||
|
||||
formated_proxies = []
|
||||
for line in r.text.splitlines():
|
||||
parsed = json.loads(line)
|
||||
|
||||
if bool(parsed['anonymity'] == 'high_anonymous'):
|
||||
proxy_string = f'{parsed["type"]}://{parsed["host"]}:{parsed["port"]}'
|
||||
print(proxy_string)
|
Loading…
Reference in New Issue
Block a user