lester

lester

cloudflare settings openai proxy

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#

image

2. Add a website#

image
image

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.
image
Add a temporary DNS record.

image

Click "Continue" and you will be redirected to a page where you can modify the DNS server address.
image

3. Modify the namesilo DNS server#

Switch to the namesilo console.
image

image

Change the existing three ns to cf's, and click "Submit".

image

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.
image

After a long wait (I actually waited for half an hour), it finally updated, and you will see the following interface.
image

Go back to the website interface again, and you will see that the domain name you just added is now in active status.

image

In the same interface, scroll down and find the "workers" tab, and click "Create a new service".
image

image

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.
image

Click "Quick Edit" in the upper right corner.

image

Copy the code from config-woker.js and replace the current code, then click "Deploy" and wait for a minute, and it's done.

image

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.

image

Go back to the main page and test it.
image

Don't try it with my domain name, it will be deleted after the demonstration.

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.