Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save michele-tn/9f5b98583c2d69f820f149bbde15f41b to your computer and use it in GitHub Desktop.

Select an option

Save michele-tn/9f5b98583c2d69f820f149bbde15f41b to your computer and use it in GitHub Desktop.

🚀 v2rayN + Shadowsocks + TUN (Sing-box) — Windows Setup Guide

Platform Core Mode Protocol

Full system VPN-style tunneling using v2rayN, Shadowsocks, and Sing-box TUN mode.


📥 1. Download v2rayN

Download the latest release from the official repository:

👉 https://github.com/2dust/v2rayN/releases

Choose:

v2rayN-windows-64-SelfContained.zip

Extract it and run v2rayN.exe as Administrator.


🔐 2. Configure Shadowsocks

  1. Open v2rayN
  2. Click Servers → Add Server
  3. Select Shadowsocks
  4. Fill in:
    • Address
    • Port
    • Password
    • Encryption Method
  5. Save and select the server as active.

⚙️ 3. Configure TUN Mode

Navigate to:

Settings → Option Settings → Tun mode Setting

Apply these values:

Setting Value
Auto route True
Strict Route True
Stack mixed
MTU 65535
Enable additional inbound True
Enable IPV6 Address True

🔁 4. Select Core Type

Go to:

Settings → Core Type Settings

Set:

Shadowsocks → Sing_box

⚠️ TUN mode only works reliably with sing-box.


▶️ 5. Enable TUN

Back in the main window:

✔ Enable TUN Mode
✔ Confirm administrator prompt

Your system traffic is now fully tunneled.


🧠 Why Sing-box?

Sing-box is a modern universal proxy platform supporting:

  • Shadowsocks
  • VMess
  • Trojan
  • VLESS
  • Full TUN VPN mode

Official documentation:

👉 https://sing-box.sagernet.org/

Sing-box is designed for NAT + TUN networking, making it more reliable than Xray for VPN-style tunneling.


🧪 Test

Open PowerShell:

curl https://ipinfo.io

If the IP matches your server location, the tunnel is active.


🛠 Troubleshooting

Problem Fix
No internet Check Admin rights
DNS works but web doesn't Ensure Sing-box core
TUN not starting Disable antivirus temporarily
Slow speed Lower MTU to 1400

📚 Sources


⚠️ Legal Notice

Use this software only in compliance with your local laws and regulations.


⭐ Enjoy Secure Tunneling

Happy tunneling with v2rayN + Sing-box! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment