启动frp时报错error unmarshaling JSON: while decoding JSON: json: cannot unmarshal string into Go value of type v1.ServerConfig
原因:因为frp0.53.2版本中配置文件是按照json格式编写的,如果是字符串格式的值是需要加双引号的,否则会报错。
比如:frps.toml配置文件中
vhostHTTPPort = 8080
bind_addr = “XXX.XXX.XXX.XXX”
bindPort = 7000
webServer.addr = “127.0.0.1”
webServer.port = 7500
webServer.user = “admin”
webServer.password = “admin”
log.to = “./frps.log”
log.level = “info”
log.maxDays = 3
bind_addr这种ip地址就是字符串,是必须加双引号的,如果不加,在启动frps时就会报错误。
将IP地址加上双引号后,再执行就可以正常启动了。
相关类似需要加引号的问题也有:
token in login doesn't match token from configuration
https://blog.csdn.net/weixin_51399637/article/details/139067901
原文地址:
https://blog.csdn.net/scottchenrui2017/article/details/135400985