实现 nginx、tengine 和 openresty 的应用资产识别
in Study on Regex
通过正则实现 nginx、tengine 和 openresty 的应用资产识别
理论
Github源码
docker-openresty docker-tengine
官网
Docker
| Name | Docker image | | ——– | ——– | | Nginx | Nginix | | tengine | axizdkr/tengine | | openresty| openresty/openresty|
关系
Tengine 继承 Nginx-1.17.3 的所有特性
识别
nginx -v nginx version: nginx/1.19.1
Tengine version: Tengine/2.3.2 nginx version: nginx/1.17.3
nginx version: openresty/1.17.8.2
代码实现
正则
^nginx version: nginx\\/([\\d.]+)
Tengine version: Tengine\\/([\\d.]+)\nnginx version: nginx\\/1\\.17\\.3
nginx version: openresty\\/([\\d.]+)