Commit graph

955 commits

Author SHA1 Message Date
4s3ti
e42c339baa Debian 11 Bullseye
Added Debian 11 bullseye to list of supported OS
2021-11-24 22:21:10 +01:00
4s3ti
e458cba36a Main Funcion cleanup
General code cleanup
Moved loose code into funcions
Removed unecessary coments
Moved some comments to their funcions
2021-11-24 22:04:33 +01:00
4s3ti
d4e3a63522 Update CHANGELOG
Updated changelog with changes going to master branch
2021-11-24 18:08:05 +01:00
Orazio
65ffa9afd2
Spelling 2021-11-18 14:28:35 +01:00
4s3ti
88a3df99ca
Merge pull request #1410 from EWouters/master
Allow DNS incoming requests through UFW
2021-11-18 12:19:13 +01:00
EWouters
45f0ad5d37
Allow DNS incoming requests through UFW
Fixes https://github.com/pivpn/pivpn/issues/1282
2021-11-18 12:00:18 +01:00
4s3ti
e2e8f4d4db CI Job no longer tolerates failure
Failures are no longer allowed on Lint/shellcheck stage.
2021-11-03 18:22:29 +01:00
4s3ti
8acbff58dd shellcheck compliance
scripts/wireguard/removeCONF.sh
  * SC1090: ShellCheck can't follow non-constant source. Use a directive to specify location.
    * Disabled warning
  * SC2207: Prefer mapfile or read -a to split command output (or quote to avoid splitting).
    * Replaced LIST=($(...)) with mapfile
  * SC2086: Double quote to prevent globbing and word splitting.
    * Added double quotes
  * SC2154: <VarName> is referenced but not assigned.
    * Disabled warning
2021-11-03 18:09:00 +01:00
4s3ti
e6933e6c53 Shellcheck compliance
scripts/wireguard/pivpnDEBUG.sh
  * SC1090: ShellCheck can't follow non-constant source. Use a directive to specify location.
    * Disabled warning
  * SC2154: <VarName> is referenced but not assigned.
    * Disabled warning
  * SC2086: Double quote to prevent globbing and word splitting.
    * Added double quotes
2021-11-03 18:07:19 +01:00
4s3ti
f823b2bd4c Shellcheck compliance
scripts/wireguard/makeCONF.sh
  * SC1090: ShellCheck can't follow non-constant source. Use a directive to specify location.
    * Disabled warning
  * SC2154: <VariableName> is referenced but not assigned.
    * Disabled warning
  * SC2086: Double quote to prevent globbing and word splitting.
    * Added double quotes
2021-11-03 17:56:42 +01:00
4s3ti
2a78fce9d3 Shellcheck compliance
scripts/wireguard/disableCONF.sh
  * Mapfile instead of double quoted LIST=("$(...)")
scripts/wireguard/enableCONF.sh
  * SC1090: ShellCheck can't follow non-constant source. Use a directive to specify location.
    * Disabled warning
  * SC2207: Prefer mapfile or read -a to split command output (or quote to avoid splitting).
    * Changed to mapfile
  * SC2086: Double quote to prevent globbing and word splitting.
    * Added double quotes
2021-11-03 15:38:45 +01:00
4s3ti
fb71fdd9fd Shellcheck compliance
scripts/wireguard/disableCONF.sh
  * SC1090: ShellCheck can't follow non-constant source. Use a directive to specify location.
    * Disabled warning
  * SC2207: Prefer mapfile or read -a to split command output (or quote to avoid splitting).
    * Added double quotes
  * SC2086: Double quote to prevent globbing and word splitting.
    * Added double quotes
2021-11-03 15:20:48 +01:00
4s3ti
8bd867894a Shellcheck compliance
scripts/wireguard/bash-completion
  * SC2207: Prefer mapfile or read -a to split command output (or quote to avoid splitting)
    * Added double quotes
2021-11-03 14:59:06 +01:00
4s3ti
78810a5781 Shellcheck compliance
scripts/openvpn/removeOVPN.sh
  * SC1090: ShellCheck can't follow non-constant source. Use a directive to specify location.
    * Disabled warning
  * SC2128: Expanding an array without an index only gives the first element.
    * Disabled warning, as its only checking if variable is empty
  * SC2001: See if you can use ${variable//search/replace} instead.
    * Disabled warning, regex doesn't apply to ${variable//search/replace}
  * SC2086: Double quote to prevent globbing and word splitting.
    * Added double quotes
  * SC2140: Word is of the form "A"B"C" (B indicated). Did you mean "ABC" or "A\"B\"C"?
    * Removed unecessary double quotes from %s
  * SC2154: <VariableName> is referenced but not assigned.
    * Disabled warning, variables sourced externally
2021-11-03 13:40:51 +01:00
4s3ti
0e313fa3b3 Shellcheck compliance
scripts/openvpn/pivpnDebug.sh
  * SC1090: ShellCheck can't follow non-constant source. Use a directive to specify location.
    * Disabled warning message
  * SC2154: <VariableName> is referenced but not assigned.
    * Disabled warning message
  * SC2086: Double quote to prevent globbing and word splitting.
    * Added double quotes
  * SC2207: Prefer mapfile or read -a to split command output (or quote to avoid splitting).
    * Added double quotes
2021-11-03 13:02:25 +01:00
4s3ti
e476cc11ee Shellcheck compliance
scripts/openvpn/makeOVPN.sh
 * SC1090: ShellCheck can't follow non-constant source. Use a directive to specify location.
  * Disabled warning
 * SC2086: Double quote to prevent globbing and word splitting.
  * Added missing double quotes
 * SC2001: See if you can use ${variable//search/replace} instead.
  * Disabled warning, suggested method doesn't go well with regexp
 * SC2154: <VarName> is referenced but not assigned.
  * Disabled warning, variables are sourced externally and may differ
2021-11-03 12:21:51 +01:00
4s3ti
12de079a8c Shellcheck compliance
scripts/openvpn/clientStats.sh
  * fix SC2086: Double quote to prevent globbing and word splitting.
  * Added missing double quotes
2021-11-03 02:00:20 +01:00
4s3ti
b4e9831da3 Pipe find to xargs
shellchek job not exiting with propper error code due to find -exec exit
code be always 0.
Piping find to xargs instead to get propper exit codes from shellcheck
2021-11-03 01:41:18 +01:00
4s3ti
4d2e3ed3f8 Shellcheck compliance
scripts/openvpn/bash-completion
 * fix SC2207: Prefer mapfile or read -a to split command output (or quote to avoid splitting).
 * Added double quotes
2021-11-02 18:30:12 +01:00
4s3ti
685133bc00 Shellcheck compliance
scripts/backup.sh
  * Fixes SC1090: ShellCheck can't follow non-constant source. Use a directive to specify location.
  * Fixes SC2086: Double quote to prevent globbing and word splitting.
  * Disabled warning for SC1090
  * Added missing double quotes
2021-11-02 17:14:05 +01:00
4s3ti
57cc772d18 Shellcheck compliance
scripts/uninstall.sh
  * SC2154: <VarName> is referenced but not assigned.
  * Disabled warnings for mentioned errors as they are sourced externaly and may vary
2021-11-02 17:08:27 +01:00
4s3ti
8598013294 Shellcheck compliance
scripts/self_check.sh
  * Fixes SC1090: ShellCheck can't follow non-constant source. Use a directive to specify location.
  * SC2154: <VarName> is referenced but not assigned.
  * Disabled warnings for the mentioned errors as they are sourced externaly and may vary
2021-11-02 17:01:08 +01:00
4s3ti
0de5656208 Shellcheck Compliance
scripts/bacup.sh
 * Fixes SC2154: install_home is referenced but not assigned.
 * Disabled error as this variable is sourced from setupVars file
2021-11-02 17:00:47 +01:00
4s3ti
1fa467d9fd Shellcheck compliance
Fixes Shell check SC2086 errors, missing ""
2021-11-02 16:38:10 +01:00
4s3ti
0883893a4f Merge branch 'test'
Merging test into master.
README.md updates only
2021-11-01 22:02:25 +01:00
4s3ti
25b2fe9f6b Readme updates
* Introduction to Github discussions
* Added pivpn room at matrix.org
* Changed titles format from -- to ##
* (tried) to make readme a bit more clear in regards opening
  issues and bug reports
2021-11-01 10:55:19 +01:00
4s3ti
ca89d74af1 Update issue templates
Added requests for more data
2021-10-28 21:47:02 +02:00
4s3ti
168cafc98b
Merge pull request #1368 from MichaIng/imgbot
[ImgBot] Optimize images
2021-10-25 10:44:00 +02:00
4s3ti
71dc364418
Merge pull request #1367 from MichaIng/patch-3
Remove debconf-apt-progress usage
2021-10-24 18:03:51 +02:00
MichaIng
f9d86cba40
Remove debconf-apt-progress usage
debconf-apt-progress is a tool to show a whiptail based dialog with progress bar for apt package installs, but it is some downsides:
- It aborts whenever apt or debconf halt for an interactive input, hence this would need to be prevented carefully, e.g. via "DEBIAN_FRONTEND=noninteractive" and "--force-confdef/old/new/miss", while it is questionable whether PiVPN should mute such configuration inputs for users.
- It even aborts when such interactive input is not actually required in some cases, but triggered by some other debconf load internals: pivpn#1360

Most importantly, aside of the visually probably appealing progress bar, debconf-apt-progress has not any upsides but reduces transparency of what is actually done, and the installer has a fallback already.

This commit removes the debconf-apt-progress usage in favour of the fallback: direct apt-get usage.

Signed-off-by: MichaIng <micha@dietpi.com>
2021-10-24 17:53:32 +02:00
4s3ti
306ddc7369
Merge pull request #1366 from MichaIng/patch-1
Remove wget usage and dependency
2021-10-24 17:47:09 +02:00
MichaIng
7e64b27590
Remove wget usage and dependency
There is only a single wget call in the installer, at the beginning of a pipe where curl may be the more natural choice. Since curl is a dependency already, this commit replaces the only wget call with curl and hence removes wget from installer dependencies.

Additionally, all curl calls get additional flags:
-s: The "silent" flag is now consequently used to suppress all processing output. It is not necessarily required when the STDOUT is a pipe or command substitution, but it does not hurt.
-S: Even when the curl output is piped, it may be helpful to have errors visible via STDERR, for debugging and being transparent about actual connection/download errors. This flag preserves error messages but does not send them to STDOUT, hence the data processed in the pipe or command substitution is not affected.
-f: There are cases where webservers return a 40x HTML document which is then printed to STDOUT by curl, like a 20x document, and hence unintentionally processed by the end of the pipe or command substitution. Usually this just cases a syntax error, but in theory it can have any unintended or even dangerous effect. The "fail" flag assures that 40x responses are printed as shortened error messages to STDERR and nothing is output to STDOUT. It should be hence seen as mandatory flag whenever curl is called to not print something to console but the output is processed.
-L: wget follows redirects automatically, curl requires the "-L" flag for this. For the wget => curl migration it is hence added to not change the behaviour.

Signed-off-by: MichaIng <micha@dietpi.com>
2021-10-24 17:34:51 +02:00
ImgBotApp
3358aa97e5
[ImgBot] Optimize images
*Total -- 475.54kb -> 460.64kb (3.13%)

/logos.jpg -- 72.87kb -> 62.17kb (14.68%)
/pivpnbanner.png -- 75.15kb -> 70.96kb (5.57%)
/logos.png -- 327.53kb -> 327.51kb (0%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>
2021-10-24 15:19:23 +00:00
4s3ti
b9230a011f typo: Typo on changelog
Month was spelled incorrectly
2021-10-23 23:09:08 +02:00
4s3ti
dc2cf12d91 Keep wireguard and openvpn logos
Adding back wireguard and openvpn logos underneath pivpn banner
2021-10-23 23:06:47 +02:00
4s3ti
24ef49712e docs: Readme and changelog
Changed LatesteUpdate.md to CHANGELOG.md
README.md
  * Added status page badge
  * Changed websites links text and position
  * Replaced banner with pivpn banner
2021-10-23 23:01:30 +02:00
4s3ti
d7f73b6342
Merge pull request #1363 from MichaIng/patch-1
Add missing leading slash
2021-10-11 16:30:21 +02:00
MichaIng
8797b60374
Add missing leading slash
Introduced with: https://github.com/pivpn/pivpn/pull/1362

Signed-off-by: MichaIng <micha@dietpi.com>
2021-10-11 16:27:07 +02:00
4s3ti
090642fd7d
Merge pull request #1362 from MichaIng/patch-1
Fix errors on logging configuration
2021-10-11 15:40:22 +02:00
MichaIng
2848a6baea
Fix errors on logging configuration
rsyslog and/or logrotate may not be installed on the system, in which case creating the configurations may fail. As rsyslog and logrotate may be installed later on, it makes sense to pre-create those directories so that then OpenVPN logs are handled as expected.

Also, if the rsyslog service is not installed or not active, it should not and does not need to be restarted. Since there is not `-e` flag, ` || true` has not effect, but also, when using that flag it makes sense to exit if for some reason the running service couldn't be restarted, which may then be caused by the added configuration.

Signed-off-by: MichaIng <micha@dietpi.com>
2021-10-11 15:29:48 +02:00
4s3ti
226722f632
Merge pull request #1358 from kaihoffman/master
Fix grammar in uninstall.sh
2021-09-20 12:32:39 +02:00
Kai Hoffman
1423f97376
Fix grammar
Update "simpling" to "simply".
2021-09-17 16:05:45 +01:00
Orazio
50798ccd42 Important change to custom MTU handling (mainly to fix issue #1357)
- When NOT providing a custom MTU, 1420 is used for both clients and server.
    Using such value for clients can break WireGuard connections on some networks,
    so iOS and Android clients have logic in place to select a proper MTU value
    when not specified. Now "pivpnMTU" with only be used to set the MTU value for
    the PiVPN installation but not for profile creation.
2021-09-15 17:52:17 +02:00
4s3ti
027f257931 Latest Changes update.
Updated LatestUpdate.md with info about last pivpn updates
2021-08-05 15:12:33 +02:00
4s3ti
78cf44156b Markdown and logo
Fixed markdown syntax
Changed logo to include pivpn logo
2021-08-05 14:54:58 +02:00
4s3ti
9005fde563 Update README
Updated readme, updated dead links, added new badges
Fix #1345
2021-08-05 13:51:28 +02:00
Orazio
c002031ce3
Merge pull request #1321 from DerDanilo/add_wireguard_persistentkeepalive
Add wireguard persistentkeepalive
2021-06-23 10:17:47 +02:00
DerDanilo
6efd6a47d7 change persistentkeepalive to official suggestion 2021-06-21 22:37:34 +02:00
DerDanilo
fd15e62b4e remove inline comment 2021-06-07 23:31:29 +02:00
DerDanilo
88a701c16a add PERSISTENTKEEPALIVE support 2021-06-06 01:10:43 +02:00