arugal / frp-notify

一个专注于消息通知的 frp server manager plugin 实现,让你对进入 frps 的连接了如指掌。
Apache License 2.0
119 stars 29 forks source link

version:0.35.0 此版本以上 pool_count 数据类型错误 #14

Closed ideazw closed 3 years ago

ideazw commented 3 years ago

level=error msg="unmarshal request content [map[arch:amd64 hostname: metas:map[token:xxxxxxx var1:123 var2:234] os:windows pool_count:%!s(float64=5) privilege_key:1f1fcfd8468d5a465ea2bbd91c37ec82 run_id: timestamp:%!s(float64=1.623309925e+09) user:ideazw version:0.35.0]] error: json: cannot unmarshal number into Go struct field Login.pool_count of type string \n" 解决: /pkg/types/types.go:56 改为 PoolCount int json:"pool_count"

arugal commented 3 years ago

有兴趣提交一个 PR 修复一下吗?

ideazw commented 3 years ago

有兴趣提交一个 PR 修复一下吗?

好的。

arugal commented 3 years ago

https://github.com/arugal/frp-notify/blob/a3ef63decd2bcf1150789029fe2b8d48a2e5d6c5/pkg/controller/controller.go#L122

@ideazw frp 有提供当前的版本,我们可以通过 version 来兼容多个版本。

arugal commented 3 years ago

https://github.com/arugal/frp-notify/blob/a3ef63decd2bcf1150789029fe2b8d48a2e5d6c5/pkg/controller/controller.go#L122

@ideazw frp 有提供当前的版本,我们可以通过 version 来兼容多个版本。

我看了 frp 的源码, 并没有变更 APIVersion

ideazw commented 3 years ago

https://github.com/arugal/frp-notify/blob/a3ef63decd2bcf1150789029fe2b8d48a2e5d6c5/pkg/controller/controller.go#L122

@ideazw frp 有提供当前的版本,我们可以通过 version 来兼容多个版本。

我看了 frp 的源码, 并没有变更 APIVersion

我没仔细看历史记录,我的错,并没有修改类型。 https://github.com/fatedier/frp/blob/9a849a29e94e969d99b41c8f3bb70c89ea46fdd3/pkg/msg/msg.go#L76

arugal commented 3 years ago

@ideazw 应该是我写错了,可以将 string 修改为 int

whosphp commented 3 years ago

@arugal 你好,能发布一个新版本吗?当前的最新 release 还是有这个问题

arugal commented 3 years ago

@arugal 你好,能发布一个新版本吗?当前的最新 release 还是有这个问题

已经发布 0.2.1