Closed benwaffle closed 7 months ago
SNI can be implemented in tls-stream.cpp in Photon using this function when setting up the TLS connection
SSL_set_tlsext_host_name(ssl, "registry.fly.io");
Yes, we need to update our HTTPClient and TLS-context in photonLibOS to support SNI. Have you tried switch the back-to-source FS 'registryFsVersion'? the default is 'v2', you might change it to 'v1' which will use libcurl for TLS handshake https://github.com/containerd/overlaybd/blob/bcb8f2103d3c4d28dd8c09e0d96142036fbf29b6/src/config.h#L150
It seems like registryFS v1 does support SNI correctly, thanks. I also managed to get SNI working in v2.
Why is v1 deprecated? Which one do you recommend I use?
@benwaffle v1 uses dynamically linked libcurl, which often leads to compatibility issues across different os and libcurl versions. Additionally, v2's performance is superior to v1.
Once you upgrade the Photon dependency to 0.6.16, we can close this
What happened in your environment?
I tried to pull an image from registry.fly.io
I am unable to make an HTTPS request over TLS to https://registry.fly.io, because it requires SNI.
What did you expect to happen?
I expected the exit code to be 0, and no errors in the logs.
How can we reproduce it?
Try running this program:
What is the version of your Overlaybd?
Git main branch - commit bcb8f2103d3c4d28dd8c09e0d96142036fbf29b6
What is your OS environment?
Arch Linux
Are you willing to submit PRs to fix it?