Compare commits
37 Commits
DOCS/adds-
...
1.0.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7234e11e87 | ||
|
|
031b0e37bb | ||
|
|
f1fff427f8 | ||
|
|
584c145b15 | ||
|
|
d9e7bb57f3 | ||
|
|
c9631e6848 | ||
|
|
06965b0e82 | ||
|
|
be741a1087 | ||
|
|
52b3960ce3 | ||
|
|
d7bcbcb5b4 | ||
|
|
4d54cdccac | ||
|
|
da75fb25d7 | ||
|
|
42023039c1 | ||
|
|
affec03d6c | ||
|
|
ecaffda777 | ||
|
|
0d484e3ffa | ||
|
|
38d6b5b97e | ||
|
|
728a8237aa | ||
|
|
24ca677021 | ||
|
|
ed53c29a55 | ||
|
|
c4e29fda0f | ||
|
|
ff65696729 | ||
|
|
2304aaf17c | ||
|
|
d43a05a0ed | ||
|
|
ada1dccc5b | ||
|
|
7a8e694abc | ||
|
|
c764bbfcd4 | ||
|
|
523419df11 | ||
|
|
62a213d74d | ||
|
|
7fc8ba4c15 | ||
|
|
f63418039a | ||
|
|
3f80d58085 | ||
|
|
ee74c5866a | ||
|
|
41cd379805 | ||
|
|
0c5dbd66a3 | ||
|
|
18f72788aa | ||
|
|
cd3ab4a264 |
11
.env
11
.env
@@ -18,8 +18,9 @@ REACT_APP_WHO_API_KEY=''
|
|||||||
|
|
||||||
# Configuration settings
|
# Configuration settings
|
||||||
# CHROME_PATH='/usr/bin/chromium' # The path the the Chromium executable
|
# CHROME_PATH='/usr/bin/chromium' # The path the the Chromium executable
|
||||||
# PORT='3000' # Port to serve the API, when running server.js
|
# PORT='3000' # Port to serve the API, when running server.js
|
||||||
# DISABLE_GUI='false' # Disable the GUI, and only serve the API
|
# DISABLE_GUI='false' # Disable the GUI, and only serve the API
|
||||||
# API_TIMEOUT_LIMIT='10000' # The timeout limit for API requests, in milliseconds
|
# API_TIMEOUT_LIMIT='10000' # The timeout limit for API requests, in milliseconds
|
||||||
# API_CORS_ORIGIN='*' # Enable CORS, by setting your allowed hostname(s) here
|
# API_CORS_ORIGIN='*' # Enable CORS, by setting your allowed hostname(s) here
|
||||||
# REACT_APP_API_ENDPOINT='/api' # The endpoint for the API (can be local or remote)
|
# API_ENABLE_RATE_LIMIT='true' # Enable rate limiting for the API
|
||||||
|
# REACT_APP_API_ENDPOINT='/api' # The endpoint for the API (can be local or remote)
|
||||||
|
|||||||
149
.github/README.md
vendored
149
.github/README.md
vendored
@@ -13,7 +13,7 @@
|
|||||||
<p align="center">
|
<p align="center">
|
||||||
<sup>Kindly supported by:</sup><br>
|
<sup>Kindly supported by:</sup><br>
|
||||||
<a href="https://terminaltrove.com/?utm_campaign=github&utm_medium=referral&utm_content=web-check&utm_source=wcgh">
|
<a href="https://terminaltrove.com/?utm_campaign=github&utm_medium=referral&utm_content=web-check&utm_source=wcgh">
|
||||||
<img src="https://i.ibb.co/fqL7Y6N/terminal-trove-normal.png" width="400" alt="Terminal Trove">
|
<img src="https://i.ibb.co/8jrrcZ0/IMG-7210.jpg" width="300" alt="Terminal Trove">
|
||||||
<br>
|
<br>
|
||||||
<strong>The $HOME of all things in the terminal.</strong>
|
<strong>The $HOME of all things in the terminal.</strong>
|
||||||
</a>
|
</a>
|
||||||
@@ -839,10 +839,12 @@ Key | Value
|
|||||||
|
|
||||||
Key | Value
|
Key | Value
|
||||||
---|---
|
---|---
|
||||||
`CHROME_PATH` | The path the Chromium executable (e.g. `/usr/bin/chromium`)
|
|
||||||
`PORT` | Port to serve the API, when running server.js (e.g. `3000`)
|
`PORT` | Port to serve the API, when running server.js (e.g. `3000`)
|
||||||
`DISABLE_GUI` | Disable the GUI, and only serve the API (e.g. `false`)
|
`API_ENABLE_RATE_LIMIT` | Enable rate-limiting for the /api endpoints (e.g. `true`)
|
||||||
`API_TIMEOUT_LIMIT` | The timeout limit for API requests, in milliseconds (e.g. `10000`)
|
`API_TIMEOUT_LIMIT` | The timeout limit for API requests, in milliseconds (e.g. `10000`)
|
||||||
|
`API_CORS_ORIGIN` | Enable CORS, by setting your allowed hostname(s) here (e.g. `example.com`)
|
||||||
|
`CHROME_PATH` | The path the Chromium executable (e.g. `/usr/bin/chromium`)
|
||||||
|
`DISABLE_GUI` | Disable the GUI, and only serve the API (e.g. `false`)
|
||||||
`REACT_APP_API_ENDPOINT` | The endpoint for the API, either local or remote (e.g. `/api`)
|
`REACT_APP_API_ENDPOINT` | The endpoint for the API, either local or remote (e.g. `/api`)
|
||||||
|
|
||||||
All values are optional.
|
All values are optional.
|
||||||
@@ -937,14 +939,28 @@ Credit to the following users for contributing to Web-Check
|
|||||||
<sub><b>Brian Teeman</b></sub>
|
<sub><b>Brian Teeman</b></sub>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<a href="https://github.com/GreyXor">
|
||||||
|
<img src="https://avatars.githubusercontent.com/u/79602273?v=4" width="80;" alt="GreyXor"/>
|
||||||
|
<br />
|
||||||
|
<sub><b>GreyXor</b></sub>
|
||||||
|
</a>
|
||||||
|
</td></tr>
|
||||||
|
<tr>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<a href="https://github.com/jinnabaalu">
|
<a href="https://github.com/jinnabaalu">
|
||||||
<img src="https://avatars.githubusercontent.com/u/11784253?v=4" width="80;" alt="jinnabaalu"/>
|
<img src="https://avatars.githubusercontent.com/u/11784253?v=4" width="80;" alt="jinnabaalu"/>
|
||||||
<br />
|
<br />
|
||||||
<sub><b>Jinna Baalu</b></sub>
|
<sub><b>Jinna Baalu</b></sub>
|
||||||
</a>
|
</a>
|
||||||
</td></tr>
|
</td>
|
||||||
<tr>
|
<td align="center">
|
||||||
|
<a href="https://github.com/bolens">
|
||||||
|
<img src="https://avatars.githubusercontent.com/u/1218380?v=4" width="80;" alt="bolens"/>
|
||||||
|
<br />
|
||||||
|
<sub><b>Michael Bolens</b></sub>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<a href="https://github.com/robinson">
|
<a href="https://github.com/robinson">
|
||||||
<img src="https://avatars.githubusercontent.com/u/237874?v=4" width="80;" alt="robinson"/>
|
<img src="https://avatars.githubusercontent.com/u/237874?v=4" width="80;" alt="robinson"/>
|
||||||
@@ -972,6 +988,14 @@ Credit to the following users for contributing to Web-Check
|
|||||||
<br />
|
<br />
|
||||||
<sub><b>PhiRequiem</b></sub>
|
<sub><b>PhiRequiem</b></sub>
|
||||||
</a>
|
</a>
|
||||||
|
</td></tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center">
|
||||||
|
<a href="https://github.com/Myzel394">
|
||||||
|
<img src="https://avatars.githubusercontent.com/u/50424412?v=4" width="80;" alt="Myzel394"/>
|
||||||
|
<br />
|
||||||
|
<sub><b>Myzel394</b></sub>
|
||||||
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<a href="https://github.com/murrple-1">
|
<a href="https://github.com/murrple-1">
|
||||||
@@ -986,8 +1010,7 @@ Credit to the following users for contributing to Web-Check
|
|||||||
<br />
|
<br />
|
||||||
<sub><b>Marco Ochse</b></sub>
|
<sub><b>Marco Ochse</b></sub>
|
||||||
</a>
|
</a>
|
||||||
</td></tr>
|
</td>
|
||||||
<tr>
|
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<a href="https://github.com/treatmesubj">
|
<a href="https://github.com/treatmesubj">
|
||||||
<img src="https://avatars.githubusercontent.com/u/39680353?v=4" width="80;" alt="treatmesubj"/>
|
<img src="https://avatars.githubusercontent.com/u/39680353?v=4" width="80;" alt="treatmesubj"/>
|
||||||
@@ -1008,7 +1031,8 @@ Credit to the following users for contributing to Web-Check
|
|||||||
<br />
|
<br />
|
||||||
<sub><b>Gertje823</b></sub>
|
<sub><b>Gertje823</b></sub>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td></tr>
|
||||||
|
<tr>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<a href="https://github.com/epreston">
|
<a href="https://github.com/epreston">
|
||||||
<img src="https://avatars.githubusercontent.com/u/347224?v=4" width="80;" alt="epreston"/>
|
<img src="https://avatars.githubusercontent.com/u/347224?v=4" width="80;" alt="epreston"/>
|
||||||
@@ -1033,6 +1057,13 @@ Huge thanks to these wonderful people, who sponsor me on GitHub, their support h
|
|||||||
<!-- readme: sponsors -start -->
|
<!-- readme: sponsors -start -->
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td align="center">
|
||||||
|
<a href="https://github.com/github">
|
||||||
|
<img src="https://avatars.githubusercontent.com/u/9919?v=4" width="80;" alt="github"/>
|
||||||
|
<br />
|
||||||
|
<sub><b>GitHub</b></sub>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<a href="https://github.com/koconder">
|
<a href="https://github.com/koconder">
|
||||||
<img src="https://avatars.githubusercontent.com/u/25068?u=582657b23622aaa3dfe68bd028a780f272f456fa&v=4" width="80;" alt="koconder"/>
|
<img src="https://avatars.githubusercontent.com/u/25068?u=582657b23622aaa3dfe68bd028a780f272f456fa&v=4" width="80;" alt="koconder"/>
|
||||||
@@ -1041,29 +1072,15 @@ Huge thanks to these wonderful people, who sponsor me on GitHub, their support h
|
|||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<a href="https://github.com/peng1can">
|
<a href="https://github.com/Admonstrator">
|
||||||
<img src="https://avatars.githubusercontent.com/u/225854?v=4" width="80;" alt="peng1can"/>
|
<img src="https://avatars.githubusercontent.com/u/69824?u=1e226d7a36cdd661c3e4cd486fea140d045b7d57&v=4" width="80;" alt="Admonstrator"/>
|
||||||
<br />
|
<br />
|
||||||
<sub><b>Peng1can</b></sub>
|
<sub><b>Aaron Viehl</b></sub>
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
<td align="center">
|
|
||||||
<a href="https://github.com/alydemah">
|
|
||||||
<img src="https://avatars.githubusercontent.com/u/652035?u=ac2c04e474da37bfeafcfa25076cc1800997aedb&v=4" width="80;" alt="alydemah"/>
|
|
||||||
<br />
|
|
||||||
<sub><b>Aly Mohamed</b></sub>
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
<td align="center">
|
|
||||||
<a href="https://github.com/bgadrian">
|
|
||||||
<img src="https://avatars.githubusercontent.com/u/830001?u=69f115baad2fcd8c14eb05bdbf5cd80f4649a95a&v=4" width="80;" alt="bgadrian"/>
|
|
||||||
<br />
|
|
||||||
<sub><b>B.G.Adrian</b></sub>
|
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<a href="https://github.com/tbjers">
|
<a href="https://github.com/tbjers">
|
||||||
<img src="https://avatars.githubusercontent.com/u/1117052?u=539d96d5e581b3139c75713ce35b89a36626404c&v=4" width="80;" alt="tbjers"/>
|
<img src="https://avatars.githubusercontent.com/u/1117052?v=4" width="80;" alt="tbjers"/>
|
||||||
<br />
|
<br />
|
||||||
<sub><b>Torgny Bjers</b></sub>
|
<sub><b>Torgny Bjers</b></sub>
|
||||||
</a>
|
</a>
|
||||||
@@ -1074,15 +1091,15 @@ Huge thanks to these wonderful people, who sponsor me on GitHub, their support h
|
|||||||
<br />
|
<br />
|
||||||
<sub><b>Eddy Lazzarin</b></sub>
|
<sub><b>Eddy Lazzarin</b></sub>
|
||||||
</a>
|
</a>
|
||||||
</td></tr>
|
</td>
|
||||||
<tr>
|
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<a href="https://github.com/AnandChowdhary">
|
<a href="https://github.com/AnandChowdhary">
|
||||||
<img src="https://avatars.githubusercontent.com/u/2841780?u=747e554b3a7f12eb20b7910e1c87d817844f714f&v=4" width="80;" alt="AnandChowdhary"/>
|
<img src="https://avatars.githubusercontent.com/u/2841780?u=747e554b3a7f12eb20b7910e1c87d817844f714f&v=4" width="80;" alt="AnandChowdhary"/>
|
||||||
<br />
|
<br />
|
||||||
<sub><b>Anand Chowdhary</b></sub>
|
<sub><b>Anand Chowdhary</b></sub>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td></tr>
|
||||||
|
<tr>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<a href="https://github.com/shrippen">
|
<a href="https://github.com/shrippen">
|
||||||
<img src="https://avatars.githubusercontent.com/u/2873570?v=4" width="80;" alt="shrippen"/>
|
<img src="https://avatars.githubusercontent.com/u/2873570?v=4" width="80;" alt="shrippen"/>
|
||||||
@@ -1106,7 +1123,7 @@ Huge thanks to these wonderful people, who sponsor me on GitHub, their support h
|
|||||||
</td>
|
</td>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<a href="https://github.com/digitalarche">
|
<a href="https://github.com/digitalarche">
|
||||||
<img src="https://avatars.githubusercontent.com/u/6546135?u=d033c9c16e8367987aec3f9ff5922bc67dd1eedf&v=4" width="80;" alt="digitalarche"/>
|
<img src="https://avatars.githubusercontent.com/u/6546135?u=564756d7f44ab2206819eb3148f6d822673f5066&v=4" width="80;" alt="digitalarche"/>
|
||||||
<br />
|
<br />
|
||||||
<sub><b>Digital Archeology</b></sub>
|
<sub><b>Digital Archeology</b></sub>
|
||||||
</a>
|
</a>
|
||||||
@@ -1117,6 +1134,13 @@ Huge thanks to these wonderful people, who sponsor me on GitHub, their support h
|
|||||||
<br />
|
<br />
|
||||||
<sub><b>InDieTasten</b></sub>
|
<sub><b>InDieTasten</b></sub>
|
||||||
</a>
|
</a>
|
||||||
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<a href="https://github.com/araguaci">
|
||||||
|
<img src="https://avatars.githubusercontent.com/u/7318668?v=4" width="80;" alt="araguaci"/>
|
||||||
|
<br />
|
||||||
|
<sub><b>Araguaci</b></sub>
|
||||||
|
</a>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
@@ -1140,12 +1164,34 @@ Huge thanks to these wonderful people, who sponsor me on GitHub, their support h
|
|||||||
<sub><b>HeliXZz</b></sub>
|
<sub><b>HeliXZz</b></sub>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<a href="https://github.com/patvdv">
|
||||||
|
<img src="https://avatars.githubusercontent.com/u/12430107?u=e8911c2fb91af4d30432f76da8c40927b2830bd7&v=4" width="80;" alt="patvdv"/>
|
||||||
|
<br />
|
||||||
|
<sub><b>Patrick Van Der Veken</b></sub>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<a href="https://github.com/plgonzalezrx8">
|
||||||
|
<img src="https://avatars.githubusercontent.com/u/19900049?u=48a58d2da520a9d712184c6e6e99927ff3cbf179&v=4" width="80;" alt="plgonzalezrx8"/>
|
||||||
|
<br />
|
||||||
|
<sub><b>Pedro Gonzalez</b></sub>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<a href="https://github.com/mryesiller">
|
<a href="https://github.com/mryesiller">
|
||||||
<img src="https://avatars.githubusercontent.com/u/24632172?v=4" width="80;" alt="mryesiller"/>
|
<img src="https://avatars.githubusercontent.com/u/24632172?u=0d20f2d615158f87cd60a3398d3efb026c32f291&v=4" width="80;" alt="mryesiller"/>
|
||||||
<br />
|
<br />
|
||||||
<sub><b>Göksel Yeşiller</b></sub>
|
<sub><b>Göksel Yeşiller</b></sub>
|
||||||
</a>
|
</a>
|
||||||
|
</td></tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center">
|
||||||
|
<a href="https://github.com/allesauseinerhand">
|
||||||
|
<img src="https://avatars.githubusercontent.com/u/32039836?v=4" width="80;" alt="allesauseinerhand"/>
|
||||||
|
<br />
|
||||||
|
<sub><b>Allesauseinerhand</b></sub>
|
||||||
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<a href="https://github.com/forwardemail">
|
<a href="https://github.com/forwardemail">
|
||||||
@@ -1154,12 +1200,33 @@ Huge thanks to these wonderful people, who sponsor me on GitHub, their support h
|
|||||||
<sub><b>Forward Email - Open-source & Privacy-focused Email Service (2023)</b></sub>
|
<sub><b>Forward Email - Open-source & Privacy-focused Email Service (2023)</b></sub>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<a href="https://github.com/lamtrinhdev">
|
||||||
|
<img src="https://avatars.githubusercontent.com/u/49742151?u=c5eaca5aa6841a80605cf4f7d0e861a9e6339ef3&v=4" width="80;" alt="lamtrinhdev"/>
|
||||||
|
<br />
|
||||||
|
<sub><b>LamTrinh.Dev</b></sub>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<a href="https://github.com/Bastii717">
|
<a href="https://github.com/Bastii717">
|
||||||
<img src="https://avatars.githubusercontent.com/u/53431819?u=604977bed6ad6875ada890d0d3765a4cacc2fa14&v=4" width="80;" alt="Bastii717"/>
|
<img src="https://avatars.githubusercontent.com/u/53431819?u=604977bed6ad6875ada890d0d3765a4cacc2fa14&v=4" width="80;" alt="Bastii717"/>
|
||||||
<br />
|
<br />
|
||||||
<sub><b>Bastii717</b></sub>
|
<sub><b>Bastii717</b></sub>
|
||||||
</a>
|
</a>
|
||||||
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<a href="https://github.com/getumbrel">
|
||||||
|
<img src="https://avatars.githubusercontent.com/u/59408891?v=4" width="80;" alt="getumbrel"/>
|
||||||
|
<br />
|
||||||
|
<sub><b>Umbrel</b></sub>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<a href="https://github.com/M2TD">
|
||||||
|
<img src="https://avatars.githubusercontent.com/u/85460457?v=4" width="80;" alt="M2TD"/>
|
||||||
|
<br />
|
||||||
|
<sub><b>M2TD</b></sub>
|
||||||
|
</a>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
@@ -1170,17 +1237,10 @@ Huge thanks to these wonderful people, who sponsor me on GitHub, their support h
|
|||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<a href="https://github.com/ratty222">
|
<a href="https://github.com/terminaltrove">
|
||||||
<img src="https://avatars.githubusercontent.com/u/92832598?u=137b65530cbd5f5af9c24cde51baa6cc77cc934b&v=4" width="80;" alt="ratty222"/>
|
<img src="https://avatars.githubusercontent.com/u/121595180?v=4" width="80;" alt="terminaltrove"/>
|
||||||
<br />
|
<br />
|
||||||
<sub><b>Brent</b></sub>
|
<sub><b>Terminal Trove</b></sub>
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
<td align="center">
|
|
||||||
<a href="https://github.com/hernanpopper">
|
|
||||||
<img src="https://avatars.githubusercontent.com/u/104868017?v=4" width="80;" alt="hernanpopper"/>
|
|
||||||
<br />
|
|
||||||
<sub><b>Hernanpopper</b></sub>
|
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
@@ -1196,13 +1256,6 @@ Huge thanks to these wonderful people, who sponsor me on GitHub, their support h
|
|||||||
<br />
|
<br />
|
||||||
<sub><b>Nrvo</b></sub>
|
<sub><b>Nrvo</b></sub>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
|
||||||
<td align="center">
|
|
||||||
<a href="https://github.com/mezza93">
|
|
||||||
<img src="https://avatars.githubusercontent.com/u/153599966?v=4" width="80;" alt="mezza93"/>
|
|
||||||
<br />
|
|
||||||
<sub><b>Mezza93</b></sub>
|
|
||||||
</a>
|
|
||||||
</td></tr>
|
</td></tr>
|
||||||
</table>
|
</table>
|
||||||
<!-- readme: sponsors -end -->
|
<!-- readme: sponsors -end -->
|
||||||
|
|||||||
@@ -2,13 +2,47 @@ const normalizeUrl = (url) => {
|
|||||||
return url.startsWith('http') ? url : `https://${url}`;
|
return url.startsWith('http') ? url : `https://${url}`;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// If present, set a shorter timeout for API requests
|
||||||
|
const TIMEOUT = process.env.API_TIMEOUT_LIMIT ? parseInt(process.env.API_TIMEOUT_LIMIT, 10) : 60000;
|
||||||
|
|
||||||
|
// If present, set CORS allowed origins for responses
|
||||||
|
const ALLOWED_ORIGINS = process.env.API_CORS_ORIGIN || '*';
|
||||||
|
|
||||||
|
// Set the platform currently being used
|
||||||
|
let PLATFORM = 'NETLIFY';
|
||||||
|
if (process.env.PLATFORM) { PLATFORM = process.env.PLATFORM.toUpperCase(); }
|
||||||
|
else if (process.env.VERCEL) { PLATFORM = 'VERCEL'; }
|
||||||
|
else if (process.env.WC_SERVER) { PLATFORM = 'NODE'; }
|
||||||
|
|
||||||
|
// Define the headers to be returned with each response
|
||||||
const headers = {
|
const headers = {
|
||||||
'Access-Control-Allow-Origin': process.env.API_CORS_ORIGIN || '*',
|
'Access-Control-Allow-Origin': ALLOWED_ORIGINS,
|
||||||
'Access-Control-Allow-Credentials': true,
|
'Access-Control-Allow-Credentials': true,
|
||||||
'Content-Type': 'application/json;charset=UTF-8',
|
'Content-Type': 'application/json;charset=UTF-8',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const timeoutErrorMsg = 'You can re-trigger this request, by clicking "Retry"\n'
|
||||||
|
+ 'If you\'re running your own instance of Web Check, then you can '
|
||||||
|
+ 'resolve this issue, by increasing the timeout limit in the '
|
||||||
|
+ '`API_TIMEOUT_LIMIT` environmental variable to a higher value (in milliseconds), '
|
||||||
|
+ 'or if you\'re hosting on Vercel increase the maxDuration in vercel.json.\n\n'
|
||||||
|
+ `The public instance currently has a lower timeout of ${TIMEOUT}ms `
|
||||||
|
+ 'in order to keep running costs affordable, so that Web Check can '
|
||||||
|
+ 'remain freely available for everyone.';
|
||||||
|
|
||||||
|
// A middleware function used by all API routes on all platforms
|
||||||
const commonMiddleware = (handler) => {
|
const commonMiddleware = (handler) => {
|
||||||
|
|
||||||
|
// Create a timeout promise, to throw an error if a request takes too long
|
||||||
|
const createTimeoutPromise = (timeoutMs) => {
|
||||||
|
return new Promise((_, reject) => {
|
||||||
|
setTimeout(() => {
|
||||||
|
reject(new Error(`Request timed-out after ${timeoutMs} ms`));
|
||||||
|
}, timeoutMs);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
// Vercel
|
// Vercel
|
||||||
const vercelHandler = async (request, response) => {
|
const vercelHandler = async (request, response) => {
|
||||||
const queryParams = request.query || {};
|
const queryParams = request.query || {};
|
||||||
@@ -21,7 +55,12 @@ const commonMiddleware = (handler) => {
|
|||||||
const url = normalizeUrl(rawUrl);
|
const url = normalizeUrl(rawUrl);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const handlerResponse = await handler(url, request);
|
// Race the handler against the timeout
|
||||||
|
const handlerResponse = await Promise.race([
|
||||||
|
handler(url, request),
|
||||||
|
createTimeoutPromise(TIMEOUT)
|
||||||
|
]);
|
||||||
|
|
||||||
if (handlerResponse.body && handlerResponse.statusCode) {
|
if (handlerResponse.body && handlerResponse.statusCode) {
|
||||||
response.status(handlerResponse.statusCode).json(handlerResponse.body);
|
response.status(handlerResponse.statusCode).json(handlerResponse.body);
|
||||||
} else {
|
} else {
|
||||||
@@ -30,7 +69,12 @@ const commonMiddleware = (handler) => {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
response.status(500).json({ error: error.message });
|
let errorCode = 500;
|
||||||
|
if (error.message.includes('timed-out') || response.statusCode === 504) {
|
||||||
|
errorCode = 408;
|
||||||
|
error.message = `${error.message}\n\n${timeoutErrorMsg}`;
|
||||||
|
}
|
||||||
|
response.status(errorCode).json({ error: error.message });
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -51,7 +95,12 @@ const commonMiddleware = (handler) => {
|
|||||||
const url = normalizeUrl(rawUrl);
|
const url = normalizeUrl(rawUrl);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const handlerResponse = await handler(url, event, context);
|
// Race the handler against the timeout
|
||||||
|
const handlerResponse = await Promise.race([
|
||||||
|
handler(url, event, context),
|
||||||
|
createTimeoutPromise(TIMEOUT)
|
||||||
|
]);
|
||||||
|
|
||||||
if (handlerResponse.body && handlerResponse.statusCode) {
|
if (handlerResponse.body && handlerResponse.statusCode) {
|
||||||
callback(null, handlerResponse);
|
callback(null, handlerResponse);
|
||||||
} else {
|
} else {
|
||||||
@@ -71,11 +120,7 @@ const commonMiddleware = (handler) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// The format of the handlers varies between platforms
|
// The format of the handlers varies between platforms
|
||||||
// E.g. Netlify + AWS expect Lambda functions, but Vercel or Node needs standard handler
|
const nativeMode = (['VERCEL', 'NODE'].includes(PLATFORM));
|
||||||
const platformEnv = (process.env.PLATFORM || '').toUpperCase(); // Has user set platform manually?
|
|
||||||
|
|
||||||
const nativeMode = (['VERCEL', 'NODE'].includes(platformEnv) || process.env.VERCEL || process.env.WC_SERVER);
|
|
||||||
|
|
||||||
return nativeMode ? vercelHandler : netlifyHandler;
|
return nativeMode ? vercelHandler : netlifyHandler;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,11 @@ const handler = async (domain) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
res.on('end', () => {
|
res.on('end', () => {
|
||||||
resolve(JSON.parse(data));
|
try {
|
||||||
|
resolve(JSON.parse(data));
|
||||||
|
} catch (error) {
|
||||||
|
reject(new Error('Invalid JSON response'));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
res.on('error', error => {
|
res.on('error', error => {
|
||||||
@@ -51,4 +55,3 @@ const handler = async (domain) => {
|
|||||||
|
|
||||||
module.exports = middleware(handler);
|
module.exports = middleware(handler);
|
||||||
module.exports.handler = middleware(handler);
|
module.exports.handler = middleware(handler);
|
||||||
|
|
||||||
|
|||||||
@@ -5,14 +5,17 @@ const handler = async (url, event, context) => {
|
|||||||
const apiKey = process.env.GOOGLE_CLOUD_API_KEY;
|
const apiKey = process.env.GOOGLE_CLOUD_API_KEY;
|
||||||
|
|
||||||
if (!apiKey) {
|
if (!apiKey) {
|
||||||
throw new Error('API key (GOOGLE_CLOUD_API_KEY) not set');
|
throw new Error(
|
||||||
|
'Missing Google API. You need to set the `GOOGLE_CLOUD_API_KEY` environment variable'
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const endpoint = `https://www.googleapis.com/pagespeedonline/v5/runPagespeed?url=${encodeURIComponent(url)}&category=PERFORMANCE&category=ACCESSIBILITY&category=BEST_PRACTICES&category=SEO&category=PWA&strategy=mobile&key=${apiKey}`;
|
const endpoint = `https://www.googleapis.com/pagespeedonline/v5/runPagespeed?`
|
||||||
|
+ `url=${encodeURIComponent(url)}&category=PERFORMANCE&category=ACCESSIBILITY`
|
||||||
|
+ `&category=BEST_PRACTICES&category=SEO&category=PWA&strategy=mobile`
|
||||||
|
+ `&key=${apiKey}`;
|
||||||
|
|
||||||
const response = await axios.get(endpoint);
|
return (await axios.get(endpoint)).data;
|
||||||
|
|
||||||
return response.data;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = middleware(handler);
|
module.exports = middleware(handler);
|
||||||
|
|||||||
@@ -6,15 +6,17 @@ const xml2js = require('xml2js');
|
|||||||
const handler = async (url) => {
|
const handler = async (url) => {
|
||||||
let sitemapUrl = `${url}/sitemap.xml`;
|
let sitemapUrl = `${url}/sitemap.xml`;
|
||||||
|
|
||||||
|
const hardTimeOut = 5000;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Try to fetch sitemap directly
|
// Try to fetch sitemap directly
|
||||||
let sitemapRes;
|
let sitemapRes;
|
||||||
try {
|
try {
|
||||||
sitemapRes = await axios.get(sitemapUrl, { timeout: 5000 });
|
sitemapRes = await axios.get(sitemapUrl, { timeout: hardTimeOut });
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error.response && error.response.status === 404) {
|
if (error.response && error.response.status === 404) {
|
||||||
// If sitemap not found, try to fetch it from robots.txt
|
// If sitemap not found, try to fetch it from robots.txt
|
||||||
const robotsRes = await axios.get(`${url}/robots.txt`, { timeout: 5000 });
|
const robotsRes = await axios.get(`${url}/robots.txt`, { timeout: hardTimeOut });
|
||||||
const robotsTxt = robotsRes.data.split('\n');
|
const robotsTxt = robotsRes.data.split('\n');
|
||||||
|
|
||||||
for (let line of robotsTxt) {
|
for (let line of robotsTxt) {
|
||||||
@@ -28,7 +30,7 @@ const handler = async (url) => {
|
|||||||
return { skipped: 'No sitemap found' };
|
return { skipped: 'No sitemap found' };
|
||||||
}
|
}
|
||||||
|
|
||||||
sitemapRes = await axios.get(sitemapUrl, { timeout: 5000 });
|
sitemapRes = await axios.get(sitemapUrl, { timeout: hardTimeOut });
|
||||||
} else {
|
} else {
|
||||||
throw error; // If other error, throw it
|
throw error; // If other error, throw it
|
||||||
}
|
}
|
||||||
@@ -39,10 +41,8 @@ const handler = async (url) => {
|
|||||||
|
|
||||||
return sitemap;
|
return sitemap;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// If error occurs
|
|
||||||
console.log(error.message);
|
|
||||||
if (error.code === 'ECONNABORTED') {
|
if (error.code === 'ECONNABORTED') {
|
||||||
return { error: 'Request timed out' };
|
return { error: `Request timed-out after ${hardTimeOut}ms` };
|
||||||
} else {
|
} else {
|
||||||
return { error: error.message };
|
return { error: error.message };
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "web-check",
|
"name": "web-check",
|
||||||
"version": "1.0.0",
|
"version": "1.1.2",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "All-in-one OSINT tool for analyzing any website",
|
"description": "All-in-one OSINT tool for analyzing any website",
|
||||||
"repository": "github:lissy93/web-check",
|
"repository": "github:lissy93/web-check",
|
||||||
@@ -45,6 +45,7 @@
|
|||||||
"cors": "^2.8.5",
|
"cors": "^2.8.5",
|
||||||
"csv-parser": "^3.0.0",
|
"csv-parser": "^3.0.0",
|
||||||
"dotenv": "^16.3.1",
|
"dotenv": "^16.3.1",
|
||||||
|
"express-rate-limit": "^7.2.0",
|
||||||
"flatted": "^3.2.7",
|
"flatted": "^3.2.7",
|
||||||
"follow-redirects": "^1.15.2",
|
"follow-redirects": "^1.15.2",
|
||||||
"got": "^13.0.0",
|
"got": "^13.0.0",
|
||||||
|
|||||||
@@ -20,6 +20,9 @@
|
|||||||
<meta property="og:image" content="/banner.png">
|
<meta property="og:image" content="/banner.png">
|
||||||
<meta property="og:url" content="https://web-check.xyz">
|
<meta property="og:url" content="https://web-check.xyz">
|
||||||
<meta name="twitter:card" content="summary_large_image">
|
<meta name="twitter:card" content="summary_large_image">
|
||||||
|
|
||||||
|
<!-- DarkReader -->
|
||||||
|
<meta name="darkreader-lock">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<noscript>
|
<noscript>
|
||||||
|
|||||||
30
server.js
30
server.js
@@ -2,6 +2,7 @@ const express = require('express');
|
|||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const cors = require('cors');
|
const cors = require('cors');
|
||||||
|
const rateLimit = require('express-rate-limit');
|
||||||
const historyApiFallback = require('connect-history-api-fallback');
|
const historyApiFallback = require('connect-history-api-fallback');
|
||||||
require('dotenv').config();
|
require('dotenv').config();
|
||||||
|
|
||||||
@@ -20,6 +21,34 @@ app.use(cors({
|
|||||||
origin: process.env.API_CORS_ORIGIN || '*',
|
origin: process.env.API_CORS_ORIGIN || '*',
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
// Define max requests within each time frame
|
||||||
|
const limits = [
|
||||||
|
{ timeFrame: 10 * 60, max: 100, messageTime: '10 minutes' },
|
||||||
|
{ timeFrame: 60 * 60, max: 250, messageTime: '1 hour' },
|
||||||
|
{ timeFrame: 12 * 60 * 60, max: 500, messageTime: '12 hours' },
|
||||||
|
];
|
||||||
|
|
||||||
|
// Construct a message to be returned if the user has been rate-limited
|
||||||
|
const makeLimiterResponseMsg = (retryAfter) => {
|
||||||
|
const why = 'This keeps the service running smoothly for everyone. '
|
||||||
|
+ 'You can get around these limits by running your own instance of Web Check.';
|
||||||
|
return `You've been rate-limited, please try again in ${retryAfter} seconds.\n${why}`;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Create rate limiters for each time frame
|
||||||
|
const limiters = limits.map(limit => rateLimit({
|
||||||
|
windowMs: limit.timeFrame * 1000,
|
||||||
|
max: limit.max,
|
||||||
|
standardHeaders: true,
|
||||||
|
legacyHeaders: false,
|
||||||
|
message: { error: makeLimiterResponseMsg(limit.messageTime) }
|
||||||
|
}));
|
||||||
|
|
||||||
|
// If rate-limiting enabled, then apply the limiters to the /api endpoint
|
||||||
|
if (process.env.API_ENABLE_RATE_LIMIT === 'true') {
|
||||||
|
app.use('/api', limiters);
|
||||||
|
}
|
||||||
|
|
||||||
// Read and register each API function as an Express routes
|
// Read and register each API function as an Express routes
|
||||||
fs.readdirSync(dirPath, { withFileTypes: true })
|
fs.readdirSync(dirPath, { withFileTypes: true })
|
||||||
.filter(dirent => dirent.isFile() && dirent.name.endsWith('.js'))
|
.filter(dirent => dirent.isFile() && dirent.name.endsWith('.js'))
|
||||||
@@ -86,7 +115,6 @@ fs.readdirSync(dirPath, { withFileTypes: true })
|
|||||||
res.json(results);
|
res.json(results);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
// Handle SPA routing
|
// Handle SPA routing
|
||||||
app.use(historyApiFallback({
|
app.use(historyApiFallback({
|
||||||
rewrites: [
|
rewrites: [
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ export const ExpandableRow = (props: RowProps) => {
|
|||||||
{ rowList?.map((row: RowProps, index: number) => {
|
{ rowList?.map((row: RowProps, index: number) => {
|
||||||
return (
|
return (
|
||||||
<SubRow key={`${row.lbl}-${index}`}>
|
<SubRow key={`${row.lbl}-${index}`}>
|
||||||
<span className="lbl" title={row.title}>{row.lbl}</span>
|
<span className="lbl" title={row.title?.toString()}>{row.lbl}</span>
|
||||||
<span className="val" title={row.val} onClick={() => copyToClipboard(row.val)}>
|
<span className="val" title={row.val} onClick={() => copyToClipboard(row.val)}>
|
||||||
{formatValue(row.val)}
|
{formatValue(row.val)}
|
||||||
</span>
|
</span>
|
||||||
@@ -199,7 +199,7 @@ const Row = (props: RowProps) => {
|
|||||||
if (children) return <StyledRow key={`${lbl}-${val}`}>{children}</StyledRow>;
|
if (children) return <StyledRow key={`${lbl}-${val}`}>{children}</StyledRow>;
|
||||||
return (
|
return (
|
||||||
<StyledRow key={`${lbl}-${val}`}>
|
<StyledRow key={`${lbl}-${val}`}>
|
||||||
{ lbl && <span className="lbl" title={title}>{lbl}</span> }
|
{ lbl && <span className="lbl" title={title?.toString()}>{lbl}</span> }
|
||||||
<span className="val" title={val} onClick={() => copyToClipboard(val)}>
|
<span className="val" title={val} onClick={() => copyToClipboard(val)}>
|
||||||
{formatValue(val)}
|
{formatValue(val)}
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -6,11 +6,13 @@ const BlockListsCard = (props: {data: any, title: string, actionButtons: any }):
|
|||||||
const blockLists = props.data.blocklists;
|
const blockLists = props.data.blocklists;
|
||||||
return (
|
return (
|
||||||
<Card heading={props.title} actionButtons={props.actionButtons}>
|
<Card heading={props.title} actionButtons={props.actionButtons}>
|
||||||
{ blockLists.map((blocklist: any) => (
|
{ blockLists.map((blocklist: any, blockIndex: number) => (
|
||||||
<Row
|
<Row
|
||||||
title={blocklist.serverIp}
|
title={blocklist.serverIp}
|
||||||
lbl={blocklist.server}
|
lbl={blocklist.server}
|
||||||
val={blocklist.isBlocked ? '❌ Blocked' : '✅ Not Blocked'} />
|
val={blocklist.isBlocked ? '❌ Blocked' : '✅ Not Blocked'}
|
||||||
|
key={`blocklist-${blockIndex}-${blocklist.serverIp}`}
|
||||||
|
/>
|
||||||
))}
|
))}
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -18,12 +18,12 @@ const DnsServerCard = (props: {data: any, title: string, actionButtons: any }):
|
|||||||
return (
|
return (
|
||||||
<Card heading={props.title} actionButtons={props.actionButtons} styles={cardStyles}>
|
<Card heading={props.title} actionButtons={props.actionButtons} styles={cardStyles}>
|
||||||
{dnsSecurity.dns.map((dns: any, index: number) => {
|
{dnsSecurity.dns.map((dns: any, index: number) => {
|
||||||
return (<>
|
return (<div key={`dns-${index}`}>
|
||||||
{ dnsSecurity.dns.length > 1 && <Heading as="h4" size="small" color={colors.primary}>DNS Server #{index+1}</Heading> }
|
{ dnsSecurity.dns.length > 1 && <Heading as="h4" size="small" color={colors.primary}>DNS Server #{index+1}</Heading> }
|
||||||
<Row lbl="IP Address" val={dns.address} key={`ip-${index}`} />
|
<Row lbl="IP Address" val={dns.address} key={`ip-${index}`} />
|
||||||
{ dns.hostname && <Row lbl="Hostname" val={dns.hostname} key={`host-${index}`} /> }
|
{ dns.hostname && <Row lbl="Hostname" val={dns.hostname} key={`host-${index}`} /> }
|
||||||
<Row lbl="DoH Support" val={dns.dohDirectSupports ? '✅ Yes*' : '❌ No*'} key={`doh-${index}`} />
|
<Row lbl="DoH Support" val={dns.dohDirectSupports ? '✅ Yes*' : '❌ No*'} key={`doh-${index}`} />
|
||||||
</>);
|
</div>);
|
||||||
})}
|
})}
|
||||||
{dnsSecurity.dns.length > 0 && (<small>
|
{dnsSecurity.dns.length > 0 && (<small>
|
||||||
* DoH Support is determined by the DNS server's response to a DoH query.
|
* DoH Support is determined by the DNS server's response to a DoH query.
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ span.val {
|
|||||||
const ServerStatusCard = (props: { data: any, title: string, actionButtons: any }): JSX.Element => {
|
const ServerStatusCard = (props: { data: any, title: string, actionButtons: any }): JSX.Element => {
|
||||||
const serverStatus = props.data;
|
const serverStatus = props.data;
|
||||||
return (
|
return (
|
||||||
<Card heading={props.title} actionButtons={props.actionButtons} styles={cardStyles}>
|
<Card heading={props.title.toString()} actionButtons={props.actionButtons} styles={cardStyles}>
|
||||||
<Row lbl="" val="">
|
<Row lbl="" val="">
|
||||||
<span className="lbl">Is Up?</span>
|
<span className="lbl">Is Up?</span>
|
||||||
{ serverStatus.isUp ? <span className="val up">✅ Online</span> : <span className="val down">❌ Offline</span>}
|
{ serverStatus.isUp ? <span className="val up">✅ Online</span> : <span className="val down">❌ Offline</span>}
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ const TlsCard = (props: {data: any, title: string, actionButtons: any }): JSX.El
|
|||||||
<Card heading={props.title} actionButtons={props.actionButtons}>
|
<Card heading={props.title} actionButtons={props.actionButtons}>
|
||||||
{ cipherSuites.length && cipherSuites.map((cipherSuite: any, index: number) => {
|
{ cipherSuites.length && cipherSuites.map((cipherSuite: any, index: number) => {
|
||||||
return (
|
return (
|
||||||
<ExpandableRow lbl={cipherSuite.title} val="" rowList={cipherSuite.fields} />
|
<ExpandableRow key={`tls-${index}`} lbl={cipherSuite.title} val="" rowList={cipherSuite.fields} />
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
{ !cipherSuites.length && (
|
{ !cipherSuites.length && (
|
||||||
|
|||||||
@@ -59,8 +59,15 @@ const TlsCard = (props: {data: any, title: string, actionButtons: any }): JSX.El
|
|||||||
const scanId = props.data?.id;
|
const scanId = props.data?.id;
|
||||||
return (
|
return (
|
||||||
<Card heading={props.title} actionButtons={props.actionButtons}>
|
<Card heading={props.title} actionButtons={props.actionButtons}>
|
||||||
{clientSupport.map((support: any) => {
|
{clientSupport.map((support: any, index: number) => {
|
||||||
return (<ExpandableRow lbl={support.title} val={support.value || '?'} rowList={support.fields} />)
|
return (
|
||||||
|
<ExpandableRow
|
||||||
|
key={`tls-client-${index}`}
|
||||||
|
lbl={support.title}
|
||||||
|
val={support.value || '?'}
|
||||||
|
rowList={support.fields}
|
||||||
|
/>
|
||||||
|
)
|
||||||
})}
|
})}
|
||||||
{ !clientSupport.length && (
|
{ !clientSupport.length && (
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -99,7 +99,13 @@ const TlsCard = (props: {data: any, title: string, actionButtons: any }): JSX.El
|
|||||||
<Card heading={props.title} actionButtons={props.actionButtons}>
|
<Card heading={props.title} actionButtons={props.actionButtons}>
|
||||||
{ tlsResults.length > 0 && tlsResults.map((row: any, index: number) => {
|
{ tlsResults.length > 0 && tlsResults.map((row: any, index: number) => {
|
||||||
return (
|
return (
|
||||||
<Row lbl={row.lbl} val={row.val} plaintext={row.plaintext} listResults={row.list} />
|
<Row
|
||||||
|
lbl={row.lbl}
|
||||||
|
val={row.val}
|
||||||
|
plaintext={row.plaintext}
|
||||||
|
listResults={row.list}
|
||||||
|
key={`tls-issues-${index}`}
|
||||||
|
/>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
<Expandable>
|
<Expandable>
|
||||||
|
|||||||
@@ -92,75 +92,75 @@ const resources = [
|
|||||||
title: 'SSL Labs Test',
|
title: 'SSL Labs Test',
|
||||||
link: 'https://ssllabs.com/ssltest/analyze.html',
|
link: 'https://ssllabs.com/ssltest/analyze.html',
|
||||||
icon: 'https://i.ibb.co/6bVL8JK/Qualys-ssl-labs.png',
|
icon: 'https://i.ibb.co/6bVL8JK/Qualys-ssl-labs.png',
|
||||||
description: 'Analyzes the SSL configuration of a server and grades it.',
|
description: 'Analyzes the SSL configuration of a server and grades it',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Virus Total',
|
title: 'Virus Total',
|
||||||
link: 'https://virustotal.com',
|
link: 'https://virustotal.com',
|
||||||
icon: 'https://i.ibb.co/dWFz0RC/Virustotal.png',
|
icon: 'https://i.ibb.co/dWFz0RC/Virustotal.png',
|
||||||
description: 'Checks a URL against multiple antivirus engines.',
|
description: 'Checks a URL against multiple antivirus engines',
|
||||||
searchLink: 'https://www.virustotal.com/gui/domain/{URL}',
|
searchLink: 'https://www.virustotal.com/gui/domain/{URL}',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Shodan',
|
title: 'Shodan',
|
||||||
link: 'https://shodan.io/',
|
link: 'https://shodan.io/',
|
||||||
icon: 'https://i.ibb.co/SBZ8WG4/shodan.png',
|
icon: 'https://i.ibb.co/SBZ8WG4/shodan.png',
|
||||||
description: 'Search engine for Internet-connected devices.',
|
description: 'Search engine for Internet-connected devices',
|
||||||
searchLink: 'https://www.shodan.io/search/report?query={URL}',
|
searchLink: 'https://www.shodan.io/search/report?query={URL}',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Archive',
|
title: 'Archive',
|
||||||
link: 'https://archive.org/',
|
link: 'https://archive.org/',
|
||||||
icon: 'https://i.ibb.co/nfKMvCm/Archive-org.png',
|
icon: 'https://i.ibb.co/nfKMvCm/Archive-org.png',
|
||||||
description: 'View previous versions of a site via the Internet Archive.',
|
description: 'View previous versions of a site via the Internet Archive',
|
||||||
searchLink: 'https://web.archive.org/web/*/{URL}',
|
searchLink: 'https://web.archive.org/web/*/{URL}',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'URLScan',
|
title: 'URLScan',
|
||||||
link: 'https://urlscan.io/',
|
link: 'https://urlscan.io/',
|
||||||
icon: 'https://i.ibb.co/cYXt8SH/Url-scan.png',
|
icon: 'https://i.ibb.co/cYXt8SH/Url-scan.png',
|
||||||
description: 'Scans a URL and provides information about the page.',
|
description: 'Scans a URL and provides information about the page',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Sucuri SiteCheck',
|
title: 'Sucuri SiteCheck',
|
||||||
link: 'https://sitecheck.sucuri.net/',
|
link: 'https://sitecheck.sucuri.net/',
|
||||||
icon: 'https://i.ibb.co/K5pTP1K/Sucuri-site-check.png',
|
icon: 'https://i.ibb.co/K5pTP1K/Sucuri-site-check.png',
|
||||||
description: 'Checks a URL against blacklists and known threats.',
|
description: 'Checks a URL against blacklists and known threats',
|
||||||
searchLink: 'https://www.ssllabs.com/ssltest/analyze.html?d={URL}',
|
searchLink: 'https://www.ssllabs.com/ssltest/analyze.html?d={URL}',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Domain Tools',
|
title: 'Domain Tools',
|
||||||
link: 'https://whois.domaintools.com/',
|
link: 'https://whois.domaintools.com/',
|
||||||
icon: 'https://i.ibb.co/zJfCKjM/Domain-tools.png',
|
icon: 'https://i.ibb.co/zJfCKjM/Domain-tools.png',
|
||||||
description: 'Run a WhoIs lookup on a domain.',
|
description: 'Run a WhoIs lookup on a domain',
|
||||||
searchLink: 'https://whois.domaintools.com/{URL}',
|
searchLink: 'https://whois.domaintools.com/{URL}',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'NS Lookup',
|
title: 'NS Lookup',
|
||||||
link: 'https://nslookup.io/',
|
link: 'https://nslookup.io/',
|
||||||
icon: 'https://i.ibb.co/BLSWvBv/Ns-lookup.png',
|
icon: 'https://i.ibb.co/BLSWvBv/Ns-lookup.png',
|
||||||
description: 'View DNS records for a domain.',
|
description: 'View DNS records for a domain',
|
||||||
searchLink: 'https://www.nslookup.io/domains/{URL}/dns-records/',
|
searchLink: 'https://www.nslookup.io/domains/{URL}/dns-records/',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'DNS Checker',
|
title: 'DNS Checker',
|
||||||
link: 'https://dnschecker.org/',
|
link: 'https://dnschecker.org/',
|
||||||
icon: 'https://i.ibb.co/gyKtgZ1/Dns-checker.webp',
|
icon: 'https://i.ibb.co/gyKtgZ1/Dns-checker.webp',
|
||||||
description: 'Check global DNS propagation across multiple servers.',
|
description: 'Check global DNS propagation across multiple servers',
|
||||||
searchLink: 'https://dnschecker.org/#A/{URL}',
|
searchLink: 'https://dnschecker.org/#A/{URL}',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Censys',
|
title: 'Censys',
|
||||||
link: 'https://search.censys.io/',
|
link: 'https://search.censys.io/',
|
||||||
icon: 'https://i.ibb.co/j3ZtXzM/censys.png',
|
icon: 'https://i.ibb.co/j3ZtXzM/censys.png',
|
||||||
description: 'Lookup hosts associated with a domain.',
|
description: 'Lookup hosts associated with a domain',
|
||||||
searchLink: 'https://search.censys.io/search?resource=hosts&q={URL}',
|
searchLink: 'https://search.censys.io/search?resource=hosts&q={URL}',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Page Speed Insights',
|
title: 'Page Speed Insights',
|
||||||
link: 'https://developers.google.com/speed/pagespeed/insights/',
|
link: 'https://developers.google.com/speed/pagespeed/insights/',
|
||||||
icon: 'https://i.ibb.co/k68t9bb/Page-speed-insights.png',
|
icon: 'https://i.ibb.co/k68t9bb/Page-speed-insights.png',
|
||||||
description: 'Checks the performance, accessibility and SEO of a page on mobile + desktop.',
|
description: 'Checks the performance, accessibility and SEO of a page on mobile + desktop',
|
||||||
searchLink: 'https://developers.google.com/speed/pagespeed/insights/?url={URL}',
|
searchLink: 'https://developers.google.com/speed/pagespeed/insights/?url={URL}',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -204,6 +204,13 @@ const resources = [
|
|||||||
description: 'View traffic source locations for a domain through Cloudflare',
|
description: 'View traffic source locations for a domain through Cloudflare',
|
||||||
searchLink: 'https://radar.cloudflare.com/domains/domain/{URL}',
|
searchLink: 'https://radar.cloudflare.com/domains/domain/{URL}',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: 'Mozilla Observatory',
|
||||||
|
link: 'https://observatory.mozilla.org/',
|
||||||
|
icon: 'https://i.ibb.co/hBWh9cj/logo-mozm-5e95c457fdd1.png',
|
||||||
|
description: 'Assesses website security posture by analyzing various security headers and practices',
|
||||||
|
searchLink: 'https://observatory.mozilla.org/analyze/{URL}',
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const makeLink = (resource: any, scanUrl: string | undefined): string => {
|
const makeLink = (resource: any, scanUrl: string | undefined): string => {
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import colors from 'styles/colors';
|
|||||||
interface Props {
|
interface Props {
|
||||||
children: ReactNode;
|
children: ReactNode;
|
||||||
title?: string;
|
title?: string;
|
||||||
|
key?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface State {
|
interface State {
|
||||||
|
|||||||
@@ -224,6 +224,52 @@ const jobNames = [
|
|||||||
'carbon',
|
'carbon',
|
||||||
] as const;
|
] as const;
|
||||||
|
|
||||||
|
interface JobListItemProps {
|
||||||
|
job: LoadingJob;
|
||||||
|
showJobDocs: (name: string) => void;
|
||||||
|
showErrorModal: (name: string, state: LoadingState, timeTaken: number | undefined, error: string, isInfo?: boolean) => void;
|
||||||
|
barColors: Record<LoadingState, [string, string]>;
|
||||||
|
}
|
||||||
|
|
||||||
|
const getStatusEmoji = (state: LoadingState): string => {
|
||||||
|
switch (state) {
|
||||||
|
case 'success':
|
||||||
|
return '✅';
|
||||||
|
case 'loading':
|
||||||
|
return '🔄';
|
||||||
|
case 'error':
|
||||||
|
return '❌';
|
||||||
|
case 'timed-out':
|
||||||
|
return '⏸️';
|
||||||
|
case 'skipped':
|
||||||
|
return '⏭️';
|
||||||
|
default:
|
||||||
|
return '❓';
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const JobListItem: React.FC<JobListItemProps> = ({ job, showJobDocs, showErrorModal, barColors }) => {
|
||||||
|
const { name, state, timeTaken, retry, error } = job;
|
||||||
|
const actionButton = retry && state !== 'success' && state !== 'loading' ?
|
||||||
|
<FailedJobActionButton onClick={retry}>↻ Retry</FailedJobActionButton> : null;
|
||||||
|
|
||||||
|
const showModalButton = error && ['error', 'timed-out', 'skipped'].includes(state) &&
|
||||||
|
<FailedJobActionButton onClick={() => showErrorModal(name, state, timeTaken, error, state === 'skipped')}>
|
||||||
|
{state === 'timed-out' ? '■ Show Timeout Reason' : '■ Show Error'}
|
||||||
|
</FailedJobActionButton>;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<li key={name}>
|
||||||
|
<b onClick={() => showJobDocs(name)}>{getStatusEmoji(state)} {name}</b>
|
||||||
|
<span style={{color: barColors[state][0]}}> ({state})</span>.
|
||||||
|
<i>{timeTaken && state !== 'loading' ? ` Took ${timeTaken} ms` : ''}</i>
|
||||||
|
{actionButton}
|
||||||
|
{showModalButton}
|
||||||
|
</li>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
export const initialJobs = jobNames.map((job: string) => {
|
export const initialJobs = jobNames.map((job: string) => {
|
||||||
return {
|
return {
|
||||||
name: job,
|
name: job,
|
||||||
@@ -239,9 +285,9 @@ export const calculateLoadingStatePercentages = (loadingJobs: LoadingJob[]): Rec
|
|||||||
const stateCount: Record<LoadingState, number> = {
|
const stateCount: Record<LoadingState, number> = {
|
||||||
'success': 0,
|
'success': 0,
|
||||||
'loading': 0,
|
'loading': 0,
|
||||||
'skipped': 0,
|
|
||||||
'error': 0,
|
|
||||||
'timed-out': 0,
|
'timed-out': 0,
|
||||||
|
'error': 0,
|
||||||
|
'skipped': 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Count the number of each state
|
// Count the number of each state
|
||||||
@@ -253,9 +299,9 @@ export const calculateLoadingStatePercentages = (loadingJobs: LoadingJob[]): Rec
|
|||||||
const statePercentage: Record<LoadingState, number> = {
|
const statePercentage: Record<LoadingState, number> = {
|
||||||
'success': (stateCount['success'] / totalJobs) * 100,
|
'success': (stateCount['success'] / totalJobs) * 100,
|
||||||
'loading': (stateCount['loading'] / totalJobs) * 100,
|
'loading': (stateCount['loading'] / totalJobs) * 100,
|
||||||
'skipped': (stateCount['skipped'] / totalJobs) * 100,
|
|
||||||
'error': (stateCount['error'] / totalJobs) * 100,
|
|
||||||
'timed-out': (stateCount['timed-out'] / totalJobs) * 100,
|
'timed-out': (stateCount['timed-out'] / totalJobs) * 100,
|
||||||
|
'error': (stateCount['error'] / totalJobs) * 100,
|
||||||
|
'skipped': (stateCount['skipped'] / totalJobs) * 100,
|
||||||
};
|
};
|
||||||
|
|
||||||
return statePercentage;
|
return statePercentage;
|
||||||
@@ -353,26 +399,9 @@ const ProgressLoader = (props: { loadStatus: LoadingJob[], showModal: (err: Reac
|
|||||||
const barColors: Record<LoadingState | string, [string, string]> = {
|
const barColors: Record<LoadingState | string, [string, string]> = {
|
||||||
'success': isDone ? makeBarColor(colors.primary) : makeBarColor(colors.success),
|
'success': isDone ? makeBarColor(colors.primary) : makeBarColor(colors.success),
|
||||||
'loading': makeBarColor(colors.info),
|
'loading': makeBarColor(colors.info),
|
||||||
'skipped': makeBarColor(colors.warning),
|
|
||||||
'error': makeBarColor(colors.danger),
|
'error': makeBarColor(colors.danger),
|
||||||
'timed-out': makeBarColor(colors.neutral),
|
'timed-out': makeBarColor(colors.warning),
|
||||||
};
|
'skipped': makeBarColor(colors.neutral),
|
||||||
|
|
||||||
const getStatusEmoji = (state: LoadingState): string => {
|
|
||||||
switch (state) {
|
|
||||||
case 'success':
|
|
||||||
return '✅';
|
|
||||||
case 'loading':
|
|
||||||
return '🔄';
|
|
||||||
case 'skipped':
|
|
||||||
return '⏭️';
|
|
||||||
case 'error':
|
|
||||||
return '❌';
|
|
||||||
case 'timed-out':
|
|
||||||
return '⏸️';
|
|
||||||
default:
|
|
||||||
return '❓';
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const showErrorModal = (name: string, state: LoadingState, timeTaken: number | undefined, error: string, isInfo?: boolean) => {
|
const showErrorModal = (name: string, state: LoadingState, timeTaken: number | undefined, error: string, isInfo?: boolean) => {
|
||||||
@@ -416,20 +445,9 @@ const ProgressLoader = (props: { loadStatus: LoadingJob[], showModal: (err: Reac
|
|||||||
<Details>
|
<Details>
|
||||||
<summary>Show Details</summary>
|
<summary>Show Details</summary>
|
||||||
<ul>
|
<ul>
|
||||||
{
|
{loadStatus.map((job: LoadingJob) => (
|
||||||
loadStatus.map(({ name, state, timeTaken, retry, error }: LoadingJob) => {
|
<JobListItem key={job.name} job={job} showJobDocs={props.showJobDocs} showErrorModal={showErrorModal} barColors={barColors} />
|
||||||
return (
|
))}
|
||||||
<li key={name}>
|
|
||||||
<b onClick={() => props.showJobDocs(name)}>{getStatusEmoji(state)} {name}</b>
|
|
||||||
<span style={{color : barColors[state][0]}}> ({state})</span>.
|
|
||||||
<i>{(timeTaken && state !== 'loading') ? ` Took ${timeTaken} ms` : '' }</i>
|
|
||||||
{ (retry && state !== 'success' && state !== 'loading') && <FailedJobActionButton onClick={retry}>↻ Retry</FailedJobActionButton> }
|
|
||||||
{ (error && state === 'error') && <FailedJobActionButton onClick={() => showErrorModal(name, state, timeTaken, error)}>■ Show Error</FailedJobActionButton> }
|
|
||||||
{ (error && state === 'skipped') && <FailedJobActionButton onClick={() => showErrorModal(name, state, timeTaken, error, true)}>■ Show Reason</FailedJobActionButton> }
|
|
||||||
</li>
|
|
||||||
);
|
|
||||||
})
|
|
||||||
}
|
|
||||||
</ul>
|
</ul>
|
||||||
{ loadStatus.filter((val: LoadingJob) => val.state === 'error').length > 0 &&
|
{ loadStatus.filter((val: LoadingJob) => val.state === 'error').length > 0 &&
|
||||||
<p className="error">
|
<p className="error">
|
||||||
|
|||||||
@@ -35,16 +35,21 @@ const useMotherOfAllHooks = <ResultType = any>(params: UseIpAddressProps<ResultT
|
|||||||
const [result, setResult] = useState<ResultType>();
|
const [result, setResult] = useState<ResultType>();
|
||||||
|
|
||||||
// Fire off the HTTP fetch request, then set results and update loading / error state
|
// Fire off the HTTP fetch request, then set results and update loading / error state
|
||||||
|
|
||||||
const doTheFetch = () => {
|
const doTheFetch = () => {
|
||||||
return fetchRequest()
|
return fetchRequest()
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
if (!res) { // No response :(
|
if (!res) { // No response :(
|
||||||
updateLoadingJobs(jobId, 'error', res.error || 'No response', reset);
|
updateLoadingJobs(jobId, 'error', 'No response', reset);
|
||||||
} else if (res.error) { // Response returned an error message
|
} else if (res.error) { // Response returned an error message
|
||||||
updateLoadingJobs(jobId, 'error', res.error, reset);
|
if (res.error.includes("timed-out")) { // Specific handling for timeout errors
|
||||||
|
updateLoadingJobs(jobId, 'timed-out', res.error, reset);
|
||||||
|
} else {
|
||||||
|
updateLoadingJobs(jobId, 'error', res.error, reset);
|
||||||
|
}
|
||||||
} else if (res.skipped) { // Response returned a skipped message
|
} else if (res.skipped) { // Response returned a skipped message
|
||||||
updateLoadingJobs(jobId, 'skipped', res.skipped, reset);
|
updateLoadingJobs(jobId, 'skipped', res.skipped, reset);
|
||||||
} else { // Yay, everything went to plan :)
|
} else { // Yay, everything went to plan :)
|
||||||
setResult(res);
|
setResult(res);
|
||||||
updateLoadingJobs(jobId, 'success', '', undefined, res);
|
updateLoadingJobs(jobId, 'success', '', undefined, res);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ const About = (): JSX.Element => {
|
|||||||
<AboutContainer>
|
<AboutContainer>
|
||||||
<Nav>
|
<Nav>
|
||||||
<HeaderLinkContainer>
|
<HeaderLinkContainer>
|
||||||
<a href="https://github.com/lissy93/web-check"><Button>View on GitHub</Button></a>
|
<a target="_blank" rel="noreferrer" href="https://github.com/lissy93/web-check"><Button>View on GitHub</Button></a>
|
||||||
</HeaderLinkContainer>
|
</HeaderLinkContainer>
|
||||||
</Nav>
|
</Nav>
|
||||||
|
|
||||||
@@ -136,29 +136,29 @@ const About = (): JSX.Element => {
|
|||||||
<SponsorshipContainer>
|
<SponsorshipContainer>
|
||||||
<p>
|
<p>
|
||||||
Web-Check is kindly sponsored
|
Web-Check is kindly sponsored
|
||||||
by <a href="https://terminaltrove.com/?utm_campaign=github&utm_medium=referral&utm_content=web-check&utm_source=wcgh">
|
by <a target="_blank" rel="noreferrer" href="https://terminaltrove.com/?utm_campaign=github&utm_medium=referral&utm_content=web-check&utm_source=wcgh">
|
||||||
Terminal Trove
|
Terminal Trove
|
||||||
</a>
|
</a>
|
||||||
<br />
|
<br />
|
||||||
The $HOME of all things in the terminal.
|
The $HOME of all things in the terminal.
|
||||||
<br />
|
<br />
|
||||||
<small>
|
<small>
|
||||||
<a href="https://terminaltrove.com/newsletter?utm_campaign=github&utm_medium=referral&utm_content=web-check&utm_source=wcgh">
|
<a target="_blank" rel="noreferrer" href="https://terminaltrove.com/newsletter?utm_campaign=github&utm_medium=referral&utm_content=web-check&utm_source=wcgh">
|
||||||
Find your next CLI / TUI tool, and get updates to your inbox
|
Find your next CLI / TUI tool, and get updates to your inbox
|
||||||
</a>
|
</a>
|
||||||
</small>
|
</small>
|
||||||
</p>
|
</p>
|
||||||
<a href="https://terminaltrove.com/?utm_campaign=github&utm_medium=referral&utm_content=web-check&utm_source=wcgh">
|
<a target="_blank" rel="noreferrer" href="https://terminaltrove.com/?utm_campaign=github&utm_medium=referral&utm_content=web-check&utm_source=wcgh">
|
||||||
<img width="300" alt="Terminal Trove" src="https://i.ibb.co/T1KzVmR/terminal-trove-green.png" />
|
<img width="300" alt="Terminal Trove" src="https://i.ibb.co/T1KzVmR/terminal-trove-green.png" />
|
||||||
</a>
|
</a>
|
||||||
</SponsorshipContainer>
|
</SponsorshipContainer>
|
||||||
<hr />
|
<hr />
|
||||||
<p>
|
<p>
|
||||||
Web-Check is developed and maintained by <a href="https://aliciasykes.com">Alicia Sykes</a>.
|
Web-Check is developed and maintained by <a target="_blank" rel="noreferrer" href="https://aliciasykes.com">Alicia Sykes</a>.
|
||||||
It's licensed under the <a href="https://github.com/Lissy93/web-check/blob/master/LICENSE">MIT license</a>,
|
It's licensed under the <a target="_blank" rel="noreferrer" href="https://github.com/Lissy93/web-check/blob/master/LICENSE">MIT license</a>,
|
||||||
and is completely free to use, modify and distribute in both personal and commercial settings.<br />
|
and is completely free to use, modify and distribute in both personal and commercial settings.<br />
|
||||||
Source code and self-hosting docs are available on <a href="https://github.com/lissy93/web-check">GitHub</a>.
|
Source code and self-hosting docs are available on <a target="_blank" rel="noreferrer" href="https://github.com/lissy93/web-check">GitHub</a>.
|
||||||
If you've found this service useful, consider <a href="https://github.com/sponsors/Lissy93">sponsoring me</a> from $1/month,
|
If you've found this service useful, consider <a target="_blank" rel="noreferrer" href="https://github.com/sponsors/Lissy93">sponsoring me</a> from $1/month,
|
||||||
to help with the ongoing hosting and development costs.
|
to help with the ongoing hosting and development costs.
|
||||||
</p>
|
</p>
|
||||||
</Section>
|
</Section>
|
||||||
@@ -216,19 +216,19 @@ const About = (): JSX.Element => {
|
|||||||
<p>Web-Check is designed to be easily self-hosted.</p>
|
<p>Web-Check is designed to be easily self-hosted.</p>
|
||||||
<Heading as="h3" size="small" color={colors.primary}>Option #1 - Netlify</Heading>
|
<Heading as="h3" size="small" color={colors.primary}>Option #1 - Netlify</Heading>
|
||||||
<p>Click the button below to deploy to Netlify</p>
|
<p>Click the button below to deploy to Netlify</p>
|
||||||
<a href="https://app.netlify.com/start/deploy?repository=https://github.com/lissy93/web-check">
|
<a target="_blank" rel="noreferrer" href="https://app.netlify.com/start/deploy?repository=https://github.com/lissy93/web-check">
|
||||||
<img src="https://www.netlify.com/img/deploy/button.svg" alt="Deploy to Netlify" />
|
<img src="https://www.netlify.com/img/deploy/button.svg" alt="Deploy to Netlify" />
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<Heading as="h3" size="small" color={colors.primary}>Option #2 - Vercel</Heading>
|
<Heading as="h3" size="small" color={colors.primary}>Option #2 - Vercel</Heading>
|
||||||
<p>Click the button below to deploy to Vercel</p>
|
<p>Click the button below to deploy to Vercel</p>
|
||||||
<a href="https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Flissy93%2Fweb-check&project-name=web-check&repository-name=web-check-fork&demo-title=Web-Check%20Demo&demo-description=Check%20out%20web-check.xyz%20to%20see%20a%20live%20demo%20of%20this%20application%20running.&demo-url=https%3A%2F%2Fweb-check.xyz&demo-image=https%3A%2F%2Fraw.githubusercontent.com%2FLissy93%2Fweb-check%2Fmaster%2F.github%2Fscreenshots%2Fweb-check-screenshot10.png">
|
<a target="_blank" rel="noreferrer" href="https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Flissy93%2Fweb-check&project-name=web-check&repository-name=web-check-fork&demo-title=Web-Check%20Demo&demo-description=Check%20out%20web-check.xyz%20to%20see%20a%20live%20demo%20of%20this%20application%20running.&demo-url=https%3A%2F%2Fweb-check.xyz&demo-image=https%3A%2F%2Fraw.githubusercontent.com%2FLissy93%2Fweb-check%2Fmaster%2F.github%2Fscreenshots%2Fweb-check-screenshot10.png">
|
||||||
<img src="https://vercel.com/button" alt="Deploy with Vercel" />
|
<img src="https://vercel.com/button" alt="Deploy with Vercel" />
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<Heading as="h3" size="small" color={colors.primary}>Option #3 - Docker</Heading>
|
<Heading as="h3" size="small" color={colors.primary}>Option #3 - Docker</Heading>
|
||||||
<p>
|
<p>
|
||||||
A Docker container is published to <a href="https://hub.docker.com/r/lissy93/web-check">DockerHub</a>
|
A Docker container is published to <a target="_blank" rel="noreferrer" href="https://hub.docker.com/r/lissy93/web-check">DockerHub</a>
|
||||||
<br />
|
<br />
|
||||||
Run this command, then open <code>localhost:3000</code>
|
Run this command, then open <code>localhost:3000</code>
|
||||||
<pre>docker run -p 3000:3000 lissy93/web-check</pre>
|
<pre>docker run -p 3000:3000 lissy93/web-check</pre>
|
||||||
@@ -246,7 +246,7 @@ const About = (): JSX.Element => {
|
|||||||
<Heading as="h3" size="small" color={colors.primary}>Further Docs</Heading>
|
<Heading as="h3" size="small" color={colors.primary}>Further Docs</Heading>
|
||||||
<p>
|
<p>
|
||||||
More detailed installation and setup instructions can be found in the
|
More detailed installation and setup instructions can be found in the
|
||||||
GitHub repository - <a href="https://github.com/lissy93/web-check#readme">github.com/lissy93/web-check</a>
|
GitHub repository - <a target="_blank" rel="noreferrer" href="https://github.com/lissy93/web-check#readme">github.com/lissy93/web-check</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<Heading as="h3" size="small" color={colors.primary}>Configuring</Heading>
|
<Heading as="h3" size="small" color={colors.primary}>Configuring</Heading>
|
||||||
@@ -258,17 +258,17 @@ const About = (): JSX.Element => {
|
|||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<code>GOOGLE_CLOUD_API_KEY</code>
|
<code>GOOGLE_CLOUD_API_KEY</code>
|
||||||
: <a href="https://cloud.google.com/api-gateway/docs/authenticate-api-keys">A Google API key</a>
|
: <a target="_blank" rel="noreferrer" href="https://cloud.google.com/api-gateway/docs/authenticate-api-keys">A Google API key</a>
|
||||||
<i> Used to return quality metrics for a site</i>
|
<i> Used to return quality metrics for a site</i>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<code>REACT_APP_SHODAN_API_KEY</code>
|
<code>REACT_APP_SHODAN_API_KEY</code>
|
||||||
: <a href="https://account.shodan.io/">A Shodan API key</a>
|
: <a target="_blank" rel="noreferrer" href="https://account.shodan.io/">A Shodan API key</a>
|
||||||
<i> To show associated hosts for a domain</i>
|
<i> To show associated hosts for a domain</i>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<code>REACT_APP_WHO_API_KEY</code>
|
<code>REACT_APP_WHO_API_KEY</code>
|
||||||
: <a href="https://whoapi.com/">A WhoAPI key</a>
|
: <a target="_blank" rel="noreferrer" href="https://whoapi.com/">A WhoAPI key</a>
|
||||||
<i> Allows for more comprehensive WhoIs records</i>
|
<i> Allows for more comprehensive WhoIs records</i>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -302,11 +302,11 @@ const About = (): JSX.Element => {
|
|||||||
<Section>
|
<Section>
|
||||||
<Heading as="h3" size="small" color={colors.primary}>License</Heading>
|
<Heading as="h3" size="small" color={colors.primary}>License</Heading>
|
||||||
<b>
|
<b>
|
||||||
<a href="https://github.com/lissy93/web-check">Web-Check</a> is distributed under the MIT license,
|
<a target="_blank" rel="noreferrer" href="https://github.com/lissy93/web-check">Web-Check</a> is distributed under the MIT license,
|
||||||
© <a href="https://aliciasykes.com">Alicia Sykes</a> { new Date().getFullYear()}
|
© <a target="_blank" rel="noreferrer" href="https://aliciasykes.com">Alicia Sykes</a> { new Date().getFullYear()}
|
||||||
</b>
|
</b>
|
||||||
<br />
|
<br />
|
||||||
<small>For more info, see <a href="https://tldrlegal.com/license/mit-license">TLDR Legal → MIT</a></small>
|
<small>For more info, see <a target="_blank" rel="noreferrer" href="https://tldrlegal.com/license/mit-license">TLDR Legal → MIT</a></small>
|
||||||
<pre>{license}</pre>
|
<pre>{license}</pre>
|
||||||
<hr />
|
<hr />
|
||||||
<Heading as="h3" size="small" color={colors.primary}>Fair Use</Heading>
|
<Heading as="h3" size="small" color={colors.primary}>Fair Use</Heading>
|
||||||
|
|||||||
@@ -219,19 +219,19 @@ const Home = (): JSX.Element => {
|
|||||||
<Heading as="h2" size="small" color={colors.primary}>Sponsored by</Heading>
|
<Heading as="h2" size="small" color={colors.primary}>Sponsored by</Heading>
|
||||||
<div className="inner">
|
<div className="inner">
|
||||||
<p>
|
<p>
|
||||||
<a href="https://terminaltrove.com/?utm_campaign=github&utm_medium=referral&utm_content=web-check&utm_source=wcgh">
|
<a target="_blank" rel="noreferrer" href="https://terminaltrove.com/?utm_campaign=github&utm_medium=referral&utm_content=web-check&utm_source=wcgh">
|
||||||
Terminal Trove
|
Terminal Trove
|
||||||
</a> - The $HOME of all things in the terminal.
|
</a> - The $HOME of all things in the terminal.
|
||||||
<br />
|
<br />
|
||||||
<span className="cta">
|
<span className="cta">
|
||||||
Get updates on the latest CLI/TUI tools via
|
Get updates on the latest CLI/TUI tools via
|
||||||
the <a className="cta" href="https://terminaltrove.com/newsletter?utm_campaign=github&utm_medium=referral&utm_content=web-check&utm_source=wcgh">
|
the <a target="_blank" rel="noreferrer" className="cta" href="https://terminaltrove.com/newsletter?utm_campaign=github&utm_medium=referral&utm_content=web-check&utm_source=wcgh">
|
||||||
Terminal Trove newsletter
|
Terminal Trove newsletter
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
<a href="https://terminaltrove.com/?utm_campaign=github&utm_medium=referral&utm_content=web-check&utm_source=wcgh">
|
<a target="_blank" rel="noreferrer" href="https://terminaltrove.com/?utm_campaign=github&utm_medium=referral&utm_content=web-check&utm_source=wcgh">
|
||||||
<img width="120" alt="Terminal Trove" src="https://i.ibb.co/NKtYjJ1/terminal-trove-web-check.png" />
|
<img width="120" alt="Terminal Trove" src="https://i.ibb.co/NKtYjJ1/terminal-trove-web-check.png" />
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -246,10 +246,10 @@ const Home = (): JSX.Element => {
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div className="links">
|
<div className="links">
|
||||||
<a href="https://github.com/lissy93/web-check" title="Check out the source code and documentation on GitHub, and get support or contribute">
|
<a target="_blank" rel="noreferrer" href="https://github.com/lissy93/web-check" title="Check out the source code and documentation on GitHub, and get support or contribute">
|
||||||
<Button>View on GitHub</Button>
|
<Button>View on GitHub</Button>
|
||||||
</a>
|
</a>
|
||||||
<a href="https://app.netlify.com/start/deploy?repository=https://github.com/lissy93/web-check" title="Deploy your own private or public instance of Web-Check to Netlify">
|
<a target="_blank" rel="noreferrer" href="https://app.netlify.com/start/deploy?repository=https://github.com/lissy93/web-check" title="Deploy your own private or public instance of Web-Check to Netlify">
|
||||||
<Button>Deploy your own</Button>
|
<Button>Deploy your own</Button>
|
||||||
</a>
|
</a>
|
||||||
<a href="/about#api-documentation" title="View the API documentation, to use Web-Check programmatically">
|
<a href="/about#api-documentation" title="View the API documentation, to use Web-Check programmatically">
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ const NotFound = (): JSX.Element => {
|
|||||||
<HeaderLinkContainer>
|
<HeaderLinkContainer>
|
||||||
<a href="/"><Button>Back to Homepage</Button></a>
|
<a href="/"><Button>Back to Homepage</Button></a>
|
||||||
</HeaderLinkContainer>
|
</HeaderLinkContainer>
|
||||||
<a href="https://github.com/lissy93/web-check">Report Issue</a>
|
<a target="_blank" rel="noreferrer" href="https://github.com/lissy93/web-check">Report Issue</a>
|
||||||
</NotFoundInner>
|
</NotFoundInner>
|
||||||
</AboutContainer>
|
</AboutContainer>
|
||||||
<Footer isFixed={true} />
|
<Footer isFixed={true} />
|
||||||
|
|||||||
@@ -208,12 +208,24 @@ const Results = (): JSX.Element => {
|
|||||||
console.log(
|
console.log(
|
||||||
`%cFetch Error - ${job}%c\n\n${timeString}%c The ${job} job failed `
|
`%cFetch Error - ${job}%c\n\n${timeString}%c The ${job} job failed `
|
||||||
+`after ${timeTaken}ms, with the following error:%c\n${error}`,
|
+`after ${timeTaken}ms, with the following error:%c\n${error}`,
|
||||||
`background: ${colors.danger}; padding: 4px 8px; font-size: 16px;`,
|
`background: ${colors.danger}; color:${colors.background}; padding: 4px 8px; font-size: 16px;`,
|
||||||
`font-weight: bold; color: ${colors.danger};`,
|
`font-weight: bold; color: ${colors.danger};`,
|
||||||
`color: ${colors.danger};`,
|
`color: ${colors.danger};`,
|
||||||
`color: ${colors.warning};`,
|
`color: ${colors.warning};`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (newState === 'timed-out') {
|
||||||
|
console.log(
|
||||||
|
`%cFetch Timeout - ${job}%c\n\n${timeString}%c The ${job} job timed out `
|
||||||
|
+`after ${timeTaken}ms, with the following error:%c\n${error}`,
|
||||||
|
`background: ${colors.info}; color:${colors.background}; padding: 4px 8px; font-size: 16px;`,
|
||||||
|
`font-weight: bold; color: ${colors.info};`,
|
||||||
|
`color: ${colors.info};`,
|
||||||
|
`color: ${colors.warning};`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return newJobs;
|
return newJobs;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -225,8 +237,9 @@ const Results = (): JSX.Element => {
|
|||||||
.then(data => resolve(data))
|
.then(data => resolve(data))
|
||||||
.catch(error => resolve(
|
.catch(error => resolve(
|
||||||
{ error: `Failed to get a valid response 😢\n`
|
{ error: `Failed to get a valid response 😢\n`
|
||||||
+ `This is likely due the target not exposing the required data, `
|
+ 'This is likely due the target not exposing the required data, '
|
||||||
+ `or limitations in how Netlify executes lambda functions, such as the 10-sec timeout.\n\n`
|
+ 'or limitations in imposed by the infrastructure this instance '
|
||||||
|
+ 'of Web Check is running on.\n\n'
|
||||||
+ `Error info:\n${error}`}
|
+ `Error info:\n${error}`}
|
||||||
));
|
));
|
||||||
});
|
});
|
||||||
@@ -288,7 +301,7 @@ const Results = (): JSX.Element => {
|
|||||||
addressInfo: { address, addressType, expectedAddressTypes: urlTypeOnly },
|
addressInfo: { address, addressType, expectedAddressTypes: urlTypeOnly },
|
||||||
fetchRequest: () => fetch(`${api}/quality?url=${address}`)
|
fetchRequest: () => fetch(`${api}/quality?url=${address}`)
|
||||||
.then(res => parseJson(res))
|
.then(res => parseJson(res))
|
||||||
.then(res => res?.lighthouseResult || { error: 'No Data'}),
|
.then(res => res?.lighthouseResult || { error: res.error || 'No Data' }),
|
||||||
});
|
});
|
||||||
|
|
||||||
// Get the technologies used to build site, using Wappalyzer
|
// Get the technologies used to build site, using Wappalyzer
|
||||||
@@ -857,7 +870,7 @@ const Results = (): JSX.Element => {
|
|||||||
<Nav>
|
<Nav>
|
||||||
{ address &&
|
{ address &&
|
||||||
<Heading color={colors.textColor} size="medium">
|
<Heading color={colors.textColor} size="medium">
|
||||||
{ addressType === 'url' && <a href={address}><img width="32px" src={`https://icon.horse/icon/${makeSiteName(address)}`} alt="" /></a> }
|
{ addressType === 'url' && <a target="_blank" rel="noreferrer" href={address}><img width="32px" src={`https://icon.horse/icon/${makeSiteName(address)}`} alt="" /></a> }
|
||||||
{makeSiteName(address)}
|
{makeSiteName(address)}
|
||||||
</Heading>
|
</Heading>
|
||||||
}
|
}
|
||||||
@@ -894,7 +907,7 @@ const Results = (): JSX.Element => {
|
|||||||
<a href="#view-download-raw-data"><span className="toggle-filters">Export Data</span></a>
|
<a href="#view-download-raw-data"><span className="toggle-filters">Export Data</span></a>
|
||||||
<a href="/about"><span className="toggle-filters">Learn about the Results</span></a>
|
<a href="/about"><span className="toggle-filters">Learn about the Results</span></a>
|
||||||
<a href="/about#additional-resources"><span className="toggle-filters">More tools</span></a>
|
<a href="/about#additional-resources"><span className="toggle-filters">More tools</span></a>
|
||||||
<a href="https://github.com/lissy93/web-check"><span className="toggle-filters">View GitHub</span></a>
|
<a target="_blank" rel="noreferrer" href="https://github.com/lissy93/web-check"><span className="toggle-filters">View GitHub</span></a>
|
||||||
</div>
|
</div>
|
||||||
) }
|
) }
|
||||||
</FilterButtons>
|
</FilterButtons>
|
||||||
@@ -910,7 +923,7 @@ const Results = (): JSX.Element => {
|
|||||||
&& title.toLowerCase().includes(searchTerm.toLowerCase())
|
&& title.toLowerCase().includes(searchTerm.toLowerCase())
|
||||||
&& (result && !result.error);
|
&& (result && !result.error);
|
||||||
return show ? (
|
return show ? (
|
||||||
<ErrorBoundary title={title}>
|
<ErrorBoundary title={title} key={`eb-${index}`}>
|
||||||
<Component
|
<Component
|
||||||
key={`${title}-${index}`}
|
key={`${title}-${index}`}
|
||||||
data={{...result}}
|
data={{...result}}
|
||||||
|
|||||||
7
vercel.json
Normal file
7
vercel.json
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"functions": {
|
||||||
|
"api/*.js": {
|
||||||
|
"maxDuration": 10
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -9788,6 +9788,11 @@ express-logging@1.1.1:
|
|||||||
dependencies:
|
dependencies:
|
||||||
on-headers "^1.0.0"
|
on-headers "^1.0.0"
|
||||||
|
|
||||||
|
express-rate-limit@^7.2.0:
|
||||||
|
version "7.2.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/express-rate-limit/-/express-rate-limit-7.2.0.tgz#06ce387dd5388f429cab8263c514fc07bf90a445"
|
||||||
|
integrity sha512-T7nul1t4TNyfZMJ7pKRKkdeVJWa2CqB8NA1P8BwYaoDI5QSBZARv5oMS43J7b7I5P+4asjVXjb7ONuwDKucahg==
|
||||||
|
|
||||||
express@4.18.2, express@^4.17.3:
|
express@4.18.2, express@^4.17.3:
|
||||||
version "4.18.2"
|
version "4.18.2"
|
||||||
resolved "https://registry.npmjs.org/express/-/express-4.18.2.tgz"
|
resolved "https://registry.npmjs.org/express/-/express-4.18.2.tgz"
|
||||||
|
|||||||
Reference in New Issue
Block a user