diff --git a/README.md b/README.md index 10138a4..2ce5f15 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Gobot is a powerful stateful API testing robot. It provides a graphical interfac [![](https://img.shields.io/badge/%E6%96%87%E6%A1%A3-Doc-2ca5e0?style=flat&logo=github)](https://pojol.github.io/gobot/#/) [![](https://img.shields.io/badge/Trello-Todo-2ca5e0?style=flat&logo=trello)](https://trello.com/b/8eDZ6h7n/) -[中文](https://github.com/pojol/gobot/driver/blob/master/README_CN.md) +[中文](https://github.com/pojol/gobot/blob/master/README_CN.md) ## Quick Installation @@ -35,7 +35,7 @@ Gobot is a powerful stateful API testing robot. It provides a graphical interfac ]]-- -- Users can load "modules" they want to use in the script. --- document https://pojol.gitee.io/gobot/#/zh-cn/script/meta +-- document https://pojol.github.io/gobot/#/ local http = require("http") -- request body @@ -77,6 +77,12 @@ end > Example message.lua is located in script/. Users can refer to its implementation and modify the protocol packet parsing method in their own projects ```lua -- message.lua +--[[ + | 2 byte | 1 byte | 2 byte | 2byte | | + |msg len | proto type | custom | msgid | | + | header | body | +]]-- + function TCPUnpackMsg(msglen, buf, errmsg) if errmsg ~= "nil" then return 0, "" @@ -87,7 +93,7 @@ function TCPUnpackMsg(msglen, buf, errmsg) local msgTy = msg:readi1() local msgCustom = msg:readi2() local msgId = msg:readi2() - local msgbody = msg:readBytes(msglen-(2+1+2+2), -1) + local msgbody = msg:readBytes(2+1+2+2, -1) return msgId, msgbody @@ -127,8 +133,8 @@ end ``` ## Try it out -Try the editor out [on website](http://43.134.38.169:7777) -driver server address http://43.134.38.169:8888 +Try the editor out [on website](http://47.120.59.203:7777) +driver server address http://47.120.59.203:8888 ## Preview [![image.png](https://i.postimg.cc/t4jMVjp1/image.png)](https://postimg.cc/PPS4B0Lh) diff --git a/README_CN.md b/README_CN.md index edd99c7..57ffd46 100644 --- a/README_CN.md +++ b/README_CN.md @@ -4,7 +4,7 @@ Gobot是一个功能强大的有状态API测试机器人。它提供图形界面 [![Go Report Card](https://goreportcard.com/badge/github.com/pojol/gobot/driver)](https://goreportcard.com/report/github.com/pojol/gobot/driver) [![](https://img.shields.io/badge/%E6%96%87%E6%A1%A3-Doc-2ca5e0?style=flat&logo=github)](https://pojol.gitee.io/gobot/#/) [![](https://img.shields.io/badge/Trello-Todo-2ca5e0?style=flat&logo=trello)](https://trello.com/b/8eDZ6h7n/) -[![CI](https://github.com/pojol/gobot/driver/actions/workflows/dockerimage.yml/badge.svg?branch=develop)](https://github.com/pojol/gobot/driver/actions/workflows/dockerimage.yml) + ## 快速安装 1. 进入最新的 [release页面](https://github.com/pojol/gobot/releases/tag/v0.4.4) 下载可执行程序 @@ -121,10 +121,7 @@ if msgid == 1002 then end ``` -## [在线试用](http://47.120.59.203:7777/) <-- 点击试用 -> 驱动端地址 http://47.120.59.203:8888 (弹出窗口填写 - -## [文档](https://pojol.gitee.io/gobot/#/) +### [在线试用](http://47.120.59.203:7777/) <-- 点击试用, 驱动端地址 http://47.120.59.203:8888 (弹出窗口填写 ## [视频演示](https://www.bilibili.com/video/BV1sS4y1z7Dg/?vd_source=7c2dfd750914fd5f8a9811b19f0bf447)