mirror of
https://github.com/ilteoood/docker-surfshark.git
synced 2025-12-21 21:33:02 +01:00
Surfshark city
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
FROM alpine:latest
|
||||
LABEL maintainer.name="Matteo Pietro Dazzi" \
|
||||
maintainer.email="matteopietro.dazzi@gmail.com" \
|
||||
version="1.0.1" \
|
||||
version="1.0.2" \
|
||||
description="OpenVPN client configured for SurfShark VPN"
|
||||
ENV SURFSHARK_USER=
|
||||
ENV SURFSHARK_PASSWORD=
|
||||
ENV SURFSHARK_COUNTRY=
|
||||
ENV SURFSHARK_CITY=
|
||||
ENV CONNECTION_TYPE=tcp
|
||||
HEALTHCHECK --interval=60s --timeout=10s --start-period=30s CMD curl -L 'https://ipinfo.io'
|
||||
RUN apk add --update --no-cache openvpn wget unzip coreutils curl
|
||||
|
||||
@@ -26,6 +26,7 @@ The container is configurable using 4 environment variables:
|
||||
|SURFSHARK_USER|Yes|Username provided by SurfShark|
|
||||
|SURFSHARK_PASSWORD|Yes|Password provided by SurfShark|
|
||||
|SURFSHARK_COUNTRY|No|The country, supported by SurfShark, in which you want to connect|
|
||||
|SURFSHARK_CITY|No|The city of the country in which you want to connect|
|
||||
|CONNECTION_TYPE|No|The connection type that you want to use: tcp, udp|
|
||||
|
||||
`SURFSHARK_USER` and `SURFSHARK_PASSWORD` are provided at the bottom of this page: [https://account.surfshark.com/setup/manual](https://account.surfshark.com/setup/manual).
|
||||
|
||||
@@ -8,6 +8,7 @@ services:
|
||||
- SURFSHARK_USER=YOUR_SURFSHARK_USER
|
||||
- SURFSHARK_PASSWORD=YOUR_SURFSHARK_PASSWORD
|
||||
- SURFSHARK_COUNTRY=it
|
||||
- SURFSHARK_CITY=mil
|
||||
- CONNECTION_TYPE=udp
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
|
||||
@@ -3,7 +3,7 @@ rm -rf ovpn_configs*
|
||||
wget -O ovpn_configs.zip https://api.surfshark.com/v1/server/configurations
|
||||
unzip ovpn_configs.zip -d ovpn_configs
|
||||
cd ovpn_configs
|
||||
VPN_FILE=$(ls | grep "${SURFSHARK_COUNTRY}" | grep "${CONNECTION_TYPE}" | shuf | head -n 1)
|
||||
VPN_FILE=$(ls | grep "${SURFSHARK_COUNTRY}" | grep "${SURFSHARK_CITY}" | grep "${CONNECTION_TYPE}" | shuf | head -n 1)
|
||||
echo Choosed: ${VPN_FILE}
|
||||
printf "${SURFSHARK_USER}\n${SURFSHARK_PASSWORD}" > vpn-auth.txt
|
||||
openvpn --config $VPN_FILE --auth-user-pass vpn-auth.txt
|
||||
|
||||
Reference in New Issue
Block a user