docs: update dockerfile and readme
This commit is contained in:
18
Dockerfile
18
Dockerfile
@@ -2,10 +2,28 @@ FROM python:2.7-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# fix EOL debian buster repos and install build dependencies for pyasn
|
||||
RUN sed -i 's/deb.debian.org/archive.debian.org/g' /etc/apt/sources.list && \
|
||||
sed -i 's/security.debian.org/archive.debian.org/g' /etc/apt/sources.list && \
|
||||
sed -i '/buster-updates/d' /etc/apt/sources.list && \
|
||||
apt-get update && apt-get install -y --no-install-recommends gcc libc-dev && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# install dependencies (optional - bs4 can be skipped with --nobs)
|
||||
COPY requirements.txt .
|
||||
RUN pip install -r requirements.txt || true
|
||||
|
||||
# download ASN database for pyasn (if pyasn installed successfully)
|
||||
RUN mkdir -p /app/data && \
|
||||
python -c "import pyasn" 2>/dev/null && \
|
||||
pyasn_util_download.py --latest && \
|
||||
pyasn_util_convert.py --single rib.*.bz2 /app/data/ipasn.dat && \
|
||||
rm -f rib.*.bz2 || \
|
||||
echo "pyasn database setup skipped"
|
||||
|
||||
# remove build dependencies to keep image small
|
||||
RUN apt-get purge -y gcc libc-dev && apt-get autoremove -y || true
|
||||
|
||||
COPY . .
|
||||
|
||||
# default: run syntax check
|
||||
|
||||
@@ -142,6 +142,7 @@ Query parameters:
|
||||
- `limit` - Max results (default: 100)
|
||||
- `proto` - Filter by protocol (socks4/socks5/http)
|
||||
- `country` - Filter by country code
|
||||
- `asn` - Filter by ASN number
|
||||
- `format` - Output format (json/plain)
|
||||
|
||||
## Architecture
|
||||
@@ -175,6 +176,7 @@ Each proxy is tested against 3 random targets:
|
||||
proxy TEXT UNIQUE -- ip:port
|
||||
proto TEXT -- socks4/socks5/http
|
||||
country TEXT -- 2-letter code
|
||||
asn INT -- autonomous system number
|
||||
failed INT -- consecutive failures
|
||||
success_count INT -- total successes
|
||||
avg_latency REAL -- rolling average (ms)
|
||||
|
||||
Reference in New Issue
Block a user