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,103 thoughts on “How To Install V2ray Websocket(WS)+TLS+CDN on a VPS”
I really love your website.. Pleasant colors & theme.
Did you build this site yourself? Please reply back as I’m
attempting to create my own personal website and would
love to know where you got this from or just what the theme is called.
If you desire to improve your knowledge just keep visiting this site and be updated with
the most recent information posted here.
For those who choose our firm to carry out your lock smith request, our technicians can rapidly diagnose your difficulty,
and provide a range of options for repairs and replacements, whether
you are looking for a quality improve or a cost-environment friendly resolution. If it’s hacked, even once, if you
possibly can duplicate coins, inflate coins, and that’s a persistent difficulty and an unfixable challenge, then the worth
goes away. And the thing that’s different about cryptocurrency
is that safety is a fundamental characteristic. This presents progress opportunities for locksmiths because new homeowners require new locks and
security programs. Do locksmiths make some
huge cash? There’s a e book by Kenneth Ackerman, for
instance, Trotsky in New York, the place he raised
money in New York. Even the brand new York Times
had something of this, like Lenin was a German agent.
Also Lenin was basically launched by the German authorities.
Until not too long ago, the most trendy access control know-how was
reserved for authorities and companies. The most obvious is every authorities on the planet, each bank, knows what CBDCs (Central
Bank Digital Currencies) are, at the very least in concept.
Write more, thats all I have to say. Literally, it seems as though you relied on the video to make your point.
You clearly know what youre talking about, why throw away your intelligence on just posting videos to your weblog when you could be giving
us something enlightening to read?
Hello to every one, as I am in fact keen of reading this website’s post to be updated on a regular basis.
It carries good information.
I am really impressed with your writing skills as well as with the
layout on your blog. Is this a paid theme or did you
customize it yourself? Either way keep up the nice quality
writing, it’s rare to see a great blog like this one
I used to be able to find good information from your blog posts.
Hi there! I just wanted to ask if you ever have any problems with
hackers? My last blog (wordpress) was hacked and I
ended up losing a few months of hard work due to no back up.
Do you have any solutions to prevent hackers?
Asking questions are genuinely nice thing if you are not understanding anything entirely, however this article gives pleasant understanding even.
actos 10 mg
It’s really a nice and helpful piece of information. I’m
happy that you simply shared this helpful information with us.
Please keep us informed like this. Thank you for sharing.
Hi there to all, it’s genuinely a nice for me to pay a quick visit this web site, it consists of helpful Information.
I like the valuable information you provide in your articles.
I’ll bookmark your weblog and check again here frequently.
I’m quite sure I will learn plenty of new stuff right here!
Best of luck for the next!
medrol buy online
zoloft cost australia
In fact, a large amount of questions are a great deal more sophisticated than a casual observer
may possibly decide on, depending on their position. I’m not saying that I happen to be a guru
on this unique subject at-hand, for that reason I suppose it’s for other site subscribers to start thinking about.
I am definitely not trying to start problem or be maddening.
Alternatively, I fully understand from knowledge that the aforementioned can easily be the case.
I practice Perinatal Massage Therapy, and in my own personal selected concentration, I experience it very much.
New Postnatal Massage Therapists are prone to overpromise; which may be, these people
don’t yet really appreciate the restrictions of
their “scope of practice,” and consequently they would probably come up with statements that
are overbroad when chatting with patients. It’s the comparable phenomenon; they have
been minimally schooled in a topic, don’t understand the total breadth
of this, and now believe they are the Experts. https://mobilemassagenj.livejournal.com/13513.html
Hi there all, here every one is sharing these knowledge, therefore it’s
good to read this webpage, and I used to pay
a visit this web site all the time.
Review my web-site [ homepage]
I just could not leave your site prior to suggesting that I actually enjoyed the usual info an individual provide in your
visitors? Is gonna be back regularly in order to inspect new posts
Hey would you mind stating which blog platform you’re using?
I’m going to start my own blog in the near future but I’m having
a tough time selecting between BlogEngine/Wordpress/B2evolution and Drupal.
The reason I ask is because your design and style seems different then most blogs and I’m looking for something completely unique.
P.S Sorry for being off-topic but I had to ask!
all the time i used to read smaller articles that as well clear their motive, and that
is also happening with this article which I am reading here.
propecia without a prescription
I’d like to find out more? I’d want to find out some additional
These are really wonderful ideas in regarding blogging.
You have touched some nice things here. Any way keep up wrinting.
In fact no matter if someone doesn’t be aware of
then its up to other visitors that they will assist, so here it happens.
Paragraph writing is also a fun, if you know after that
you can write if not it is difficult to write.
hydrochlorothiazide online canada
You can definitely see your enthusiasm within the work you write.
The world hopes for more passionate writers like you who aren’t afraid to mention how they believe.
At all times follow your heart.
synthroid 88 mcg tab
I blog frequently and I seriously thank you for your information. This
great article has truly peaked my interest. I’m going to
take a note of your blog and keep checking for new information about once a week.
I subscribed to your Feed too.
buy viagra online
Medication information sheet. Long-Term Effects.
All what you want to know about drug. Read now.
I’m really impressed with your writing skills and also with the layout on your blog.
Is this a paid theme or did you modify it yourself?
Anyway keep up the excellent quality writing, it’s rare to see a great
blog like this one nowadays.
Wow that was odd. I just wrote an extremely long comment but after I clicked submit my comment didn’t
show up. Grrrr… well I’m not writing all that over again. Regardless, just
wanted to say fantastic blog!
Fantastic website you have here but I was wanting to know if you knew of any forums that
cover the same topics discussed here? I’d really like
to be a part of community where I can get feed-back from other knowledgeable people that share the same interest.
If you have any recommendations, please let me know.
Pretty component to content. I simply stumbled upon your weblog and in accession capital to claim
that I acquire actually loved account your blog posts.
Any way I will be subscribing in your feeds or even I
fulfillment you get right of entry to constantly fast.
Medicines information sheet. What side effects can this medication cause?
Some information about medicine. Read information here.
robaxin 400 mg
In fact, a large percentage of subject areas are more problematic
than some amateur observer might possibly determine,
in accordance with their vantagepoint. I’m not expressing that I happen to be an authority on this
unique concern at-hand, so I know it’s for different message board people to bear in mind.
I am not necessarily wanting to make difficulties or be
bothersome. Rather, I know from knowledge that this could be the instance.
I am educated in Perinatal Massage, and in my own personal targeted concentration, I see it quite a lot.
New Postpartum Massage Practitioners are apt to overstate claims;
that is, these people don’t at this point seriously
recognize the limitations of their personal “scope of practice,” and
hence they will make statements that are too general when speaking with patients.
It’s the same occurrence; they have been minimally schooled in a theme, don’t understand the thorough degree of it all, and
now believe they are the Masters. https://mobilemassagenj.livejournal.com/8599.html
Awesome blog! Do you have any hints for aspiring writers?
I’m hoping to start my own site soon but I’m a little lost on everything.
Would you propose starting with a free platform like WordPress or
go for a paid option? There are so many options out there that I’m totally confused ..
Any recommendations? Kudos!
I do not know whether it’s just me or if perhaps everyone else
encountering problems with your site. It looks like some of
the written text on your content are running off the screen. Can someone
else please comment and let me know if this is
happening to them as well? This might be a issue with my browser because I’ve had
this happen previously. Many thanks
buy cheap hydrochlorothiazide
Hey very interesting blog!
buy flomax 0.4 mg