From da4cc1ced52e28107e30967da0e7a6dd4c304369 Mon Sep 17 00:00:00 2001 From: Rob Gill Date: Mon, 14 Oct 2019 19:59:00 +1000 Subject: [PATCH 01/11] Regex specifies : must start with alphanumeric, may have no more than two consecutive hyphens, must not end or start with hyphen, final must be at least two apha characters. Signed-off-by: Rob Gill --- auto_install/install.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/auto_install/install.sh b/auto_install/install.sh index ac2e190..1ff0cc9 100755 --- a/auto_install/install.sh +++ b/auto_install/install.sh @@ -389,8 +389,7 @@ function valid_domain() local domain=$1 local stat=1 - - if [[ $domain =~ ^[a-zA-Z0-9][a-zA-Z0-9-]{1,61}\.[a-zA-Z]{2,}$ ]]; then + if [[ $domain =~ ^(([a-zA-Z0-9]{1,63}|([a-zA-Z0-9]{1,60}[-a-zA-Z0-9()]{0,2}[a-zA-Z0-9]{1,60}))\.){1,6}([a-zA-Z]{2,})$ ]]; then stat=$? fi return $stat From fa21666869ecc019425c01a77fdf0df8ddd39c59 Mon Sep 17 00:00:00 2001 From: IcedComputer <31418197+IcedComputer@users.noreply.github.com> Date: Fri, 18 Oct 2019 21:00:00 -0700 Subject: [PATCH 02/11] Create OVPN12_capable file MakeOVPN has been updated to include the -i iOS function to allow users to create an OVPN12 format file that can be used with the iOS keychain. Since the OVPN12 format is incompatible with OpenVPN 2.4 - this change creates a configuration file that determines if the user can create a -i request via MakeOVPN. --- auto_install/install.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/auto_install/install.sh b/auto_install/install.sh index b021052..4bba848 100755 --- a/auto_install/install.sh +++ b/auto_install/install.sh @@ -787,7 +787,10 @@ confOpenVPN() { if [[ ${APPLY_TWO_POINT_FOUR} == false ]]; then - ENCRYPT=$(whiptail --backtitle "Setup OpenVPN" --title "RSA certificate size" --radiolist \ + ## creates a file to determine if the OpenVPN setup is compatible with the OVPN12 format for iOS keychain integration. + echo "true" > /etc/pivpn/OVPN12_Compatible + + ENCRYPT=$(whiptail --backtitle "Setup OpenVPN" --title "RSA certificate size" --radiolist \ "Choose the desired size of your certificate (press space to select):\n This is a certificate that will be generated on your system. The larger the certificate, the more time this will take. For most applications, it is recommended to use 2048 bits. If you are testing, you can use 1024 bits to speed things up, but do not use this for normal use! If you are paranoid about ... things... then grab a cup of joe and pick 4096 bits." ${r} ${c} 3 \ "1024" "Use a 1024-bit certificate (testing only)" OFF \ "2048" "Use a 2048-bit certificate (recommended level)" ON \ From 3dcaea9067dcaa28ef934f1d02a31f0e676eccd8 Mon Sep 17 00:00:00 2001 From: IcedComputer <31418197+IcedComputer@users.noreply.github.com> Date: Fri, 18 Oct 2019 21:09:54 -0700 Subject: [PATCH 03/11] Check if -i iOS can be used the -i iOS function is not compatible with OVPN 2.4. This change checks to ensure that the user is not using this version before attempting to create an OVPN12 file. --- scripts/makeOVPN.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/makeOVPN.sh b/scripts/makeOVPN.sh index 406aff0..a75cb8e 100755 --- a/scripts/makeOVPN.sh +++ b/scripts/makeOVPN.sh @@ -70,7 +70,13 @@ do DAYS="$_val" ;; -i|--iOS) - iOS=1 + OVPN12_Compatible=$(cat /etc/pivpn/OVPN12_Compatible) + if [[ ${OVPN12_Compatible} == "true" ]]; then + iOS=1 + else + echo "This function is not compatable with OVPN 2.4" + exit 1 + fi ;; -h|--help) helpFunc From 0d6e03757c872eb0946b10355b5d8d2c9c4d212e Mon Sep 17 00:00:00 2001 From: IcedComputer <31418197+IcedComputer@users.noreply.github.com> Date: Fri, 18 Oct 2019 21:15:37 -0700 Subject: [PATCH 04/11] Special characters in OVPN12 files Fixed the issues with special characters in OVPN12 files. --- scripts/makeOVPN.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/makeOVPN.sh b/scripts/makeOVPN.sh index 406aff0..b2bb661 100755 --- a/scripts/makeOVPN.sh +++ b/scripts/makeOVPN.sh @@ -189,6 +189,7 @@ function keyPASS() { fi #Escape chars in PASSWD + PASSWD_UNESCAPED="${PASSWD}" PASSWD=$(echo -n ${PASSWD} | sed -e 's/\\/\\\\/g' -e 's/\//\\\//g' -e 's/\$/\\\$/g' -e 's/!/\\!/g' -e 's/\./\\\./g' -e "s/'/\\\'/g" -e 's/"/\\"/g' -e 's/\*/\\\*/g' -e 's/\@/\\\@/g' -e 's/\#/\\\#/g' -e 's/£/\\£/g' -e 's/%/\\%/g' -e 's/\^/\\\^/g' -e 's/\&/\\\&/g' -e 's/(/\\(/g' -e 's/)/\\)/g' -e 's/-/\\-/g' -e 's/_/\\_/g' -e 's/\+/\\\+/g' -e 's/=/\\=/g' -e 's/\[/\\\[/g' -e 's/\]/\\\]/g' -e 's/;/\\;/g' -e 's/:/\\:/g' -e 's/|/\\|/g' -e 's//\\>/g' -e 's/,/\\,/g' -e 's/?/\\?/g' -e 's/~/\\~/g' -e 's/{/\\{/g' -e 's/}/\\}/g') #Build the client key and then encrypt the key @@ -354,7 +355,7 @@ if [ "$iOS" = "1" ]; then printf "Please remember the export password\n" printf "as you will need this import the certificate on your iOS device\n" printf "========================================================\n" - openssl pkcs12 -passin pass:"$PASSWD" -export -in "issued/${NAME}${CRT}" -inkey "private/${NAME}${KEY}" -certfile ${CA} -name "${NAME}" -out "/home/$INSTALL_USER/ovpns/$NAME.ovpn12" + openssl pkcs12 -passin pass:"$PASSWD_UNESCAPED" -export -in "issued/${NAME}${CRT}" -inkey "private/${NAME}${KEY}" -certfile ${CA} -name "${NAME}" -out "/home/$INSTALL_USER/ovpns/$NAME.ovpn12" chown "$INSTALL_USER" "/home/$INSTALL_USER/ovpns/$NAME.ovpn12" chmod 600 "/home/$INSTALL_USER/ovpns/$NAME.ovpn12" printf "========================================================\n" From cc618e1eeb86ffca72ca3888d2ad7031a65ec5bf Mon Sep 17 00:00:00 2001 From: ia Date: Wed, 23 Oct 2019 21:41:12 -0500 Subject: [PATCH 05/11] Fix small typo in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bee626b..3ae6861 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ The master branch of this script installs and configures OpenVPN on Raspbian Jessie, Stretch, Devuan and has been tested on Ubuntu 14.04 and 16.04 running from an Amazon AWS image. We recommend using the Stretch or Jessie Lite image on a raspberry pi in your home so you can VPN into your home from unsecure remote locations and safely use the internet. However, the scripts do try to detect different distributions and make adjustments accordingly. They should work on the majority of Ubuntu and Debian based distributions including those using UFW by default instead of raw iptables. -This scripts primary mission in life is to allow a user to have a home VPN for as cost effective as possible and without being a technical wizard. Hence the design of pivpn to work on a Raspberry Pi ($35) and then one command installer. Followed by easy management of the VPN thereafter with the 'pivpn' command. That being said... +This script's primary mission in life is to allow a user to have a home VPN for as cost effective as possible and without being a technical wizard. Hence the design of pivpn to work on a Raspberry Pi ($35) and then one command installer. Followed by easy management of the VPN thereafter with the 'pivpn' command. That being said... > This will also work on a free-tier Amazon AWS server using Ubuntu 14.04 - 16.04. I don't want to support every scenario there but getting it to run and install successfully on a free server in the cloud was also important. Many people have untrustworthy ISP's so running on a server elsewhere means you can connect to the VPN from home and your ISP will just see encrypted traffic as your traffic will now be leaving out the amazon infrastructure. From f900d810625d7a82833cba57952426fc96de4b4c Mon Sep 17 00:00:00 2001 From: cfcolaco Date: Mon, 25 Nov 2019 11:54:17 +0100 Subject: [PATCH 06/11] Pre Test into Master merge changed LatestUpdate.md, added date when changes were pushed to master. --- LatestUpdate.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/LatestUpdate.md b/LatestUpdate.md index dacab55..91fc828 100644 --- a/LatestUpdate.md +++ b/LatestUpdate.md @@ -5,7 +5,8 @@ patch release notes. Everytime Test branch is merged into master, a new entry should be created with the date and changes being merged. -## Oct 12th 2019 +## Oct 12th 2019 - On test +## Nov 25th 2019 - On Master * Changed pivpn command exit codes from 1 to 0 - exit code 1 means general error hence should not be used for exiting successfully From d243d9ae1212a30a7959cfe2ec3ef04e7eb9935c Mon Sep 17 00:00:00 2001 From: cfcolaco Date: Fri, 29 Nov 2019 10:45:32 +0100 Subject: [PATCH 07/11] Fixed Typo Line 1262: s/jkkprintf/printf/ --- auto_install/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auto_install/install.sh b/auto_install/install.sh index 0abbdce..b3dea5d 100755 --- a/auto_install/install.sh +++ b/auto_install/install.sh @@ -1259,7 +1259,7 @@ Run 'pivpn help' to see what else you can do!\n\nIf you run into any issue, plea All incomplete posts or bug reports will be ignored or deleted.\n\nThank you for using PiVPN." ${r} ${c} if (whiptail --title "Reboot" --yesno --defaultno "It is strongly recommended you reboot after installation. Would you like to reboot now?" ${r} ${c}); then whiptail --title "Rebooting" --msgbox "The system will now reboot." ${r} ${c} - jkkprintf "\nRebooting system...\n" + printf "\nRebooting system...\n" $SUDO sleep 3 $SUDO shutdown -r now fi From a1722af967646909c226103197aade11f9ba44e6 Mon Sep 17 00:00:00 2001 From: 4s3ti Date: Fri, 20 Dec 2019 23:37:40 +0100 Subject: [PATCH 08/11] Moving to Pivpn.dev Changed all appearances of pivpn.io to pivpn.dev --- CONTRIBUTING.md | 4 ++-- ISSUE_TEMPLATE.md | 6 +++--- README.md | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 64de879..cc581d4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,7 +6,7 @@ This project adheres to the Contributor Covenant [code of conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. -Please report unacceptable behavior to [0.kaladin@gmail.com](mailto:0.kaladin@gmail.com). +Please report unacceptable behavior to any project maintainer. ### Contributing @@ -24,7 +24,7 @@ Please report unacceptable behavior to [0.kaladin@gmail.com](mailto:0.kaladin@gm ### **PiVPN.io Website** -* Yes the site is open source as well! You can find and contribute to [pivpn.io](https://github.com/pivpn/pivpn.github.io) directly. +* Yes the site is open source as well! You can find and contribute to [pivpn.dev](https://github.com/pivpn/pivpn.github.io) directly.
diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md index dcc2b68..6842947 100644 --- a/ISSUE_TEMPLATE.md +++ b/ISSUE_TEMPLATE.md @@ -6,7 +6,7 @@ Any Issue opened that doesn't follow this template will be removed. Hi, you are about to open a new issue, Please provide us with all the info required below, incomplete issues will decrease our effectiveness to troubleshoot your issue and increase the time we need to spend helping you out, or with your issue closed even if it is a legitimate issue. Please remember we do not have any super power that makes us guess exactly what your issue is without any decent details! -For any output requested below, you may alternatively post it on http://pastebin.com and provide the Pastebin URL in its place +For any output requested below, you may alternatively post it on https://pastebin.com and provide the Pastebin URL in its place --> ## In raising this issue, I confirm the following: @@ -21,7 +21,7 @@ For any output requested below, you may alternatively post it on http://pastebin - + ### Issue @@ -31,7 +31,7 @@ For any output requested below, you may alternatively post it on http://pastebin (yes/no / which issues?) -### Console output of `curl -L install.pivpn.io | bash` +### Console output of `curl -L install.pivpn.dev | bash` ``` Output Here ``` diff --git a/README.md b/README.md index 3ae6861..46a65d3 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ About ----- -Visit the [PiVPN](http://pivpn.io) site for more information. +Visit the [PiVPN](https://pivpn.dev) site for more information. This is a set of shell scripts developed by **@0-kaladin** that serve to easily turn your Raspberry Pi (TM) into a VPN server using the free, open-source [OpenVPN](https://openvpn.net) software. @@ -11,7 +11,7 @@ The master branch of this script installs and configures OpenVPN on Raspbian Jessie, Stretch, Devuan and has been tested on Ubuntu 14.04 and 16.04 running from an Amazon AWS image. We recommend using the Stretch or Jessie Lite image on a raspberry pi in your home so you can VPN into your home from unsecure remote locations and safely use the internet. However, the scripts do try to detect different distributions and make adjustments accordingly. They should work on the majority of Ubuntu and Debian based distributions including those using UFW by default instead of raw iptables. -This script's primary mission in life is to allow a user to have a home VPN for as cost effective as possible and without being a technical wizard. Hence the design of pivpn to work on a Raspberry Pi ($35) and then one command installer. Followed by easy management of the VPN thereafter with the 'pivpn' command. That being said... +This scripts primary mission in life is to allow a user to have a home VPN for as cost effective as possible and without being a technical wizard. Hence the design of pivpn to work on a Raspberry Pi ($35) and then one command installer. Followed by easy management of the VPN thereafter with the 'pivpn' command. That being said... > This will also work on a free-tier Amazon AWS server using Ubuntu 14.04 - 16.04. I don't want to support every scenario there but getting it to run and install successfully on a free server in the cloud was also important. Many people have untrustworthy ISP's so running on a server elsewhere means you can connect to the VPN from home and your ISP will just see encrypted traffic as your traffic will now be leaving out the amazon infrastructure. @@ -40,7 +40,7 @@ Installation ```shell -curl -L https://install.pivpn.io | bash +curl -L https://install.pivpn.dev | bash ``` The script will first update your APT repositories, upgrade packages, and install OpenVPN, From 36f96aee7dd2001e7ce1e844ca19c429d946c4c6 Mon Sep 17 00:00:00 2001 From: 4s3ti <4s3ti@protonmail.com> Date: Sun, 22 Dec 2019 18:44:16 +0100 Subject: [PATCH 09/11] Update issue templates New issue templates, now issues are categorized by, but, feature request, Support request --- .github/ISSUE_TEMPLATE/bug_report.md | 47 +++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 20 ++++++++ .github/ISSUE_TEMPLATE/support-request.md | 61 +++++++++++++++++++++++ 3 files changed, 128 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/ISSUE_TEMPLATE/support-request.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..87c0de0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,47 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +## In raising this issue, I confirm the following: + +`{please fill the checkboxes, e.g: [X]}` + +- [] I have read and understood the [contributors guide](https://github.com/pivpn/pivpn/blob/master/CONTRIBUTING.md). +- [] The issue I am reporting can be *replicated*. +- [] The issue I am reporting can be *is* directly related to the pivpn installer script. +- [] The issue I am reporting isn't a duplicate (see [FAQs](https://github.com/pivpn/pivpn/wiki/FAQ), [closed issues](https://github.com/pivpn/pivpn/issues?q=is%3Aissue+sort%3Aupdated-desc+is%3Aclosed), and [open issues](https://github.com/pivpn/pivpn/issues?q=is%3Aissue+sort%3Aupdated-desc+is%3Aopen)). + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - VPN Protocol + - OS: [e.g. iOS] + - Version [e.g. 22] + +**Smartphone (please complete the following information):** + - VPN Protocol + - Device: [e.g. iPhone6] + - OS: [e.g. iOS8.1] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..bbcbbe7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/ISSUE_TEMPLATE/support-request.md b/.github/ISSUE_TEMPLATE/support-request.md new file mode 100644 index 0000000..f639dae --- /dev/null +++ b/.github/ISSUE_TEMPLATE/support-request.md @@ -0,0 +1,61 @@ +--- +name: Support Request +about: Request support from PiVPN comunity +title: '' +labels: '' +assignees: '' + +--- + + + +## In raising this issue, I confirm the following: + +`{please fill the checkboxes, e.g: [X]}` + +- [] I have read and understood the [contributors guide](https://github.com/pivpn/pivpn/blob/master/CONTRIBUTING.md). +- [] The issue I am reporting can be *replicated*. +- [] The issue I am reporting can be *is* directly related to the pivpn installer script. +- [] The issue I am reporting isn't a duplicate (see [FAQs](https://github.com/pivpn/pivpn/wiki/FAQ), [closed issues](https://github.com/pivpn/pivpn/issues?q=is%3Aissue+sort%3Aupdated-desc+is%3Aclosed), and [open issues](https://github.com/pivpn/pivpn/issues?q=is%3Aissue+sort%3Aupdated-desc+is%3Aopen)). + + + + + + + +### Issue + + +### Have you searched for similar issues and solutions? + (yes/no / which issues?) + + +### Console output of `curl -L install.pivpn.dev | bash` +``` + Output Here +``` + + +### Console output of `pivpn add` or `pivpn add nopass` +``` + Output Here +``` + +### Console output of `pivpn debug` +``` + Output Here +``` +### Have you taken any steps towards solving your issue? +``` + which? +``` From 03916e85d45b13052a817e1ecb320dc96764d32e Mon Sep 17 00:00:00 2001 From: 4s3ti <4s3ti@protonmail.com> Date: Sun, 22 Dec 2019 18:48:10 +0100 Subject: [PATCH 10/11] Update issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 4 ++-- .github/ISSUE_TEMPLATE/feature_request.md | 2 +- .github/ISSUE_TEMPLATE/support-request.md | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 87c0de0..05c4b02 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,8 +1,8 @@ --- name: Bug report about: Create a report to help us improve -title: '' -labels: '' +title: "[BUG] " +labels: Needs Investigation assignees: '' --- diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index bbcbbe7..b1cdb91 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,7 +1,7 @@ --- name: Feature request about: Suggest an idea for this project -title: '' +title: "[FR] " labels: '' assignees: '' diff --git a/.github/ISSUE_TEMPLATE/support-request.md b/.github/ISSUE_TEMPLATE/support-request.md index f639dae..9f71483 100644 --- a/.github/ISSUE_TEMPLATE/support-request.md +++ b/.github/ISSUE_TEMPLATE/support-request.md @@ -1,7 +1,7 @@ --- name: Support Request about: Request support from PiVPN comunity -title: '' +title: "[Support] " labels: '' assignees: '' From 86f60b95041cb80e4ac9a859cbacc243da5b9a59 Mon Sep 17 00:00:00 2001 From: 4s3ti Date: Sun, 22 Dec 2019 18:52:58 +0100 Subject: [PATCH 11/11] Deleted Old Issue Template --- ISSUE_TEMPLATE.md | 52 ----------------------------------------------- 1 file changed, 52 deletions(-) delete mode 100644 ISSUE_TEMPLATE.md diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md deleted file mode 100644 index 6842947..0000000 --- a/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,52 +0,0 @@ - - -## In raising this issue, I confirm the following: - -`{please fill the checkboxes, e.g: [X]}` - -- [] I have read and understood the [contributors guide](https://github.com/pivpn/pivpn/blob/master/CONTRIBUTING.md). -- [] The issue I am reporting can be *replicated*. -- [] The issue I am reporting can be *is* directly related to the pivpn installer script. -- [] The issue I am reporting isn't a duplicate (see [FAQs](https://github.com/pivpn/pivpn/wiki/FAQ), [closed issues](https://github.com/pivpn/pivpn/issues?q=is%3Aissue+sort%3Aupdated-desc+is%3Aclosed), and [open issues](https://github.com/pivpn/pivpn/issues?q=is%3Aissue+sort%3Aupdated-desc+is%3Aopen)). - - - - - - - -### Issue - - -### Have you searched for similar issues and solutions? - (yes/no / which issues?) - - -### Console output of `curl -L install.pivpn.dev | bash` -``` - Output Here -``` - - -### Console output of `pivpn add` or `pivpn add nopass` -``` - Output Here -``` - -### Console output of `pivpn debug` -``` - Output Here -``` -### Have you taken any steps towards solving your issue? -``` - which? -```