文章目录
前言
Apache APISIX 是一个动态、实时、高性能的 API 网关, 提供负载均衡、动态上游、灰度发布、服务熔断、身份认证、可观测性等丰富的流量管理功能。
- 开源项目地址:https://github.com/apache/apisix;
- 官方文档地址:https://apisix.apache.org/zh/docs/apisix/getting-started/README/;
你可以把 Apache APISIX 当做流量入口,来处理所有的业务数据,包括动态路由、动态上游、动态证书、金丝雀发布(灰度发布)、限流限速、抵御恶意攻击、监控报警、服务可观测性、服务治理等。
Fofa 搜索语法:
title="Apache APISIX"
渗透测试基本信息:
APISIX 系统 | 默认端口 | 默认凭据或口令 |
---|---|---|
Apache APISIX | 9080 | edd1c9f034335f136f87ad84b625c8f1 |
Apache APISIX Dashboard | 9000 | admin/admin |
官方推荐的快速安装 APISIX:
curl -sL https://run.api7.ai/apisix/quickstart | sh
# 验证安装是否成功
curl "http://127.0.0.1:9080" --head | grep Server
【创建路由】
通过下面的命令,你将创建一个路由,把请求 http://127.0.0.1:9080/ip 转发至 httpbin.org/ip:
root@ubuntu:~/Desktop$ curl -i "http://127.0.0.1:9180/apisix/admin/routes" -X PUT -d '
{
"id": "getting-started-ip",
"uri": "/ip",
"upstream": {
"type": "roundrobin",
"nodes": {
"httpbin.org:80": 1
}
}
}'
HTTP/1.1 201 Created
Date: Sun, 18 Feb 2024 01:45:48 GMT
Content-Type: application/json
Transfer-Encoding: chunked
Connection: keep-alive
Server: APISIX/3.8.0
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: *
Access-Control-Max-Age: 3600
X-API-VERSION: v3
{"key":"/apisix/routes/getting-started-ip","value":{"upstream":{"scheme":"http","nodes":{"httpbin.org:80":1},"type":"roundrobin","pass\_host":"pass","hash\_on":"vars"},"id":"getting-started-ip","priority":0,"update\_time":1708220748,"uri":"/ip","status":1,"create\_time":1708220748}}
root@ubuntu:~/Desktop$
root@ubuntu:~/Desktop$ curl "http://127.0.0.1:9080/ip"
{
"origin": "XXX.X