Skip to content

alireza-sardar/v2ray-ubuntu-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🛰️ V2Ray on Ubuntu — Local Proxy (SOCKS 10808 / HTTP 10809)

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

🚀 1 · Download & Install V2Ray Core

Official releases: v2fly/v2ray-core v5.40.0

Step 1 — Prerequisites

sudo apt update
sudo apt install -y curl unzip

Step 2 — Create working directory

mkdir -p ~/Desktop/v2ray
cd ~/Desktop/v2ray

Step 3 — Download release

curl -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 SHA256

Step 4 — Extract and make executable

unzip v2ray-linux-64.zip -d ./v2ray-core
cd v2ray-core
chmod +x v2ray v2ctl
./v2ray version

Step 5 — Move files to main folder

~/Desktop/v2ray/
├── v2ray
├── v2ctl
├── geoip.dat
├── geosite.dat
└── config.json   # ← your private file (not committed)

⚙️ 2 · Create Config File

Copy template and edit with your server details:

cp config/config.example.json ./config.json
nano config.json

See config/README.md for explanations.


▶️ 3 · Run V2Ray

A) Quick start

./v2ray run config.json

B) Using helper scripts

bin/run.sh    # start
bin/stop.sh   # stop

🌐 4 · Enable Proxies for Your Apps

Use the environment toggles:

source bin/proxy-env-on.sh   # enable
source bin/proxy-env-off.sh  # disable

HTTP → 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.io

🧩 5 · (Optional) Run as Systemd Service

See systemd/ for ready-to-use service units.


🧰 6 · Uninstall / Cleanup

bin/proxy-env-off.sh
pkill -f "v2ray run config.json" || true

🔒 7 · Security Notes

  • Never expose your real UUID or host.
  • Always bind inbounds to 127.0.0.1.
  • Keep logs minimal (warning).

🧠 Learn More

About

Minimal, secure, and educational guide for setting up a local V2Ray proxy (SOCKS + HTTP) on Ubuntu — from download to systemd service.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages