snowdreamtech/frp

docker 启动容器成功但是frps.ini配置没有生效

Closed this issue · 4 comments

docker logs frps
2023/11/07 01:49:55 [I] [root.go:102] frps uses config file: /etc/frp/frps.toml
2023/11/07 01:49:56 [I] [service.go:200] frps tcp listen on 0.0.0.0:7000
2023/11/07 01:49:56 [I] [root.go:111] frps started successfully
2023/11/07 02:03:45 [I] [root.go:102] frps uses config file: /etc/frp/frps.toml
2023/11/07 02:03:45 [I] [service.go:200] frps tcp listen on 0.0.0.0:7000
2023/11/07 02:03:45 [I] [root.go:111] frps started successfully
2023/11/07 02:09:12 [I] [root.go:102] frps uses config file: /etc/frp/frps.toml
2023/11/07 02:09:12 [I] [service.go:200] frps tcp listen on 0.0.0.0:7000
2023/11/07 02:09:12 [I] [root.go:111] frps started successfully

我配置的是
[common]
bind_port= 5544
kcp_bind_port = 5544
dashboard_user= adsni
dashboard_pwd= admin15sa
dashboard_port= 7999
token = xxxxx

配置文件在frp版本更新后从frps.ini变为了frps.toml
请按照以下格式将配置写入frps.toml

bindPort = 7000
auth.method = "token"
auth.token = "12345678"
 
webServer.addr = "0.0.0.0"
webServer.port = 7500
webServer.user = "admin"
webServer.password = "admin123456"

并使用以下命令来创建docker容器
docker run --restart=always --network host -d -v /etc/frp/frps.toml:/etc/frp/frps.toml --name frps snowdreamtech/frps

懂了谢谢

配置文件在frp版本更新后从frps.ini变为了frps.toml 请按照以下格式将配置写入frps.toml

bindPort = 7000
auth.method = "token"
auth.token = "12345678"
 
webServer.addr = "0.0.0.0"
webServer.port = 7500
webServer.user = "admin"
webServer.password = "admin123456"

并使用以下命令来创建docker容器 docker run --restart=always --network host -d -v /etc/frp/frps.toml:/etc/frp/frps.toml --name frps snowdreamtech/frps
按这个配置得到以下报错怎么解决啊
error unmarshaling JSON: while decoding JSON: json: cannot unmarshal string into Go value of type v1.ServerConfig