V2Ray
服务器部署
安装apache2
apt install apache2
sudo a2enmod ssl
sudo a2enmod proxy
sudo a2enmod proxy_wstunnel
sudo a2enmod proxy_http
sudo a2enmod rewrite
sudo a2enmod headers
修改port、添加页面配置文件
安装v2ray
配置文件
证书文件
服务器安全组
443端口
Tls Websocket转发v2ray代理
##Apache2 config
<VirtualHost *:443>
ServerName vps.lado.online.
ServerAlias vps.lado.online.
DocumentRoot /var/www/
SSLEngine On
SSLCertificateFile /etc/v2ray/vps.lado.online_public.crt
SSLCertificateKeyFile /etc/v2ray/vps.lado.online.key
SSLCertificateChainFile /etc/v2ray/vps.lado.online_chain.crt
RewriteEngine On
RewriteCond %{HTTP:Upgrade} =websocket [NC]
RewriteRule /vmess(.*) ws://localhost:9527/$1 [P,L]
RewriteCond %{HTTP:Upgrade} !=websocket [NC]
RewriteRule /vmess(.*) http://localhost:9527/$1 [P,L]
##Proxy to port 9527
#Replace xxx.xxx.xxx.xxx with your servers IP adress or hostname
#Replace yourCertname with your servers SSL certificate name
#SSLProxyEngine On
#Proxypass /ray http://127.0.0.1:9527
#ProxyPassReverse /ray http://127.0.0.1:9527
</VirtualHost>
Last updated