Educational repo demonstrating how to set up and run V2Ray Core on Ubuntu as a local SOCKS/HTTP proxy — ideal for personal or lab use.
No private credentials are stored here.
Clone, follow the guide, and create your own secure config.json.
created by : Alireza Sardaripour
Official releases: v2fly/v2ray-core v5.40.0
sudo apt update
sudo apt install -y curl unzipmkdir -p ~/Desktop/v2ray
cd ~/Desktop/v2raycurl -L -O https://github.com/v2fly/v2ray-core/releases/download/v5.40.0/v2ray-linux-64.zip(Optional) Verify checksum:
curl -L -O https://github.com/v2fly/v2ray-core/releases/download/v5.40.0/v2ray-linux-64.zip.dgst
sha256sum v2ray-linux-64.zip
cat v2ray-linux-64.zip.dgst | grep SHA256unzip v2ray-linux-64.zip -d ./v2ray-core
cd v2ray-core
chmod +x v2ray v2ctl
./v2ray version~/Desktop/v2ray/
├── v2ray
├── v2ctl
├── geoip.dat
├── geosite.dat
└── config.json # ← your private file (not committed)
Copy template and edit with your server details:
cp config/config.example.json ./config.json
nano config.jsonSee config/README.md for explanations.
./v2ray run config.jsonbin/run.sh # start
bin/stop.sh # stopUse the environment toggles:
source bin/proxy-env-on.sh # enable
source bin/proxy-env-off.sh # disableHTTP → 127.0.0.1:10809
SOCKS5 → 127.0.0.1:10808
Test:
curl --proxy http://127.0.0.1:10809 https://ifconfig.io
curl --socks5-hostname 127.0.0.1:10808 https://ifconfig.ioSee systemd/ for ready-to-use service units.
bin/proxy-env-off.sh
pkill -f "v2ray run config.json" || true- Never expose your real UUID or host.
- Always bind inbounds to
127.0.0.1. - Keep logs minimal (
warning).