GithubHelp home page GithubHelp logo

lhong1008 / autov2ray Goto Github PK

View Code? Open in Web Editor NEW

This project forked from iitii/autov2ray

0.0 0.0 0.0 48 KB

let v2ray configrue automatic ( TLS+NGINX+WEB )

Home Page: https://github.com/IITII/AutoV2ray2

License: MIT License

Shell 89.13% HTML 5.37% Dockerfile 5.50%

autov2ray's Introduction

AutoV2ray

let v2ray configure automatic ( TLS+NGINX+WEB )
Just put your site file on www dir if you want to use your own site as the web page

简体中文

  • quick start
git clone https://github.com/IITII/AutoV2ray.git && cd AutoV2ray

## Manual add firewallcmd rules
sudo -i
sudo apt update -y && sudo apt install firewalld git -y
sudo firewall-cmd --zone=public --permanent --add-port=22/tcp
sudo firewall-cmd --zone=public --permanent --add-port=80/tcp
sudo firewall-cmd --zone=public --permanent --add-port=443/tcp
sudo firewall-cmd --reload
sudo systemctl enable firewalld
sudo systemctl status firewalld nginx v2ray
sudo systemctl start firewalld

## enable bbr via add kernel param
echo "net.core.default_qdisc=fq" >>/etc/sysctl.conf
echo "net.ipv4.tcp_congestion_control=bbr" >>/etc/sysctl.conf
sysctl -p

## quick deploy
site="baidu.com" && \
./v2ray.sh -w $site --ddns $site

## update ddns record base on dns.he.net
site="baidu.com" && \
siteName=$site && \
he_net_ddns_key=$site && \
curl -4 "https://$siteName:$he_net_ddns_key@dyn.dns.he.net/nic/update?hostname=$siteName"

Notice

  1. v2ray will use self-signed certificate if you don't give a dns.he.net ddns_key and sslPath either
  2. Honestly, I don't recommend the self-signed certificates
  3. Due to the safety reason, I disabled TLSv1.0 and use TLS1.3 for TLS protocol. ( Why I am keeping TLSv1.2? Just for better compatibility)
  4. TLSv1.3 required NGINX v1.13.0+. So check your nginx version first if your install is failed.

Pre-check

  1. Have a domain
  2. A clean linux server
  3. Some basic knowledge of operating Linux

Additional

  1. A domain on dns.he.net which had configured ddns

Some presume

  1. Your server ip is: 1.1.1.1
  2. Your domain is: v2.google.com
  3. Your ddns key is: re35A5xFGdEzrRow
  4. Your ws path is: path
  5. Your uuid is: 85d0e39a-4571-44da-80bb-caf5f853c2ba

Quick start

  1. Login to your server: ssh [email protected]
  2. Clone repo: git clone https://github.com/IITII/AutoV2ray.git
  3. Follow some example
  4. Enjoy yourself

Example

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

Debug

  • systemctl status v2ray nginx & cat /var/v2ray/config.json & cat /etc/nginx/sites-enabled/default will help you a lot.

Upgrade or re-deploy

  • Using config from config file

Sample
re-deploy from www.google.com to v2.google.com

domain=v2.google.com
v2() {
    domain="$1"
    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
}
rm -rf " /etc/nginx/ssl/$domain" && v2 $domain

Problems

all problems is fixed on last commit

  • invalid user: VMessAEAD is enforced and a non VMessAEAD connection is received.

set alterId: 0 at client OR Environment="V2RAY_VMESS_AEAD_FORCED=false" to Service

  • clashX configure sample base on ClashX 1.90.0+

autov2ray's People

Contributors

iitii avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.