vernesong / OpenClash

A Clash Client For OpenWrt
MIT License
16.8k stars 3.09k forks source link

Dlercloud 账户登录失败 #1491

Closed FrancisKong closed 3 years ago

FrancisKong commented 3 years ago

调试后发现是因为下面的代码中的 curl 没有用 json 格式传递数据

https://github.com/vernesong/OpenClash/blob/9d63c27d79a84051f8082d4ffc4aa588fcf031d2/luci-app-openclash/luasrc/controller/openclash.lua#L314

这段 curl 应该修改为:

curl -sL -H "Content-Type: application/json" -d '{"email":"%s"', "passwd":"%s"}' -X POST https://dler.cloud/api/v1/login
vernesong commented 3 years ago

不加你返回什么错误

FrancisKong commented 3 years ago

不加你返回什么错误

不加返回 402 状态码,加了后就能正常返回了,确认账号密码都是正确的