How to Install and Configure V2Ray Proxy Server on Ubuntu 22.04

Sdílet
Vložit
  • čas přidán 28. 07. 2024
  • In this video, we have an exciting tutorial for you. We'll be setting up a V2Ray proxy on an Ubuntu 22.04 VPS. This will allow you to enhance your online privacy.
    V2Ray is a powerful open-source network proxy that's designed to help increase online privacy, and improve network performance. It's highly flexible and supports multiple protocols, making it suitable for a wide range of applications.
    Get Kamatera VPS (30 days free trial)
    zacs-tech.com/go/kamatera-vps/
    Get RedHosting VPS
    zacs-tech.com/go/rosehosting/
    Get InterServer VPS
    zacs-tech.com/go/interserver/
    Get Hawk Host VPS
    zacs-tech.com/go/hawkhost/
    Register domain name
    tinyurl.com/y8hz9seu
    Commands:
    curl -O htts://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh (add the p so it is https)
    sudo bash install-release.sh
    sudo nano /usr/local/etc/v2ray/config.json
    V2Ray configuration file
    {
    "log": {
    "loglevel": "warning",
    "access": "/var/log/v2ray/access.log",
    "error": "/var/log/v2ray/error.log"
    },
    "inbounds": [
    {
    "port": 10000,
    "listen":"127.0.0.1",
    "protocol": "vmess",
    "settings": {
    "clients": [
    {
    "id": "zcbbcndicnicmdkcmdcmckdmoenn",
    "alterId": 64
    }
    ]
    },
    "streamSettings": {
    "network": "ws",
    "wsSettings": {
    "path": "/ray"
    }
    }
    }
    ],
    "outbounds": [
    {
    "protocol": "freedom",
    "settings": {}
    }
    ]
    }
    Nginx web server
    server {
    listen 80;
    server_name example.com;
    index index.html;
    root /usr/share/nginx/html/;
    access_log /var/log/nginx/v2ray.access;
    error_log /var/log/nginx/v2ray.error;
    location /ray { # Consistent with the path of V2Ray configuration
    if ($http_upgrade != "websocket") { # Return 404 error when WebSocket upgrading negotiate failed
    return 404;
    }
    proxy_redirect off;
    proxy_pass 127.0.0.1:10000; # Assume WebSocket is listening at localhost on port of 10000
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header Host $host;
    Show real IP in v2ray access.log
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
    }
    Linux Desktop
    {
    "inbounds": [
    {
    "port": 1090,
    "listen": "127.0.0.1",
    "protocol": "socks",
    "sniffing": {
    "enabled": true,
    "destOverride": ["http", "tls"]
    },
    "settings": {
    "auth": "noauth",
    "udp": false
    }
    }
    ],
    "outbounds": [
    {
    "protocol": "vmess",
    "settings": {
    "vnext": [
    {
    "address": "example.com",
    "port": 443,
    "users": [
    {
    "id": "dddfffffffsscsscsccscedececececeeccdcd1",
    "alterId": 0
    }
    ]
    }
    ]
    },
    "streamSettings": {
    "network": "ws",
    "security": "tls",
    "wsSettings": {
    "path": "/ray"
    }
    }
    }
    ]
    }
    Windows
    {
    "inbounds": [
    {
    "port": 1090,
    "listen": "127.0.0.1",
    "protocol": "socks",
    "sniffing": {
    "enabled": true,
    "destOverride": ["http", "tls"]
    },
    "settings": {
    "auth": "noauth",
    "udp": false
    }
    }
    ],
    "outbounds": [
    {
    "protocol": "vmess",
    "settings": {
    "vnext": [
    {
    "address": "example.com",
    "port": 443,
    "users": [
    {
    "id": "ggrbgrbgrbgnbmmbmbmbffff",
    "alterId": 0
    }
    ]
    }
    ]
    },
    "streamSettings": {
    "network": "ws",
    "security": "tls",
    "wsSettings": {
    "path": "/ray"
    }
    }
    }
    ]
    }
    DISCLAIMER: This video and description contain affiliate links, which means that if you click on one of the product links, I’ll receive a small commission. This helps support the channel and allows us to continue to make videos like this. Thank you for your support!

Komentáře • 12

  • @HamedAbdollahpour
    @HamedAbdollahpour Před 4 měsíci

    Surprisingly I'm also on Contabo for years (recommended hosting) and I was looking for such a tutorial. Thank you!

  • @acronproject
    @acronproject Před 6 měsíci

    Thanks so much

  • @JustinEckert-fn4nu
    @JustinEckert-fn4nu Před 2 měsíci

    I was able to do this on my home host ubuntu machine by forwarding port 80 and 10000 to my ubuntu Ip address in my router.

  • @Jasonyang-uz7vf
    @Jasonyang-uz7vf Před 5 měsíci

    Hi Brother,Is it possible to set up my linux without Desktop.That's right, it's the linux server version

    • @zacstech
      @zacstech  Před 5 měsíci

      Ubuntu server doesn't have any Graphical User Interface or GUI by default

  • @derekchan1045
    @derekchan1045 Před 4 měsíci

    Great tutorial. Is it possible to connect to the v2ray server using an Android or Iphone ?

  • @user-nr8fs9ei8t
    @user-nr8fs9ei8t Před 7 měsíci

    I get nginx test failed
    How can i fix that?

    • @emado.7834
      @emado.7834 Před 7 měsíci

      had the same issue, you have to comment out one of the lines -> "Show real ip ..." inside the `conf.d`

    • @user-nr8fs9ei8t
      @user-nr8fs9ei8t Před 7 měsíci

      @@emado.7834 How can I do this?
      Give me an example of this please, I am a beginner

  • @editrisiandi396
    @editrisiandi396 Před 8 měsíci

    Hi Brother, I'm from Indonesia