diff --git a/docs/config/routing.md b/docs/config/routing.md index a705369a..a51a79e7 100644 --- a/docs/config/routing.md +++ b/docs/config/routing.md @@ -205,6 +205,8 @@ xxxxxxxx-xxxx-0000-xxxx-xxxxxxxxxxxx 如果连接来自本机,匹配其进程。如果不来自本机则直接视作匹配失败。仅支持 Windows 和 Linux. +特别的,安卓需要客户端 app 调用 `github.com/xtls/xray-core/common/net.RegisterAndroidProcessFinder()` 注入 Android API 提供的查找器。该 hook 可以自定义向核心返回的字符串以实现 app 匹配等功能。 + 该选项为一个数组,数组内每一项有三种匹配模式。 1. 不包含斜杠,匹配进程名字。 diff --git a/docs/en/config/routing.md b/docs/en/config/routing.md index 3f51b122..ab9e6bbe 100644 --- a/docs/en/config/routing.md +++ b/docs/en/config/routing.md @@ -205,6 +205,8 @@ Example: If the connection originates from the local machine, match its process. If not from local, it is directly regarded as a match failure. Only supports Windows and Linux. +In particular, on Android the client app needs to call `github.com/xtls/xray-core/common/net.RegisterAndroidProcessFinder()` to inject the finder provided by the Android API. This hook can customize the string returned to the core, enabling features such as app matching. + This option is an array, where each item has three matching modes. 1. **No slash**: Matches process name. diff --git a/docs/ru/config/routing.md b/docs/ru/config/routing.md index 9401c859..e374b1ce 100644 --- a/docs/ru/config/routing.md +++ b/docs/ru/config/routing.md @@ -201,6 +201,8 @@ JSON-объект, где ключи и значения являются стр Если соединение поступает с локальной машины, выполняется сопоставление по процессу. Если соединение не с локальной машины, сопоставление сразу считается неуспешным. Поддерживаются только Windows и Linux. +В частности, на Android клиентское приложение должно вызвать `github.com/xtls/xray-core/common/net.RegisterAndroidProcessFinder()`, чтобы внедрить искатель, предоставляемый Android API. Этот хук позволяет настраивать строку, возвращаемую ядру, что дает возможность реализовать, например, сопоставление по приложениям. + Эта опция представляет собой массив, где каждый элемент имеет три режима сопоставления: 1. Не содержит слешей: сопоставление по имени процесса.