Commit graph

3176 commits

Author SHA1 Message Date
andofrjando
00d62b3423
This fixes the following bug:
If Pi-Hole is behind a reverse proxy that uses SSL, then the block page will not load resources such as `blockingpage.css` and `jquery.min.js` as the insecure `http://` is hard coded. Browsers will block attempts to load insecure resources if the page is loaded of SSL.
The fix is acheived by checking `$_SERVER['HTTPS']` and setting the variable `$proto` to either `http` or `https`. The harcoded `http` is replaced by the contents of this variable.
2017-09-16 10:24:37 +08:00
WaLLy3K
c957124fad Optimised parsing of domains on IPv6 servers
* Remove WHITELIST_COMMAND
* Place IPv4/IPv6 availability test underneath setupVars.conf source
* Improved clarity on comments
* Define default lookupDomain on local line
* Use `getent hosts` instead of nslookup (faster)
* Make gravity_DNSLookup() function more readable
* Use bold on "Neutrino emissions detected"
* Swap conditionals around on adlists file handling
* Add comments to both gravity_Collapse() `awk`s
* Removed unnecessary "${str}" from gravity_Pull()
* Merge function variables into local line
* Place .phgbp suffice on mktemp, so patternbuffers can be cleaned up all at once in gravity_Cleanup()
* Removed success="false" from $httpCode case, placed empty success var in local
* Reordered $httpCode case numerically because I can
* Provide error if Dnsmasq format list is being parsed
* Remove IPv4 check when determining URL list (too slow on large lists)
* Check ${#sources[@]} to ensure we're checking the number of entries and not the character count
* Define empty plural in local line, removing unnecessary plural=;
* Optimised readability of gravity_Whitelist()
* Removed uninformative "Nothing to blacklist"/"No wildcards used" text
* Optimised parsing of domains into hosts format on IPv6 enabled servers
* Ensure /etc/hostname is non-zero
* Use `: >` instead of `rm` as consistent with the rest of the script
* Ensured that gravity_Cleanup() removes ${localList}.tmp
* Optimised readability of gravity_ParseUserDomains()
* Moved dnsRestart to ${var} case statement, renaming it to dnsRestartType for readability
* Set default $listType to ensure script passes "bash strict mode"
2017-09-15 22:39:17 +10:00
WaLLy3K
28063aa7f7 Add administrative contact address functionality
* Disable shellcheck for SC1090
2017-09-15 00:24:29 +10:00
WaLLy3K
c458e4a93b Merge pull request #1420 from WaLLy3K/new/https
Disable Let's Encrypt HTTPS & shift functions to block page
2017-09-14 20:40:20 +10:00
WaLLy3K
e7ae62ba76 Merge pull request #1416 from WaLLy3K/blockpage2
Block Page 2.0
2017-09-14 20:39:45 +10:00
WaLLy3K
ff5411a93a Add 'Connection Refused' for 000 status
* Shift default dnsRestart value into unset default parameter expansion value
* Change nslookup timeout to 5 seconds 
* Use &> instead of >
* Standardise plural code
* Update some comments
* Add "000" when connection is refused
* Condense adblock detection logic
* Add Dnsmasq format detection and parsing logic
* Removed unnecessary echo
* Add dnsWasOffline variable to ensure that if DNS service has been stopped, that it doesn't start and also get reloaded
2017-09-14 20:23:49 +10:00
WaLLy3K
d3073e5e23 Fix array of unique $sourceDomains 2017-09-14 17:09:52 +10:00
WaLLy3K
34ae4844fa Merge branch 'development' into tweak/gravity 2017-09-14 16:44:14 +10:00
WaLLy3K
8191ec01e5 Gravity Bugfixes
* Merge development OpenVPN code
* Determine which domain to resolve depending on existence of $localList
* Re-add code to remove $localList, preventing duplicate local entries
* Minor shellcheck validation fix
2017-09-14 16:39:30 +10:00
WaLLy3K
4d39ab9753 Allow force-reload to be used when restarting DNS
* Remove duplicate coltable variable definition and source
* Minor comment modifications
* Add "$2" to restartdns
2017-09-14 16:39:25 +10:00
Adam Warner
7a1df15724 Merge pull request #1688 from pi-hole/tweak/customBlockPage
Allow for Custom block page
2017-09-13 18:22:38 +01:00
Adam Warner
42b5574f9b
remove no longer needed tests
Signed-off-by: Adam Warner <adamw@rner.email>
2017-09-09 19:41:05 +01:00
Adam Warner
5f4be0de35
adjust lighttpd config depending on whether or not custom.php exists
Signed-off-by: Adam Warner <adamw@rner.email>
2017-09-09 19:30:53 +01:00
Adam Warner
6c605f55f9
always overwrite default blockpage, so that changes can be rolled out
Signed-off-by: Adam Warner <adamw@rner.email>
2017-09-09 19:07:48 +01:00
Adam Warner
774c6e8ac0
Merge branch 'development' into new/UninstallCleanup
Signed-off-by: Adam Warner <adamw@rner.email>

# Conflicts:
#	automated install/uninstall.sh
2017-09-09 18:56:17 +01:00
DL6ER
17be6b860e Merge pull request #1682 from pi-hole/tweak/VPN_hostnames
Add VPN host names to local.list
2017-09-08 22:42:58 +02:00
Adam Warner
474ac4a15d Merge pull request #1581 from pi-hole/sqlite-dependency
Add "php5-sqlite" to dependencies
2017-09-08 21:28:16 +01:00
DL6ER
b8fedf76cd Merge pull request #1572 from pi-hole/gedetil-development
Add web frontend shutdown command
2017-09-08 20:21:20 +02:00
DL6ER
ca88c59d4e Merge pull request #1687 from spacedingo/patch-2
Add ignore-case switch to sort (domains)
2017-09-08 20:17:38 +02:00
Mcat12
d69e62589a Merge branch 'development' into sqlite-dependency 2017-09-08 13:43:26 -04:00
DL6ER
c9d4995900
Update to comply with current development code
Signed-off-by: DL6ER <dl6er@dl6er.de>
2017-09-08 19:35:05 +02:00
DL6ER
279e809aaf
Use poweroff instead of halt
Signed-off-by: DL6ER <dl6er@dl6er.de>
2017-09-08 19:33:06 +02:00
Mcat12
d61857efae Merge branch 'development' into patch-2 2017-09-08 13:32:51 -04:00
DL6ER
0d037e96fb
Merge branch 'development' into gedetil-development
Signed-off-by: DL6ER <dl6er@dl6er.de>

Conflicts:
	advanced/Scripts/webpage.sh
2017-09-08 19:32:38 +02:00
Mcat12
6376f9aef4 Merge pull request #1680 from pi-hole/colour-consistency
Colour output consistency
2017-09-08 13:29:55 -04:00
spacedingo
f5a1fa21f7 Add ignore-case switch to sort (domains)
Domains with caps pass off as unique. It is necessary for proper duplicate removal.
Example:
::: /etc/pihole/list.preEventHorizon (2 results)
adsatt.abcnews.starwave.com
Adsatt.ABCNews.starwave.com
2017-09-08 20:36:14 +04:00
DL6ER
4a90dac68e
Simplify awk code as the format of ipp.txt is actually fixed (only one entry per line is allowed)
Signed-off-by: DL6ER <dl6er@dl6er.de>
2017-09-07 19:42:00 +02:00
DL6ER
2624e56de5
Parse /etc/openvpn/ipp.txt (if existing) and add entries to local.list.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2017-09-06 16:54:41 +02:00
Adam Warner
aef54d6694 Merge branch 'development' into new/UninstallCleanup 2017-09-05 20:41:13 +01:00
Adam Warner
e839a7784c Merge branch 'development' into sqlite-dependency 2017-09-05 20:39:45 +01:00
WaLLy3K
bea99abd8d Ensure colour consistency between terminal themes
* Comment file for review-ability
* Add BOLD and UNDERLINE options
* Select most readable colours out of LIGHT/DARK options
* Provide empty variables for `set -u`
* Deprecate unnecessary variables
* Correct colours for TICK/CROSS/DONE
* Escape r twice and add ESC to OVER
2017-09-05 23:28:33 +10:00
WaLLy3K
a5c4ae955a Merge branch 'development' into tweak/gravity 2017-09-03 15:28:41 +10:00
Dan Schaper
d7d53849a3 Merge pull request #1628 from pi-hole/fix/issue-template
Update Issue/PR Template text
2017-09-02 04:55:56 -07:00
WaLLy3K
b354f722be Add link for EUPL
* Also formatted `git rebase` text to be consistent with `git commit --signoff`

Signed-off-by: WaLLy3K <wally3k@pi-hole.net>
2017-09-02 21:52:54 +10:00
WaLLy3K
ea1aad9774 Add review suggestions to template 2017-09-01 10:17:08 +10:00
WaLLy3K
817d644795 Merge branch 'development' into fix/issue-template 2017-09-01 10:16:03 +10:00
WaLLy3K
56b8c4bfdb Merge branch 'development' into tweak/gravity 2017-09-01 10:01:41 +10:00
Adam Warner
c65c26b463 Merge branch 'development' into new/UninstallCleanup 2017-08-31 15:36:47 +01:00
WaLLy3K
bf059e5ee8 Merge pull request #1676 from pi-hole/remove-netstat
Replace superseded netstat command
2017-08-31 21:16:11 +10:00
WaLLy3K
15a5f425bf Replace nc with psuedo-device
* Also fix minor conditional style issue
2017-08-31 20:32:02 +10:00
WaLLy3K
3125d24ded Replace superseded netstat command
* Make colfile readonly, and use path of PI_HOLE_SCRIPT_DIR
* Rename piholeStatus function to statusFunc for function name consistency
* Replace superseded netstat command with nc
* Perform addn-hosts check using a single grep subshell
2017-08-31 17:39:41 +10:00
Adam Warner
6b6d105c2f Merge branch 'development' into sqlite-dependency 2017-08-28 10:17:33 +01:00
WaLLy3K
bab44c52ae Merge branch 'development' into blockpage2 2017-08-28 13:30:57 +10:00
WaLLy3K
2f19605750 Merge branch 'development' into fix/issue-template 2017-08-28 13:29:18 +10:00
WaLLy3K
7311db3a63 Change wording to support feature PR's
* Also clarify template suggestion text
* Remove stray '
2017-08-28 13:28:23 +10:00
WaLLy3K
0a00936e99 Update resolver test & added more comments
* Add/update code comments
* Change resolver check to test for pi.hole
* Make resolver check timeout after 10 seconds
* Use > instead of &> where appropriate
* Make resolver check sleep for 30 seconds (effectively waiting up to 50s for dnsmasq to be resolvable)
* Provide confirmation upon success of resolver check availability
* Quotes and Braced remaining variables as appropriate
* Removed duplicate local
2017-08-28 11:36:02 +10:00
WaLLy3K
7cac207c00 Merge branch 'development' into tweak/gravity 2017-08-28 03:11:38 +10:00
WaLLy3K
feb412b02a Merge pull request #1671 from pi-hole/release/3.2
Update development from release/3.2
2017-08-28 03:04:46 +10:00
Adam Warner
199de9ebc0 Merge branch 'development' into new/https 2017-08-27 11:38:30 +01:00
Adam Warner
504ae0193f Merge branch 'development' into blockpage2 2017-08-27 11:23:21 +01:00