This commit is contained in:
@@ -1,21 +1,13 @@
|
||||
FROM golang:1.25-alpine AS builder
|
||||
|
||||
# ccarpinteri fork: uses PIA's central token API instead of regional
|
||||
# /authv3/generateToken (CN-only certs fail on modern Go / new Server-* hosts).
|
||||
RUN apk add --no-cache git ca-certificates \
|
||||
&& go install github.com/ccarpinteri/pia-wg-config@v1.4.0
|
||||
|
||||
FROM docker:cli
|
||||
|
||||
RUN apk add --no-cache bash ca-certificates tzdata python3 py3-pip \
|
||||
RUN apk add --no-cache ca-certificates tzdata python3 py3-pip \
|
||||
&& python3 -m venv /opt/venv \
|
||||
&& /opt/venv/bin/pip install --no-cache-dir 'croniter==6.2.4' \
|
||||
&& /opt/venv/bin/pip install --no-cache-dir 'croniter==6.2.4' 'cryptography>=42,<47' \
|
||||
&& apk del py3-pip
|
||||
|
||||
ENV PATH="/opt/venv/bin:$PATH"
|
||||
|
||||
COPY --from=builder /go/bin/pia-wg-config /usr/local/bin/pia-wg-config
|
||||
COPY rotate.py entrypoint.py entrypoint.sh /usr/local/bin/
|
||||
COPY pia.py rotate.py entrypoint.py entrypoint.sh /usr/local/bin/
|
||||
|
||||
RUN chmod +x /usr/local/bin/rotate.py /usr/local/bin/entrypoint.py /usr/local/bin/entrypoint.sh
|
||||
|
||||
@@ -28,6 +20,9 @@ ENV REGION_SELECT=fastest
|
||||
ENV SERVERLIST_CACHE_PATH=/config/cache/pia-serverlist.json
|
||||
ENV SERVERLIST_CACHE_TTL=24h
|
||||
ENV SERVERLIST_CACHE_MAX_AGE=168h
|
||||
ENV TOKEN_CACHE_PATH=/config/cache/pia-token.json
|
||||
ENV TOKEN_CACHE_TTL=20h
|
||||
ENV PIA_CA_PATH=/config/cache/ca.rsa.4096.crt
|
||||
ENV WG_CONFIG_MAX_AGE=7d
|
||||
ENV LATENCY_SWITCH_MARGIN_MS=15
|
||||
|
||||
|
||||
Reference in New Issue
Block a user