注意: 本项目需要搭配 eto-gateway-admin 前端项目使用
如果: 使用docker-compose无需单独运行
ETO·网关服务是一个基于gin框架的网关服务,主要用于对接游戏服务,提供统一的接口,方便对接多个游戏服务。
- 支持邮件单独发送 无需配置物品占用
- 邮件直接发送金币
- Frida动态代码注入
- 快速对接游戏服务
- 超快速的响应速度,对比php的网关服务,响应速度提升了10倍
- 支持多平台快速部署
- 占用资源少,运行稳定,支持高并发
![image](https://private-user-images.githubusercontent.com/49603204/330438819-9bab261f-38c9-4473-84e9-17b217b303d6.jpeg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE2OTI2NjEsIm5iZiI6MTcyMTY5MjM2MSwicGF0aCI6Ii80OTYwMzIwNC8zMzA0Mzg4MTktOWJhYjI2MWYtMzhjOS00NDczLTg0ZTktMTdiMjE3YjMwM2Q2LmpwZWc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzIyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcyMlQyMzUyNDFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0wYjkwMjY5MDVjNzQ3ODNlM2YwMjE1NjViOGIyNTc3NWJlYTBmNDdlMWUzOTIxZjM1OGVkMmM3NDk1ZDMzNGRkJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.8HX1V93aXP6UVaUxCX-SSqPBoA27cZBEtqscmNoXO4M)
![image](https://private-user-images.githubusercontent.com/49603204/330438249-26875c19-aa15-42bf-82aa-4e98c6b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Yjk2NTNjNTc1NDBkZWNlNDUyNzczMWJhZDk4JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.p1X94jDo4EShEdHGFz7F5VAX1170FIwRu4JAP8rUDVk)
# 配置文件 将eto.config.yaml 重命名为config.yaml 并修改配置文件为你的配置
mv eto.config.yaml config.yaml
# mod 包管理
go mod tidy
# 编译
go build -o eto-gateway
# 运行
./eto-gateway
# 如果你的服务正常运行,你可以通过curl访问登陆接口测试 post 请求 body 为json格式 {"accountname":"","password":""}
curl -X POST http://localhost:8080/login -d '{"accountname":"admin","password":"admin"}' -H "Content-Type: application/json"
# 获取到的数据中 data 为游戏token base64编码后的数据
{
"code": 0,
"data": "MMAjO5ubD7LawXw/....",
"msg": "登录成功"
}
#注意 新版本登陆游戏和注册游戏的前置路由增加/base/ 例如登陆游戏的路由为 /d_taiwan/dnfLogin 新版本为 /base/d_taiwan/dnfLogin
# 完整的登陆游戏的路由为 /base/d_taiwan/dnfLogin
# 完整的注册游戏的路由为 /base/d_taiwan/Register
# 传递参数不变
QQ群: 575053531