let v2ray configure automatic ( TLS+NGINX+WEB )
Just put your site file onwww
dir if you want to use your own site as the web page
- v2ray will use self-signed certificate if you don't give a dns.he.net ddns_key and sslPath either
- Honestly, I don't recommend the self-signed certificates
- Due to the safety reason, I disabled
TLSv1.0
and useTLS1.3
for TLS protocol. ( Why I am keeping TLSv1.2? Just for better compatibility) - TLSv1.3 required NGINX v1.13.0+. So check your nginx version first if your install is failed.
- Have a domain
- A clean linux server
- Some basic knowledge of operating Linux
- A domain on dns.he.net which had configured ddns
- Your server ip is:
1.1.1.1
- Your domain is:
v2.google.com
- Your ddns key is:
re35A5xFGdEzrRow
- Your ws path is:
path
- Your uuid is:
85d0e39a-4571-44da-80bb-caf5f853c2ba
- Login to your server:
ssh [email protected]
- Clone repo:
git clone https://github.com/IITII/AutoV2ray.git
- Follow some example
- Enjoy yourself
git clone https://github.com/IITII/AutoV2ray.git && cd AutoV2ray
bash ./v2ray -w "v2.google.com"
bash ./v2ray -w "v2.google.com"
bash ./v2ray -w "v2.google.com" -p "path"
bash ./v2ray -w "v2.google.com" -p "path" -u "85d0e39a-4571-44da-80bb-caf5f853c2ba"
bash ./v2ray -w "v2.google.com" -p "path" -u "85d0e39a-4571-44da-80bb-caf5f853c2ba" --ddns "re35A5xFGdEzrRow"
bash ./v2ray -w "v2.google.com" -p "path" -u "85d0e39a-4571-44da-80bb-caf5f853c2ba" --sslPath "/etc/nginx/ssl"
systemctl status v2ray nginx
root@test-machine# bash v2ray.sh
Usage:
draft/v2ray.sh -h, --help Show this page
draft/v2ray.sh -w siteName
draft/v2ray.sh -p, --path v2ray web socket path, default "/bin/date +"%S" | /usr/bin/base64"
draft/v2ray.sh -u, --uuid v2ray uuid
draft/v2ray.sh --ddns dns.he.net ddns's key
draft/v2ray.sh --sslPath ssl cert path
systemctl status v2ray nginx
&cat /var/v2ray/config.json
&cat /etc/nginx/sites-enabled/default
will help you a lot.
- Using config from config file
Sample
re-deploy from www.google.com to v2.google.com
v2() {
domain="$1.google.com"
vpath=$(cat /usr/local/etc/v2ray/config.json | grep -e 'path' -e 'id' | awk -v FS='"' '{print $4}' | grep '/' | sed 's/\///g')
vuuid=$(cat /usr/local/etc/v2ray/config.json | grep -e 'path' -e 'id' | awk -v FS='"' '{print $4}' | grep '/' -v)
echo "$domain $vpath $vuuid"
./v2ray.sh -w $domain -p $vpath -u $vuuid --ddns $domain
}
# cd AutoV2ray
v2 v2