ไดเรกทอรีและไฟล์สำคัญ
- V2Ray binary:
/usr/local/bin/v2ray - ไฟล์ข้อมูล (geoip, geosite):
/usr/local/share/v2ray/ - Logs:
/var/log/v2ray/ - Server Config:
/usr/local/etc/v2ray/config.json - Client Config:
/root/client.json(SOCKS5 on127.0.0.1:1080) - VMESS Share URL:
/root/client.vmess(เข้ารหัสด้วย base64 สามารถนำเข้าใน V2Ray client ได้)
การจัดการ Service
systemctl start v2ray # Start service
systemctl stop v2ray # Stop service
systemctl restart v2ray # Reload configs
systemctl status v2ray # Show status
journalctl -u v2ray -f # Live logs
How to Connect
ตัวเลือก A: ใช้ Client Config (client.json)
1. Copy /root/client.json ไปยังเครื่องของคุณ
2. Run V2Ray locally:
v2ray run -config client.json
3. ตั้งค่าเบราว์เซอร์/ระบบให้ใช้ SOCKS5 proxy:
Host: 127.0.0.1
Port: 1080
ตัวเลือก B: ใช้ VMESS URL
1. Open /root/client.vmess และคัดลอก URL
2. นำเข้าไปยังแอปไคลเอนต์
แก้ไข Config
Server config: /usr/local/etc/v2ray/config.json
ตัวอย่างการแก้ไข: เปลี่ยน port 10086 → 443 เพื่อหลีกเลี่ยงไฟร์วอลล์ได้ดีขึ้น
After editing:
systemctl restart v2ray
Security Notes
- นี่คือการตั้งค่าสาธิตเบื้องต้นเท่านั้น ผู้ใช้ขั้นสูงต้องกำหนดค่าและเสริมความปลอดภัยด้วยตัวเอง
- ใช้ชื่อโดเมน + TLS (ผ่าน Nginx + certbot) เพื่อซ่อนตัวตน
- เก็บ UUID ไว้เป็นความลับ สร้างใหม่ได้ด้วย:
v2ray uuid