Preface: The reason for such a complicated setup is because we cannot directly access the openai API interface, so we need to rely on these magic tricks.#
1. Register and log in to Cloudflare | Web Performance & Security#
2. Add a website#
Enter the domain name you want to migrate on the redirected page and click "Add Site".
Choose the free package, it doesn't matter if you have money or not.
Add a temporary DNS record.
Click "Continue" and you will be redirected to a page where you can modify the DNS server address.
3. Modify the namesilo DNS server#
Switch to the namesilo console.
Change the existing three ns to cf's, and click "Submit".
Go back to the cf interface, click "Check" to see if it's updated. It may not update immediately, so you need to wait for a while.
After a long wait (I actually waited for half an hour), it finally updated, and you will see the following interface.
Go back to the website interface again, and you will see that the domain name you just added is now in active status.
In the same interface, scroll down and find the "workers" tab, and click "Create a new service".
After creating, you will be redirected to the details page of the current service. Click the "Trigger" button to bind a custom domain name to our service.
Click "Quick Edit" in the upper right corner.
Copy the code from config-woker.js and replace the current code, then click "Deploy" and wait for a minute, and it's done.
Now, let's take OpenCat - Native iOS/macOS/iPadOS client for OpenAI/ChatGPT as an example to demonstrate how to use it. Most mainstream chatgpt shell websites should support this kind of setup.
Go to the settings page of opencat.
Go back to the main page and test it.
Don't try it with my domain name, it will be deleted after the demonstration.