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.

77 lines
839 B

# net-api
12 months ago
Simple Network Tools API
12 months ago
## Install
```
git clone https://github.com/YGGverse/net-api.git
cd net-api
12 months ago
composer install
```
## Run
```
cd src/public
php -S localhost:8080
```
## Usage
12 months ago
### Socket
Check socket
#### Usage
* `port` required
12 months ago
* `host` optional, name, IPv4 or IPv6 `REMOTE_ADDR` by default
12 months ago
```
GET socket.php?port=80&host=php.net
```
##### Response
```
JSON
{
status: bool
}
```
12 months ago
### Dig
12 months ago
Show host records
#### Usage
* `name` required host name, IPv4 or IPv6
* `record` required if `records` not provided
* `records` required if `record` not provided
+ [x] A
+ [x] AAAA
+ [ ] SRV #1
##### Single record
```
GET dig.php?name=php.net&record=A
```
##### Multiple records
12 months ago
```
12 months ago
GET dig.php?name=php.net&records[]=A&records[]=AAAA
12 months ago
```
12 months ago
##### Response
12 months ago
```
12 months ago
JSON
{
status: bool
records: array
}
12 months ago
```