FranzKafkaYu / x-ui

Lightweight Xray panel with multi-protocol and multi-user on the same port,supports English language and Telegram bot. Easy to use and easy to manage.
GNU General Public License v3.0
7.85k stars 1.57k forks source link

流量和网速bug #347

Closed zdyyujing closed 1 year ago

zdyyujing commented 1 year ago

Welcome

Description of the problem,screencshot would be good

最近发现首页系统状态中的流量统计和网速存在bug

我测试了下: 单上传或下载的网速似乎比实际快两倍(上传+下载网速总和似乎快了4倍),从而导致旁边的流量统计比实际应用快4倍。

补充: 入站列表中的流量统计无相同问题. 我尝试切换了xray版本(1.7.5和1.8.0)后bug仍然存在,推测应该不是xray的bug。

希望大大能在后面修复一下下。感谢!!!🌹🌹🌹

Version of x-ui

0.3.4.2

x-ui log or xray log

-- Logs begin at 四 2023-04-13 10:52:08 CST. -- 4月 13 10:52:10 JollyPerky-VM systemd[1]: Started x-ui Service. 4月 13 10:52:10 JollyPerky-VM systemd[1]: Starting x-ui Service... 4月 13 10:52:11 JollyPerky-VM x-ui[854]: 2023/04/13 10:52:11 x-ui 0.3.4.2:20230409 4月 13 10:52:11 JollyPerky-VM x-ui[854]: 2023/04/13 10:52:11 INFO - web server run https on [::]:2096 4月 13 10:52:11 JollyPerky-VM x-ui[854]: 2023/04/13 10:52:11 INFO - We got 2 members in client 4月 13 10:52:11 JollyPerky-VM x-ui[854]: 2023/04/13 10:52:11 INFO - telegram service ready to run 4月 13 10:52:11 JollyPerky-VM x-ui[854]: 2023/04/13 10:52:11 WARNING - sendMsgToTgbot failed,GetTgBotChatId fail,err:,tgBottoken:%!s(int=0) 4月 13 10:52:39 JollyPerky-VM x-ui[854]: 2023/04/13 10:52:39 ERROR - Add NewStatsNotifyJob error[%!s()],Runtime[] invalid,wil run default 4月 13 10:52:39 JollyPerky-VM x-ui[854]: 2023/04/13 10:52:39 INFO - Tg notify enabled,run at @daily 4月 13 10:52:39 JollyPerky-VM x-ui[854]: 2023/04/13 10:52:39 INFO - Wait 2 seconds for telegram bot ready 4月 13 11:02:47 JollyPerky-VM x-ui[854]: 2023/04/13 11:02:47 http: TLS handshake error from 117.88.108.5:29642: EOF 4月 13 11:45:51 JollyPerky-VM x-ui[854]: 2023/04/13 11:45:51 http: TLS handshake error from 117.88.108.5:28130: EOF 4月 13 11:45:51 JollyPerky-VM x-ui[854]: 2023/04/13 11:45:51 http: TLS handshake error from 117.88.108.5:28129: EOF 4月 13 11:47:51 JollyPerky-VM x-ui[854]: 2023/04/13 11:47:51 INFO - We got 2 members in client 4月 13 15:10:31 JollyPerky-VM x-ui[854]: 2023/04/13 15:10:31 http: TLS handshake error from 117.88.108.5:28880: EOF 4月 13 16:24:01 JollyPerky-VM x-ui[854]: 2023/04/13 16:24:01 INFO - RecordXrayVersion: v1.8.0 4月 13 16:24:01 JollyPerky-VM x-ui[854]: 2023/04/13 16:24:01 INFO - We got 2 members in client 4月 13 16:32:31 JollyPerky-VM x-ui[854]: 2023/04/13 16:32:31 WARNING - stop server err: multierr: close tcp [::]:2096: use of closed network connection | 4月 13 16:32:31 JollyPerky-VM x-ui[854]: 2023/04/13 16:32:31 INFO - web server run https on [::]:2096 4月 13 16:32:31 JollyPerky-VM x-ui[854]: 2023/04/13 16:32:31 INFO - We got 2 members in client 4月 13 16:32:31 JollyPerky-VM x-ui[854]: 2023/04/13 16:32:31 INFO - telegram service ready to run 4月 13 16:32:31 JollyPerky-VM x-ui[854]: 2023/04/13 16:32:31 WARNING - sendMsgToTgbot failed,GetTgBotChatId fail,err:,tgBottoken:%!s(int=0) 4月 13 16:32:31 JollyPerky-VM x-ui[854]: 2023/04/13 16:32:31 ERROR - Add NewStatsNotifyJob error[%!s()],Runtime[] invalid,wil run default 4月 13 16:32:31 JollyPerky-VM x-ui[854]: 2023/04/13 16:32:31 INFO - Tg notify enabled,run at @daily 4月 13 16:32:31 JollyPerky-VM x-ui[854]: 2023/04/13 16:32:31 INFO - Wait 2 seconds for telegram bot ready 4月 13 16:32:33 JollyPerky-VM x-ui[854]: 2023/04/13 16:32:33 http: TLS handshake error from 117.88.108.5:27171: EOF

FranzKafkaYu commented 1 year ago

两者的统计口径不一致,面板首页中统计的流量为网卡对应的流量;而入站列表中的流量统计来源于xray core,是针对xray core使用的流量。此外还有一个常识:由客户端->xray core上行的流量,转换为服务器的流量时应为×2,由xray core->客户端的流量,转换为服务器的流量也应×2

FranzKafkaYu commented 1 year ago

在使用VPS时,网卡统计的流量不一定准确,具体原因可能有很多,不做过多解释。针对这个问题,建议只用关注入站列表中的流量统计,只需关心入站列表的流量统计是否准确。

zdyyujing commented 1 year ago
感谢大大的及时回复与科普! JFYU

@. | ---- 回复的原邮件 ---- | 发件人 | Yu @.> | | 发送日期 | 2023年4月13日 17:25 | | 收件人 | @.> | | 抄送人 | @.> , @.***> | | 主题 | Re: [FranzKafkaYu/x-ui] 流量和网速bug (Issue #347) |

在使用VPS时,网卡统计的流量不一定准确,具体原因可能有很多,不做过多解释。针对这个问题,建议只用关注入站列表中的流量统计,只需关心入站列表的流量统计是否准确。

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>