Setup V2Ray VPN Server 101 | on Hax.co.id VPS, totally FREE, set VLESS+Websocket+TLS mode, use WARP to open IPv4


bash <(curl -L https://github.com/crazypeace/V2ray_VLESS_WebSocket_TLS_CaddyV2/raw/main/install.sh)

bash <(curl -L git.io/warp.sh) 4 

Prerequisites

You should have a telegram account.

---------------------

Installation

1. Create Hax.co.id VPS

Visit https://hax.co.id/, Click the menu button "三" - Register

Or visit https://hax.co.id/register directly

Hax register account
Click the Telegram bot's name @HaxTG_bot, send /getid to the bot. You will get your Telegram ID. Type it into this page.
Click Submit.
Hax register account input Telegram ID
Receive your Code, type it into this page.
Enter your HAX account's password.
Click Submit.
Hax register account input verification code and password
Login into your HAX account.
Or visit https://hax.co.id/login directly.
Hax login your account

Enter your account, password, pass the robot test.

Click Submit.

Hax login your account input your telegram ID and password
Click menu button "三" - "VPS" - "Create VPS".
Or visit https://hax.co.id/create-vps/ directly.
Hax Create VPS

Data Center - No matter, just don't choose OPENVZ.

Operating System - Debian11

Password - set your root password

VPS Purpose - Whatever

Check everything, pass the robot test.

Click CREATE VPS

Hax Create VPS input location operating system password

After some minutes, check VPS - VPS Info,
Or visit https://hax.co.id/vps-info directly.
Hax check VPS info

Notice the IPv6 address of your VPS

Hax check VPS info IP Address

2. Create a DNS pointing (domain)

Click 'DNS Pointing CF' 
Or visit https://hax.co.id/dns-pointing directly. 

Hax DNS Pointing CF
CF Proxy - No
DNS Name - Whatever you like
IPv6 Address - IPv6 Address of your VPS
Pass the robot test
Click Create DNS
Hax DNS Pointing CF create DNS - CF Proxy - NO
You will get a domain (DNS pointing) like this:
Hax DNS Pointing CF create DNS succeed

3. Login into your VPS via SSH

Click menu button "三" - "Tool" - "WebBase - SSH Client".
Or visit https://ssh.hax.co.id/ directly.
Hax WebBase - SSH Client

Enter your VPS's IPv6 Address and root Password.
Click Connect
Hax WebBase - SSH Client input IP address port user root password

Sometimes, you may fail with "Websocket authentication failed"
Just wait minutes, and refresh this page, and try Connect again.
Hax WebBase - SSH Client Websocket authentication failed

4. Setup V2Ray VPN Server

If you are using iOS cellphone, you can use the 'Paste Guesture' (swiping out with three fingers) to avoid typing so much.

iOS Paste Guesture

Type/paste the command below line by line and press Enter/Return after each line.
apt update
apt install -y curl
bash <(curl -L https://github.com/crazypeace/V2ray_VLESS_WebSocket_TLS_CaddyV2/raw/main/install.sh)
Input your domain - type your domain (for example, chacuoganzao.ipv6a.my.id)
Is resolution correct? - y
Other options - just press ENTER to use the default.
At the end of script, you will get a vless:// link, if you are using PC, just select and copy. You can input it into your VPN client (for example, v2rayN). 

If you are using cellphone, the script will save it as a file named '_v2ray_vless_url_'. We will use FTP to get it down to your cellphone.

5. Login into your VPS via FTP

Click menu button "三" - "Tool" - "WebBase - FTP Client".
Or visit https://ftp.hax.co.id/ directly.
Hax FTP Client

IP Address - enter your VPS's IPv6 address
Username - root
Authentication Type - Password
Password - your root password
Click Connect
Hax FTP Client login

You will see the file '_v2ray_vless_url_', click it and download.
Hax FTP Client download _v2ray_vless_url_

After open it in your cellphone. You will see the vless link.
Input it into your VPN client (for example, Shadowrocket or v2rayNG).

6. Setup CDN

Till now, our V2Ray VPN server can only accept IPv6 inbound. We will use Cloudflare Proxy (CDN) to transport the traffic pointing our domain from IPv4 to IPv6 (our VPS).

Delete the DNS which we just build with 'CF Proxy - No' setting.

Hax DNS Pointing CF remove DNS record

Then create a new one with 'CF Proxy - Yes'Hax DNS Pointing CF create DNS - CF Proxy - Yes

You need to wait some minutes to let Cloudflare build the CDN.
Ping your domain in your IPv4 environment (PC), untill you get an IPv4 result.


Now you can use the VPN server to access the world.

---------------------
The END




---------------------

Troubleshoot

Here is some tips for your to troubleshoot

---------------------

PS

If you create your VPS is located on US-1. You may meet a problem that when your script access github.com it will get stuck.

visit https://hax.co.id/vps-info to check your VPS's location.

You need to run WARP script to setup an IPv4 outbound first.

bash <(curl -L https://raw.githubusercontents.com/crazypeace/warp.sh/main/warp.sh) 4

Then set IPv4 has higher priority.

bash <(curl -L https://raw.githubusercontents.com/crazypeace/warp.sh/main/ipv4v6.sh) 4

Then you can run any GitHub script.

At the end of my V2Ray script, when script ask you to setup WARP, press Ctrl+C to terminate the script. 



---------------------
If after a long time, you still can't get an IPv4 result when you ping your domain, you can use this script to check if the DNS is already effective on Cloudflare server. (change the blue part as your domain)

curl -sH 'accept: application/dns-json' "https://cloudflare-dns.com/dns-query?name=chacuoganzao.ipv6a.my.id&type=A" | jq -r '.Answer[0].data'
If it returns an IPv4 result, then Cloudflare server is set up correctly.
Check result of DNS resolution

If you can ping that IPv4 address, then you can add it into your hosts file.
Or you can use https://github.com/XIU2/CloudflareSpeedTest to pick an Cloudflare CDN IP address for you, and add it into your hosts file. (change all the blue part as yours)

104.21.46.211 chacuoganzao.ipv6a.my.id

---------------------

Example log, please compare to yours

---------------------

[BEGIN] 2022/3/30 23:01:41
Connecting to 91.134.238.133:4487...
Connection established.
To escape to local shell, press 'Ctrl+Alt+]'.

Linux 391932510hax.localdomain 5.10.0-8-amd64 #1 SMP Debian 5.10.46-4 (2021-08-03) x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Wed Mar 30 10:38:54 2022 from 2101:41d0:8:824f:22:d9e4:90a3:1

 

root@391932510hax:~# apt update
apt install -y curl
root@391932510hax:~# apt update
apt install -y curl
bash <(curl -L https://github.com/crazypeace/V2ray_VLESS_WebSocket_TLS_CaddyV2/raw/main/install.sh)
Hit:1 http://deb.debian.org/debian bullseye InRelease
Hit:2 http://security.debian.org/debian-security bullseye-security InRelease
Get:3 http://deb.debian.org/debian bullseye-updates InRelease [39.4 kB]                         
Get:4 https://dl.cloudsmith.io/public/caddy/stable/deb/debian any-version InRelease [7,491 B]   
Fetched 46.8 kB in 2s (30.9 kB/s)                                        
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
79 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
curl is already the newest version (7.74.0-1.3+deb11u1).
0 upgraded, 0 newly installed, 0 to remove and 79 not upgraded.
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   160  100   160    0     0    124      0  0:00:01  0:00:01 --:--:--   124

此脚本仅兼容于Debian 10+系统. 如果你的系统不符合,请Ctrl+C退出脚本
可以去 https://github.com/crazypeace/V2ray_VLESS_WebSocket_TLS_CaddyV2 查看脚本整体思路和关键命令, 以便针对你自己的系统做出调整.
----------------------------------------------------------------
100 13292  100 13292    0     0   9036      0  0:00:01  0:00:01 --:--:--  9036
按  Enter 回车键  继续....或按  Ctrl + C  取消.
Hit:1 http://security.debian.org/debian-security bullseye-security InRelease
Hit:2 http://deb.debian.org/debian bullseye InRelease                                          
Hit:3 http://deb.debian.org/debian bullseye-updates InRelease                                  
Get:4 https://dl.cloudsmith.io/public/caddy/stable/deb/debian any-version InRelease [7,491 B]  
Fetched 7,491 B in 2s (4,232 B/s)                                        
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
79 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
bash is already the newest version (5.1-2+b3).
curl is already the newest version (7.74.0-1.3+deb11u1).
jq is already the newest version (1.6-2.1).
sudo is already the newest version (1.9.5p2-3).
0 upgraded, 0 newly installed, 0 to remove and 79 not upgraded.

安装V2ray最新版本
----------------------------------------------------------------
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 21647  100 21647    0     0  81686      0 --:--:-- --:--:-- --:--:-- 81686
info: No new version. The current version of V2Ray is v4.44.0 .

安装CaddyV2最新版本
----------------------------------------------------------------
sudo: unable to resolve host 391932510hax.localdomain: Name or service not known
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
apt-transport-https is already the newest version (2.2.4).
debian-archive-keyring is already the newest version (2021.1.1).
debian-keyring is already the newest version (2021.07.26).
0 upgraded, 0 newly installed, 0 to remove and 79 not upgraded.
sudo: unable to resolve host 391932510hax.localdomain: Name or service not known
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
OK
sudo: unable to resolve host 391932511hax.localdomain: Name or service not known
# Source: Caddy
# Site: https://github.com/caddyserver/caddy
# Repository: Caddy / stable
# Description: Fast, multi-platform web server with automatic HTTPS


deb https://dl.cloudsmith.io/public/caddy/stable/deb/debian any-version main

deb-src https://dl.cloudsmith.io/public/caddy/stable/deb/debian any-version main
sudo: unable to resolve host 391932511hax.localdomain: Name or service not known
Hit:1 http://security.debian.org/debian-security bullseye-security InRelease
Hit:2 http://deb.debian.org/debian bullseye InRelease                                          
Hit:3 http://deb.debian.org/debian bullseye-updates InRelease                                  
Get:4 https://dl.cloudsmith.io/public/caddy/stable/deb/debian any-version InRelease [7,491 B]  
Fetched 7,491 B in 2s (4,422 B/s)                                        
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
79 packages can be upgraded. Run 'apt list --upgradable' to see them.
sudo: unable to resolve host 391932510hax.localdomain: Name or service not known
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
caddy is already the newest version (2.4.6).
0 upgraded, 0 newly installed, 0 to remove and 79 not upgraded.

 

打开BBR
----------------------------------------------------------------


配置 VLESS_WebSocket_TLS 模式
----------------------------------------------------------------
请输入 V2RayID 
(默认ID: 2c526f65-2f9a-4354-ae34-2135e19b2e41):


 V2RayID = 2c526f65-2f9a-4354-ae34-2135e19b2e41
----------------------------------------------------------------

请输入 V2Ray 端口 [1-65535], 不能选择 80 或 443 端口
(默认端口: 64994):


 V2Ray 端口 = 64994
----------------------------------------------------------------


请输入一个 正确的域名, 一定一定一定要正确, 不! 能! 出! 错! 
(例如: zelikk.blogspot.com): chacuoganzao.ipv6a.my.id


 你的域名 = chacuoganzao.ipv6a.my.id
----------------------------------------------------------------
如果你的小鸡是双栈(同时有IPv4和IPv6的IP),请选择你把v2ray搭在哪个'网口'上
如果你不懂这段话是什么意思, 请直接回车
Input 4 for IPv4, 6 for IPv6:  


 请将 chacuoganzao.ipv6a.my.id  解析到: 2101:4f8:151:334b:face:452:8586:1

 Resolve chacuoganzao.ipv6a.my.id  to: 2101:4f8:151:334b:face:452:8586:1

 请将 chacuoganzao.ipv6a.my.id  解析到: 2101:4f8:151:334b:face:452:8586:1
----------------------------------------------------------------

(是否已经正确解析: [Y]): Is resolution correct?y


 域名解析 = 我确定已经有解析了
----------------------------------------------------------------

请输入想要  用来分流的路径  , 例如 /v2raypath , 那么只需要输入 v2raypath 即可
(默认: [2135e19b2e41]):


 分流的路径 = /2135e19b2e41
----------------------------------------------------------------

请输入 一个正确的  网址 用来作为 网站的伪装 , 例如 https://zelikk.blogspot.com
(默认: [https://zelikk.blogspot.com]):


 伪装的网址 = https://zelikk.blogspot.com
----------------------------------------------------------------


配置 /usr/local/etc/v2ray/config.json
----------------------------------------------------------------

配置 /etc/caddy/Caddyfile
----------------------------------------------------------------

重启 V2Ray
----------------------------------------------------------------

重启 CaddyV2
----------------------------------------------------------------


---------- V2Ray 配置信息 -------------

 ---提示..这是 VLESS 服务器配置--- 

 地址 (Address) = chacuoganzao.ipv6a.my.id

 端口 (Port) = 443

 用户ID (User ID / UUID) = 2c526f65-2f9a-4354-ae34-2135e19b2e41

 流控 (Flow) = 空

 加密 (Encryption) = none

 传输协议 (Network) = ws

 伪装类型 (header type) = none

 伪装域名 (host) = chacuoganzao.ipv6a.my.id

 路径 (path) = /2135e19b2e41

 底层传输安全 (TLS) = tls

---------- V2Ray VLESS URL ----------
vless://2c526f65-2f9a-4354-ae34-2135e19b2e41@chacuoganzao.ipv6a.my.id:443?encryption=none&security=tls&type=ws&host=chacuoganzao.ipv6a.my.id&path=2135e19b2e41#VLESS_WSS_chacuoganzao.ipv6a.my.id

---------- END -------------


这是一个 IPv6 小鸡,用 WARP 创建 IPv4
----------------------------------------------------------------
按  Enter 回车键  继续....或按  Ctrl + C  取消.

__        ___    ____  ____    ___           _        _ _           
\ \      / / \  |  _ \|  _ \  |_ _|_ __  ___| |_ __ _| | | ___ _ __ 
 \ \ /\ / / _ \ | |_) | |_) |  | || '_ \/ __| __/ _` | | |/ _ \ '__|
  \ V  V / ___ \|  _ <|  __/   | || | | \__ \ || (_| | | |  __/ |   
   \_/\_/_/   \_\_| \_\_|     |___|_| |_|___/\__\__,_|_|_|\___|_|   
                                                                    
Copyright (C) P3TERX.COM | https://github.com/P3TERX/warp.sh


System Information
---------------------------------------------------
  Operating System: Debian GNU/Linux 11 (bullseye)
      Linux Kernel: 5.10.0-8-amd64
      Architecture: x86_64
    Virtualization: kvm
---------------------------------------------------

[INFO] WireGuard is installed and running.
[INFO] Disabling WireGuard...
Removed /etc/systemd/system/multi-user.target.wants/wg-quick@wgcf.service.
[INFO] WireGuard has been disabled.
[INFO] Getting the network interface IPv6 address...
[INFO] IPv6 Address: 2a01:4f8:151:334b:face:452:8586:1
[INFO] Getting the best MTU value for WireGuard...
[INFO] WireGuard MTU: 1400
[INFO] WireGuard profile (/etc/wireguard/wgcf.conf) generation in progress...
=================================================================================================================================================================================================================
# Generated by P3TERX/warp.sh
# Visit https://github.com/P3TERX/warp.sh for more information

[Interface]
PrivateKey = cL6+xlZD4aAaAhn3lEDOGXEeVI9Hbg8pgrZovj88u0I=
Address = 172.16.0.2/32,fd01:5ca1:ab1e:864c:cd2c:a168:ad6a:a672/128
DNS = 2101:4860:4860::8888,2001:4860:4860::8844,8.8.8.8,8.8.4.4
MTU = 1400

[Peer]
PublicKey = bmXOC+F1FxEMF9dyiK2H5/1SUtzH0JuVo51h2wPfgyo=
AllowedIPs = 0.0.0.0/0
Endpoint = [2606:4700:d0::a29f:c001]:2408
=================================================================================================================================================================================================================
[INFO] Starting WireGuard...
Created symlink /etc/systemd/system/multi-user.target.wants/wg-quick@wgcf.service → /lib/systemd/system/wg-quick@.service.
[INFO] WireGuard is running.
[INFO] Status check in progress...

 ----------------------------
 WireGuard : Running
 IPv4 Network : WARP
 IPv6 Network : Normal
 ----------------------------

[INFO] Done.

重启 V2Ray
----------------------------------------------------------------

重启 CaddyV2
----------------------------------------------------------------

[END] 2022/3/30 23:11:36

评论

The Hot3 in Last 30 Days

RackNerd VPS搭V2Ray WSS梯子 年付 $10.98 1G端口 3T流量 17G存储 1GB内存