Coder Social home page Coder Social logo

eolinker / apinto Goto Github PK

View Code? Open in Web Editor NEW
1.2K 26.0 184.0 2.64 MB

基于golang开发的网关。具有各种插件,可以自行扩展,即插即用。此外,它可以快速帮助企业管理API服务,提高API服务的稳定性和安全性。

Home Page: https://www.apinto.com

License: Apache License 2.0

Go 99.15% Shell 0.53% Dockerfile 0.16% Smarty 0.12% Lua 0.04%
gateway api api-gateway microservice goku middleware servicemesh proxy apigateway plugin golang go router loadbalancer apinto dubbo2 grpc

apinto's Introduction

Apinto

Go Report Card Releases LICENSE Contributor Covenant


Apinto是一款高性能、可扩展、易维护的云原生API网关。

Apinto网关基于GO语言模块化开发,5分钟极速部署,配置简单、易于维护,支持集群与动态扩容,并且提供几十款网关插件和实用的企业级插件,让用户开箱即用。

Demo

体验地址:demo-dashboard.apinto.com

提供了三个试用账号,避免被使用者挤下来

账号:apinto-1

密码:12345678

账号:apinto-2

密码:12345678

账号:apinto-3

密码:12345678

快速入门:https://help.apinto.com/docs/dashboard-v2/quick/quick_start.html

Apinto Dashboard github地址: https://github.com/eolinker/apinto-dashboard

Apinto功能架构图:

img_v2_22590d84-f8a4-4d3a-9c67-b481ecfdf1fg

Apinto亮点特性

Apinto API 网关以出色的用户体验和适用于各种企业级业务场景的控制台为特色。控制台具有四大亮点功能:集群管理、应用管理、精细服务治理和企业插件,能够满足企业对 API 网关更高级场景化需求的要求。

集群管理

Apinto 提供集群管理功能,可以一次性配置业务并将其发布到相应的集群。这解决了多集群维护多套业务配置的问题,显著提高了运维效率,并降低了繁杂配置时的事故率。

应用管理

Apinto 网关推出应用管理概念,统一管理应用及其生命周期。作为业务通讯的发起者,应用贯穿整个调用链。Apinto 网关对应用请求的流量进行鉴权认证和服务治理,并对请求的流量进行监控告警,统计应用调用情况。

精细化服务治理

Apinto提出精细化流量管理方案,即所有调用方的请求流量都经过网关,通过对应用、API、上游服务、请求方式、IP、请求路径、应用自定义标签等组合条件筛选请求流量,执行限量、访问、熔断、灰度、缓存等策略规则,帮助企业快速、灵活地制定策略,以满足不同业务场景的需求,并全方位治理好服务。

企业插件

Apinto网关即将推出企业插件模块,并且陆续提供业务型企业插件如:用户角色权限、监控告警、日志、API文档、开放平台、安全防护、数据分析、调用链、mock、在线调测、安全测试、国密、多协议等。支持用户自定义企业插件,支持独立部署。

Apinto功能

Apinto网关可以作为业务流量的入口,可以对业务流量进行处理,如动态路由、负载均衡、服务发现、熔断降级、身份认证、监控与告警等。 Apinto网关不受云平台限制,也能在Kubernetes运行。

产品特性

功能 描述
集群 集群不限制网关节点,自由剔除或加入网关节点,主从网关节点具备无缝切换功能,提升网关高可用性
动态路由 可通过设置location、query、header、host、method等参数匹配对应的服务
服务发现 支持对接Eureka、Nacos、Consul
负载均衡 支持轮询权重算法
用户鉴权 匿名、Basic、Apikey、JWT、AK/SK认证
SSL证书 管理多个证书
访问域名 可为网关设置访问域名
健康检查 支持对负载的节点进行健康检查,确保服务健壮性
协议 HTTP/HTTPS、Webservice、Restful、gRPC、Dubbo2、SOAP
插件化 流程插件化,按需加载所需模块
OPEN API 支持使用open api配置网关
日志 提供节点的运行日志,可根据日志设置的等级输出
多种日志输出 可将节点的请求日志输出到不同的日志接收器,如file、nsq、kafka等
Cli命令支持 通过Cli命令操控网关,插件安装、下载和网关的开启、关闭等操作均可使用一键命令操控
黑白名单 支持多维度筛选流量,设置黑白名单IP,拦截非法IP
访问策略 支持多维度筛选流量,可针对应用、IP、应用与IP、应用与API、应用与上游等多维组合设置黑白名单
流量策略 支持多维度筛选流量,控制应用、应用与API、应用与上游之间的请求次数和请求报文大小限制
熔断策略 支持多维度筛选流量,熔断上游或API
灰度策略 支持多维度筛选流量,按百分比或高级规则灰度流量到目标节点
缓存策略 支持多维度筛选流量,缓存API响应内容
参数映射 将客户端的请求参数映射到转发请求中,可按需改变参数的位置及名称
额外参数 转发请求时,额外加上后端验证参数,如apikey等
转发重写 支持对 schemeurihost 的重写,同时支持对转发请求的请求头部header的值进行新增或者删除
流量镜像 线上流量或请求内容进行拷贝到镜像服务中
MOCK 模拟web服务器端API的响应
CORS 支持api请求跨域
同步API 提供OpenAPI同步API文档,支持swagger3.0 json或yaml格式文件

迭代计划

image 如果您是个人开发者,可基于API网关相关的业务场景开发有价值的网关插件或企业级插件,并且愿意分享给Apinto,您将会成为Apinto的杰出贡献者或得到一定的收益。 如果您是企业,可基于Apinto网关开发企业级插件,成为Apinto的合作伙伴。

Star历史

Star History Chart

基准测试

image

部署

启动

1.下载安装包并解压(此处以v0.12.1版本的安装包示例)

wget https://github.com/eolinker/apinto/releases/download/v0.12.1/apinto_v0.12.1_linux_amd64.tar.gz && tar -zxvf apinto_v0.12.1_linux_amd64.tar.gz && cd apinto

Apinto支持在arm64、amd64架构上运行。

请根据需要下载对应架构及系统的安装包,安装包下载请点击跳转

  1. 安装网关:
./install.sh install

执行该步骤将会生成配置文件/etc/apinto/apinto.yml/etc/apinto/config.yml,可根据需要修改。

3.启动网关:

apinto start

Bug 和需求反馈

如果想要反馈 Bug、提供产品意见,可以创建一个 Github issue 联系我们,十分感谢!

如果你希望和 Apinto 团队近距离交流,讨论产品使用技巧以及了解更多产品最新进展,欢迎加入以下渠道。

  • 联系我们

apinto's People

Contributors

baker-yuan avatar chen2eric avatar dot-liu avatar hmzzrcs avatar nonzzz avatar testwill avatar wuk0 avatar zouchenli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

apinto's Issues

bug: Cross domain plugin filtering options request failed

Current Behavior

Cross domain plugin options request failed to get the allow related header.
image

Expected Behavior

image

Error Logs

No response

Steps to Reproduce

1、send ajax request
2、get corw allow header failure

Environment

  • APINTO version (run apinto version):
  • Operating system (run uname -a):
    apinto v0.8.1

bug: 0.14.8版本的apinto访问配置好的Prometheus输出器的metrics路径,是一个下载gz文件操作,不是正常的metrics数据展示页面

Current Behavior

apinto进行了升级,从0.13.2升级到0.14.8,目的是新版本支持更多的插件。
但是在0.14.8版本使用过程中发现了如下问题:
我配置了一个Prometheus的output(name为request_total_prometheus),配置成功后访问metrics路径http://xx.xx.xx.xxx:9400/apinto/metrics/prometheus/request_total_prometheus 出现下载gz文件,正常来说应该是一个metric数据展示页面,
在之前的0.13.2版本上是正常的。

Expected Behavior

访问metrics路径http://xx.xx.xx.xxx:9400/apinto/metrics/prometheus/request_total_prometheus 打开正常的metric数据展示页面

Error Logs

No response

Steps to Reproduce

1、配置Prometheus输出器(name为request_total_prometheus)
2、浏览器访问输出器的metrics路径http://xx.xx.xx.xxx:9400/apinto/metrics/prometheus/request_total_prometheus

Environment

  • APINTO version (run apinto version):
  • Operating system (run uname -a):

bug: 文件内容转发失效

Current Behavior

使用form-data方式上传文件,文件内容不能正常转发

Expected Behavior

No response

Error Logs

No response

Steps to Reproduce

使用form-data方式上传文件

Environment

  • APINTO version (run apinto version): v0.6.4
  • Operating system (run uname -a): centos

Fix the wrong link

Fix the wrong link, the original one didn't jump correctly. Way to go, great project!

希望支持TCP代理

Description

目前nginx是支持4层TCP代理,Apinto已经支持了gRPC、Dubbo2了,希望支持TCP代理

bug: when apinto-gateway:>0.12.11,Cannot add plugins

Current Behavior

When using Apinto Dashboard(V1)v1.2.1-beta, the apinto version is greater than V0.12.11, and the following error will be displayed when adding the plugin: {"code":500,"error":"invalid character '<' looking for beginning of value","re","message":"Moved Permanently. "}
eae915ecb28be2b431a7cc28e3d79cc
d6ab91bc3435e41c2344e3988c8312a

Expected Behavior

No response

Error Logs

No response

Steps to Reproduce

eolinker/apinto-dashboard:1.2.1-beta

eolinker/apinto-gateway:>0.12.11

Environment

  • APINTO version (run apinto version):
  • Operating system (run uname -a):

功能增加建议

Description

api支持swagger自动导入

  • 首次可自动导入
  • 二次更新都通过后台的按钮点击更新,通过遴选的方式选择追加对应的接口

集群

  • 应支持在线状态查看,以防服务器的节点不在线无从查找

服务发现

  • 建议增加对第三方的信息查询,例如consul的相关服务可以在平台查看相关的服务以及状态
  • 支持在线状态查询,可通过此平台随时监控查看服务的在线状态,以防服务器过多时要一台一台的检查

bug: 配置了服务发现nacos后,在控制台将nacos下线,网关依旧输出大量的nacos连接不上的日志

Current Behavior

image
image

Expected Behavior

既然nacos服务下线了,就不应该持续输出nacox相关的日志

Error Logs

No response

Steps to Reproduce

  1. 启动一个nacos服务;
  2. 在apinto控制台网页端配置nacos,并配置相应接口之前可用;
  3. 将网页控制台将nacos下线;
  4. 观察apinto的/var/log/apinto/nacos/nacos目录下的日志是否持续输出;

Environment

apinto版本:v0.13.3
apserver版本:v3.2.0

bug:

Current Behavior

post创建配置(包括service、router、证书)后,存入值将description存到返回值中version字段中,如图
image

Expected Behavior

返回的description应该存放传入的description中

Error Logs

image

Steps to Reproduce

1、添加任意apinto配置(router、service、证书等),即可发现问题

Environment

  • APINTO version (run apinto version):
  • Operating system (run uname -a):

使用http_to_grpc插件代理grpc服务,使用postman无法获取响应

Current Behavior

在router开启http_to_grpc插件后,使用postman请求对应的api会返回
image
使用curl -vvv直接请求,response header中发现有
image

Expected Behavior

No response

Error Logs

No response

Steps to Reproduce

  1. 直接安装apinto编译包
  2. 使用Admin API创建router,router中配置http_to_grpc插件
  3. 创建service

Environment

Apinto version: 0.13.3
Golang version: go version go1.19.4 linux/amd64
Git commit hash: 3ebe4ac
Built on: 2023-07-21T10:28:39Z
Built by: goreleaser
Built by eosc version: v0.14.2

  • Operating system:
    Linux sg-dsp-go-test-01-1155 5.4.17-2136.321.4.el7uek.x86_64 #2 SMP Mon Jun 26 16:20:00 PDT 2023 x86_64 x86_64 x86_64 GNU/Linux

feat:希望节点支持获取当前连接数

Description

想要在负载均衡算法中扩充最小连接数算法,需要获取最小连接数的节点,如果NODE节点可以支持获取当前的连接数就方便多了

nacos接入问题

Current State

nacos接入 api提示成功了返回信息也正常 但是nacos中并未发现apinto网关服务 也没有日志提示是否接入成功 请完善下日志功能和说明文档吧 文档实在是难读

Desired State

nacos接入 api提示成功了返回信息也正常 但是nacos中并未发现apinto网关服务 也没有日志提示是否接入成功 请完善下日志功能和说明文档吧 文档实在是难读

bug:

Current Behavior

apinto 配置http@output,json格式。
http输出是正常的,服务器能接受到日志,就是每输出一次日志,error.log文件会输出报错。

[2023-08-06 05:00:37] [ERRO] [worker-28]plg manager: fail to createFilters filter,error is http@output:worker-data not exits
[2023-08-06 05:00:38] [ERRO] [admin-48]plg manager: fail to createFilters filter,error is http@output:worker not implement IEntryOutput
[2023-08-06 08:49:40] [ERRO] [worker-39]plg manager: fail to createFilters filter,error is http@output:worker-data not exits
[2023-08-06 08:49:41] [ERRO] [admin-71]plg manager: fail to createFilters filter,error is http@output:worker not implement IEntryOutput
[2023-08-06 08:54:57] [ERRO] [worker-39]plg manager: fail to createFilters filter,error is http@output:worker-data not exits
[2023-08-06 08:54:58] [ERRO] [admin-68]plg manager: fail to createFilters filter,error is http@output:worker not implement IEntryOutput
[2023-08-06 10:29:27] [ERRO] [worker-39]plg manager: fail to createFilters filter,error is http@output:worker-data not exits
[2023-08-06 10:29:28] [ERRO] [admin-71]plg manager: fail to createFilters filter,error is http@output:worker not implement IEntryOutput

Expected Behavior

No response

Error Logs

No response

Steps to Reproduce

image: eolinker/apinto-gateway:0.13.3
image: eolinker/apinto-dashboard:1.2.1-beta

Environment

  • APINTO version (run apinto version):
  • Operating system (run uname -a):
  • image: eolinker/apinto-gateway:0.13.3
    image: eolinker/apinto-dashboard:1.2.1-beta

Who is using apinto?

Description

Who is using apinto?

Thank you for your support for apinto open source gateway. We will continue to support the development and Q & A of **apinto ** open source gateway, create more complete, safe and reliable **apinto **products, and build a more prosperous community.

Why create this issue?

-Listen to the voice of the community and let **apinto **solve practical problems

-Attract more developers to participate and contribute

-Understand the actual use scenarios of apinto, so as to determine the subsequent version iteration plan

We look forward to your offer

Submit a comment here, which includes:

Your company, school or organization

Your city and country

Your contact information: email, wechat, QQ (at least one)

What business scenarios will you use **apinto **for

Has it been applied to the production environment

You can refer to the following examples:

Organization: apinto

Location: Guangzhou, China

contact information: [email protected]

Use scenario: provide safe and reliable unified call entry for microservices

Applied to production environment: Applied

Thank you for your support!

Apinto community

谁在使用 Apinto?

感谢大家对 Apinto 开源网关的支持,我们将持续支持 Apinto 开源网关的开发、答疑,打造更加完备、安全、可靠的 Apinto 产品,将社区建设得更加繁荣。

为什么创建这个Issue?

  • 聆听社区的声音,让 Apinto 切实解决实际问题
  • 吸引更多开发者参与贡献
  • 了解 Apinto 的实际使用场景,以便确定后续的版本迭代计划

我们期待您能提供

在此提交一条评论, 评论内容包括:

您所在公司、学校或组织

您所在的城市、国家

您的联系方式:邮箱、微信、QQ (至少一个)

您将 Apinto 用于哪些业务场景

是否已经应用到生产环境

可以参考下面的示例:

组织:apinto
地点:**广州
联系方式: [email protected]
使用场景:给微服务提供安全、可靠的统一调用入口
是否已经应用到生产环境:已经应用

多谢您的支持!
Apinto 社区

Environment

  • APINTO version (run apinto version):
  • Operating system (run uname -a):

bug: APINTO start Success! 但是网关并没有启动成功

Current Behavior

1.docker restart apinto
2.重启失败

Expected Behavior

1.docker restart apinto
2.重启成功

Error Logs

[2023-09-26 16:10:22] [ERRO] the app apinto is running
APINTO start Success!
APINTO start Success!
APINTO start Success!
APINTO start Success!
APINTO start Success!
APINTO start Success!

Steps to Reproduce

1.docker restart apinto

Environment

  • APINTO version (run apinto version):
  • Operating system (run uname -a):

ssl certificate can be updated dynamically

Description

It is hoped that the function that the ssl certificate can be updated dynamically can be added, because the services that the gateway needs to manage may have different ssl certificates, and the certificates also have the problem of expiration. The certificate information can be submitted to the configuration

bug: 额外参数v2插件携带自定义header参数偶发丢失

Current Behavior

配置了额外参数v2插件,配置信息如下,在上游服务中获取headers,偶发获取不到自定义的header字段

{
    "error_type": "text",
    "params": [{
        "name": "application",
        "position": "header",
        "type": "$concat",
        "value": ["$application"]
    }, {
        "name": "remote_addr",
        "position": "header",
        "type": "$concat",
        "value": ["$remote_addr"]
    }, {
        "name": "uri",
        "position": "header",
        "type": "$concat",
        "value": ["$uri"]
    }],
    "request_body_type": "json"
}

Expected Behavior

No response

Error Logs

在access-log中打印系统变量,有正常输出系统变量值

{
    "fields":[
        "$time_iso8601",
        "$request_id",
        "@request",
        "@proxy",
        "@response",
        "@status_code",
        "@time"
    ],
    "request":[
        "$request_method",
        "$scheme",
        "$request_uri",
        "$host",
        "$header",
        "$remote_addr",
        "$application",
        "$token"
    ],
    "proxy":[
        "$proxy_method",
        "$proxy_scheme",
        "$proxy_uri",
        "$proxy_host",
        "$proxy_header",
        "$proxy_addr"
    ],
    "response":[
        "$response_header"
    ],
    "status_code":[
        "$status",
        "$proxy_status"
    ],
    "time":[
        "$request_time",
        "$response_time"
    ]
}

Steps to Reproduce

重复请求,偶发上游服务接收不到自定义header参数。

Environment

apinto版本信息,有自行修改commit,主要关注tag: v0.14.4

Apinto version: 2023101615-786f44a
Golang version: go version go1.20.3 linux/amd64
Git commit hash: 786f44a6468f89112163d04ad12f11c85400d2e8
Built on: 2023-10-16T07:23:03Z
Built by: gitlab
Built by eosc version: v0.14.4

Windows support

Description

我们目前将apinto 作为我们一个应用的网关,通过网关的配置实现应用后各个模块的集成与路由的统一。但是目前遇到的最大的问题主要在两点: 1. 程序的稳定性  2.还未实现对windows的支持。
  • 程序的稳定性

从我们目前使用过来看,在k8s 集群下部署的时候,重启程序等操作的时候,容易出现无法正常启动的情况。或者出现配置丢失的情况。感觉上更大的可能性是在etcd 集群的协调上 (具体的我们还没又深入调试)。 另外在运行一段时间后,容易出现网关的相关路由出现访问特别缓慢,甚至超时等情况 (这种情况比较难重现,但是确实经常会发生)

  • Windows方面的支持

我们目前项目的甲方,很多时候没办法提供linux服务器,或者无法提供带有 docker 环境的windows服务器。我们目前是内部魔改了一个windows版本,但是稳定性还是略有欠缺。希望官方能出一个windows版本的,可能性能不一定要求很高,但是能稳定的跑下来。

bug: 证书删除后,https代理依旧可以正常访问,需要重启apinto网关,才能生效

Current Behavior

证书删除后,https代理依旧可以正常访问,需要重启apinto网关,才能生效

Expected Behavior

No response

Error Logs

No response

Steps to Reproduce

1.调用API删除证书
2.调用http://192.168.64.3:9400/api/certificate 接口,显示证书为空 []
3.尝试利用https访问,例如https://xxx.com:8099/v1/test 依旧可以访问到结果
4.等待10分钟,第二步依旧成立,可以访问https,证明证书尚未测试移除
5.重启apinot后,再次测试发现https不可访问。

Environment

  • APINTO version (run apinto version): v0.12.6
  • Operating system (run uname -a): x86 centos 7.6

bug: [ERRO] address is listened:0.0.0.0:80

Current Behavior

I followed the instructions on https://help.apinto.com/docs/apinto/quick/arrange.html, and when I execute ./apinto start, I got [ERRO] address is listened:0.0.0.0:80 error. and I checked the configs in config.yml.tpl or https://help.apinto.com/docs/apinto/quick/quick_course.html#%E4%BD%BF%E7%94%A8%E6%AD%A5%E9%AA%A4.
I could not found any configs around :80.

[root@localhost apinto]# cat config.yml.tpl 
version: 2
#certificate: # 证书存放根目录
#  dir: /etc/apinto/cert
client:
  #advertise_urls: # open api 服务的广播地址
  #- http://127.0.0.1:9400
  listen_urls: # open api 服务的监听地址
    - http://0.0.0.0:9400
  #certificate:  # 证书配置,允许使用ip的自签证书
  #  - cert: server.pem
  #    key: server.key
gateway:
  #advertise_urls: # 转发服务的广播地址
  #- http://127.0.0.1:9400
  listen_urls: # 转发服务的监听地址
    - https://0.0.0.0:8099
    - http://0.0.0.0:8099
peer: # 集群间节点通信配置信息
  listen_urls: # 节点监听地址
    - http://0.0.0.0:9401
  #advertise_urls: # 节点通信广播地址
  # - http://127.0.0.1:9400
  #certificate:  # 证书配置,允许使用ip的自签证书
  #  - cert: server.pem
  #    key: server.key

[root@localhost apinto]#

Expected Behavior

The listen port of ./apinto start could be config.

Error Logs

bug: [ERRO] address is listened:0.0.0.0:80

Steps to Reproduce

  1. download apinto_v0.12.1_linux_amd64.tar.gz and extracted it.
  2. execute ./apinto start

Environment

  • APINTO version (run apinto version):
[root@localhost apinto]# ./apinto version
Apinto version: 0.12.1
Golang version: go version go1.19.4 linux/amd64
Git commit hash: 68da18d234080b71fa70fe1cd0cee3933f6bbf28
Built on: 2023-03-03T13:27:58Z
Built by: goreleaser
Built by eosc version: v0.11.0
[root@localhost apinto]#
  • Operating system (run uname -a):
[root@localhost apinto]# uname -a
Linux localhost.localdomain 3.10.0-1127.19.1.el7.x86_64 #1 SMP Tue Aug 25 17:23:54 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
[root@localhost apinto]# 

Support Websocket

Description

It is hoped that websocket requests can be proxied so that long connection communication can be established

bug: jwt鉴权被覆盖的问题

Current Behavior

basic auth鉴权和jwt鉴权同时上线时, jwt鉴权会被覆盖。当下线了basic auth鉴权,jwt鉴权才生效。

Expected Behavior

No response

Error Logs

No response

Steps to Reproduce

1.创建basic auth鉴权,上线。basic auth鉴权生效。
2.创建jwt鉴权,上线。jwt鉴权不生效。
3.下线basic auth鉴权。jwt鉴权不生效。

Environment

  • APINTO version (run apinto version):apinto_v0.13.3
  • Operating system (run uname -a):centos7

docs: Just a discussion

Current State

Currently, I found when apinto upgrade. Should update latest link for readme. I think it's no necessary. Infer from releasing. We can know. Can redirect the link. So we don't need update readme and api-docs any more.

Desired State

I think we can change the release process to get rid of the version number. In past apinto-v0.7.0.linux.x64.tar.gz. For future apinto-linux.x64.tar.gz is enough.

bug: API配置路由规则时正则匹配不判断溢出位数字符

Current Behavior

API配置-配置API信息-高级配置-路由规则:设置正则匹配时不判断溢出长度范围的字符。

Expected Behavior

No response

Error Logs

No response

Steps to Reproduce

API配置-配置API信息-高级配置:
路由规则:
设置为正则匹配,校验手机号

Environment

  • APINTO version (run apinto version):
  • Operating system (run uname -a):
    apinto基础版1.0

[Feature]: support yaml config alias.

Description

Background

Apinto is a great project. But i found apinto already support read yml config file. But as we all know .yaml is equal with .yml. But from the eosc/config.go. I notice it's only read .yml suffix file. I think we can set up an constant array containing .yaml and .yml.Then read .yml first.

The admin thread crashed after the nacos service was shut down

Current Behavior

shutdown registered nacos service, restart the apinto, admin collapse. The console keeps printing:admin controller ping...

Expected Behavior

No response

Error Logs

No response

Steps to Reproduce

  1. Register the nacos service to apinto
  2. shutdown nacos service
  3. Restart the apinto
  4. admin thread collapse

Environment

  • APINTO version (run apinto version):
  • Operating system (run uname -a):
    apinto-0.8.1

bug: access-log http_output json自定义引用项嵌套层数超过3层就异常了

Current Behavior

image
image

【官方文档标注】:
输出类型为line的formatter输出line格式的日志信息,信息嵌套层数不超过三层。
输出
类型为json的formatter输出json格式的日志信息,自定义引用项嵌套层数没有限制。
【实际测试 httpout 输出】
输出类型为json的formatter输出json格式的日志信息,自定义引用项嵌套层数超过3层就异常了。

Expected Behavior

No response

Error Logs

No response

Steps to Reproduce

fields:
- @http
http:
- @service
- @Proxy
service:
- abc as service_name
proxy:
- $request_uri
- $proxy_header

Environment

  • APINTO version (run apinto version):
  • Operating system (run uname -a):

eolinker/apinto-gateway:0.8.5

help request: func assert error

Description

func Assert[T any](v interface{}) (*T, error) {

image
没有被编辑器识别

Environment

version

commit 5356752e56c4370fc65e2d2ad93f52342e5e40d9 (HEAD -> main, origin/main, origin/HEAD)
Author: Dot.L <[email protected]>
Date:   Thu Mar 23 19:55:24 2023 +0800

    Update README.md

os version

uname -ra                                                                                                                            ✔  8582  13:42:32 
 Darwin Kernel Version 21.6.0: Thu Sep 29 20:12:57 PDT 2022; root:xnu-8020.240.7~1/RELEASE_X86_64 x86_64

go env

GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/tony/Library/Caches/go-build"
GOENV="/Users/tony/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/tony/workspace/gosdk19workspace/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/tony/workspace/gosdk19workspace"
GOPRIVATE=""
GOPROXY="https://goproxy.cn,direct"
GOROOT="/Users/tony/workspace/gosdk19/go1.19.7"
GOSUMDB="off"
GOTMPDIR=""
GOTOOLDIR="/Users/tony/workspace/gosdk19/go1.19.7/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.19.7"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/tony/workspace/gosdk19workspace/src/apinto/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/z7/vw1qnq_x3793sdh43gxv5tzm0000gn/T/go-build127721799=/tmp/go-build -gno-record-gcc-switches -fno-common"

bug: IP ssl证书不可用,必须域名才能访问到https接口

Current Behavior

IP ssl证书不可用,必须域名才能访问到https接口

Common Name 为止为IP,证书成功导入后,不能以https 方式访问接口
ssl设置参考文档:https://blog.51cto.com/u_10624715/3235172

Expected Behavior

No response

Error Logs

No response

Steps to Reproduce

1.正确配置IP ssl证书和域名证书
2.https://xxx.com:8099/xxx_xljt/v2/yiyan?format=json 访问正常
3. https://192.168.64.3:8099/xxx_xljt/v2/yiyan?format=json 访问异常

Environment

  • APINTO version (run apinto version):
  • Operating system (run uname -a):

help request:

有个疑问,上次改这个 grpc header失效的问题#113
1、AddHeader和DelHeader是不是也要跟着该一下。
2、afterProxy的作用是干嘛的,有点没理解到

bug: 上游服务是https服务(证书私有)请求报x509: cannot validate certificate错误

Current Behavior

bug: 上游服务是https服务(证书私有)请求报x509: cannot validate certificate错误

Expected Behavior

No response

Error Logs

x509: cannot validate certificate for ip because it doesn't contain any IP SANs

Steps to Reproduce

bug: 上游服务是https服务(证书私有)请求报x509: cannot validate certificate错误

Environment

  • APINTO version (run apinto version):
  • Operating system (run uname -a):
    bug: 上游服务是https服务(证书私有)请求报x509: cannot validate certificate错误

服务节点资源分组部署

Description

服务节点资源分组部署,不同部门的服务,部署在不同资源组节点上,增肌资源组管理

apinto config.yml support listen range ip port

Description

Now:

listen:   # node listen port
  - 8099

admin:    # openAPI request info
  scheme: http # listen scheme
  listen: 9400 # listen port
  ip: 0.0.0.0 # listen ip

just a case:

listen:   # node listen port
  - 8099
  - 2000-3000,3001,3003,4000-50000

more idea:

only allow bind ports you list, if you set nothing, there won't be any limit
and the port will used when config in the dashboard

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.