Table of Contents
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.
Update 2021:
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
You should:
- 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:
example1.ns.cloudflare.com
example2.ns.cloudflare.com
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
On Cloudflare,
- 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:
/etc/letsencrypt/live/test.example.com/fullchain.pem
/etc/letsencrypt/live/test.example.com/privkey.pem
Note:
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

Managing v2ray
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.
http://"your-ip-address":54321
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.



Bonus
BBR script
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.
- v2RayNG
- Clash for Android
- NapsternetV
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.
- ShadowRocket
- Kitsunebi
- Quantumult
- i2Ray
- Pepi
- 91VPN
- Pharos Pro
- FairVPN
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).
- V2RayW
- V2RayN
- V2RayS
- Clash
- Qv2ray
- Netch
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.
- V2RayX
- V2RayU
- ClashX
- Qv2ray
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.
Hi there! Do you use Twitter? I’d like to follow you if that would be okay.
I’m definitely enjoying your blog and look forward to new updates.
Hi there to all, the contents present at this web page
are genuinely awesome for people knowledge, well, keep up the nice work fellows.
Great website. Plenty of useful information here. I’m sending it to
a few friends ans additionally sharing in delicious. And certainly,
thanks in your effort!
At this time I am going away to do my breakfast, when having my breakfast coming
again to read further news.
Please let me know if you’re looking for a author for your blog.
You have some really great articles and I feel I would be a good asset.
If you ever want to take some of the load off, I’d really
like to write some material for your blog in exchange for a link back to mine.
Please blast me an email if interested. Many thanks!
Appreciate the recommendation. Let me try it out.
my site; camping heater
I just couldn’t depart your site before suggesting that I really loved the usual information a person supply to your visitors?
Is going to be back frequently in order to check up on new posts
We all know what success seems like and wish you too as nicely.
We all knlw that content creators aare prolific andd
highly effective, and by using the Mavrck platfor to drive model awareness and encourage significant conversations, we weree able to drive some unprecedented success.
This more permits enterprise leaders to leverage their experience and be intentional about constructing group on the
platform. It allows brands to tell a greater brand story and drive extra revenue from influencers.
4. Inventive Influencer Campaigns: HireInfluence also mqkes use of the “Influencer Freedom Campaign” strategy which permits influencers to express their creativity by way oof authentic
content, while conveying the brand’s message. Based in Los Angeles, this influencer company has connections with prime influenncers aand model
ambassadors. HireInfluence supplies influencer marketing companies globally and has locations in New York City, Houston, and Los
Angeles. 2. Hashtag Influencer Marketing Campaigns: Influencers create content round a social media hashtag
or central theme aand ask their followings to share or observe the hasehtag of their social medka posts.
As folks spend more time on social media, they’re additionally more likely to spend no less than some
of that point interacting with influencers. But it’s not time to utterly
throw out the rulebook, as mahy of tthe adjustments are accelerations off pre-present developments, quite than transformative shifts available in the market.
Howdy I am so glad I found your site, I really found you by mistake, while I was
searching on Yahoo for something else, Regardless I
am here now and would just like to say kudos for a tremendous post and a all round entertaining blog (I also love
the theme/design), I don’t have time to look over it all at the
minute but I have bookmarked it and also added in your RSS feeds, so when I have time
I will be back to read much more, Please do keep up the superb job.
Hey I am so delighted I found your web site, I really found you by accident,
while I was researching on Bing for something else, Anyways I am here now and would just like to say many
thanks for a incredible post and a all round exciting blog (I also love the theme/design), I don’t have time to
go through it all at the minute but I have book-marked it and also added in your RSS feeds, so when I have time I will be back to read a great deal more, Please
do keep up the great work.
Hi would you mind sharing which blog platform you’re
using? I’m looking to start my own blog in the near
future but I’m having a difficult time deciding between BlogEngine/Wordpress/B2evolution and Drupal.
The reason I ask is because your layout seems different then most blogs and I’m looking for something unique.
P.S Sorry for being off-topic but I had to ask!
Hi to every one, the contents present at this web page are genuinely awesome for people knowledge, well, keep up the good work fellows.
Excellent post. I was checking continuously this weblog and I’m impressed!
Extremely helpful info particularly the remaining section 🙂 I handle
such info much. I was seeking this certain information for
a very lengthy time. Thanks and good luck.
I pay a quick visit each day a few web sites and
blogs to read posts, except this web site presents
quality based writing.
Hey there! I’ve been following your blog for some time now and finally got the courage to go
ahead and give you a shout out from Atascocita Tx!
Just wanted to mention keep up the good job!
Hang tabs are small sticky strips or hooks that are used
to hang items from hooks or store displays.
Blister packaging, packaged goods and other lightweight things are frequently hung from them.
Hang tabs are created to be fastened to the product’s packaging, making it easy for customers to
see and buy the item.
According to the Australian context, Hang Tabs Australia is likely to be a company that specializes in providing hang tabs as well as display solutions for the retail sector.
Hang tabs, hooks with adhesive, display attachments and similar products are offered in a variety of designs and dimensions.
The fact that Hang Tabs Australia is not yet a recognizable or well-known expression or even a company must
be taken into consideration.
Products are hung from hooks or retail displays by using hang tabs.
These are small sticky strips. They are frequently utilised to hang items such as packed items,
blister packs or any other light objects. Customers can easily display and access items more easily using hang tabs
that are designed to be attached to the package of the product.
If you live in Australia, Hang Tabs Australia is likely to be a company or supplier who specializes in offering hang tabs and associated display options for retail stores.
They might provide a range of adhesive hooks, display accessories, hang tabs of various sizes and
shapes, and other related goods.
It’s crucial to remember it is that Hang Tabs Australia, at the time I
write this it is not an online store.
I like the valuable info you provide in your articles.
I’ll bookmark your blog and check again here regularly.
I am quite sure I will learn a lot of new stuff
right here! Good luck for the next!
It’s crucial to note that, as of my writing this
article, Hang Tabs Australia is not a well-known or established phrase or organization.
You should be a part of a contest for one
of the best sites on the web. I will highly recommend this blog!
Great information. Lucky me I ran across your blog by chance
(stumbleupon). I’ve bookmarked it for later!
I’m gone to say to my little brother, that he should also go to see this webpage on regular basis to obtain updated from most recent news.
Hang Tabs Australia is probably an enterprise or a
provider which specializes in providing hang tabs as well as display solutions
for the retail industry in Australia. They might sell hang tabs in various sizes and shapes, as well as adhesive hooks displays, accessories for display, as
well as other related products.
It is important to remember that as of writing this, Hang Tabs Australia is
not a well-known, established term or a company.
I’m not sure why but this weblog is loading incredibly
slow for me. Is anyone else having this problem or is it a problem on my end?
I’ll check back later on and see if the problem still exists.
I all the time emailed this blog post page to all my friends, for the reason that if like to read
it next my links will too.
Very nice article, just what I was looking for.
WOW just what I was searching for. Came here by searching for natural supplements online
Why viewers still make use of to read news papers when in this technological
world all is available on net?
I’ll immediately take hold of your rss feed as I can’t
find your e-mail subscription link or newsletter service.
Do you’ve any? Kindly allow me know in order that I could subscribe.
Thanks.
Heya i’m for the first time here. I came across this board
and I find It really useful & it helped me out a lot. I hope to
give something back and aid others like you aided me.
Very good information. Lucky me I found your blog by chance (stumbleupon).
I have saved as a favorite for later!
Great post. I was checking continuously this blog and I am inspired!
Very helpful information specifically the final part :
) I care for such information a lot. I used to be looking for this particular information for a long time.
Thanks and best of luck.
always i used to read smaller articles which as well clear their
motive, and that is also happening with this piece of writing which I
am reading at this place.
Also visit my web site: Alpha Ignite Review
Hello! Quick question that’s completely off topic.
Do you know how to make your site mobile friendly? My blog looks weird when viewing from my iphone 4.
I’m trying to find a template or plugin that might Skin Tag Be Gone Skin Tag able
to correct this issue. If you have any suggestions, please share.
Appreciate it!
What’s up, constantly i used to check webpage posts here early
in the daylight, since i love to gain knowledge of more and more.
With accumulator bets there must be three or more events for them to
qualify.
Feel free to visit my webpage; mostbet casino
When some one searches for his vital thing, therefore he/she wishes to
be available that in detail, so that thing is maintained
over here.
I have been exploring for a little bit for any high-quality articles or weblog posts in this kind of
space . Exploring in Yahoo I eventually stumbled upon this
site. Reading this info So i am happy to show that I’ve an incredibly good uncanny feeling I came upon just what I needed.
I most undoubtedly will make certain to do not fail to remember this web site and provides it a glance on a continuing basis.
Also visit my web site – viagra
Hi! I’m at work surfing around your blog from my new iphone 3gs!
Just wanted to say I love reading through your blog and look forward to all your posts!
Keep up the outstanding work!
This post is invaluable. How can I find out more?
I do agree with all of the concepts you have presented to your post.
They are very convincing and will definitely work.
Nonetheless, the posts are very brief for starters.
May you please prolong them a little from next time?
Thanks for the post.
Thank you for sharing your info. I truly appreciate your efforts and I am waiting for your further post thank you once again.
Greetings I am so delighted I found your
website, I really found you by mistake, while I was looking
on Bing for something else, Anyhow I am here now and would
just like to say many thanks for a remarkable post and a all round
interesting blog (I also love the theme/design), I don’t
have time to look over it all at the minute but I have saved it and also included your RSS feeds, so when I have time I will be
back to read a great deal more, Please do keep up the fantastic
jo.
Also visit my blog post :: http://www.keeha.co.kr
I blog often and I truly thank you for your information.
This article has really peaked my interest. I am going to book mark your website and keep checking for new information about once a week.
I opted in for your Feed as well.
Keep on writing, great job!
Greetings I am so excited I found your webpage,
I really found you by accident, while I was
searching on Askjeeve for something else, Nonetheless I am here now and would just like to say kudos for a
marvelous post and a all round thrilling blog (I also love the
theme/design), I don’t have time to go through it all at the moment
but I have book-marked it and also included your RSS
feeds, so when I have time I will be back to read a great deal
more, Please do keep up the excellent jo.
Paragraph writing is also a excitement, if you be familiar with then you can write if not it is complicated to write.
Thanks on your marvelous posting! I actually enjoyed reading it, you happen to be a great author.I will remember to bookmark your blog and
will often come back in the foreseeable future.
I want to encourage you to continue your great posts, have a nice holiday weekend!
Hi, I do believe this is an excellent site. I stumbledupon it ;
) I may return yet again since I book-marked it. Money and freedom
is the best way to change, may you be rich and continue
to help other people.
Amazing postings. Appreciate it!