76 lines
2.3 KiB
Markdown
76 lines
2.3 KiB
Markdown
# Meta
|
|
|
|
*Meta* is a small Nginx/PHP tool displaying some informations in order to debug or satisfy your curiosity.
|
|
|
|
## Use
|
|
|
|
### Paths
|
|
|
|
* `/me` will redirect to `/<your-ip-address>`
|
|
* `/<any-ip-address>` will print informations obtained from databases located in the `geolite2` directory
|
|
* `/emoji` will print an emoji list
|
|
* `/<anything-else>` will print *IP*, *TCP*, *TLS* and *HTTP* metadata
|
|
|
|
### Domains
|
|
|
|
`meta.antopie.org` have working A (IPv4) and AAAA (IPv6) records
|
|
|
|
You can test IP version connectivity by forcing it throught:
|
|
|
|
* `ipv4.meta.antopie.org`, which only have the A record
|
|
* `ipv6.meta.antopie.org`, which only have the AAAA record
|
|
|
|
## Nginx configuration sample
|
|
|
|
```
|
|
server {
|
|
listen 443 ssl http2;
|
|
listen [::]:443 ssl http2;
|
|
|
|
server_name meta.antopie.org;
|
|
|
|
root /var/www/meta;
|
|
index index.php;
|
|
try_files $uri/ /;
|
|
|
|
location ~ \.php$ {
|
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
|
fastcgi_pass unix:/var/run/php/meta.sock;
|
|
include inc/fastcgi.conf;
|
|
fastcgi_param SSL_CURVES $ssl_curves;
|
|
fastcgi_param SSL_CIPHERS $ssl_ciphers;
|
|
fastcgi_param SSL_CIPHER $ssl_cipher;
|
|
fastcgi_param SSL_PROTOCOL $ssl_protocol;
|
|
fastcgi_param SSL_SESSION_ID $ssl_session_id;
|
|
fastcgi_param NGINX_VERSION $nginx_version;
|
|
fastcgi_param TCPINFO_RTT $tcpinfo_rtt;
|
|
fastcgi_param TCPINFO_RTTVAR $tcpinfo_rttvar;
|
|
fastcgi_param TCPINFO_SND_CWND $tcpinfo_snd_cwnd;
|
|
fastcgi_param TCPINFO_RCV_SPACE $tcpinfo_rcv_space;
|
|
fastcgi_param CONNECTION $connection;
|
|
fastcgi_param CONNECTION_REQUESTS $connection_requests;
|
|
fastcgi_param REQUEST $request;
|
|
}
|
|
|
|
location ~ emojis.txt {
|
|
charset utf-8;
|
|
}
|
|
}
|
|
```
|
|
|
|
## Resources
|
|
|
|
Nginx variable list: <https://nginx.org/docs/varindex.html>
|
|
|
|
PHP $_SERVER list: <https://www.php.net/manual/reserved.variables.server.php>
|
|
|
|
### HTTP headers
|
|
|
|
* <https://en.wikipedia.org/wiki/List_of_HTTP_header_fields>
|
|
* <https://developer.mozilla.org/docs/Web/HTTP/Headers>
|
|
* <https://datatracker.ietf.org/doc/html/rfc7231>
|
|
|
|
## Free software
|
|
|
|
*Meta* is published under **AGPLv3+** (see `LICENSE`), it's source code is available at <https://code.antopie.org/miraty/meta>. `db-reader` and `geolite2` directories contents have their own licenses.
|