IPv6 support for HTTPS Outcalls

Hi! I’m planning on making calls to the OpenAI api endpoints, but currently the limitation on IPv4 destinations is a blocker. Is there any proxy solution that I can use to get around this?
If not, would it be sensible to write an off-chain proxy between the canister and the openai api endpoints? (I’m really trying to avoid any off-chain component)

For OpenAI, you need a proxy anyway because, in addition to not supporting IPv6, they also do not support idempotent answers.

Various solutions were shared on the forum. @zensh literally shared a solution today: Idempotent Proxy Show: proxy HTTPS Outcalls to any Web2 service

Additionally, @massimoalbarello and @ilbert also provide solutions. You might find it documented them in this thread: Non replicated HTTPS outcalls or I’m sure they will be happy to share more information as well.

I would go with one of those solutions. However, if you are really looking for something else, like coding it yourself, you can have a look at my experiment where I coded some serverless functions on Firebase as a proxy. But that’s more for hacking around: https://github.com/peterpeterparker/juno-openai

4 Likes

Thanks for sharing these resources! They are exactly what I needed :wink:

1 Like

A online Cloudflare Worker version for testing is available at:

https://idempotent-proxy-cf-worker.zensh.workers.dev

2 Likes