Skip to content

indiwtf/indiwtf-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Indiwtf CLI

Will your website be blocked by Kominfo? Let's check!

Indiwtf CLI is a tiny command-line tool written in Go that allows you to check if your website is blocked in Indonesia. It uses the Indiwtf API to check the accessibility status of the website in Indonesian Internet network.

You can access the web version by visiting indiwtf.com. Indiwtf is also available in a Telegram Bot version.

Usage

Run indiwtf with one or more domains:

indiwtf [domain1] [domain2] ...

Examples

Check the accessibility status of a single website:

indiwtf example.com

Check the accessibility status of multiple websites:

indiwtf puredns.org github.com reddit.com

API Token

Indiwtf CLI requires an API token to check website accessibility. You can store the API token securely in a configuration file located at ~/.indiwtf/config.json.

Save your token with the auth command:

indiwtf auth API_TOKEN

Alternatively, the program will prompt you to enter the token the first time you run a check if it's not found in the configuration file.

To obtain an API token, please visit indiwtf.com/pricing.

Installation

Install the latest prebuilt binary with a single command:

curl -fsSL https://github.com/indiwtf/indiwtf-cli/raw/main/install.sh | sh

Or using wget:

wget -qO- https://github.com/indiwtf/indiwtf-cli/raw/main/install.sh | sh

The script downloads the indiwtf binary to /usr/local/bin and makes it executable. To install somewhere else, set INSTALL_DIR:

INSTALL_DIR="$HOME/.local/bin" sh -c "$(curl -fsSL https://github.com/indiwtf/indiwtf-cli/raw/main/install.sh)"
Manual installation

Download the latest binary from the releases page and place it under /usr/local/bin:

sudo wget -O /usr/local/bin/indiwtf \
  https://github.com/indiwtf/indiwtf-cli/releases/latest/download/indiwtf
sudo chmod +x /usr/local/bin/indiwtf

For other platforms, replace the asset name (e.g. indiwtf-darwin-arm64, indiwtf-linux-arm64, indiwtf-windows-amd64.exe).

Windows

Prebuilt Windows binaries are published on the releases page (indiwtf-windows-amd64.exe and indiwtf-windows-arm64.exe). Download one, rename it to indiwtf.exe, and place it in a directory on your PATH.

The install.sh script, indiwtf update, and indiwtf uninstall are not available on Windows. Update by downloading the latest .exe, and uninstall by deleting the file.

Update

Update to the latest release at any time:

indiwtf update

Uninstall

Remove the indiwtf binary and its configuration files (~/.indiwtf):

indiwtf uninstall
Manual uninstall
sudo rm /usr/local/bin/indiwtf
rm -rf ~/.indiwtf

Features

  • Check the accessibility status of a website based on the resolved IP address.
  • Resolve IP address for a given hostname using a custom DNS server in Indonesia.
  • Supports checking multiple websites in a single run.

Development

You will need Go (version 1.16 or above).

Clone the repository:

git clone https://github.com/fransallen/indiwtf-cli.git
cd indiwtf-cli

To build the binary, run:

CGO_ENABLED=0 go build -o indiwtf main.go

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contributing

Contributions are welcome! If you find any issues or want to add new features, please open an issue or submit a pull request.