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.

88 lines
936 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
12 months ago
##### Attributes
12 months ago
* `port` - required
* `host` - optional, name, IPv4 or IPv6 `REMOTE_ADDR` by default
12 months ago
12 months ago
##### Request
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
12 months ago
##### Attributes
12 months ago
* `name` - required host name, IPv4 or IPv6
* `record` - required if `records` not provided
* `records` - required if `record` not provided
12 months ago
12 months ago
###### Records support
* [x] A
* [x] AAAA
* [ ] SRV #1
##### Request
###### Single record
12 months ago
```
GET dig.php?name=php.net&record=A
```
12 months ago
###### 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
```