mirror of
https://github.com/haugene/docker-transmission-openvpn.git
synced 2025-08-06 22:37:18 +02:00
* Add Transmissionic Web UI & New Documentation (#2589) * Added step to build a .deb file to install and reduce image size (#2590) * Added step to build a .deb file to install and reduce image size * Fixed deb install incorrectly done * Check for update-port script existing instead of being executable (#2593) #2459 * Fixed TWC paths (#2600) * add docker build caching to workflow (#2609) * Privoxy eth0 fixes, healthcheck comparison tweak and start.sh update (#2610) * by checking for existence of default 127 address,healthcheck will never effectively run, as the non-default eth0 ip will never be matched * the comparison was not trimming off the port, thus healthcheck was always going to fail or denote a change when there may have been none * simplified the comparison (thanks @edgd1er ) * Strip double quotes from umask check (#2601) * Fix problem with enabled UFW with Random Ports (#2603) Fixing #2255 * move vpn config download to /config (#2592) * move vpn config download to /config * fix git safe dir permissions * cleanup vpn config clone * re-add zip dl, set git to default * use alpine:latest for TransmissionUIs build stage (#2573) * Update fetch-external-configs.sh removed duplicate bracket * Update to transmission 4.0.4 * Update configure-openvpn.sh --------- Co-authored-by: Anastasiya Polina Soyka <apsoyka@protonmail.com> Co-authored-by: Geoff <geoff@gapple.ca> Co-authored-by: ksurl <ksurl@users.noreply.github.com> Co-authored-by: HeavyGee <133152184+heavygee@users.noreply.github.com> Co-authored-by: WitchRecipe <77073792+WitchRecipe@users.noreply.github.com> Co-authored-by: Florian Kretschmer <19738301+Entepotenz@users.noreply.github.com>
65 lines
1.5 KiB
Bash
Executable File
65 lines
1.5 KiB
Bash
Executable File
#! /bin/bash
|
|
|
|
set -e
|
|
|
|
OVPN_CONNECTION=$OVPN_CONNECTION
|
|
export OVPN_CONNECTION
|
|
|
|
OVPN_PROTOCOL=$OVPN_PROTOCOL
|
|
export OVPN_PROTOCOL
|
|
|
|
OVPN_COUNTRY=$OVPN_COUNTRY
|
|
export OVPN_COUNTRY
|
|
|
|
OVPN_CITY=$OVPN_CITY
|
|
export OVPN_CITY
|
|
|
|
if [ -z "$VPN_PROVIDER_HOME" ]; then
|
|
echo "ERROR: Need to have VPN_PROVIDER_HOME set to call this script" && exit 1
|
|
fi
|
|
|
|
validate_options () {
|
|
if [[ -n "$OVPN_CONNECTION" ]] && [[ $OVPN_CONNECTION =~ (multihop|standard) ]]; then
|
|
return 1
|
|
elif [[ -n "$OVPN_PROTOCOL" ]] && [[ $OVPN_PROTOCOL =~ (udp|tcp) ]]; then
|
|
return 2
|
|
fi
|
|
|
|
return 0
|
|
}
|
|
|
|
# in case the script is executed from another directory
|
|
#cd ${0%/*}
|
|
|
|
cd /etc/openvpn/ovpn
|
|
|
|
# Delete all files for this provider, except scripts
|
|
find /etc/openvpn/ovpn -type f ! -name "*.sh" -delete
|
|
|
|
# Download and extract wanted bundle into temporary file
|
|
|
|
echo "creating temp folder"
|
|
mkdir /tmp/ovpnxtract/
|
|
echo "entering temp folder"
|
|
cd /tmp/ovpnxtract/
|
|
echo "cloning contrib git"
|
|
git clone https://github.com/haugene/vpn-configs-contrib.git
|
|
echo "moving content"
|
|
mv /tmp/ovpnxtract/vpn-configs-contrib/openvpn/ovpn/* /etc/openvpn/ovpn
|
|
echo "deleting temp folder"
|
|
rm -rf /tmp/ovpnxtract/
|
|
|
|
|
|
|
|
#pattern=$OVPN_CONNECTION.$OVPN_COUNTRY.$OVPN_CITY.$OVPN_PROTOCOL
|
|
#OPENVPN_CONFIG=$(ls $pattern | shuf | head -n1)
|
|
|
|
OPENVPN_CONFIG=$OVPN_CONNECTION.$OVPN_COUNTRY.$OVPN_CITY.$OVPN_PROTOCOL
|
|
|
|
#if [[ -n "$OPENVPN_CONFIG" ]]; then
|
|
# ln -sf OPENVPN_CONFIG "$VPN_PROVIDER_HOME"/default.ovpn
|
|
#else
|
|
# echo "There is no available config matching provided options!"
|
|
# exit 3
|
|
#fi
|