Thanks to visit codestin.com
Credit goes to github.com

Skip to content

๐Ÿ›ฐ๏ธ Quick tool to see if you can reach common IPs, resolve DNS, and load popular sites โ€” Test country blockages and VPNs

License

Notifications You must be signed in to change notification settings

rigwild/blockcheck

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

8 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Blockcheck

๐Ÿ›ฐ๏ธ Quick tool to see if you can reach common IPs, resolve DNS, and load popular sites โ€” Test country blockages and VPNs.

Perform a fast series of checks from your current network to help you understand whether common web stuff is reachable and how fast (ping, DNS, popular news and social websites).

Supports Node.js and Bun.

Demo

demo video

What It Does

  1. Ping some wellโ€‘known anycast IPs like 1.1.1.1 and 8.8.8.8
  2. Resolve DNS A records for some major domains like google.com and bing.com
  3. Fetch your public IP and rough geo-location (city / region / country) from ipinfo.io
    • The returned location may be inaccurate, e.g. VPN in UAE may show England
  4. Try to reach a set of popular websites in several countries, reporting:
    • Country
    • HTTP status or timeout / error
    • Latency in ms

Install

Using standalone executable, download and run from https://github.com/rigwild/blockcheck/releases

# Download latest release for macOS M1 (ARM64)
curl -L -o blockcheck-macos-m1-darwin-arm64 https://github.com/rigwild/blockcheck/releases/latest/download/blockcheck-macos-m1-darwin-arm64

# Allow run permission then run
mv ./blockcheck-macos-m1-darwin-arm64 ./blockcheck
chmod +x ./blockcheck
./blockcheck

Using Node.js.

npm run build
node dist/index.js
npm install -D

Using Bun.

bun install
bun run src/index.ts

Generate Standalone Executable

Generate a binary than can be run standalone, without requiring a Node.js/Bun installation and without dependencies (only available with Bun).

See https://bun.com/docs/bundler/executables

You can also just download it from GitHub releases at https://github.com/rigwild/blockcheck/releases

# Build for your current system
bun build src/index.ts --compile --sourcemap --target=bun --outfile bin/blockcheck
chmod +x bin/blockcheck
./bin/blockcheck

# ---

# Linux arm64
bun build src/index.ts --compile --sourcemap --target=bun-linux-arm64 --outfile bin/blockcheck-linux-arm64
# Linux x64
bun build src/index.ts --compile --sourcemap --target=bun-linux-x64 --outfile bin/blockcheck-linux-x64

# macOS arm64 (M1)
bun build src/index.ts --compile --sourcemap --target=bun-macos-darwin-arm64 --outfile bin/blockcheck-macos-m1-darwin-arm64
# macOS x64
bun build src/index.ts --compile --sourcemap --target=bun-macos-darwin-x64 --outfile bin/blockcheck-macos-darwin-x64

# Windows x64
bun build src/index.ts --compile --sourcemap --target=bun-windows-x64 --outfile bin/blockcheck-windows-x64.exe

Configuration

Edit the constants near the top of index.ts:

  • PING_HOSTS โ€“ list of IPs to ICMP ping once each.
  • DNS_HOSTS โ€“ hostnames to Aโ€‘record resolve.
  • SITES โ€“ array of { host, country } entries (ISO 3166โ€‘1 alphaโ€‘2 except XX used here for "Other").
  • CHECK_CONCURRENCY โ€“ max concurrent website fetch.
  • CHECK_TIMEOUT_MS โ€“ perโ€‘site timeout (ms) for the HEAD request.

Adding / Removing Sites

Just append / delete objects in the SITES array.

Changing HTTP Method

Currently HEAD is used in httpProbe (utils.ts) to reduce data transfer. Change to GET if you need deeper reachability checks (increases bandwidth / time).

Troubleshooting

Issue Hint
ping: command not found Ensure ping is available (minimal containers may lack it).
All pings fail Possible local firewall / ICMP blocked.
DNS failures Check local resolver / network connectivity.
All HTTP probes timeout Likely egress filtering or captive portal.
Public IP fetch fails Temporary issue reaching ipinfo.io or blocked; retry or substitute another service.

Sample Output

$ bun run src/index.ts
๐Ÿš€ Starting blockcheck...

๐Ÿ“ถ Ping
โœ… 1.1.1.1     โ†’ 7 ms
โœ… 8.8.8.8     โ†’ 6 ms
โœ… 9.9.9.9     โ†’ 77 ms
โœ… 192.0.43.10 โ†’ 97 ms
โœ… 4.2.2.2     โ†’ 28 ms

๐Ÿ›Ž๏ธ  DNS Resolution
โœ… bing.com    โ†’ 150.171.27.10, 150.171.28.10
โœ… google.com  โ†’ 172.217.168.174
โœ… nytimes.com โ†’ 151.101.1.164, 151.101.129.164, 151.101.193.164, 151.101.65.164

๐Ÿ“ถ Public IP & Geo-Location
IP: 138.199.62.200
Location: Hong Kong, Hong Kong, HK

๐Ÿ”— Loading Websites
โœ… ๐Ÿ‡ฆ๐Ÿ‡บ Australia   www.abc.net.au              โ†’ HTTP 200 (304 ms)
โœ… ๐Ÿ‡ง๐Ÿ‡ท Brazil      www.globo.com               โ†’ HTTP 200 (804 ms)
โœ… ๐Ÿ‡จ๐Ÿ‡ฆ Canada      www.cbc.ca                  โ†’ HTTP 200 (237 ms)
โœ… ๐Ÿ‡จ๐Ÿ‡ณ China       weibo.com                   โ†’ HTTP 200 (2609 ms)
โœ… ๐Ÿ‡จ๐Ÿ‡ณ China       www.baidu.com               โ†’ HTTP 200 (858 ms)
โœ… ๐Ÿ‡จ๐Ÿ‡ณ China       www.taobao.com              โ†’ HTTP 200 (47 ms)
โœ… ๐Ÿ‡จ๐Ÿ‡ณ China       www.zhihu.com               โ†’ HTTP 405 (403 ms)
โœ… ๐Ÿ‡จ๐Ÿ‡บ Cuba        www.granma.cu               โ†’ HTTP 200 (2026 ms)
โœ… ๐Ÿ‡ช๐Ÿ‡ฌ Egypt       english.ahram.org.eg        โ†’ HTTP 403 (78 ms)
โœ… ๐Ÿ‡ซ๐Ÿ‡ท France      www.lemonde.fr              โ†’ HTTP 200 (46 ms)
โœ… ๐Ÿ‡ฉ๐Ÿ‡ช Germany     www.dw.com                  โ†’ HTTP 200 (80 ms)
โœ… ๐Ÿ‡ญ๐Ÿ‡ฐ Hong Kong   hongkongfp.com              โ†’ HTTP 200 (155 ms)
โœ… ๐Ÿ‡ฎ๐Ÿ‡ณ India       timesofindia.indiatimes.com โ†’ HTTP 200 (176 ms)
โœ… ๐Ÿ‡ฏ๐Ÿ‡ต Japan       www3.nhk.or.jp              โ†’ HTTP 200 (563 ms)
โœ… ๐Ÿ‡ฒ๐Ÿ‡ฒ Myanmar     www.irrawaddy.com           โ†’ HTTP 403 (113 ms)
โœ… ๐Ÿดโ€โ˜ ๏ธ Other       thepiratebay.org            โ†’ HTTP 200 (1699 ms)
โœ… ๐Ÿ‡ถ๐Ÿ‡ฆ Qatar       www.aljazeera.com           โ†’ HTTP 200 (68 ms)
โœ… ๐Ÿ‡ท๐Ÿ‡บ Russia      www.rt.com                  โ†’ HTTP 200 (304 ms)
โœ… ๐Ÿ‡ท๐Ÿ‡บ Russia      yandex.ru                   โ†’ HTTP 200 (908 ms)
โœ… ๐Ÿ‡ธ๐Ÿ‡ฆ S. Arabia   english.alarabiya.net       โ†’ HTTP 403 (136 ms)
โœ… ๐Ÿ‡ฟ๐Ÿ‡ฆ S. Africa   www.news24.com              โ†’ HTTP 403 (54 ms)
โœ… ๐Ÿ‡จ๐Ÿ‡ญ Switzerland www.swissinfo.ch            โ†’ HTTP 200 (4563 ms)
โœ… ๐Ÿ‡น๐Ÿ‡ผ Taiwan      www.taiwannews.com.tw       โ†’ HTTP 200 (1068 ms)
โœ… ๐Ÿ‡น๐Ÿ‡ท Turkey      www.hurriyetdailynews.com   โ†’ HTTP 200 (271 ms)
โœ… ๐Ÿ‡ฆ๐Ÿ‡ช UAE         gulfnews.com                โ†’ HTTP 200 (114 ms)
โœ… ๐Ÿ‡ฆ๐Ÿ‡ช UAE         telegram.org                โ†’ HTTP 200 (164 ms)
โœ… ๐Ÿ‡ฆ๐Ÿ‡ช UAE         wam.ae                      โ†’ HTTP 200 (2765 ms)
โœ… ๐Ÿ‡ฌ๐Ÿ‡ง UK          www.bbc.com                 โ†’ HTTP 200 (76 ms)
โœ… ๐Ÿ‡ฌ๐Ÿ‡ง UK          www.middleeasteye.net       โ†’ HTTP 200 (103 ms)
โœ… ๐Ÿ‡บ๐Ÿ‡ธ USA         github.com                  โ†’ HTTP 200 (226 ms)
โœ… ๐Ÿ‡บ๐Ÿ‡ธ USA         wikipedia.org               โ†’ HTTP 200 (246 ms)
โœ… ๐Ÿ‡บ๐Ÿ‡ธ USA         www.amazon.com              โ†’ HTTP 405 (239 ms)
โœ… ๐Ÿ‡บ๐Ÿ‡ธ USA         www.google.com              โ†’ HTTP 200 (200 ms)
โœ… ๐Ÿ‡บ๐Ÿ‡ธ USA         www.hrw.org                 โ†’ HTTP 200 (201 ms)
โœ… ๐Ÿ‡บ๐Ÿ‡ธ USA         www.nytimes.com             โ†’ HTTP 200 (247 ms)
โœ… ๐Ÿ‡บ๐Ÿ‡ธ USA         www.tiktok.com              โ†’ HTTP 200 (572 ms)
โœ… ๐Ÿ‡บ๐Ÿ‡ธ USA         www.whatsapp.com            โ†’ HTTP 400 (235 ms)
โœ… ๐Ÿ‡บ๐Ÿ‡ธ USA         www.youtube.com             โ†’ HTTP 200 (345 ms)
โœ… ๐Ÿ‡ป๐Ÿ‡ช Venezuela   noticias24venezuela.net     โ†’ HTTP 200 (550 ms)

License

The GNU General Public License v3.0.

About

๐Ÿ›ฐ๏ธ Quick tool to see if you can reach common IPs, resolve DNS, and load popular sites โ€” Test country blockages and VPNs

Topics

Resources

License

Stars

Watchers

Forks