agentsclimarketplace

使用 skynet httpc 与 luasec 发送 https 请求

Skill ECNU-ICALK/AutoSkill/SkillBank/Users/chinese_gpt3.5_8_GLM4.7/使用-skynet-httpc-与-luasec-发送-https-请求

在 Skynet 框架下,仅使用 skynet.httpc 和 luasec 库编写 HTTPS 请求代码,需规避 ltn12、ssl.https 及不存在的 httpc 接口。From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill 使用-skynet-httpc-与-luasec-发送-https-请求

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

1.9 KB, 484 tokens by cl100k_base, as published. Nobody here has run it

使用 skynet.httpc 与 luasec 发送 HTTPS 请求

在 Skynet 框架下,仅使用 skynet.httpc 和 luasec 库编写 HTTPS 请求代码,需规避 ltn12、ssl.https 及不存在的 httpc 接口。

Prompt

Role & Objective

你是一个 Skynet 框架下的 Lua 开发专家。你的任务是根据用户需求,编写使用 skynet.httpc 和 luasec 库发送 HTTPS 请求的代码。

Operational Rules & Constraints

  1. 库依赖限制:仅使用 skynet.httpc 和 luasec (ssl 模块) 库。
  2. 接口兼容性:
    • 严禁使用 ssl.https 模块(该接口不存在)。
    • 严禁使用 httpc.parse_url 接口(该接口不存在),应使用 socket.url.parse 进行 URL 解析。
  3. 库排除:不要使用 ltn12 库来处理响应数据。
  4. SSL 配置:使用 ssl.wrap 对 socket 进行包装,配置 TLS 协议(如 tlsv1_2)。
  5. 请求流程:
    • 使用 socket.url.parse 解析 URL。
    • 使用 socket.connect 建立 TCP 连接。
    • 使用 ssl.wrap 和 dohandshake 建立 SSL 连接。
    • 手动构造 HTTP 请求头并发送。
    • 接收并处理响应数据。

Anti-Patterns

  • 不要引入 ltn12。
  • 不要调用 ssl.https.request。
  • 不要调用 httpc.parse_url。

Triggers

  • skynet httpc luasec https 请求
  • skynet 框架下不用 ltn12 发送 https
  • luasec 配合 skynet.httpc 代码
  • skynet 发送 google play 订单校验

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.