$$+V2ray-plugin+Nginx(websocket)+Cloudflare(CDN)

作者:admin | 时间:April 23, 2019 | 分类:router | 评论:0 ℃

Server

server {
        listen       443 ssl http2;
        listen       [::]:443 ssl http2;
        server_name  example.com;     # Your domain.
        root         /usr/share/nginx/html/;
        ssl_certificate "/path/to/cert";     # Path to certificate
        ssl_certificate_key "/path/to/key";     # Path to private key
        ssl_session_cache shared:SSL:1m;
        ssl_session_timeout  10m;
        ssl_ciphers HIGH:!aNULL:!MD5;
        ssl_prefer_server_ciphers on;
        location /free {
            proxy_redirect off;
            proxy_http_version 1.1;
            proxy_pass http://localhost:8008;     # Port of v2ray-plugin
            proxy_set_header Host $http_host;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
        }
	}
{
    "server":"localhost", 
    "local_port":1080,
    "password":"password",
    "timeout":300,
    "method":"aes-256-gcm",
}
ss-server -c config.json -p 8008 --plugin v2ray-plugin --plugin-opts "server;path=/free;loglevel=none" -f /tmp/ss.pid

Client:

{
  "server": "104.24.127.112",
  "server_port": 443,
  "local_address": "127.0.0.1",
  "local_port": 1080,
  "password": "password",
  "method": "aes-256-gcm",
  "plugin": "v2ray-plugin",
  "plugin_opts": "tls;path=/free;host=example.com;loglevel=none",
  "timeout": 60
}