# OpenResty API GateWay **Repository Path**: houjq3/openresty-api-gateway ## Basic Information - **Project Name**: OpenResty API GateWay - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2020-04-10 - **Last Updated**: 2021-01-05 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## 功能 - HTTP(S) 反向代理 - 动态负载均衡:动态支持有权重的 round-robin 负载平衡。 - 支持一致性 hash 的负载均衡:动态支持一致性 hash 的负载均衡。 - WAF防火墙 - 身份认证:key-auth, JWT。 - 限制速率 - 限制请求数 - 限制并发 - 代理请求重写:支持重写请求上游的`host`、`uri`、`schema`、`enable_websocket`、`headers`信息。 - 输出内容重写:支持自定义修改返回内容的 `status code`、`body`、`headers`。 - IP 黑名单 - 灰度发布 - 监控和指标:Prometheus ## 安装 以下操作系统中可顺利安装并做过运行测试 - CentOS 7 - Ubuntu 16.04, - ARM64 Ubuntu 18.04 互联网安全平台安装步骤: 1. 安装运行时依赖:OpneResty 和 Confd,参考[OpenResty安装包合集](https://gitee.com/rhubard/openresty-all-in-one)。需要注意的是:OpenResty 的版本必须 >= 1.15.8.2 2. 安装互联网安全平台,下载 [最新版源码包](https://gitee.com/rhubard/openresty-api-gateway/repository/archive/master),并解压到 `$HOME/openresty` 目录下 ## 快速上手 ```bash # 确认OpenResty是否安装成功 openresty -v # 克隆工程 cd $HOME/openresty git clone git@gitee.com:rhubard/openresty-api-gateway.git # 启动脚本 cd openresty-api-gateway && sh bin/start.sh # 访问 curl http://127.0.0.1:23080 ``` ## 管理平台 ## 性能测试 ## 容器化 - [OpenResty镜像](doc/docker/OpenResty.md) - [互联网安全平台镜像](doc/docker/IspGateway.md) ## 文档 ## 工具 ### 获取免费SSL证书 1. SSL证书 [在线生成工具](https://csr.chinassl.net/generator-csr.html) 2. 上传到 `conf/cert` 目录下,并重命名为 `nginx.csr` 和 `nginx.key` 3. 生成CA根证书,得到nginx.crt ```bash openssl x509 -req -days 3650 -in nginx.csr -signkey nginx.key -out nginx.crt ```