Project link: https://github.com/cloudflare8/Cloudflare-worker-vpn/blob/main/Cloudflare%20worker%2001
- Register and set up a Cloudflare account
1.1 If you do not have a Cloudflare account yet, visit the Cloudflare registration page to create one.
1.2 Log in to Cloudflare, then click on the "Workers" tab in the dashboard.
1.3 If this is your first time using Cloudflare Workers, you may need to set up a Workers subdomain. Follow the prompts to complete the setup.
- Create a new Cloudflare Worker
2.1 In the Cloudflare Workers dashboard, click on "Create a Service".
2.2 Enter a service name, such as vpn-worker-service, and choose "HTTP handler" as the template, then click on "Create service".
2.3 Once created, you will be taken to the Worker editing page.
- Copy code from GitHub to Cloudflare Worker
3.1 Open the Cloudflare-worker-vpn project in your browser.
3.2 Open the Cloudflare worker 01 file and copy all the code from it.
3.3 Go back to the Cloudflare Worker editing page and replace the default code with the code copied from GitHub.
-
Add UUID variable
4.1 In the Cloudflare Worker editing page, add the UUID variable. -
Deploy and test Cloudflare Worker
5.1 Click on the "Save and Deploy" button at the top right of the page to deploy your Worker to Cloudflare.
5.2 After deployment, click on the "Preview" button in "Quick Edit" to test if the generated VPN subscription link is working correctly.
5.3 If everything is working fine, you will be able to access your VPN service by using the link that includes the UUID.
- Completion
Your Cloudflare Worker has now been successfully deployed and includes a custom UUID variable. You can use the generated link to access the VPN service.