| 本帖最後由 yiucsw 於 2019-12-21 12:53 編輯 
 谢谢改正了。 Enable TLS 是不成功的問題。
 在v2ray log 內, error message. 301 Move Permanently.
 发现是lighttpd conf 內弄錯。 (andriod 的 v2ray client 沒有問題,只是PC 端 不成)
 
 原因:原本用 v2ray.dynu.com。 TLS 要用Goddy 的domain. SSL 看到我用v2ray.dynu.com,有Certification error. 改了v2ray 的Server 名字,SSL 過了 Certification check. Android 端能 上V2ray, 所以沒有想是lighttpd 的問題。。
 
 lighttpd config :
 $HTTP["host"] == "v2ray.myserver.com"
 
 現在 client 的 v2ray config. tls + ws
 {
 "log" : {
 "access": "/var/log/v2ray-access.log",
 "error": "/var/log/v2ray-error.log",
 "loglevel": "warning"
 },
 "inbounds": [
 {
 "port": 1080,
 "listen": "0.0.0.0",
 "protocol": "socks",
 "sniffing": {
 "enabled": true,
 "destOverride": ["http", "tls"]
 },
 "settings": {
 "auth": "noauth",
 "udp": false
 }
 }
 ],
 "outbounds": [
 {
 "protocol": "vmess",
 "settings": {
 "vnext": [
 {
 "address": "v2ray.myserver.com",
 "port": 443,
 "users": [
 {
 "id": "c50bf28e-98cd-a351-b8d5-d60d56c376c7",
 "alterId": 64
 }
 ]
 }
 ]
 },
 "streamSettings": {
 "network": "ws",
 "security": "tls",
 "tlsSettings": {
 "allowInsecure": true,
 "serverName": "v2ray.myserver.com"},
 "wsSettings": {
 "path": "/vpath"
 }
 },
 "mux": {"enabled": true}
 },
 {
 "protocol": "freedom",
 "settings": {},
 "tag": "direct" //如果要使用路由,这个 tag 是一定要有的,在这里 direct 就是 freedom 的一个标号,在路由中说 direct V2Ray 就知道是这里的 freedom 了
 }
 ],
 "routing": {
 "domainStrategy": "IPOnDemand",
 "rules": [
 {
 "type": "field",
 "outboundTag": "direct",
 "domain": ["geosite:cn"] // 中国大陆主流网站的域名
 },
 {
 "type": "field",
 "outboundTag": "direct",
 "ip": [
 "geoip:cn", // 中国大陆的 IP
 "geoip:private" // 私有地址 IP,如路由器等
 ]
 }
 ]
 }
 }
 
 Startup  (match server side log's location.)
 rm /var/log/v2ray-error.log > /dev/null 2>&1
 rm /var/log/v2ray-access.log > /dev/null 2>&1
 
 現在 Server v2ray log 有error message,大概 7 second 一次
 rejected  v2ray.com/core/proxy/vmess/encoding: failed to read request header > websocket: close 1000 (normal)
 |