Table of Contents
- What is v2ray?
- Choosing a VPS
- Setting up v2ray ws+tls+cdn
- Managing v2ray
- Installing v2ray to Your Devices
- VPN services that offer v2ray
What is v2ray?
V2ray or vmess protocol to be precise, is a sophisticated version of the famous Shadowsocks. At the core, v2ray is also based on SOCKS5 proxy. Normally, proxies lack encryption, and that’s what differentiates a VPN and a proxy. Shadowsocks is SOCKS5 proxy with an encryption, and vmess is the next gen Shadowsocks.
The previous article was about simple v2ray with tcp protocol, and that was enough for that time. But recently my v2ray tcp servers got blocked. So I believe it is time to move to more complicated configurations of v2ray.
This method is called v2ray+websocket+tls+cdn (sometimes nginx is also added, if you prefer to add a website). As to my understanding, this method hides your VPS IP address behind an IP address from a major CDN provider like Cloudflare, and most ISPs do not block those IP addresses.
As the developer of v2-ui, changed the v2ray panel to x-ui, which is based on xray core, this tutorial is updated accordingly. The new panel has some design and functionality changes. Most of the installation is same as before. The x-ui panel is only in Chinese right now, but you can use google translate to understand it.
Note: I will update screenshots later.
Choosing a VPS
- Before making payment ping an IP address of the VPS provider
- Prefer hourly billing VPS services
- Prefer less popular VPS services
- Check for ratings and user reviews
- Prefer KVM virtualization
- Use a VPN when using Putty or an alternative SSH programme, to prevent IP address blocking
I can suggest these VPS services:
- Vultr – hourly billing – starting from $3.5 per month – vultr.com (get a $100 bonus)
- DigitalOcean – hourly billing – starting from $5 per month – digitalocean.com (get a $100 bonus)
- RackNerd – monthly billing – starting from $2 per month (annual subscription) – racknerd.com
- Contabo – monthly billing – starting from € 3.99 per month – contabo.com
- CloudCone – hourly billing – starting from $4.2 per month – cloudcone.com
Setting up v2ray ws+tls+cdn
Thanks to the one-command script by sprov065, you can install v2ray easily, even if you are not familiar with Linux commands.
You need to have at least Ubuntu 16, Debian 8 or CentOS 7.
This guide will be for Ubuntu.
The setup consists of two parts. First, the v2ray script installation, and the second is getting a free SSL certificate from Let’s Encrypt for TLS, and enabling CDN from Cloudflare. The second part is only needed if you wish to use tls and cdn.
Part one – install the script
1. First make updates and upgrades, and install curl
sudo apt-get update -y sudo apt-get upgrade -y sudo apt install curl -y
2. Run the x-ui script
bash <(curl -Ls https://raw.githubusercontent.com/vaxilu/x-ui/master/install.sh)
And that is it for the installation part.
Part two – get the SSL Certificates
You will need:
- A domain name
- A Cloudflare account
- Point your nameservers to Cloudflare
- Point your VPS IP to your domain name
To get an SSL certificate, you need a domain name (www.example.com), preferably a paid one from providers like namecheap or porkbun, and a Cloudflare account. Both Porkbun and Namecheap have free Whois Guard. When it comes to pricing, Porkbun has an upper hand, you can find domain names for under $3 per year. Please do check the renewal prices before purchasing a domain.
1. Nameservers configurationWhen adding your domain name to your Cloudflare account, Cloudflare will ask you to redirect your nameservers. It will be something like this:
You need to copy those from Cloudflare to your domain name registrar (ex: namecheap.com). On Namecheap you can find it on Domain List > Manage > Nameservers. Change the DNS to Custom DNS and add Cloudflare nameservers. After a while, Cloudflare will inform you that the setup is done.,
2. Connecting your domain name to the VPS IP address
- Go to DNS Management
- Press “Add Record”
- Type your sub-domain name or domain name to “Name” (ex: write test for test.example.com or @ for example.com)
- Write your VPS IP to “IPv4 address”.
- Make sure the color of “Proxy status” is orange and says DNS Only.
Note: If you keep DNS only status after SSL configuration mentioned below, you will get v2ray+ws+tls. If you change it to Proxied, you will get v2ray+ws+tls+cdn.
And lastly change SSL/TLS mode to Full or Full (strict).
3. Getting SSL Certificate
Now SSH to your VPS using Putty.
- Install certbot.
sudo apt install software-properties-common sudo add-apt-repository ppa:certbot/certbot sudo apt-get install certbot
2. Use certbot to get SSL Certificate. Use your own email address and domain name.
sudo certbot certonly --standalone --preferred-challenges http --agree-tos --email your-email-address -d test.example.com
3. If you get a note like “Congratulations!..”, it means that now you have SSL certificate for your domain/sub-domain.
In the text you will find destinations of your certificate file and key file. Copy them, as you will need them on web panel. It will be something like this:
If you face errors and cannot get the certificate, please make sure that your firewall is listening to ports 80 and 443, you have pointed your VPS IP address to the domain name and the Cloudflare CDN is off.
4. Last, the SSL certificate expires in 90 days, to make sure to renew it before expiration. Here is a manual renewal command.
certbot renew --force-renewal
Adding a user
You can go to x-ui web panel typing your IP address and the port (54321) on a browser. By default, both login and password are admin. You can change them in the panel settings.
To add a user, you need to go to “accounts”, press add button and fill in the blanks according to your preferences.
- Remark – here you can write anything you want
- Protocol – vmess
- Listening IP, Port, ID (UUID) and Alter ID generated automatically. You can change them manually, as well. It is advised to use port 443.
- Transport – ws (websocket)
- Path – you can leave it the way it is or add anything you want
- Turn on TLS
- Domain – write your domain name or sub-domain name
- You can choose certificate file path and copy the file paths, or copy the certificate and key directly to certificate file content
- Copy and paste certificate and key file paths, respectively
- Press “Add”
And that is it. You can add, edit, delete users within seconds, and check bandwidth usage using x-ui web-panel.
You are not only limited to v2ray ws tls cdn with this web panel, you can configure and test various combinations of v2ray.
I would like to thank vaxilu and other developers for this easy v2ray multi-user management panel.
If you think your v2ray has slow speed, or have an older Linux version on your VPS, you can use bbr script by teddysun, to install google bbr.
wget -N --no-check-certificate https://github.com/teddysun/across/raw/master/bbr.sh && chmod +x bbr.sh && bash bbr.sh
Installing v2ray to Your Devices
v2ray apps for Android
You can use v2ray on several apps on Android, and all of them are available for free Google Play.
- Clash for Android
v2ray apps for iOS
You can use v2ray on several apps on your iPhone/iPad as well, most of the v2ray apps are paid apps, except for 91VPN.
- Pharos Pro
v2ray clients for Windows
For your Windows PC, you can choose one of these five v2ray Windows clients. And here is a download link for the three of them. There are also new softwares called Clash (download it here) and Qv2ray (download it here).
v2ray clients for macOS
For your Mac, you can choose one of these four v2ray clients. Here is a download link for V2RayX and here for V2RayU. The newsest additions to the list are ClashX (Click here to download) and Qv2ray (download it here) for macOS.
VPN services that offer v2ray
Sometimes IP blocks are so often that you may want a solution without a hassle and go for a paid option. If that is the case for you, Wannaflix and 12VPN offer v2ray, along with other VPN protocols.
28,101 thoughts on “How To Install V2ray Websocket(WS)+TLS+CDN on a VPS”
where to buy xenical in australia
Heya i’m for the first time here. I found this board and I find It truly useful & it helped me out a lot.
I’m hoping to give one thing back and help others like you helped me.
how much is finasteride
Do you have a spam issue on this blog; I also am
a blogger, and I was wanting to know your situation;
many of us have developed some nice procedures and we are looking to exchange
methods with other folks, why not shoot me an e-mail if interested.
We’re a group of volunteers and opening a brand new scheme in our community.
Your site provided us with useful info to work on. You’ve done a formidable
process and our whole group will likely be grateful to you.
Браво, эта фраза пришлась как раз кстати
https://games-monitoring.com/ stated it would be selling 12.
If some one desires expert view regarding running a blog afterward i
recommend him/her to pay a visit this webpage, Keep up the fastidious job.
Hi, i believe that i noticed you visited my site so
i got here to go back the choose?.I’m trying to in finding things to enhance my site!I suppose its good
enough to make use of some of your ideas!!
singulair 20 mg daily
I’ll immediately snatch your rss as I can not to
find your email subscription link or e-newsletter service.
Do you have any? Kindly permit me recognise so that I may just subscribe.
how fast does lasix work Our study shows that letrozole has excellent pregnancy rates compared to clomiphene citrate
клининговые компании москва отзывы https://chistota365.ru/
I know this web page offers quality dependent posts and extra stuff, is there any other site which provides such information in quality?
buy fluoxetine online without prescription
Unquestionably believe that that you stated. Your favorite justification appeared to be at the web the easiest factor to be aware of.
I say to you, I certainly get annoyed even as other people consider concerns that they plainly don’t understand about.
You controlled to hit the nail upon the top and outlined out the
entire thing without having side-effects , folks can take a signal.
Will likely be again to get more. Thanks
I’ve been exploring for a bit for any high-quality articles or blog posts in this kind of house .
Exploring in Yahoo I eventually stumbled upon this web site.
Studying this info So i am glad to exhibit that I’ve a very good uncanny
feeling I came upon just what I needed. I most surely will make sure to do not overlook
this website and provides it a glance on a continuing basis.
Thanks on your marvelous posting! I seriously enjoyed reading it, you may be a great author.
I will ensure that I bookmark your blog and may come back in the foreseeable future.
I want to encourage you to ultimately continue your great job, have a nice weekend!
Also visit my web page [ web site]
If some one desires to be updated with latest technologies therefore he must be visit this
web page and be up to date all the time.
Thanks for sharing your thoughts about https://pa-waikabubak.go.id/panjar/?ref=daftar slot gacor 69.
Remarkable! Its genuinely awesome article, I have got much clear idea regarding from
Good way of explaining, and pleasant article to get data on the topic of my presentation topic, which
i am going to present in academy.
Подтверждаю. Так бывает. Давайте обсудим этот вопрос.
relating to http://revistawonder.com/se-caso-doli/#comment-10670 Generously visit the
In faϲt no matter if sоmeone dоesn’t know ɑfteг that
its up to other users that tey will assist, so here
Aⅼsо visit my bl᧐g; Túi xách nữ da bò cao cấp
Its not my first time to go to see this website, i
am visiting this web page dailly and take good
data from here daily.
I am no longer certain where you are getting your info, however good topic.
I needs to spend some time studying much more or working
out more. Thank you for wonderful info I used to be looking for this information for
My blog; http://www.saehansonic.co.kr
Meds prescribing information. What side effects can this medication cause?
All news about pills. Read here.
What’s up to all, since I am in fact keen of reading this webpage’s post to be updated on a regular basis.
It contains nice stuff.
Nice blog here! Also your site loads up very fast! What host are you using?
Can I get your affiliate link to your host?
I wish my website loaded up as quickly as yours lol
In June of 2019, Apple Pay expanded to multiple European countries including Bulgaria,
Croatia, Cyprus, Estonia, Greece, Latvia, Liechtenstein, Lithuania,
Malta, Portugal, Romania, Slovakia, and Slovenia. However, I found my colleagues’ accounts of these events to be credible because,
in almost all cases, multiple officials recounted fact patterns that were consistent
with one another. In Mexico, two major banks and a
power company provide one to four weeks more leave than the 12 weeks mandated by law.
2-Flat, 3-Flat, and 4-Flat houses: houses or buildings with 2, 3, or 4 flats, respectively, especially when each of the flats takes up one entire floor of the house.
If the US hospital needs information about the UK citizen’s family history from
their mother in the UK, and the mother has severe dementia, this
exception applies as the mother is incapable of giving consent.
On the night of Aug. 24/25, 1572, after a council at which the
queen mother Catherine de Médicis, King Charles IX, the Duke d’Anjou (later Henry III), and the Guises were present,
there occurred a massacre in which Coligny
and almost all the leading Huguenots in Paris were slain. Through Knowledge Leader,
readers stay in touch with and are at the leading edge of a rapidly evolving
industry by uncovering and showcasing the individuals, organizations, and trends that are
transforming commercial real estate.
where to buy dapoxetine online
neurontin 100 mg
It’s going to be ending of mine day, but before ending I am reading this fantastic article to improve my experience.
I don’t even know how I ended up here, but I thought this post was good.
I don’t know who you are but definitely you are going to a famous blogger if you are not already 😉 Cheers!
You stated that well!
Also visit my blog: https://lisinopril2023.top/
colchicine tablets over the counter
buy elimite cream
Hi colleagues, its fantastic post regarding cultureand fully explained,
keep it up all the time.
motrin price canada
phenergan 25 mg
Hi, There’s no doubt that your blog may be having browser compatibility issues. Whenever I take a look at your website in Safari, it looks fine but when opening in Internet Explorer, it’s got some overlapping issues. I merely wanted to provide you with a quick heads up! Apart from that, great site!
Hi, I desire to subscribe for this webpage
to get newest updates, so where can i do it please assist.
This paragraph is truly a good one it helps new the web visitors, who
are wishing for blogging.
Nicely put. Thank you!
My web site – http://fr.illogicopedia.com/wiki/Utilisateur:RVTEmmanuel