Skip to content

Commit

Permalink
Merge pull request #15 from apernet/wip-geoUpdateInterval-details
Browse files Browse the repository at this point in the history
docs(geodata): impl details of geoUpdateInterval
  • Loading branch information
tobyxdd authored Mar 30, 2024
2 parents 5a4f131 + 8fe545c commit 1369ca6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions docs/docs/advanced/Full-Server-Config.md
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ You can have either `file` or `inline`, but not both.
1. The path to the ACL file.
2. Optional. Uncomment to enable. The path to the GeoIP database file. **If this field is omitted, Hysteria will automatically download the latest database to your working directory.**
3. Optional. Uncomment to enable. The path to the GeoSite database file. **If this field is omitted, Hysteria will automatically download the latest database to your working directory.**
4. Optional. The interval at which to refresh the GeoIP/GeoSite databases. 168 hours (1 week) by default. Only applies if the GeoIP/GeoSite databases are automatically downloaded.
4. Optional. The interval at which to refresh the GeoIP/GeoSite databases. 168 hours (1 week) by default. Only applies if the GeoIP/GeoSite databases are automatically downloaded. (Check the note below for more information.)

=== "Inline"

Expand All @@ -314,10 +314,12 @@ You can have either `file` or `inline`, but not both.
1. The list of inline ACL rules.
2. Optional. Uncomment to enable. The path to the GeoIP database file. **If this field is omitted, Hysteria will automatically download the latest database to your working directory.**
3. Optional. Uncomment to enable. The path to the GeoSite database file. **If this field is omitted, Hysteria will automatically download the latest database to your working directory.**
4. Optional. The interval at which to refresh the GeoIP/GeoSite databases. 168 hours (1 week) by default. Only applies if the GeoIP/GeoSite databases are automatically downloaded.
4. Optional. The interval at which to refresh the GeoIP/GeoSite databases. 168 hours (1 week) by default. Only applies if the GeoIP/GeoSite databases are automatically downloaded. (Check the note below for more information.)

> **NOTE:** Hysteria currently uses the protobuf-based "dat" format for geoip/geosite data originating from v2ray. If you don't need any customization, you can omit the `geoip` or `geosite` fields and let Hysteria automatically download the latest version (from <https://github.com/Loyalsoldier/v2ray-rules-dat>) to your working directory. The files will only be downloaded and used if your ACL has at least one rule that uses this feature.

> **NOTE:** Hysteria currently only downloads the GeoIP/GeoSite databases once at startup. You will need to use external tools to periodically restart the Hysteria server in order to update the databases regularly through `geoUpdateInterval`. This may change in future versions.

## Outbounds

Outbounds are used to define the "exit" through which a connection should be routed. For example, when [combined with ACL](ACL.md), you can route all traffic except Netflix directly through the local interface, while routing Netflix traffic through a SOCKS5 proxy.
Expand Down
6 changes: 4 additions & 2 deletions docs/docs/advanced/Full-Server-Config.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ ACL 是 Hysteria 服务端中一个非常强大的功能,可以用来自定义
1. ACL 文件的路径。
2. 可选。取消注释以启用。GeoIP 数据库文件的路径。**如果省略这个字段,Hysteria 会自动下载最新的数据库到工作目录。**
3. 可选。取消注释以启用。GeoSite 数据库文件的路径。**如果省略这个字段,Hysteria 会自动下载最新的数据库到工作目录。**
4. 可选。GeoIP/GeoSite 数据库刷新的间隔。默认为 168 小时(1 周)。仅在 GeoIP/GeoSite 数据库是自动下载的情况下生效。
4. 可选。GeoIP/GeoSite 数据库刷新的间隔。默认为 168 小时(1 周)。仅在 GeoIP/GeoSite 数据库是自动下载的情况下生效。(另请参阅下方注意事项)

=== "内联"

Expand All @@ -316,10 +316,12 @@ ACL 是 Hysteria 服务端中一个非常强大的功能,可以用来自定义
1. 内联 ACL 规则的列表。
2. 可选。取消注释以启用。GeoIP 数据库文件的路径。**如果省略这个字段,Hysteria 会自动下载最新的数据库到工作目录。**
3. 可选。取消注释以启用。GeoSite 数据库文件的路径。**如果省略这个字段,Hysteria 会自动下载最新的数据库到工作目录。**
4. 可选。GeoIP/GeoSite 数据库刷新的间隔。默认为 168 小时(1 周)。仅在 GeoIP/GeoSite 数据库是自动下载的情况下生效。
4. 可选。GeoIP/GeoSite 数据库刷新的间隔。默认为 168 小时(1 周)。仅在 GeoIP/GeoSite 数据库是自动下载的情况下生效。(另请参阅下方注意事项)

> **注意:** Hysteria 目前使用的是源自 v2ray 的,基于 protobuf 的 GeoIP/GeoSite 数据库格式。如果没有自定义的需求,可以省略这两个字段,Hysteria 会自动 (从 <https://github.com/Loyalsoldier/v2ray-rules-dat>) 下载最新的数据库到工作目录。只有在 ACL 中有至少一条 GeoIP/GeoSite 规则时才会下载对应的数据库。

> **注意:** 当前版本的 Hysteria 仅在启动时下载和载入 GeoIP/GeoSite 数据库, 你需要借助外部工具定期重启 Hysteria 服务端, 才能通过 `geoUpdateInterval` 定期更新 GeoIP/GeoSite 数据库。 我们计划在以后的版本中完善这个功能。

## 出站规则 (Outbounds)

出站规则用于定义连接应通过哪个“出口”。例如,[与 ACL 结合使用时](ACL.md),可以实现除 Netflix 外的所有流量都直接使用服务器本地网络,而 Netflix 流量通过另一个 SOCKS5 代理连接。
Expand Down

0 comments on commit 1369ca6

Please sign in to comment.