mirror of
https://github.com/wangyu-/UDPspeeder.git
synced 2025-01-31 12:19:35 +08:00
just commit
This commit is contained in:
parent
11730a8cbf
commit
c12a1326fc
8
main.cpp
8
main.cpp
@ -442,9 +442,9 @@ int client_event_loop()
|
|||||||
mylog(log_warn,"huge packet,data len=%d (>%d).strongly suggested to set a smaller mtu at upper level,to get rid of this warn\n ",data_len,mtu_warn);
|
mylog(log_warn,"huge packet,data len=%d (>%d).strongly suggested to set a smaller mtu at upper level,to get rid of this warn\n ",data_len,mtu_warn);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(cook_rm_crc32(data,data_len)!=0)
|
if(de_cook(data,data_len)!=0)
|
||||||
{
|
{
|
||||||
mylog(log_debug,"cook_rm_crc32 check error");
|
mylog(log_debug,"de_cook error");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -602,9 +602,9 @@ int server_event_loop()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(cook_rm_crc32(data,data_len)!=0)
|
if(de_cook(data,data_len)!=0)
|
||||||
{
|
{
|
||||||
mylog(log_debug,"cook_rm_crc32 check error");
|
mylog(log_debug,"de_cook error");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
10
packet.cpp
10
packet.cpp
@ -301,7 +301,7 @@ int put_crc32(char * s,int &len)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cook_rm_crc32(char * s,int &len)
|
int de_cook(char * s,int &len)
|
||||||
{
|
{
|
||||||
if(!disable_xor)decrypt_0(s,len,key_string);
|
if(!disable_xor)decrypt_0(s,len,key_string);
|
||||||
if(!disable_obscure)
|
if(!disable_obscure)
|
||||||
@ -313,7 +313,13 @@ int cook_rm_crc32(char * s,int &len)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return rm_crc32(s,len);
|
int ret=rm_crc32(s,len);
|
||||||
|
if(ret!=0)
|
||||||
|
{
|
||||||
|
mylog(log_debug,"rm_crc32 fail\n");
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
int rm_crc32(char * s,int &len)
|
int rm_crc32(char * s,int &len)
|
||||||
{
|
{
|
||||||
|
2
packet.h
2
packet.h
@ -41,5 +41,5 @@ int put_conv(u32_t conv,const char * input,int len_in,char *&output,int &len_out
|
|||||||
int get_conv(u32_t &conv,const char *input,int len_in,char *&output,int &len_out );
|
int get_conv(u32_t &conv,const char *input,int len_in,char *&output,int &len_out );
|
||||||
int put_crc32(char * s,int &len);
|
int put_crc32(char * s,int &len);
|
||||||
int rm_crc32(char * s,int &len);
|
int rm_crc32(char * s,int &len);
|
||||||
int cook_rm_crc32(char * s,int &len);
|
int de_cook(char * s,int &len);
|
||||||
#endif /* PACKET_H_ */
|
#endif /* PACKET_H_ */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user