Skip to content

Defda3q/gcp-v2ray

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

⚑ VLESS over WebSocket (WS) on Google Cloud Run + CDN

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.


🌟 Features

  • βœ”οΈ 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

⚠️ Important Notice

  • ❌ Google Cloud IPs starting with 34.* and 35.* do NOT work reliably with V2Ray/VLESS.
  • βœ… Use a custom domain with HTTPS via Google Load Balancer + CDN for proper functionality.

πŸ”§ Configuration Overview

config.json

{
  "inbounds": [
    {
      "port": 8080,
      "protocol": "vless",
      "settings": {
        "clients": [
          {
            "id": "a3b7de87-b46f-4dcf-b6ed-5bf5ebe83167",
            "level": 0
          }
        ],
        "decryption": "none"
      },
      "streamSettings": {
        "network": "ws",
        "wsSettings": {
          "path": "/t.me/ragnarservers"
        }
      }
    }
  ],
  "outbounds": [
    {
      "protocol": "freedom"
    }
  ]
}

πŸ” Replace the UUID with your own for security.


🐳 Docker Deployment

Step 1: Build Docker Image

docker build -t gcr.io/YOUR_PROJECT_ID/vless-ws .

Step 2: Push to Container Registry

docker push gcr.io/YOUR_PROJECT_ID/vless-ws

Step 3: Deploy to Google Cloud Run

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


🌐 Setup Google CDN + Load Balancer

  1. Go to Google Cloud Console > Network services > Load balancing
  2. Create a new HTTP(S) Load Balancer
  3. Add your Cloud Run service as a backend
  4. Enable CDN on the backend
  5. Attach a custom domain and SSL certificate

πŸ”’ HTTPS is handled by Google; no need to configure TLS in Xray.


πŸ“² Client Configuration (V2Ray, Xray)

Use the following settings in your client app:

Setting Value
Protocol VLESS
Address your.domain.com
Port 443 (HTTPS)
UUID a3b7de87-b46f-4dcf-b6ed-5bf5ebe83167
Encryption none
Transport WebSocket (WS)
WS Path /notragnar
TLS Yes (via Google CDN)

πŸ§ͺ Tested Clients

  • βœ… Windows: V2RayN
  • βœ… Android: SagerNet / V2RayNG
  • βœ… iOS: Shadowrocket / V2Box
  • βœ… macOS/Linux: Xray CLI

πŸ›‘ Tips for Better Stealth

  • Use random UUIDs and WS paths
  • Combine with Cloudflare DNS and proxy
  • Rotate domains if needed
  • Enable logs in debug environments only

πŸ“„ License

This project is licensed under the MIT License.


πŸ‘€ Author

Made with ❀️ by Ragnar


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published