cary-sas / v2ray_bin

梅林380 固件的魔改科学上网插件
574 stars 128 forks source link

发现可能是时区的问题引起无法连接国外网站 #35

Closed mayaxcn closed 2 years ago

mayaxcn commented 2 years ago

服务端和客户端版本都升级为最新的V2ray 4.45.2,但国外网站无法打开打开,同样的配置在手机端上正常。进而去研究是否是转发的问题,通过修改配置文件增加v2ray_access_log配置,发现里面是有数据的,但是时间却和当前路由器上的时间相差的8个小时:

2022/06/24 05:53:44 192.168.50.195:6335 accepted tcp:172.67.200.185:443 [agentout] 2022/06/24 05:53:44 tcp:127.0.0.1:53794 accepted tcp:8.8.8.8:53 [agentout] 2022/06/24 05:53:44 tcp:127.0.0.1:53793 accepted tcp:8.8.8.8:53 [agentout] 2022/06/24 05:53:44 tcp:127.0.0.1:53792 accepted tcp:8.8.8.8:53 [agentout] 2022/06/24 05:53:44 192.168.50.195:6334 accepted tcp:34.225.234.66:443 [agentout] 2022/06/24 05:53:45 10.146.204.157:43313 accepted udp:191.96.185.46:22170 [agentout]

实际时间应该是13点53分,在路由器上用xshell登录并用date命令查看发现时间日期也是正确,但为嘛会写日志时出现时间不对呢?

另外是否因为这问题导致无法连接??

mayaxcn commented 2 years ago

补充一点:在路由器上有以上日志输出,证明流量已经转发到vmess上了,可是在v2ray的服务端access_log却没有看到相关的传入流量...同样的网络环境,用PC端客户端和IOS客户端均能在v2ray的服务端access_log看到正常的请求,请问这问题出在哪??

[agentout] <---??这中间还有啥---> [V2RAY_SERVER]

cary-sas commented 2 years ago

你可以把 二进制切换为 xray 试试, alterID 是设了 0吗

mayaxcn commented 2 years ago

是的,alterID 为0的,xray和v2ray的内核都试过了,还是同样的情况。

但在同样的网络环境和同样的配置,用PC的V2RAY客户端和IOS的ShadowsRocket客户端就正常使用,木有任何问题。之前用”科学上网“4.2.2版本的时候也可以正常使用的,有幸看到这插件的升级版本,立刻进行升级和配置。却没办法用上

cary-sas commented 2 years ago

你勾选“允许不安全”试试呢 https://github.com/cary-sas/v2ray_bin/issues/18

mayaxcn commented 2 years ago

我只使用单纯的kcp+we_chat伪装,并没有使用到tls和ws这些内容 image

cary-sas commented 2 years ago

kcp seed参数可以留空的吗

mayaxcn commented 2 years ago

这是h2和ws才需要用到的配置,上面也写着没有请留空

mayaxcn commented 2 years ago

【2022年06月24日 15:53:22】: ① 程序版本(插件版本:4.36.4):

程序 版本 备注 ss-redir 3.3.5 2020年9月15日编译 ss-tunnel 3.3.5 2020年9月15日编译 ss-local 3.3.5 2020年9月15日编译 v2ray-plugin 4.45.0 2022年4月30日编译 ssrr-redir 3.5.3 2018年11月25日编译 ssrr-tunnel 3.5.3 2018年11月25日编译 ssrr-local 3.5.3 2018年11月25日编译 haproxy 1.8.8 2018年05月03日编译 dns2socks V2.0 cdns 1.0 2017年12月09日编译 chinadns1 1.3.2 2017年12月09日编译 chinadns2 2.0.0 2017年12月09日编译 ChinaDNS-NG 1.0-beta.25 2019年08月31日编译 client_linux_arm5 20210922 kcptun v2ray 4.45.2 community-driven xray 1.5.5 Everything.) trojan-go 0.10.6 2021年9月14日编译

② 检测当前相关进程工作状态:(你正在使用V2Ray,选择的模式是【游戏模式】,国外DNS解析方案是:dns2socks)

程序 状态 PID v2ray 工作中 pid:27434 xray 未运行 dns2socks 工作中 pid:27865 27855 27838 27837 27836 27463 27462 27456 dnsmasq 工作中 pid:27835

③ 检测iptbales工作状态: ----------------------------------------------------- nat表 PREROUTING 链 -------------------------------------------------------- Chain PREROUTING (policy ACCEPT 55 packets, 5262 bytes) pkts bytes target prot opt in out source destination
39 2028 SHADOWSOCKS tcp -- 0.0.0.0/0 0.0.0.0/0
0 0 DNAT tcp -- 0.0.0.0/0 192.168.1.1 tcp dpt:80 to:192.168.50.1:18017 7285 954K VSERVER all -- 0.0.0.0/0 10.146.204.157
0 0 VSERVER all -- 0.0.0.0/0 192.168.1.71

----------------------------------------------------- nat表 OUTPUT 链 ------------------------------------------------------------ Chain OUTPUT (policy ACCEPT 72 packets, 13638 bytes) pkts bytes target prot opt in out source destination
0 0 REDIRECT tcp -- 0.0.0.0/0 0.0.0.0/0 match-set router dst redir ports 3333 0 0 SHADOWSOCKS_EXT tcp -- 0.0.0.0/0 0.0.0.0/0 mark match 0xc0a83200/0xffffff00

----------------------------------------------------- nat表 SHADOWSOCKS 链 -------------------------------------------------------- Chain SHADOWSOCKS (1 references) pkts bytes target prot opt in out source destination
37 1924 RETURN tcp -- 0.0.0.0/0 0.0.0.0/0 match-set white_list dst 2 104 SHADOWSOCKS_GAM tcp -- 0.0.0.0/0 0.0.0.0/0

----------------------------------------------------- nat表 SHADOWSOCKS_EXT 链 -------------------------------------------------------- Chain SHADOWSOCKS_EXT (1 references) pkts bytes target prot opt in out source destination
0 0 RETURN tcp -- 0.0.0.0/0 0.0.0.0/0 match-set white_list dst 0 0 SHADOWSOCKS_GAM tcp -- 0.0.0.0/0 0.0.0.0/0

----------------------------------------------------- nat表 SHADOWSOCKS_GFW 链 ---------------------------------------------------- Chain SHADOWSOCKS_GFW (0 references) pkts bytes target prot opt in out source destination
0 0 REDIRECT tcp -- 0.0.0.0/0 0.0.0.0/0 match-set black_list dst redir ports 3333 0 0 REDIRECT tcp -- 0.0.0.0/0 0.0.0.0/0 match-set gfwlist dst redir ports 3333

----------------------------------------------------- nat表 SHADOWSOCKS_CHN 链 ----------------------------------------------------- Chain SHADOWSOCKS_CHN (0 references) pkts bytes target prot opt in out source destination
0 0 REDIRECT tcp -- 0.0.0.0/0 0.0.0.0/0 match-set black_list dst redir ports 3333 0 0 REDIRECT tcp -- 0.0.0.0/0 0.0.0.0/0 ! match-set chnroute dst redir ports 3333

----------------------------------------------------- nat表 SHADOWSOCKS_GAM 链 ----------------------------------------------------- Chain SHADOWSOCKS_GAM (2 references) pkts bytes target prot opt in out source destination
0 0 REDIRECT tcp -- 0.0.0.0/0 0.0.0.0/0 match-set black_list dst redir ports 3333 0 0 REDIRECT tcp -- 0.0.0.0/0 0.0.0.0/0 ! match-set chnroute dst redir ports 3333

----------------------------------------------------- nat表 SHADOWSOCKS_GLO 链 ----------------------------------------------------- Chain SHADOWSOCKS_GLO (0 references) pkts bytes target prot opt in out source destination
0 0 REDIRECT tcp -- 0.0.0.0/0 0.0.0.0/0 redir ports 3333

----------------------------------------------------- nat表 SHADOWSOCKS_HOM 链 ----------------------------------------------------- Chain SHADOWSOCKS_HOM (0 references) pkts bytes target prot opt in out source destination
0 0 REDIRECT tcp -- 0.0.0.0/0 0.0.0.0/0 match-set black_list dst redir ports 3333 0 0 REDIRECT tcp -- 0.0.0.0/0 0.0.0.0/0 match-set chnroute dst redir ports 3333

------------------------------------------------------ mangle表 PREROUTING 链 ------------------------------------------------------- Chain PREROUTING (policy ACCEPT 724 packets, 87093 bytes) pkts bytes target prot opt in out source destination
0 0 MARK all -- !ppp0 0.0.0.0/0 10.146.204.157 MARK or 0x8000 107 18015 SHADOWSOCKS udp -- * 0.0.0.0/0 0.0.0.0/0

------------------------------------------------------ mangle表 SHADOWSOCKS 链 ------------------------------------------------------- Chain SHADOWSOCKS (1 references) pkts bytes target prot opt in out source destination
84 10878 RETURN udp -- 0.0.0.0/0 0.0.0.0/0 match-set white_list dst 29 8147 SHADOWSOCKS_GAM udp -- 0.0.0.0/0 0.0.0.0/0

------------------------------------------------------ mangle表 SHADOWSOCKS_GAM 链 ------------------------------------------------------- Chain SHADOWSOCKS_GAM (1 references) pkts bytes target prot opt in out source destination
0 0 TPROXY udp -- 0.0.0.0/0 0.0.0.0/0 match-set black_list dst TPROXY redirect 0.0.0.0:3333 mark 0x7/0xffffffff 25 6985 TPROXY udp -- 0.0.0.0/0 0.0.0.0/0 ! match-set chnroute dst TPROXY redirect 0.0.0.0:3333 mark 0x7/0xffffffff

这是启动后相关的详细信息,情况一直如下图: image

cary-sas commented 2 years ago

kcp seed 你给一个值应该就行了,我这边没有考虑 空值

mayaxcn commented 2 years ago

填入了一个0,但情况依旧...Orz。服务端这边没做任何改动

cary-sas commented 2 years ago

image 或者你自己改一下 ssconfig.sh 文件

mayaxcn commented 2 years ago

image 好像并不是因为这个问题引起的,还是没有任何效果

cary-sas commented 2 years ago

你改的不对,你要改成我截图上的样子才行

mayaxcn commented 2 years ago

image 情况依旧....

mayaxcn commented 2 years ago

路由器的客户端也没有错误信息输出

cary-sas commented 2 years ago

给我看一下出来的v2ray.json 文件呢

cary-sas commented 2 years ago

这是h2和ws才需要用到的配置,上面也写着没有请留空 我看了一下网上的教程,seed最好不要留空 https://99orange.xyz/2021/09/14/v2raykcp/

mayaxcn commented 2 years ago

{ "log": { "access": "/dev/null", "error": "/tmp/v2ray_log.log", "loglevel": "error" }, "inbounds": [ { "port": 23456, "listen": "0.0.0.0", "protocol": "socks", "settings": { "auth": "noauth", "udp": true, "ip": "127.0.0.1", "clients": null }, "streamSettings": null }, { "listen": "0.0.0.0", "port": 3333, "protocol": "dokodemo-door", "settings": { "network": "tcp,udp", "followRedirect": true } } ], "outbounds": [ { "tag": "agentout", "protocol": "vmess", "settings": { "vnext": [ { "address": "隐藏隐藏", "port": 55666, "users": [ { "id": "4adf522c-bd94-4c16-995a-13e2e1bceed2", "alterId": 0, "security": "none" } ] } ], "servers": null }, "streamSettings": { "network": "kcp", "security": "", "tlsSettings": null, "tcpSettings": null, "kcpSettings": { "mtu": 1350, "tti": 50, "uplinkCapacity": 12, "downlinkCapacity": 100, "congestion": false, "readBufferSize": 2, "writeBufferSize": 2, "seed": "0", "header": { "type": "wechat-video", "request": null, "response": null } }, "wsSettings": null, "httpSettings": null, "grpcSettings": null }, "mux": { "enabled": false, "concurrency": 8 } } ] } 以上是v2ray的json配置

cary-sas commented 2 years ago

"seed": "0", -----这个地方好像不大对啊。 你网页里面是填的0 吗

mayaxcn commented 2 years ago

是的,我在网页里面也是填了0

cary-sas commented 2 years ago

服务端搭建的时候: "seed" 后面的值 弄复杂一点; "security": "auto"
再试试

mayaxcn commented 2 years ago

已找到根源所在,问题还是出现在seed字段中,经过与其他正常运行的客户端json配置文件比对,发现seed如为空时不应该出现在配置文件中,我已提交修复过后的ssconfig.sh,望采纳合并。

cary-sas commented 2 years ago

"seed": null 这样写不可以吗?

mayaxcn commented 2 years ago

在我的环境测试过也不行,只要seed 为空,那这个整个字段就不应该出现在配置文件里