VPN for All is a Chrome extension that connects to V2Ray / VLESS / VMess / Trojan proxy servers and routes all your browser traffic through a secure encrypted tunnel. Just paste your config link and connect β it's that simple.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β VPN4All β Connected β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β [Connect] [Profiles] [Stats] β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β
β Paste V2Ray / VLESS / VMess / Trojan Config Link β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β vless://uuid@server.com:443?security=tls&... β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Type VLESS β β
β β Server server.com β β
β β Port 443 β β
β β Name My Server β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β
β [+ Add to Profiles] [Connect] ββββββββββββ β
β β
β Paste a vless://, vmess://, or trojan:// link to connect β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β VPN4All β Connected β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β [Connect] [Profiles] [Stats] β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β
β π No saved profiles yet. β
β β
β Paste a config link in the Connect tab and save it. β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β VPN4All β Connected β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β [Connect] [Profiles] [Stats] β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β TRAFFIC STATISTICS β
β β
β β² 1.2 MB βΌ 5.7 MB β
β 340 B/s β 1.2 KB/s β β
β Upload Download β
β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β CONNECTION β
β β
β Status β Connected β
β Connected Since 10:32:45 AM β
β Active Profile My Server β
β β
β [βββββββββββββββββββββ Disconnect ββββββββββββββββββββββ] β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- β
Instant connect β Paste any
vless://,vmess://, ortrojan://link and connect in one click - β Multi-profile β Save and switch between multiple server profiles
- β All protocols supported β VLESS, VMess, Trojan (with Reality, XTLS, WebSocket, gRPC, TCP, etc.)
- β Real-time traffic stats β Monitor upload/download speed and total data usage
- β Proxy isolation β Routes only Chrome/Chromium traffic, not system-wide
- β PER-PROFILE support β Each Chrome profile can use a different server on a different port
- β Lightweight β Minimal UI, no bloat, just works
- β Open source β MIT licensed, fully transparent
| Protocol | Status |
|---|---|
| VLESS (with Reality, XTLS, Vision) | β |
| VMess (with AEAD, WebSocket, gRPC) | β |
| Trojan | β |
| VLESS + TCP | β |
| VLESS + WebSocket + TLS | β |
| VLESS + gRPC | β |
| VLESS + Reality | β |
| VMess + TCP + WebSocket | β |
| VMess + gRPC | β |
| Trojan + TLS | β |
βββββββββββββββ ββββββββββββββββ βββββββββββββββββββ ββββββββββββββββ
β Popup ββββββΆβ Background ββββββΆβ Native Host ββββββΆβ Xray Core β
β (UI/Config)β β (Service β β (Go binary) β β (SOCKS5 β
β β β Worker) β β runs xray β β :10801) β
βββββββββββββββ ββββββββββββββββ βββββββββββββββββββ ββββββββββββββββ
β β
βΌ βΌ
ββββββββββββββββ ββββββββββββββββββββ
β chrome.proxy β β All Chrome β
β API (MV3) ββββββββββββββββββββββββββββββββΆβ traffic β β
β socks5:// β β V2Ray Server β
β 127.0.0.1 β β β Internet β
ββββββββββββββββ ββββββββββββββββββββ
Flow:
- User pastes a config link (
vless://...,vmess://...,trojan://...) in the popup - Extension parses the config and sends it to the native host via Chrome Native Messaging
- Native host generates Xray-compatible JSON config and launches Xray core as a local SOCKS5 proxy
- Extension sets Chrome proxy settings (
chrome.proxyAPI) to point to127.0.0.1:SOCKS5_PORT - All browser traffic is now routed through the V2Ray server
- Real-time traffic statistics are displayed in the popup
Note: This extension requires a native messaging host component to run the Xray core binary. Chrome extensions cannot implement raw TCP/VLESS protocol directly due to browser sandbox restrictions. See Installation for setup instructions.
- Google Chrome, Microsoft Edge, Brave, or any Chromium-based browser
- Go 1.21+ (to build the native host β or use the pre-built binary from the Releases page)
- A V2Ray/VLESS/VMess/Trojan server config link
- Download this repository:
git clone https://github.com/coldhell7/Chrome-extention-Vpnforall.git cd Chrome-extention-Vpnforall - Open
chrome://extensions/in your browser - Enable Developer mode (toggle in top-right corner)
- Click Load unpacked and select the
extension/folder
- Download
vpnforall.crxfrom the Releases page - Open
chrome://extensions/ - Enable Developer mode
- Drag and drop
vpnforall.crxonto the page
Why? Chrome extensions cannot directly implement V2Ray/VLESS protocol. The native host runs the Xray core, which does the actual proxy work.
# Make the installer executable
chmod +x native-host/install.sh
# Run the installer
./native-host/install.shThe installer will:
- Build the Go native host binary
- Download Xray core from GitHub releases
- Register the native messaging host with Chrome
- Ask for your Extension ID β copy it from
chrome://extensions/
# Run PowerShell as Administrator
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
# Run the installer
.\native-host\install.ps1The installer will:
- Build the Go native host binary
- Download Xray core from GitHub releases
- Register the native messaging host in the registry
- Ask for your Extension ID β copy it from
chrome://extensions/
- Go to
chrome://extensions/ - Find VPN for All in the list
- Copy its ID (e.g.,
abcdefghijklmnopabcdefghijklmnop) - Enter this ID when prompted by the installer script
- After installation, go back to
chrome://extensions/ - Click the Refresh icon on the VPN for All card
- Click the extension icon in your toolbar
- Paste your config link (e.g.,
vless://...) and click Connect
- Click the VPN for All icon in your Chrome toolbar
- Paste your config link into the text area:
vless://your-uuid@your-server.com:443?security=tls&sni=your-server.com&type=tcp&encryption=none#My%20Server - Click Connect
- Chrome traffic is now routed through your V2Ray server
- Paste a config link
- Click + Add to Profiles
- Switch to the Profiles tab to see your saved servers
- Click Connect on any saved profile to quickly switch
Each Chrome profile can use a different proxy server on a different port:
| Chrome Profile | Port | Server |
|---|---|---|
| Default | 10801 | π―π΅ Japan |
| Work | 10803 | πΊπΈ US |
| Personal | 10805 | πΈπ¬ Singapore |
Important: Use different ports for different Chrome profiles. Each port corresponds to a separate Xray process.
The Stats tab shows:
- Upload β Total data sent + current upload speed
- Download β Total data received + current download speed
- Connection β Current status, connection time, active profile
- Go 1.21+
- Node.js 18+
- OpenSSL (for CRX signing)
# Clone the repo
git clone https://github.com/coldhell7/Chrome-extention-Vpnforall.git
cd Chrome-extention-Vpnforall
# Run the build script
chmod +x build.sh
./build.shThe build script:
- Compiles native host binaries for all platforms (Linux/macOS/Windows Γ amd64/arm64)
- Creates
dist/vpnforall.crx(packed Chrome extension) - Creates
dist/vpnforall.zip(unpacked extension archive) - Copies installer scripts to
dist/
dist/
βββ vpnforall.crx # Packed Chrome extension
βββ vpnforall.zip # Unpacked extension archive
βββ vpnforall-host-linux-amd64 # Native host (Linux x64)
βββ vpnforall-host-linux-arm64 # Native host (Linux ARM)
βββ vpnforall-host-darwin-amd64 # Native host (macOS Intel)
βββ vpnforall-host-darwin-arm64 # Native host (macOS Apple Silicon)
βββ vpnforall-host-windows-amd64.exe # Native host (Windows x64)
βββ install.sh # Linux/macOS installer
βββ install.ps1 # Windows installer
βββ com.vpnforall.native.json # Native messaging manifest template
βββ key.pem # Extension private key
Chrome-extention-Vpnforall/
βββ extension/ # Chrome extension source
β βββ manifest.json # Manifest V3 config
β βββ popup.html # Popup UI
β βββ popup.js # Popup logic + config parsing
β βββ background.js # Service worker (proxy + native messaging)
β βββ icons/ # Extension icons
βββ native-host/ # Native messaging host (Go)
β βββ go.mod # Go module
β βββ main.go # Native host implementation
β βββ install.sh # Linux/macOS installer
β βββ install.ps1 # Windows installer
β βββ com.vpnforall.native.json # Native messaging manifest
βββ dist/ # Build output
βββ build.sh # Build script
βββ README.md # This file
- Make sure you ran the installer script (
install.shorinstall.ps1) - Verify the native messaging manifest is in the correct location:
- macOS:
~/Library/Application Support/Google/Chrome/NativeMessagingHosts/ - Linux:
~/.config/google-chrome/NativeMessagingHosts/ - Windows:
%LOCALAPPDATA%\Google\Chrome\User Data\NativeMessagingHosts\
- macOS:
- Check that the Extension ID in the manifest matches your extension's ID
- Check your server config is valid (paste it in another V2Ray client to test)
- Verify the Xray binary downloaded correctly: check
~/.vpnforall/xray - Look at the extension logs:
chrome://extensions/β VPN for All β Service Worker β Console - Check if port 10801 is already in use:
lsof -i :10801
- Different Chrome profiles must use different ports (10801, 10803, 10805, etc.)
- Kill stale Xray processes:
- macOS/Linux:
pkill xray - Windows: Task Manager β find
xray.exeβ End Task
- macOS/Linux:
- Traffic monitor updates every second
- Make sure there is active browser traffic
- Refresh the popup and check again
- Google Chrome
- Microsoft Edge
- Mozilla Firefox (requires Firefox-specific native messaging paths)
- Brave
- Opera
- Any Chromium-based browser
Chrome extensions run in a sandboxed JavaScript environment. They cannot:
- Create raw TCP/UDP sockets
- Execute system processes
- Implement the VLESS/VMess protocol directly
The native messaging host bridges this gap by running Xray core as a system process and communicating with the extension via stdin/stdout.
| Component | Technology |
|---|---|
| Chrome Extension | Manifest V3 (JavaScript) |
| Native Host | Go (compiled binary) |
| Proxy Core | Xray-core |
| Proxy Protocol | SOCKS5 |
| Packaging | CRX3 format |
- XTLS/Xray-core β The proxy core that powers this extension
- Project V β The original V2Ray project
- razifijazi/v2ray-chrome-extension β Reference implementation
This project is for educational and research purposes only. Users are responsible for complying with applicable laws and regulations in their jurisdiction. The authors are not responsible for any misuse of this software.