bash <(curl -Ls https://raw.githubusercontent.com/nyeinkokoaung404/gcp-v2ray/refs/heads/main/cloud-run.sh)
This project allows you to deploy a VLESS proxy server over WebSocket using Xray-core, fully containerized with Docker and deployed to Google Cloud Run, fronted by Google Cloud CDN.
- ✔️ VLESS over WebSocket (WS)
- ✔️ Deployed on Google Cloud Run (serverless + autoscaling)
- ✔️ Works with Google Cloud Load Balancer + CDN
- ✔️ Dockerized and easy to deploy
- ✔️ Designed for domain fronting, bypassing, FreeNet
- ❌ Google Cloud IPs starting with
34.*and35.*do NOT work reliably with V2Ray/VLESS. - ✅ Use a custom domain with HTTPS via Google Load Balancer + CDN for proper functionality.
{
"inbounds": [
{
"port": 8080,
"protocol": "vless",
"settings": {
"clients": [
{
"id": "ba0e3984-ccc9-48a3-8074-b2f507f41ce8",
"level": 0
}
],
"decryption": "none"
},
"streamSettings": {
"network": "ws",
"wsSettings": {
"path": "/@nkka404"
}
}
}
],
"outbounds": [
{
"protocol": "freedom"
}
]
}🔐 Replace the UUID with your own for security.
docker build -t gcr.io/YOUR_PROJECT_ID/vless-ws .docker push gcr.io/YOUR_PROJECT_ID/vless-wsgcloud run deploy vless-ws \
--image gcr.io/YOUR_PROJECT_ID/vless-ws \
--platform managed \
--region us-central1 \
--allow-unauthenticated \
--port 8080☑️ Make sure to allow unauthenticated access.
- Go to Google Cloud Console > Network services > Load balancing
- Create a new HTTP(S) Load Balancer
- Add your Cloud Run service as a backend
- Enable CDN on the backend
- Attach a custom domain and SSL certificate
🔒 HTTPS is handled by Google; no need to configure TLS in Xray.
Use the following settings in your client app:
| Setting | Value |
|---|---|
| Protocol | VLESS |
| Address | your.domain.com |
| Port | 443 (HTTPS) |
| UUID | ba0e3984-ccc9-48a3-8074-b2f507f41ce8 |
| Encryption | none |
| Transport | WebSocket (WS) |
| WS Path | /tg-@nkka404 |
| TLS | Yes (via Google CDN) |
- ✅ Windows: V2RayN
- ✅ Android: SagerNet / V2RayNG
- ✅ iOS: Shadowrocket / V2Box
- ✅ macOS/Linux: Xray CLI
- Use random UUIDs and WS paths
- Combine with Cloudflare DNS and proxy
- Rotate domains if needed
- Enable logs in debug environments only
This project is licensed under the MIT License.
Made with ❤️ by 404\2.0