PBH-BTN / PeerBanHelper

自动封禁不受欢迎、吸血和异常的 BT 客户端,并支持自定义规则。PeerId黑名单/UserAgent黑名单/IP CIDR/假进度/超量下载/进度回退/多播追猎/连锁封禁/伪装检测 支持 qBittorrent/Transmission/Deluge/BiglyBT
GNU General Public License v3.0
539 stars 15 forks source link

启用规则报错,400 #151

Closed Gaojianli closed 3 weeks ago

Gaojianli commented 3 weeks ago

Version: 4.0.6 (6466d7b5)

Request:

curl 'http://localhost:8899/api/sub/rule/example' \
  -X 'PATCH' \
  -H 'accept: */*' \
  -H 'accept-language: en' \
  -H 'authorization: Bearer 55841685-94c5-43a4-a65b-5ba73f869f8e' \
  -H 'cache-control: no-cache' \
  -H 'content-type: text/plain;charset=UTF-8' \
  -H 'dnt: 1' \
  -H 'origin: http://localhost:5173' \
  -H 'pragma: no-cache' \
  -H 'priority: u=1, i' \
  -H 'referer: http://localhost:5173/' \
  -H 'sec-ch-ua: "Microsoft Edge";v="125", "Chromium";v="125", "Not.A/Brand";v="24"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "macOS"' \
  -H 'sec-fetch-dest: empty' \
  -H 'sec-fetch-mode: cors' \
  -H 'sec-fetch-site: cross-site' \
  -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36 Edg/125.0.0.0' \
  --data-raw '{"enabled":true}'

Response:

{"message":"IP黑名单订阅规则启用禁用参数错误","success":false}
Gaojianli commented 3 weeks ago

@PluieM

Ghost-chu commented 3 weeks ago

Try update to 4.0.7?

Gaojianli commented 3 weeks ago

Try update to 4.0.7?

still not work on 4.0.7 (013df2fd)

Gaojianli commented 3 weeks ago

破案了,这些接口全部用的formdata。咱们能修改成json吗?formdata没有类型,操作起来非常麻烦 @Ghost-chu

Ghost-chu commented 3 weeks ago

破案了,这些接口全部用的formdata。咱们能修改成json吗?formdata没有类型,操作起来非常麻烦 @Ghost-chu

这个接口我应该没动过,问一下 @PluieM 看看?

PluieM commented 3 weeks ago

容我调一下

PluieM commented 3 weeks ago

152 已调整