
Product
A Fresh Look for the Socket Dashboard
We’ve redesigned the Socket dashboard with simpler navigation, less visual clutter, and a cleaner UI that highlights what really matters.
wait4x.dev/v2/wait
Wait4X allows you to wait for a port or a service to enter the requested state, with a customizable timeout and interval time.
Table of Contents
There are many different ways to install Wait4X
Wait4X provides automatically updated Docker images within Docker Hub. It is possible to always use the latest stable tag.
Pull the image from the docker index.
docker pull atkrad/wait4x:latest
then you can launch the wait4x
container.
docker run --rm --name='wait4x' \
atkrad/wait4x:latest --help
Choose the file matching the destination platform from the release page, copy the URL and replace the URL within the commands below:
curl -L https://github.com/atkrad/wait4x/releases/latest/download/wait4x-linux-amd64 -o /usr/local/bin/wait4x
chmod +x /usr/local/bin/wait4x
curl -L https://github.com/atkrad/wait4x/releases/latest/download/wait4x-darwin-amd64 -o /usr/local/bin/wait4x
chmod +x /usr/local/bin/wait4x
curl -L https://github.com/atkrad/wait4x/releases/latest/download/wait4x-windows-amd64 -o wait4x.exe
Wait4X generates checksum for all binaries with sha256sum to prevent against unwanted modification of binaries.
To validate the binary, download the checksum file which ends in .sha256sum
for the binary you downloaded and use
the sha256sum
command line tool.
curl -SLO https://github.com/atkrad/wait4x/releases/latest/download/wait4x-linux-amd64.sha256sum
sha256sum --check wait4x-linux-amd64.sha256sum
You can find the Wait4X package in some Linux distributions.
You can install the wait4x package from the official sources:
apk add wait4x
You can install the wait4x package from the Arch User Repository:
yay -S wait4x
# If you want checking just tcp connection
wait4x tcp 127.0.0.1:9090
# If you want checking just http connection
wait4x http https://ifconfig.co
# If you want checking http connection and expect specify http status code
wait4x http https://ifconfig.co --expect-status-code 200
# If you want checking http connection, status code and match the response body.
# Note: You can write any regex that compatible with Golang syntax (https://pkg.go.dev/regexp/syntax#hdr-Syntax)
wait4x http https://ifconfig.co/json --expect-status-code 200 --expect-body='"country":\s"Netherlands"'
# If you want to check a http response header
# NOTE: the value in the expected header is regex.
# Sample response header: Authorization Token 1234ABCD
# You can match it by these ways:
# Full key value:
wait4x http https://ifconfig.co --expect-header "Authorization=Token 1234ABCD"
# Value starts with:
wait4x http https://ifconfig.co --expect-header "Authorization=Token"
# Regex value:
wait4x http https://ifconfig.co --expect-header "Authorization=Token\s.+"
# Checking Redis connection
wait4x redis redis://127.0.0.1:6379
# Specify username, password and db
wait4x redis redis://user:password@localhost:6379/1
# Checking Redis connection over unix socket
wait4x redis unix://user:password@/path/to/redis.sock?db=1
# Checking a key existence
wait4x redis redis://127.0.0.1:6379 --expect-key FOO
# Checking a key existence and matching the value
# Note: You can write any regex that compatible with Golang syntax (https://pkg.go.dev/regexp/syntax#hdr-Syntax)
wait4x redis redis://127.0.0.1:6379 --expect-key "FOO=^b[A-Z]r$"
# Checking MySQL TCP connection
wait4x mysql user:password@tcp(localhost:5555)/dbname?tls=skip-verify
# Checking MySQL UNIX Socket connection
wait4x mysql username:password@unix(/tmp/mysql.sock)/myDatabase
# Checking PostgreSQL TCP connection
wait4x postgresql 'postgres://bob:secret@1.2.3.4:5432/mydb?sslmode=verify-full'
# Checking PostgreSQL Unix socket connection
wait4x postgresql 'postgres://bob:secret@/mydb?host=/var/run/postgresql'
# Checking InfluxDB connection
wait4x influxdb http://localhost:8086
# Checking MongoDB connection
wait4x mongodb 'mongodb://127.0.0.1:27017'
# Checking MongoDB connection with credentials and options
wait4x mongodb 'mongodb://user:pass@127.0.0.1:27017/?maxPoolSize=20&w=majority'
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
We’ve redesigned the Socket dashboard with simpler navigation, less visual clutter, and a cleaner UI that highlights what really matters.
Industry Insights
Terry O’Daniel, Head of Security at Amplitude, shares insights on building high-impact security teams, aligning with engineering, and why AI gives defenders a fighting chance.
Security News
MCP spec updated with structured tool output, stronger OAuth 2.1 security, resource indicators, and protocol cleanups for safer, more reliable AI workflows.