Closed alexburt closed 1 year ago
Thank you so much!
Fixed in https://github.com/infinet/xt_wgobfs/commit/d246f3f85bbbf90f64dbe47c256e8189bd0992e0.
cpu_to_le64( mem ) + 42 is not equal to cpu_to_le64( mem + 42 )
cpu_to_le64( *mem + 42 ) will have is different result on little endian and big endian devices
I think we have to do cpu_to_le64 first and add 42 after.
You are right, they are not the same. However, here it is used to generate pseudo-random bytes for padding. Its peer does not need to regenerate the same pseudo-random bytes.
thank you!
I cant establish connection between my Openwrt router and Linux PC. Problem is in operations like "chacha_input = *p64 + 42;" which will give a different result on a different machines. https://github.com/infinet/xt_wgobfs/blob/main/src/xt_WGOBFS_main.c#L48
Very good project. Thank you! patch: wgobfs_big_endian.txt