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.

103 lines
1.2 KiB

# net-api
12 months ago
12 months ago
Network API with native Yggdrasil/IPv6 support
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
```
12 months ago
## Features
12 months ago
12 months ago
### Socket
12 months ago
Check socket (also useful for open ports detection)
12 months ago
#### 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
```
12 months ago
GET socket.php?port=80&host=yo.index
12 months ago
```
##### Response
```
JSON
{
12 months ago
success: bool
12 months ago
}
```
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
* [x] SRV
12 months ago
##### Request
###### Single record
12 months ago
```
12 months ago
GET dig.php?name=yo.index&record=A
12 months ago
```
12 months ago
###### Multiple records
12 months ago
```
12 months ago
GET dig.php?name=yo.index&records[]=A&records[]=AAAA
12 months ago
```
12 months ago
##### Response
12 months ago
```
12 months ago
JSON
{
12 months ago
success: bool
12 months ago
records: array
}
12 months ago
```
## Online
### Yggdrasil
* `http://[201:23b4:991a:634d:8359:4521:5576:15b7]/api/net/`
### Alfis
* `http://api.ygg/net/`
* `http://api.ygg.at/net/`
### Clearnet
* `https://yggapi.duckdns.org/net/`