mirror of
https://github.com/ilteoood/docker-surfshark.git
synced 2025-12-21 13:23:02 +01:00
Tun device gration
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
.vscode
|
||||||
@@ -11,6 +11,7 @@ ENV SURFSHARK_CITY=
|
|||||||
ENV OPENVPN_OPTS=
|
ENV OPENVPN_OPTS=
|
||||||
ENV CONNECTION_TYPE=tcp
|
ENV CONNECTION_TYPE=tcp
|
||||||
ENV LAN_NETWORK=
|
ENV LAN_NETWORK=
|
||||||
|
ENV CREATE_TUN_DEVICE=
|
||||||
HEALTHCHECK --interval=60s --timeout=10s --start-period=30s CMD curl -L 'https://ipinfo.io'
|
HEALTHCHECK --interval=60s --timeout=10s --start-period=30s CMD curl -L 'https://ipinfo.io'
|
||||||
COPY startup.sh .
|
COPY startup.sh .
|
||||||
RUN apk add --update --no-cache openvpn wget unzip coreutils curl && chmod +x ./startup.sh
|
RUN apk add --update --no-cache openvpn wget unzip coreutils curl && chmod +x ./startup.sh
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ The container is configurable using 5 environment variables:
|
|||||||
|OPENVPN_OPTS|No|Any additional options for OpenVPN|
|
|OPENVPN_OPTS|No|Any additional options for OpenVPN|
|
||||||
|CONNECTION_TYPE|No|The connection type that you want to use: tcp, udp|
|
|CONNECTION_TYPE|No|The connection type that you want to use: tcp, udp|
|
||||||
|LAN_NETWORK|No|Lan network used to access the web ui of attached containers. Can be comma seperated for multiple subnets Comment out or leave blank: example 192.168.0.0/24|
|
|LAN_NETWORK|No|Lan network used to access the web ui of attached containers. Can be comma seperated for multiple subnets Comment out or leave blank: example 192.168.0.0/24|
|
||||||
|
|CREATE_TUN_DEVICE|No|Creates the TUN device, useful for NAS users|
|
||||||
|
|
||||||
`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).
|
`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).
|
||||||
|
|
||||||
|
|||||||
@@ -21,4 +21,12 @@ then
|
|||||||
|
|
||||||
echo Do not forget to expose the ports for attached container we ui access
|
echo Do not forget to expose the ports for attached container we ui access
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "${CREATE_TUN_DEVICE}" = "true" ]; then
|
||||||
|
echo "Creating TUN device /dev/net/tun"
|
||||||
|
mkdir -p /dev/net
|
||||||
|
mknod /dev/net/tun c 10 200
|
||||||
|
chmod 0666 /dev/net/tun
|
||||||
|
fi
|
||||||
|
|
||||||
openvpn --config $VPN_FILE --auth-user-pass vpn-auth.txt --mute-replay-warnings $OPENVPN_OPTS
|
openvpn --config $VPN_FILE --auth-user-pass vpn-auth.txt --mute-replay-warnings $OPENVPN_OPTS
|
||||||
|
|||||||
Reference in New Issue
Block a user