Skip to content
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

【Fix】V2拉取周期优化 #17

Open
ibmthink opened this issue Aug 18, 2024 · 1 comment
Open

【Fix】V2拉取周期优化 #17

ibmthink opened this issue Aug 18, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@ibmthink
Copy link

当然可以。以下是编辑后的表述:

当前拉取用户周期都是:time.Second*5

go auth.UpdateUsers(fmt.Sprintf("%s?token=%s&node_id=%d&node_type=hysteria", c.V2board.ApiHost+"/api/v1/server/UniProxy/user", c.V2board.ApiKey, c.V2board.NodeID), time.Second*5, hyConfig.TrafficLogger)

go auth.UpdateUsers(fmt.Sprintf("%s?token=%s&node_id=%d&node_type=hysteria", c.V2board.ApiHost+"/api/v1/server/UniProxy/user", c.V2board.ApiKey, c.V2board.NodeID), time.Second*5, nil)

用户拉取量为全量用户,拉取数据量较大,且频率较高,这可能会增加V2后端的流量消耗

解决方案:
a. 适当增加数值,比如调至20以上,以减少影响
b. 提供自定义配置选项,让用户自行调整拉取频率

我们希望通过这些措施,既能保持系统稳定,又能满足用户需求

这样的表述更加简洁明了,便于快速传达信息

@ibmthink ibmthink added the enhancement New feature or request label Aug 18, 2024
@cedar2025
Copy link
Owner

cedar2025 commented Nov 1, 2024

已经自定义拉取周期、示例配置:

v2board:
  apiHost: http://127.0.0.1:8000
  apiKey: xxxxxxxxx
  nodeID: 1
  pullInterval: 10
  pushInterval: 60
acme:
  domains:
    - hy23333.example.com
  email: [email protected]
auth:
  type: v2board
trafficStats:
  listen: 127.0.0.1:7653
acl: 
  inline: 
    - reject(10.0.0.0/8)
    - reject(172.16.0.0/12)
    - reject(192.168.0.0/16)
    - reject(127.0.0.0/8)
    - reject(fc00::/7)

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

No branches or pull requests

2 participants