Skip to content

How judge level is decided && Client redundancy configuration #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tanglu1323123 opened this issue Sep 10, 2023 · 7 comments
Closed

Comments

@tanglu1323123
Copy link

tanglu1323123 commented Sep 10, 2023

我通过 --help了解到 默认是发送10个包,通过 绿色 黄色 红色来展示丢包率,超过500ms视为丢包
strict lenient much lenient这三个的绿黄红区间是什么呢?

@eastarpen
Copy link
Owner

这三个等级定义在 constant.js

需要说明的是

默认发 10 个包情况下, strict 模式下 丢包率为0为绿色, 其他为红色 (就是说不会出现黄色)

如果你希望自定义判断区间, 可以直接修改 constant.js 然后打包编译

打包编译的脚本在 scripts/release/ 中

export const strict_level = {
	green: 0,
	yellow:  0.05,
	red:   1
}

export const lenient_level = {
	green: 0.05,
	yellow:  0.1,
	red:   1
}

export const much_lenient_level = {
	green: 0.1,
	yellow:  0.3,
	red:   1
}

@tanglu1323123
Copy link
Author

tanglu1323123 commented Sep 10, 2023

客户端的traget和服务端的target为什么都有name值呀?
不理解客户端的name值有什么用

@tanglu1323123
Copy link
Author

可以删去客户端target name吗?
我如果想更换target name的话,还要给每个客户端修改target name

@eastarpen
Copy link
Owner

不理解客户端的name值有什么用

由于目前客户端的 tar 手工管理, 服务端使用 target Id 和 target Name 做核验

如果只使用 target Id 的话容易出错

我如果想更换target name的话,还要给每个客户端修改target name

预期行为

因为 服务端的 target 是对每个 client 都有影响的

不过如果存在大量client的话修改 target 确实是个问题

近期考虑给服务端加个 alias 快速修改前端显示的 target name

client 配置的自动管理在后续计划中

此外, 后续 comment 和 issue 标题不符, 你应该重新开一个 issue

@eastarpen eastarpen reopened this Sep 11, 2023
@eastarpen eastarpen changed the title strict lenient much lenient 具体范围 How judge level is decided && Client redundancy configuration Sep 11, 2023
eastarpen added a commit that referenced this issue Sep 11, 2023
@eastarpen
Copy link
Owner

v1.2.2 已加入 alias 功能

你可以使用 server-update 脚本进行更新

@tanglu1323123
Copy link
Author

v1.2.2 已加入 alias 功能

你可以使用 server-update 脚本进行更新

那我是不是client targets name和server端tarets name可以都天一个?
我的意思是所有name属性都填一个,这样岂不是name失去了意义?

@eastarpen
Copy link
Owner

那我是不是client targets name和server端tarets name可以都天一个?

是的, name 可以重复, id 不能

数据库靠 id 识别不同的 target

我的意思是所有name属性都填一个,这样岂不是name失去了意义?

name 的作用相当于密码, id 是用户名

只不过 name 附带标识作用在前端显示(当然, 现在你可以用 alias 来承担这个作用)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants