0x00 错误描述

使用v2rayN连接节点的时候,总是会出现这个警告:

  1. 2021/03/05 13:45:52 [Warning] failed to handler mux client connection > v2ray.com/core/proxy/vmess/outbound: connection ends > v2ray.com/core/proxy/vmess/outbound: failed to read header > v2ray.com/core/proxy/vmess/encoding: failed to read response header > websocket: close 1000 (normal)

上网查了一圈,发现是节点时间与客户端时间不一致导致的。

0x01 解决方案

节点是基于ubuntu搭建的,所以下面将给出ubuntu设置时区的教程:

1. 运行tzselect,选择 Asia -> China -> Beijing。

  1. root@KnobbyKindhearted-VM:~/v2ray-poseidon/docker/sspanel/ws-tls# tzselect
  2. Please identify a location so that time zone rules can be set correctly.
  3. Please select a continent, ocean, "coord", or "TZ".
  4. 1) Africa
  5. 2) Americas
  6. 3) Antarctica
  7. 4) Asia
  8. 5) Atlantic Ocean
  9. 6) Australia
  10. 7) Europe
  11. 8) Indian Ocean
  12. 9) Pacific Ocean
  13. 10) coord - I want to use geographical coordinates.
  14. 11) TZ - I want to specify the time zone using the Posix TZ format.
  15. #? 4
  16. Please select a country whose clocks agree with yours.
  17. 1) Afghanistan 18) Israel 35) Palestine
  18. 2) Armenia 19) Japan 36) Philippines
  19. 3) Azerbaijan 20) Jordan 37) Qatar
  20. 4) Bahrain 21) Kazakhstan 38) Russia
  21. 5) Bangladesh 22) Korea (North) 39) Saudi Arabia
  22. 6) Bhutan 23) Korea (South) 40) Singapore
  23. 7) Brunei 24) Kuwait 41) Sri Lanka
  24. 8) Cambodia 25) Kyrgyzstan 42) Syria
  25. 9) China 26) Laos 43) Taiwan
  26. 10) Cyprus 27) Lebanon 44) Tajikistan
  27. 11) East Timor 28) Macau 45) Thailand
  28. 12) Georgia 29) Malaysia 46) Turkmenistan
  29. 13) Hong Kong 30) Mongolia 47) United Arab Emirates
  30. 14) India 31) Myanmar (Burma) 48) Uzbekistan
  31. 15) Indonesia 32) Nepal 49) Vietnam
  32. 16) Iran 33) Oman 50) Yemen
  33. 17) Iraq 34) Pakistan
  34. #? 9
  35. Please select one of the following time zone regions.
  36. 1) Beijing Time
  37. 2) Xinjiang Time
  38. #? 1
  39. The following information has been given:
  40. China
  41. Beijing Time
  42. Therefore TZ='Asia/Shanghai' will be used.
  43. Local time is now: Fri Mar 5 13:46:27 CST 2021.
  44. Universal Time is now: Fri Mar 5 05:46:27 UTC 2021.
  45. Is the above information OK?
  46. 1) Yes
  47. 2) No
  48. #? 1
  49. You can make this change permanent for yourself by appending the line
  50. TZ='Asia/Shanghai'; export TZ
  51. to the file '.profile' in your home directory; then log out and log in again.
  52. Here is that TZ value again, this time on standard output so that you
  53. can use the /usr/bin/tzselect command in shell scripts:
  54. Asia/Shanghai

2. 复制文件到/etc目录下cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime