@@ -47,18 +47,18 @@ func (m *MITMServer) Run() {
47
47
48
48
for {
49
49
ctx := context .NewContext ()
50
- ctx .LogTamplate = fmt .Sprintf ("[clientId :%s]" , ctx .ContextId )
50
+ ctx .LogTamplate = fmt .Sprintf ("[contextId :%s]" , ctx .ContextId )
51
51
52
52
client , err := server .Accept ()
53
53
if err != nil {
54
54
yaklog .Errorf ("%s Accept Client Connection Failed : %v" , ctx .LogTamplate , err )
55
55
continue
56
56
}
57
57
58
- ctx .LogTamplate = fmt .Sprintf ("%s [clientIP :%s] [%s]" , ctx .LogTamplate , client .RemoteAddr ().String (), colorutils .SetColor (colorutils .YELLOW_COLOR_TYPE , "TCP" ))
58
+ ctx .LogTamplate = fmt .Sprintf ("%s [clientIp :%s] [%s]" , ctx .LogTamplate , client .RemoteAddr ().String (), colorutils .SetColor (colorutils .YELLOW_COLOR_TYPE , "TCP" ))
59
59
reg := regexp .MustCompile (`:\d+$` )
60
- ctx .Client2MitmLog = fmt .Sprintf ("[clientId :%s] [%s => %s]" , ctx .ContextId , client .RemoteAddr ().String (), reg .FindString (client .LocalAddr ().String ()))
61
- ctx .Mitm2ClientLog = fmt .Sprintf ("[clientId :%s] [%s => %s]" , ctx .ContextId , reg .FindString (client .LocalAddr ().String ()), client .RemoteAddr ().String ())
60
+ ctx .Client2MitmLog = fmt .Sprintf ("[contextId :%s] [%s => %s]" , ctx .ContextId , client .RemoteAddr ().String (), reg .FindString (client .LocalAddr ().String ()))
61
+ ctx .Mitm2ClientLog = fmt .Sprintf ("[contextId :%s] [%s => %s]" , ctx .ContextId , reg .FindString (client .LocalAddr ().String ()), client .RemoteAddr ().String ())
62
62
63
63
yaklog .Infof ("%s New Client Connection Successfully Established" , ctx .LogTamplate )
64
64
0 commit comments