Closed qiu-x closed 1 month ago
Ok, I already figured out what caused the problem. I had to remove go.mod
and go.sum
in cffi_dist
, because the files made the shared libs use the code on GitHub and ignore my modifications. Perhaps those files should be generally removed from the repo to avoid similar confusion in the future?
@qiu-x
These two files are for the dependency managenent for the shared lib and required for the build process with xgo
.
Yeah if you are doing modifications in the tls client code itself you need to the the shared library project to actualy use the specific modified version of the tls client and not the one published on github.
You can use a replace statement inside the go.mod targeting the local modified tls_client:
I also commented out the line in the go.mod file.
// replace github.com/bogdanfinn/tls-client => ../
TLS client version
master and 1.7.5
System information
Arch Linux
Issue description
When using the shared library version of tls-client, the next request does not contain the "pre_shared_key" in the "extensions" section of the test at https://tls.peet.ws/api/all, yet the Go version works as expected.
Steps to reproduce / Code Sample
I added the
tls.UtlsPreSharedKeyExtension
extension to thechrome_124
profile in the following way:and after building the library, I tested it with this program:
program output: shared_lib_output.txt (The second request is missing the "pre_shared_key")
I also made a Go program to test whether the issue was only present in the shared lib: main.go
However the Go version worked correctly (golang_output.txt) and the "pre_shared_key" is present in the second request response, which leads me to believe that there is some kind of issue in the shared lib.
Please let me know if you noticed any issues with my testing approach or if there is a way to get around this problem.