V2Ray WebSocket+TLS Mode Troubleshooting | First-Time Setup Failed
If this is your first-time setup V2Ray server, this troubleshooting guide could help you a lot.
Make sure you did exactly what the tutorial said.
If you are not familiar with V2Ray, you should follow every step exactly as the tutorial said. If you have a different output, or red text, or 'error' in output, from any steps and commands, please take a screenshot or copy the log.
Do not report an error with only your own description.
Do not report only the error result at the end of your setup process.
My tutorials usually include an example log file at the end. Please compare the log file with the one that you had - you might be able to find what you have done wrong there.
You followed the tutorial exactly and carefully?
You failed on one step, or can't connect the server after a successful setup process.
This can happen, for various different reasons. Do not attempt to re-run the script - it'll likely make NO DIFFERENCE.
Please check the items below:
(If one item is OK, you usually don't need to check the sub-items)
1. Can you connect without traffic routed through a CDN(set up in the last step)?
2. Can you connect If you re-run the script with another domain?
(Please notice that www.mydomain.com, mydomain.com, and abc.mydomian.com are different domains. Therefore, you just need to change the prefix to get a new domain at the DNS settings)
3. Is v2ray running correctly?
service v2ray status
Please notice whether the status is 'active (running)' and whether there is any 'error' or 'warning' in the log
3.1 Is config.json written correctly?
(Please notice the path to your files)
/usr/local/bin/v2ray -config /usr/local/etc/v2ray/config.json -test
The path to your files may vary depending on how you set up your server (which script you use). You can find the entire command whilst looking at the v2ray status using 'service v2ray status':
3.2 Is user privilege set correctly?
Can you run v2ray as the user which you used to run the setup script?
Enter the following command on your VPS:
/usr/local/bin/v2ray -config /usr/local/etc/v2ray/config.json
Is there any 'error' or 'waning' in the output?
Can you connect?
4. Is caddy running correctly?
service caddy status
Please notice whether the status is 'active (running)' and whether there is any 'error' or 'warning' in the log
4.1 Did caddy get SSL certificate successfully?
Enter the following command on your VPS:
(Please change the blue part to your own domain)
find / -name "*chacuoganzao.ipv6a.my.id*"
Is there any .crt .key file?
5. Can you visit your domain via browser
https://chacuoganzao.ipv6a.my.id/
Can you see your camouflage site?
If not, please take a screenshot and carry on to the next step.
5.1 Check DNS result on your VPS
Try seeing if your VPS can see your own website.
Enter the following command on your VPS:
curl https://chacuoganzao.ipv6a.my.id/
Can you see a '</html>' at the end of the output?
5.2 Check DNS result on 3rd party sites
https://ping.pe/chacuoganzao.ipv6a.my.id
Did you get a correct result of your domain?
5.3 Check if others can connect to your server's 80 and 443 ports
https://tcp.ping.pe/207.148.79.159:80
https://tcp.ping.pe/207.148.79.159:443
https://tcp6.ping.pe/[2a01:4f8:151:334b:face:452:8586:1]:80
https://tcp6.ping.pe/[2a01:4f8:151:334b:face:452:8586:1]:443
If this command failed, then please recheck if caddy is running.
Also, check if a firewall is blocking your VPS's 80 and 443 ports.
Enter the following command on your VPS:
which iptables
If it is, close iptables.
Enter the following command on your VPS:
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
Restart caddy.
Enter the following command on your VPS:
service caddy restart
6. Can you visit your domain/path via browser?
https://chacuoganzao.ipv6a.my.id/a4d265a2ec82
Did you get '400 Bad Request'?
If not, please take a screenshot and carry on to the next step.
6.1 If you can get camouflage site via domain, but can't get '400 Bad Request' via domain/path
That means the data reverse proxied by caddy isn't catched by v2ray.
Maybe because the reasons below:
- The path in Caddyfile is not the same as you typed in browser.
- v2ray is not running.
- The reverse proxy port in Caddyfile is not the same as the listen port in config.json
Log is the best description of the error
You can set Xshell to record log automatically.
You can use screenshot tool to scrolling capture the command window.
PS
Many thanks to @day_cat for proofreading.
评论
发表评论