Web API tools with native Yggdrasil/IPv6 support
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ghost 0e89d599c9 add REMOTE_ADDR if host not provided, apply timeout 12 months ago
src/public add REMOTE_ADDR if host not provided, apply timeout 12 months ago
.gitignore initial commit 12 months ago
LICENSE Initial commit 12 months ago
README.md fix returned value 12 months ago
composer.json update depencency name 12 months ago
composer.lock update depencency name 12 months ago

README.md

net-api

Simple Network Tools API

Install

git clone https://github.com/YGGverse/net-api.git
cd net-api
composer install

Run

cd src/public
php -S localhost:8080

Usage

Socket

Check socket

Usage

Attributes
  • port - required
  • host - optional, name, IPv4 or IPv6 REMOTE_ADDR by default
Request
GET socket.php?port=80&host=php.net
Response
JSON
{
  success: bool
}

Dig

Show host records

Usage

Attributes
  • name - required host name, IPv4 or IPv6
  • record - required if records not provided
  • records - required if record not provided
Records support
  • A
  • AAAA
  • SRV #1
Request
Single record
GET dig.php?name=php.net&record=A
Multiple records
GET dig.php?name=php.net&records[]=A&records[]=AAAA
Response
JSON
{
  success: bool
  records: array
}