Fix "missing translation" alert and translate a few pages

This commit is contained in:
mmmray 2024-07-16 04:51:10 -05:00
parent 3c07ea5213
commit beca5152dd
4 changed files with 47 additions and 3 deletions

View File

@ -28,6 +28,7 @@ export default defineUserConfig(<UserConfig>{
plugins: [
i18nPlugin({
updatedTime: "git",
translationGuide: "https://github.com/XTLS/Xray-docs-next",
locales: {
en: {
lang: "en-US",

View File

@ -28,6 +28,7 @@ export const sidebarEn: SidebarConfig = {
'/en/config/stats.md',
'/en/config/transport.md',
'/en/config/metrics.md',
'/en/config/observatory.md',
],
},
{

View File

@ -22,7 +22,9 @@ The configuration file of Xray is in JSON format, and the configuration format f
"stats": {},
"reverse": {},
"fakedns": {},
"metrics": {}
"metrics": {},
"observatory": {},
"burstObservatory": {}
}
```
@ -78,4 +80,12 @@ FakeDNS configuration. Can be used with a transparent proxy to obtain the actual
> metrics: [metricsObject](./metrics.md)
Metrics configuration. A more straightforward (and hopefully better) way to export metrics.
Metrics configuration. A more straightforward (and hopefully better) way to export metrics.
> observatory: [ObservatoryObject](./observatory.md#observatoryobject)
Background connection observation. Detect the connection status of outbound proxies.
> burstObservatory: [BurstObservatoryObject](./observatory.md#burstobservatoryobject)
Concurrent connection observation. Detect the connection status of outbound proxies.

View File

@ -7,7 +7,7 @@ The interface can be enabled through the api configuration module. When the api
Please refer to the [related configuration](#related-configuration) in this section.
::: warning
Most users do not need to use this API. Novices can ignore this item directly.
Most users do not need to use this API. Novices can ignore this page entirely.
:::
## ApiObject
@ -18,6 +18,7 @@ Most users do not need to use this API. Novices can ignore this item directly.
{
"api": {
"tag": "api",
"listen": "127.0.0.1:8080",
"services": ["HandlerService", "LoggerService", "StatsService"]
}
}
@ -27,6 +28,13 @@ Most users do not need to use this API. Novices can ignore this item directly.
Outbound proxy identifier.
> `listen`: string
The IP and port that the API service listens on. This is an optional configuration item.
When you omit this item, you need to add inbounds and routing configurations according to the examples in the [relevant configurations below](#related-configuration).
> `services`: [string]
List of enabled APIs, optional values can be found in [Supported API List](#supported-api-list).
@ -65,6 +73,18 @@ Add routing rules for the api inbound in the routing configuration.
}
```
Add api to basic configuration
```
"api": {
"tag": "api",
"services": [
"StatsService"
]
}
```
## Supported API List
### HandlerService
@ -78,6 +98,18 @@ APIs that modify the inbound and outbound proxies, with the following available
- Add a user to an inbound proxy (VMess, VLESS, Trojan, and Shadowsocks(v1.3.0+) only);
- Delete a user from an inbound proxy (VMess, VLESS, Trojan, and Shadowsocks(v1.3.0+) only);
## RoutingService
API for adding, deleting, and replacing routing rules and querying equalizer statistics. The available functions are as follows:
* `adrules` adds and replaces routing configuration
* `rmrules` delete routing rules
* `sib` Disconnect source IP
* `bi` Query equalizer statistics
* `bo` Forces the equalizer to select the specified outboundTag
You can use something like `./xray help api bi` to query the specific usage.
### LoggerService
Supports restarting the built-in logger, which can be used in conjunction with logrotate to perform operations on log files.