fix: add user field to frpc.ini for client identification

- frps assigns random clientID without user field
- Web UI matches clients by name, so all showed offline
- Now render_frpc_ini() writes user = <client-name>
- frps dashboard API returns user field for matching
This commit is contained in:
Your Name
2026-08-10 18:55:59 +08:00
parent 84d3ad7c75
commit 65455c55cf
+2
View File
@@ -501,6 +501,8 @@ def render_frpc_ini(client, server_addr, bind_port):
lines.append("[common]")
lines.append(f"server_addr = {server_addr}")
lines.append(f"server_port = {bind_port}")
# Set user so frps identifies this client by name (for dashboard matching)
lines.append(f"user = {client.name}")
lines.append("authentication_method = token")
lines.append(f"token = {token}")
# Admin API for `frpc reload` command