kuoruan / luci-app-v2ray

LuCI support for V2Ray
1.17k stars 284 forks source link

正常的配置但却没有成功 #117

Closed oe77 closed 4 years ago

oe77 commented 4 years ago

传输协议:WebSocket + TLS

版本号:luci-app-v2ray 1.5.4-1 | v2ray-core 4.22.1-6

昨天还可以的,重装一下路由,然后怎么配置v2ray都不成功了!完全没有解决问题的方向感!我觉得自己的配置是正确,但就是用不了!求大佬们支招!小弟真的力不从心了

配置:
{
    "log": {
        "access": "/var/log/v2ray-access.log",
        "loglevel": "debug",
        "error": "/var/log/v2ray-error.log"
    },
    "dns": {
        "servers": [
            "1.1.1.1",
            "8.8.8.8",
            {
                "address": "208.67.222.222",
                "port": 5353
            },
            {
                "address": "114.114.114.114",
                "port": 53,
                "domains": [
                    "geosite:cn"
                ]
            }
        ]
    },
    "routing": {
        "domainStrategy": "IPOnDemand",
        "rules": [
            {
                "type": "field",
                "ip": [
                    "geoip:private",
                    "geoip:cn"
                ],
                "outboundTag": "direct"
            },
            {
                "type": "field",
                "domain": [
                    "geosite:cn"
                ],
                "outboundTag": "direct"
            },
            {
                "type": "field",
                "protocol": [
                    "bittorrent"
                ],
                "outboundTag": "direct"
            },
            {
                "type": "field",
                "port": "53",
                "network": "udp",
                "inboundTag": [
                    "transparent"
                ],
                "outboundTag": "dns_out"
            },
            {
                "type": "field",
                "ip": [
                    "1.1.1.1",
                    "8.8.8.8",
                    "208.67.222.222"
                ],
                "outboundTag": "proxy"
            }
        ]
    },
    "inbounds": [
        {
            "listen": "0.0.0.0",
            "port": 1081,
            "protocol": "dokodemo-door",
            "settings": {
                "followRedirect": true,
                "network": "tcp,udp"
            },
            "streamSettings": {
                "sockopt": {
                    "tproxy": "redirect"
                }
            },
            "tag": "transparent",
            "sniffing": {
                "enabled": true,
                "destOverride": [
                    "http",
                    "tls"
                ]
            }
        }
    ],
    "outbounds": [
        {
            "protocol": "freedom",
            "settings": {

            },
            "streamSettings": {
                "sockopt": {
                    "mark": 255
                }
            },
            "tag": "direct"
        },
        {
            "protocol": "blackhole",
            "settings": {

            },
            "streamSettings": {
                "sockopt": {
                    "mark": 255
                }
            },
            "tag": "block"
        },
        {
            "sendThrough": "0.0.0.0",
            "protocol": "dns",
            "settings": {

            },
            "streamSettings": {
                "sockopt": {
                    "mark": 255
                }
            },
            "tag": "dns_out"
        },
        {
            "sendThrough": "0.0.0.0",
            "protocol": "vmess",
            "settings": {
                "vnext": [
                    {
                        "address": "qq.com",
                        "port": 443,
                        "users": [
                            {
                                "id": "999999999999",
                                "alterId": 233,
                                "security": "auto"
                            }
                        ]
                    }
                ]
            },
            "streamSettings": {
                "network": "ws",
                "security": "tls",
                "tlsSettings": {
                    "allowInsecure": false,
                    "allowInsecureCiphers": false,
                    "disableSystemRoot": false,
                    "certificates": [

                    ]
                },
                "wsSettings": {
                    "path": "/",
                    "headers": {
                        "Host": "qq.com"
                    }
                },
                "sockopt": {
                    "mark": 255
                }
            }
        }
    ]
}
日志:
2020/03/20 08:58:24 [Info] v2ray.com/core/proxy/freedom: opening connection to udp:1.1.1.1:53
2020/03/20 08:58:24 [Info] v2ray.com/core/app/dns: UDP:1.1.1.1:53 got answere: activity.windows.com. TypeA -> [20.36.219.28] 160.98549ms
2020/03/20 08:58:24 [Debug] v2ray.com/core/app/dns: UDP:1.1.1.1:53 updating IP records for domain:activity.windows.com.
2020/03/20 08:58:24 [Info] v2ray.com/core/app/dns: UDP:1.1.1.1:53 got answere: activity.windows.com. TypeA -> [20.36.219.28] 161.385512ms
2020/03/20 08:58:24 [Debug] v2ray.com/core/app/dns: UDP:1.1.1.1:53 updating IP records for domain:activity.windows.com.
2020/03/20 08:58:30 [Debug] v2ray.com/core/transport/internet/udp: UDP original destination: udp:202.96.134.33:53
2020/03/20 08:58:30 [Debug] [1760727262] v2ray.com/core/proxy/dokodemo: processing connection from: 192.168.88.252:52934
2020/03/20 08:58:30 [Info] [1760727262] v2ray.com/core/app/dispatcher: taking detour [direct] for [udp:202.96.134.33:53]
2020/03/20 08:58:30 [Info] [1760727262] v2ray.com/core/proxy/freedom: opening connection to udp:202.96.134.33:53
2020/03/20 08:58:32 [Info] v2ray.com/core/app/proxyman/outbound: failed to process outbound traffic > v2ray.com/core/proxy/freedom: connection ends > context canceled
2020/03/20 08:58:32 [Info] v2ray.com/core/transport/internet/udp: failed to handle UDP input > io: read/write on closed pipe
2020/03/20 08:58:37 [Info] [3248140828] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/dokodemo: connection ends > context canceled
2020/03/20 08:58:37 [Info] [2007699586] v2ray.com/core/app/proxyman/outbound: failed to process outbound traffic > v2ray.com/core/proxy/freedom: connection ends > context canceled
2020/03/20 08:58:37 [Info] [2007699586] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/dokodemo: connection ends > v2ray.com/core/proxy/dokodemo: failed to transport response > io: read/write on closed pipe
2020/03/20 08:58:37 [Info] [2144266772] v2ray.com/core/app/proxyman/outbound: failed to process outbound traffic > v2ray.com/core/proxy/freedom: connection ends > context canceled
2020/03/20 08:58:37 [Info] [2144266772] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/dokodemo: connection ends > v2ray.com/core/proxy/dokodemo: failed to transport response > io: read/write on closed pipe
2020/03/20 08:58:37 [Info] [2159435467] v2ray.com/core/app/proxyman/outbound: failed to process outbound traffic > v2ray.com/core/proxy/freedom: connection ends > context canceled
2020/03/20 08:58:37 [Info] [2159435467] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/dokodemo: connection ends > v2ray.com/core/proxy/dokodemo: failed to transport response > io: read/write on closed pipe
2020/03/20 08:58:37 [Info] [2161182821] v2ray.com/core/app/proxyman/outbound: failed to process outbound traffic > v2ray.com/core/proxy/freedom: connection ends > context canceled
2020/03/20 08:58:37 [Info] [2161182821] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/dokodemo: connection ends > v2ray.com/core/proxy/dokodemo: failed to transport response > io: read/write on closed pipe
2020/03/20 08:58:37 [Info] [1154533455] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/dokodemo: connection ends > context canceled

当我把所有入站连接都转发到我新配的出站连接,我发觉日志只有提示入站请求,并没有出站信息!(此时啥网都上不了)出站连接是一键导入的,应该不会设置错的!

日志:
2020/03/20 21:51:18 [Warning] v2ray.com/core: V2Ray 4.22.1 started
2020/03/20 21:51:18 [Info] v2ray.com/core/app/dns: DNS: created udp client inited for 1.1.1.1:53
2020/03/20 21:51:18 [Info] v2ray.com/core/app/dns: DNS: created udp client inited for 8.8.8.8:53
2020/03/20 21:51:18 [Info] v2ray.com/core/app/dns: DNS: created udp client inited for 223.5.5.5:53
2020/03/20 21:51:18 [Info] v2ray.com/core/app/dns: DNS: created udp client inited for 114.114.114.114:53
2020/03/20 21:51:18 [Debug] v2ray.com/core/app/proxyman/inbound: creating stream worker on 0.0.0.0:1081
2020/03/20 21:51:18 [Info] v2ray.com/core/transport/internet/tcp: listening TCP on 0.0.0.0:1081
2020/03/20 21:51:18 [Info] v2ray.com/core/transport/internet/udp: listening UDP on 0.0.0.0:1081
2020/03/20 21:51:23 [Debug] v2ray.com/core/transport/internet/udp: UDP original destination: udp:192.168.88.252:53
2020/03/20 21:51:23 [Debug] [3844957468] v2ray.com/core/proxy/dokodemo: processing connection from: 192.168.88.250:23173
2020/03/20 21:51:23 [Info] [3844957468] v2ray.com/core/app/dispatcher: default route for udp:192.168.88.252:53
2020/03/20 21:51:23 [Debug] v2ray.com/core/transport/internet/udp: UDP original destination: udp:192.168.88.252:53
2020/03/20 21:51:23 [Info] [3844957468] v2ray.com/core/proxy/vmess/outbound: tunneling request to udp:192.168.88.252:53 via tcp:qq.com:443
2020/03/20 21:51:23 [Debug] [2270543245] v2ray.com/core/proxy/dokodemo: processing connection from: 192.168.88.250:65324
2020/03/20 21:51:23 [Info] [2270543245] v2ray.com/core/app/dispatcher: default route for udp:192.168.88.252:53
2020/03/20 21:51:23 [Info] [2270543245] v2ray.com/core/proxy/vmess/outbound: tunneling request to udp:192.168.88.252:53 via tcp:qq.com:443
2020/03/20 21:51:23 [Debug] v2ray.com/core/transport/internet/udp: UDP original destination: udp:192.168.88.252:53
2020/03/20 21:51:23 [Debug] [1856518331] v2ray.com/core/proxy/dokodemo: processing connection from: 192.168.88.250:47463
2020/03/20 21:51:23 [Info] [1856518331] v2ray.com/core/app/dispatcher: default route for udp:192.168.88.252:53
2020/03/20 21:51:23 [Info] [1856518331] v2ray.com/core/proxy/vmess/outbound: tunneling request to udp:192.168.88.252:53 via tcp:qq.com:443
2020/03/20 21:48:58 [Debug] v2ray.com/core/transport/internet/udp: UDP original destination: udp:192.168.88.252:53
2020/03/20 21:51:27 [Info] [2270543245] v2ray.com/core/proxy/vmess/outbound: tunneling request to tcp:qq.com:443 via tcp:qq.com:443
2020/03/20 21:51:27 [Debug] [3844957468] v2ray.com/core/app/proxyman/outbound: proxying to proxy_1 for dest tcp:qq.com:443
kuoruan commented 4 years ago

没看出配置的问题,你透明代理怎么设置的?

oe77 commented 4 years ago

@kuoruan 20200321133903

v2ray PC客户端能正常使用,但放到路由就连不了!

[Warning] v2ray.com/core/app/proxyman/outbound: failed to process outbound traffic > v2ray.com/core/proxy/vmess/outbound: failed to find an available destination > v2ray.com/core/common/retry: [v2ray.com/core/transport/internet/websocket: failed to dial WebSocket > v2ray.com/core/transport/internet/websocket: failed to dial to (wss://qq.com/):  > dial tcp 88.88.88.88:443: operation was canceled v2ray.com/core/transport/internet/websocket: failed to dial WebSocket > v2ray.com/core/transport/internet/websocket: failed to dial to (wss://qq.com/):  > dial tcp: operation was canceled] > v2ray.com/core/common/retry: all retry attempts failed

墙外IP都是超时的!ipset list v2ray_dst_proxy_v4 1

我发觉我的防火墙对比其他人好像少了点规则!iptables -t nat -nL 3

iptables -t mangle -nL 2

kuoruan commented 4 years ago

防火墙是正常的。试试不用 tproxy 呢? 然后看看服务器端日志呢?

oe77 commented 4 years ago

@kuoruan 服务器的v2ray日志打不开,不知道啥问题!不用tproxy也是不行!上次弄了一个早上才弄好,是设置上的问题,这次弄了两天也弄不好!路由固件,都是一样的!弄了两台服务器装v2ray,结果都一样!

kuoruan commented 4 years ago

先把透明代理关了,入站添加一个 socks 代理,直接用浏览器使用这个入站代理试试。

oe77 commented 4 years ago

弄好了,原来主路由没设置好!