今天更新2.4.2,windows下的客户端怎么也连不上,服务端查看日志,显示:
[Warning]VMessIn: Invalid request from xxx.xxx.xxx.xxx:65306: Invalid user.
具体症状是:
服务器端,v2ray2.4.2, ubuntu 14.04
然后还有国内一台vps,也是 ubuntu 14.04,更新v2ray2.4.2后,能够正常连接
本地使用windows10,用windows版的,把ubuntu上的正常工作的配置文件复制下来,不做修改,运行,服务器日志中就显示Invalid user了。
服务器端配置:
{
"log": {
"access": "/var/log/v2ray/access.log",
"error": "/var/log/v2ray/error.log",
"loglevel": "info"
},
"inbound": {
"port": 32333,
"protocol": "vmess",
"settings": {
"clients": [
{
"id": "f2858847-1940-4765-992a-87e407cfeff4",
"level": 1,
"alterId": 64
}
]
},
"streamSettings": {
"network": "kcp"
}
},
"outbound": {
"protocol": "freedom",
"settings": {}
},
"outboundDetour": [
{
"protocol": "blackhole",
"settings": {},
"tag": "blocked"
}
],
"routing": {
"strategy": "rules",
"settings": {
"rules": [
{
"type": "field",
"ip": [
"0.0.0.0/8",
"10.0.0.0/8",
"100.64.0.0/10",
"127.0.0.0/8",
"169.254.0.0/16",
"172.16.0.0/12",
"192.0.0.0/24",
"192.0.2.0/24",
"192.168.0.0/16",
"198.18.0.0/15",
"198.51.100.0/24",
"203.0.113.0/24",
"::1/128",
"fc00::/7",
"fe80::/10"
],
"outboundTag": "blocked"
}
]
}
},
"transport": {
"kcpSettings": {
"uplinkCapacity": 50,
"downlinkCapacity": 50
}
}
}
客户端配置:
{
"log": {
"loglevel": "info"
},
"inbound": {
"port": 10001,
"listen": "0.0.0.0",
"protocol": "http",
"settings": {
"timeout": 5
}
},
"outbound": {
"protocol": "vmess",
"settings": {
"vnext": [
{
"address": "xxx.xxx.xxx.xxx",
"port": 32333,
"users": [
{
"id": "f2858847-1940-4765-992a-87e407cfeff4",
"alterId": 64
}
]
}
]
},
"streamSettings": {
"network": "kcp"
}
},
"outboundDetour": [
{
"protocol": "freedom",
"settings": {},
"tag": "direct"
}
],
"dns": {
"servers": [
"208.67.222.222",
"208.67.220.220",
"8.8.8.8",
"8.8.4.4"
]
},
"routing": {
"strategy": "rules",
"settings": {
"domainStrategy": "IPIfNonMatch",
"rules": [
{
"type": "field",
"ip": [
"0.0.0.0/8",
"10.0.0.0/8",
"100.64.0.0/10",
"127.0.0.0/8",
"169.254.0.0/16",
"172.16.0.0/12",
"192.0.0.0/24",
"192.0.2.0/24",
"192.168.0.0/16",
"198.18.0.0/15",
"198.51.100.0/24",
"203.0.113.0/24",
"::1/128",
"fc00::/7",
"fe80::/10"
],
"outboundTag": "direct"
}
]
}
},
"transport": {
"kcpSettings": {
"uplinkCapacity": 10,
"downlinkCapacity": 10,
"readBufferSize": 3,
"writeBufferSize": 3
}
}
}
客户端日志:
V2Ray v2.4.2 (One for all) 20161024
An unified platform for anti-censorship.
2016/11/01 21:49:25 [Warning]V2Ray started.
2016/11/01 21:49:32 [Info]HTTP: Request to Method [GET] Host [www.ip138.com] with URL [http://www.ip138.com/]
2016/11/01 21:49:32 [Info]Router: Looking up IP for tcp:www.ip138.com:80
2016/11/01 21:49:32 [Info]UDP Server: establishing new connection for udp:127.0.0.1:53-udp:208.67.222.222:53
2016/11/01 21:49:32 [Info]DefaultDispatcher: Default route for udp:208.67.222.222:53
2016/11/01 21:49:32 [Info]KCP|Dialer: Dialing KCP to udp:xxx.xxx.xxx.xxx:32333
2016/11/01 21:49:32 [Info]KCP|Connection: creating connection 2180
2016/11/01 21:49:32 [Info]VMess|Outbound: Tunneling request to udp:208.67.222.222:53 via tcp:xxx.xxx.xxx.xxx:32333
2016/11/01 21:49:38 [Info]KCP|Connection: Terminating connection to xxx.xxx.xxx.xxx:32333
2016/11/01 21:49:38 [Info]Raw: Failed to read response header: EOF
2016/11/01 21:49:38 [Warning]VMess|Outbound: Failed to read response from udp:208.67.222.222:53: EOF
2016/11/01 21:49:40 [Info]UDP Server: establishing new connection for udp:127.0.0.1:53-udp:208.67.220.220:53
2016/11/01 21:49:40 [Info]DefaultDispatcher: Default route for udp:208.67.220.220:53
2016/11/01 21:49:40 [Info]KCP|Dialer: Dialing KCP to udp:xxx.xxx.xxx.xxx:32333
2016/11/01 21:49:40 [Info]KCP|Connection: creating connection 2181
2016/11/01 21:49:40 [Info]VMess|Outbound: Tunneling request to udp:208.67.220.220:53 via tcp:xxx.xxx.xxx.xxx:32333
2016/11/01 21:49:46 [Info]KCP|Connection: Terminating connection to xxx.xxx.xxx.xxx:32333
2016/11/01 21:49:46 [Info]Raw: Failed to read response header: EOF
2016/11/01 21:49:46 [Warning]VMess|Outbound: Failed to read response from udp:208.67.220.220:53: EOF
2016/11/01 21:49:48 [Info]UDP Server: establishing new connection for udp:127.0.0.1:53-udp:8.8.8.8:53
2016/11/01 21:49:51 [Info]DefaultDispatcher: Default route for udp:8.8.8.8:53
2016/11/01 21:49:51 [Info]KCP|Dialer: Dialing KCP to udp:xxx.xxx.xxx.xxx:32333
2016/11/01 21:49:51 [Info]KCP|Connection: creating connection 2182
2016/11/01 21:49:51 [Info]VMess|Outbound: Tunneling request to udp:8.8.8.8:53 via tcp:xxx.xxx.xxx.xxx:32333
服务端日志:
2016/11/01 13:34:29 [Info]KCP|Listener: listening on 0.0.0.0:32333
2016/11/01 13:34:29 [Warning]V2Ray started.
2016/11/01 13:34:37 [Info]KCP|Connection: creating connection 33113
2016/11/01 13:34:37 [Warning]VMessIn: Invalid request from 112.229.99.104:65305: Invalid user.
2016/11/01 13:34:37 [Info]KCP|Connection: Closing connection to 112.229.99.104:65305
2016/11/01 13:34:45 [Info]KCP|Connection: Terminating connection to 112.229.99.104:65305
2016/11/01 13:34:45 [Info]KCP|Connection: creating connection 33114
2016/11/01 13:34:45 [Warning]VMessIn: Invalid request from 112.229.99.104:65306: Invalid user.
2016/11/01 13:34:45 [Info]KCP|Connection: Closing connection to 112.229.99.104:65306
2016/11/01 13:34:53 [Info]KCP|Connection: Terminating connection to 112.229.99.104:65306
2016/11/01 13:34:53 [Info]KCP|Connection: creating connection 33115
2016/11/01 13:34:53 [Warning]VMessIn: Invalid request from 112.229.99.104:65307: Invalid user.
2016/11/01 13:34:53 [Info]KCP|Connection: Closing connection to 112.229.99.104:65307
2016/11/01 13:35:01 [Info]KCP|Connection: Terminating connection to 112.229.99.104:65307
服务端和客户端的uplinkCapacity与downlinkCapacity不一致,修改为一致后再试
@wtlusvm
修改了,还是那错误
2016/11/04 01:27:28 [Warning]VMessIn: Invalid request from 39.82.255.115:61761: Invalid user.
2016/11/04 01:27:28 [Info]KCP|Connection: Closing connection to 39.82.255.115:61761
2016/11/04 01:27:28 [Info]KCP|Connection: Terminating connection to 39.82.255.115:61760
2016/11/04 01:27:28 [Info]KCP|Connection: creating connection 1891
2016/11/04 01:27:28 [Warning]VMessIn: Invalid request from 39.82.255.115:61762: Invalid user.
2016/11/04 01:27:28 [Info]KCP|Connection: Closing connection to 39.82.255.115:61762
2016/11/04 01:27:36 [Info]KCP|Connection: creating connection 1892
2016/11/04 01:27:36 [Warning]VMessIn: Invalid request from 39.82.255.115:61763: Invalid user.
2016/11/04 01:27:36 [Info]KCP|Connection: Closing connection to 39.82.255.115:61763
2016/11/04 01:27:36 [Info]KCP|Connection: Terminating connection to 39.82.255.115:61761
2016/11/04 01:27:36 [Info]KCP|Connection: Terminating connection to 39.82.255.115:61762
2016/11/04 01:27:37 [Info]KCP|Connection: creating connection 1893
2016/11/04 01:27:37 [Warning]VMessIn: Invalid request from 39.82.255.115:61764: Invalid user.
2016/11/04 01:27:37 [Info]KCP|Connection: Closing connection to 39.82.255.115:61764
2016/11/04 01:27:44 [Info]KCP|Connection: Terminating connection to 39.82.255.115:61763
2016/11/04 01:27:44 [Info]KCP|Connection: creating connection 1894
2016/11/04 01:27:44 [Warning]VMessIn: Invalid request from 39.82.255.115:61765: Invalid user.
2016/11/04 01:27:44 [Info]KCP|Connection: Closing connection to 39.82.255.115:61765
2016/11/04 01:27:44 [Info]KCP|Connection: creating connection 1895
2016/11/04 01:27:44 [Warning]VMessIn: Invalid request from 39.82.255.115:61766: Invalid user.
2016/11/04 01:27:44 [Info]KCP|Connection: Closing connection to 39.82.255.115:61766
2016/11/04 01:27:45 [Info]KCP|Connection: Terminating connection to 39.82.255.115:61764
2016/11/04 01:27:45 [Info]KCP|Connection: creating connection 1896
2016/11/04 01:27:45 [Warning]VMessIn: Invalid request from 39.82.255.115:61767: Invalid user.
2016/11/04 01:27:45 [Info]KCP|Connection: Closing connection to 39.82.255.115:61767
2016/11/04 01:27:45 [Info]KCP|Connection: creating connection 1897
2016/11/04 01:27:45 [Warning]VMessIn: Invalid request from 39.82.255.115:61768: Invalid user.
2016/11/04 01:27:45 [Info]KCP|Connection: Closing connection to 39.82.255.115:61768
主要是配置文件是相同的,linux的客户端是正常的,windows的就不可以。
如果是Windows服务端的话,服务端配置文件中的
"log": {
"access": "/var/log/v2ray/access.log",
"error": "/var/log/v2ray/error.log",
"loglevel": "info"
},
需要改为:
"log": {
"loglevel": "info"
},
这是因为……显然……Windows与Linux目录组织方式不一样。还不行再叫我
@wtlusvm
不是,我的服务端是linux的
客户端是windows10,防火墙也关了
客户端的配置文件,我在linux下是正常的,windows下就不行,用的同一个文件,log那里,也没有写路径,所以肯定不是log路径的问题。
@yxw820603 同一个文件吗,你在Windows下用Notepad打开那个配置文件看看是不是只有一行了?
@wtlusvm
是同一个文件,确实变成只有一行了
但也不是换行符的问题,我找了个在线格式化json的网站,格式化后,notepad新建文件粘贴进去,问题依旧。
同步下windows系统的系统时间 时间与服务器时间差距太大会校验失败
改了时区同步了时间后就好了
不过文档上不是说是按照UTC时间,与时区无关吗?
我同一台电脑linux系统就没问题,windows系统时区设置错了,改了时区同步下就好了。
幸好在这里找到解决方法, 在debian里 apt-get install ntp 就行了
Most helpful comment
同步下windows系统的系统时间 时间与服务器时间差距太大会校验失败