/ linux

VMess

nginx install

没有 yum 的话

sudo apt-get update
sudo apt-get install nginx
sudo nginx -t

反正就是放在对应的能生效的地方
/etc/nginx/sites-enabled/*.conf

server {
    listen 443 http2 ssl;
    server_name xxxxxxxxxxxxxxxxxxxxx;
    ssl on;
    ssl_certificate /etc/nginx/conf.d/1_xxxx.com_bundle.crt;
    ssl_certificate_key /etc/nginx/conf.d/2_xxxx.com.key;
    ssl_session_timeout 5m;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
    ssl_prefer_server_ciphers on;

    location / {

        proxy_redirect off;
        proxy_pass http://127.0.0.1:xxxxx;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $http_host;

        # Show realip in v2ray access.log
        # proxy_set_header X-Real-IP $remote_addr;
        # proxy_set_header Host $host;
        # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

    }
}

注意:记得端口要相同,还有服务器和客户端的id要相同哦~

nginx note

启动

systemctl start nginx

重启

systemctl reload nginx

查看进程

ps -ef |grep nginx

v2

https://toutyrater.github.io/prep/install.html

config

https://toutyrater.github.io/prep/vmess.html

UUID Generator

现已支持 http2

v2ray/config.json

记得要有对应日志文件存在不然会报错

{
  "log":{
    "access":"/var/log/v2ray/access.log",
    "error":"/var/log/v2ray/error.log",
    "loglevel":"warning"
  },
  "inbounds": [{
    "port": xxxxx,
    "protocol": "vmess",
    "settings": {
      "clients": [
        {
          "id": "xxxxxxxxxxxxxxxxxxxxxx",
          "level": 1,
          "alterId": 64
        }
      ]
    },"streamSettings": {
        "network": "ws",
        "security": "auto",
        "wsSettings": {
          "path": "/"
        }
      }
  }],
  "outbounds": [{
    "protocol": "freedom",
    "settings": {}
  }]
}

note

  • 查看服务状态
systemctl status v2ray 
  • 重启服务
systemctl restart v2ray 
  • 停止服务
systemctl stop v2ray 
  • 启动服务
systemctl start v2ray 

想法

访问速度还是太慢,下周打开bbr再测试一下速度。

发现 Vultr 上的 Ubuntu 自带bbr的……

lsmod | grep bbr