@@ -22,10 +22,10 @@ def timestamp_to_str(timestamp):
22
22
23
23
# 处理Login操作:frpc登录frps
24
24
def login_operation (data ):
25
- str_fmt = "frp-client登录\n frp版本:{}\n 系统类型:{}\n 系统架构:{}\n 登录时间:{}\n 连接池大小:{}"
25
+ str_fmt = "frp-client登录\n frp版本:{}\n 系统类型:{}\n 系统架构:{}\n 登录时间:{}\n IP端口:{} \ n 连接池大小:{}"
26
26
txt = str_fmt .format (
27
27
data ['version' ], data ['os' ],
28
- data ['arch' ], timestamp_to_str (data ['timestamp' ]), data ['pool_count' ]
28
+ data ['arch' ], timestamp_to_str (data ['timestamp' ]), data . get ( "client_address" , "" ) , data ['pool_count' ]
29
29
)
30
30
return txt
31
31
@@ -34,15 +34,15 @@ def login_operation(data):
34
34
def newproxy_operation (data ):
35
35
run_id = data ['user' ]['run_id' ]
36
36
proxy_type = data ['proxy_type' ]
37
- txt = "frp-client建立穿透代理\n 主机ID:{}\n 代理名称:{}\n 代理类型:{}\n " .format (
37
+ txt = "frp-client建立穿透代理\n 主机ID:{}\n 代理名称:{}\n 代理类型:{}" .format (
38
38
run_id , data ['proxy_name' ], proxy_type
39
39
)
40
40
if proxy_type in ["tcp" , "udp" ]:
41
41
if 'remote_port' in data :
42
- txt += "远程端口 :{}\n " .format (data ['remote_port' ])
42
+ txt += "\n 远程端口 :{}" .format (data ['remote_port' ])
43
43
elif proxy_type in ["http" , "https" ]:
44
44
if 'subdomain' in data :
45
- txt += "子域名 :{}.{}\n " .format (data ['subdomain' ], subdomain_host )
45
+ txt += "\n 子域名 :{}.{}" .format (data ['subdomain' ], subdomain_host )
46
46
return txt
47
47
48
48
# 处理NewUserConn操作:用户连接内网机器;用户(ssh)-->云服务器(frps)-->内网主机(frpc)
0 commit comments