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.

112 lines
1.2 KiB

12 months ago
# web-api
12 months ago
12 months ago
Network API with native Yggdrasil/IPv6 support
12 months ago
## Install
```
12 months ago
git clone https://github.com/YGGverse/web-api.git
cd web-api
12 months ago
composer install
```
## Config
```
nano config.json
```
12 months ago
## 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 /net/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 /net/dig.php?name=yo.index&record=A
12 months ago
```
12 months ago
###### Multiple records
12 months ago
```
12 months ago
GET /net/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
12 months ago
* `http://[201:23b4:991a:634d:8359:4521:5576:15b7]/api/`
12 months ago
### Alfis
12 months ago
* `http://api.ygg`
12 months ago
### Hybrid
12 months ago
* `http://api.ygg.at`
12 months ago
### Clearnet
12 months ago
* `https://yggapi.duckdns.org`