鏡の夢 - 2020年8月
type: channel
link: http://loli.world/2020/08/
items: Haproxy + Nginx + V2ray + VLESS
items: 大概不会再换博客了？

Haproxy + Nginx + V2ray + VLESS
type: item
date: 2020-08-07T13:07:00+00:00
description: 2020-09-12 更新：V2ray config fallback -> fallbacks2020-11-04 更新：感谢 @John 的建议，修改 Haproxy 和 V2ray 配置，增加 Trojan 方式和获取真实 ip我使用的是 Haproxy+Nginx/OpenResty+V2ray，和 GitHub 仓库示例不同，我没用 V2ray 处理 TLS, 用的是 Haproxy，Tcp 和 WebSocket 方式都有，仅贴出关键配置文件作为参考，客户端连接域名都为 www.example.com，端口 443怎么安装 xxx 、怎么我没有 xxx 文件、怎么申请域名和证书、怎么配置证书，自行 googleHaproxy:自行替换域名、证书路径，如有需要自行替换 /ray 路径global log /dev/log local0 log /dev/log local1 notice chroot /var/lib/haproxy stats socket /run/haproxy-stat.sock mode 660 level admin expose-fd listeners pidfile /run/haproxy.pid stats timeout 30s user haproxy group haproxy daemon ssl-default-bind-ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384 ssl-default-bind-ciphersuites TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256 ssl-default-bind-options no-sslv3 no-tlsv10 no-tlsv11 no-tls-tickets ssl-default-server-ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384 ssl-default-server-ciphersuites TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256 ssl-default-server-options no-sslv3 no-tlsv10 no-tlsv11 no-tls-tickets ssl-dh-param-file /etc/ssl/dhparam.pem defaults log global mode tcp option dontlognull timeout connect 15s timeout client 300s timeout server 300s frontend http mode tcp bind *:80 bind [::]:80 tcp-request inspect-delay 5s tcp-request content accept if HTTP use_backend openresty_http if HTTP frontend tls mode tcp bind *:443 ssl crt /etc/ssl/ecc.pem crt /etc/ssl/xx.pem alpn h2,http/1.1 bind [::]:443 ssl crt /etc/ssl/ecc.pem crt /etc/ssl/xx.pem alpn h2,http/1.1 tcp-request inspect-delay 5s tcp-request content accept if HTTP # V2ray 域名 acl v2ray_host hdr(host…

大概不会再换博客了？
type: item
date: 2020-08-07T12:59:00+00:00
description: 就这样吧，虽然以前的文章都有存档，但大部分都是发牢骚，选了些正经的发出来，至于评论那是永久性丢失