使用V2Ray Websocket + Nginx TLS + CDN 笔记

1.1 服务器租赁

教程链接:https://233yes.com/post/2/

1.2 域名注册

教程链接:https://www.freehao123.com/freenom-tk-ml-ga-cf-gq/

1.3 伪装主页

教程链接:https://blog.csdn.net/u012486840/article/details/52610320

1.4 CND转发

教程链接:https://support.cloudflare.com/hc/zh-cn/articles/205195708-%E7%AC%AC-3-%E6%AD%A5-%E5%B0%86%E6%82%A8%E7%9A%84%E5%9F%9F%E5%90%8D%E6%9C%8D%E5%8A%A1%E5%99%A8%E6%9B%B4%E6%94%B9%E4%B8%BA-Cloudflare

1.5 v2ray安装

1.5.1 Linux服务器安装

        教程链接:https://www.v2ray.com/chapter_00/install.html

配置文件设置:

{
     "log" : {
         "access": "/var/log/v2ray/access.log",
         "error": "/var/log/v2ray/error.log",
         "loglevel": "debug"
     },
    
     "inbound": {
         "port": 10000,
         "listen":"127.0.0.1",//只监听 127.0.0.1,避免除本机外的机器探测到开放了 10000 端口
         "protocol": "vmess",
         "settings": {
             "clients": [{
                 "id": "#####################",  #GGID
                 "alterId": 233
             }]
         },
        
         "streamSettings": {
             "network": "ws",
             "wsSettings": {
                 "path": "/ray"
             }
         }
     },
  
     "outbound": {
         "protocol": "freedom",
         "settings": {}
     }
}


1.5.2 Window v2ray安装

教程链接:https://www.v2ray.com/chapter_00/install.html

image


配置文件设置:

{
     "log": {
         "loglevel": "debug"
     },

    "dns": {
         "server":[
             "8.8.8.8",
             "8.8.4.4"
         ]
     },

    "inbound": {
         "port": 2333,    # 本地端口
         "listen": "127.0.0.1",
         "protocol": "socks",
         "domainOverride": ["http", "tls"],
         "settings": {
             "auth": "noauth",
             "timeout": 300
         }
     },
  
   "outbound": {
     "protocol": "vmess",
     "settings": {
         "vnext":[
             {       
                 "address":"#######",# 域名
                 "port": 443,
                 "users": [
                     {
                         "id": "##################", # GGID与服务端保持一致
                         "alterId": 233,                               # 与服务端保持一致
                         "security": "aes-128-cfb",
                         "level": 0
                     }
                 ]
             }
         ]
     },
    
     "streamSettings":{
         "network":"ws",
         "security":"tls",
         "tlsSettings":{
             "serverName":"####",# 域名
             "allowInsecure": false
         },
         "wsSettings":{
             "path":"/ray"# 访问路径,与服务端和nginx.conf保持一致
         }
     },
    
     "mux": {
         "concurrency": 6,
         "enabled": true
     }
   }
}


1.5.3 Nginx 配置设置


worker_processes  1;

error_log  logs/error.log  notice;

events {
     worker_connections  1024;
}


http {
     include       mime.types;
     default_type  application/octet-stream;

    sendfile        on;

    keepalive_timeout  65;

    gzip          on;
     gzip_min_length     1k;
     gzip_buffers     4 16k;
     gzip_http_version     1.0;
     gzip_comp_level     2;
     gzip_types         text/plain application/x-javascript text/css application/xml;
     gzip_vary         on;

    server {
         listen       80;
         listen       443 ssl;
         # yourdomian.xx填写你注册的域名
         server_name  yourdomian localhost;

        ssl off;
         # 你的https证书和密钥地址
         ssl_certificate          /home/nginx/ssl/v2ray.crt;
         ssl_certificate_key      /home/nginx/ssl/v2ray.key;
         ssl_protocols        TLSv1 TLSv1.1 TLSv1.2;
        ssl_ciphers          HIGH:!aNULL:!MD5;

        # 这里写xx是你指定的访问路径,自己定一个,要保证和客户端的配置一直
         location = /ray {
             proxy_redirect     off;
             proxy_pass     http://127.0.0.1:10000;
             proxy_http_version    1.1;
             proxy_set_header    Upgrade $http_upgrade;
             proxy_set_header    Connection "upgrade";
             proxy_set_header    Host $http_host;
             }

        location / {
             root   html;
             index  index.html index.htm index.php;
         }

        error_page   500 502 503 504  /50x.html;
         location = /50x.html {
             root   html;
         }
     }

}

ssl安装教程:https://blog.csdn.net/Holmofy/article/details/79261123

1.6 浏览器设置

教程链接:https://blog.csdn.net/u012486840/article/details/52610320 

1.7 其他工具

DuckDuckGo搜索引擎(https://sspai.com/post/40117

LastPass密码工具(https://zhuanlan.zhihu.com/p/20079385

WordPress博客建站(https://www.jiustore.com/wordpress-for-beginners/

GUID生成工具(http://www.ofmonkey.com/transfer/guid


1.8 感谢公司大神ghost教导!!!

猜你喜欢

转载自www.cnblogs.com/yzdai/p/10239488.html