Xray-docs-next/docs/en/config/features/env.md

31 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# Environment Variables
Xray provides the following environment variables for modifying some of its underlying configurations.
## Xray Asset Location
- Name`xray.location.asset` or `XRAY_LOCATION_ASSET`
- Default valuespecified [FHS](https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard) directory or the same path as the Xray file.
This environment variable specifies a folder location that should contain the `geoip.dat` and `geosite.dat` files. If no variable value is specified, the program will search for resource files in the following order:
```
./
/usr/local/share/xray
/usr/share/xray
```
## Configuration File Location
- Name`xray.location.config` or `XRAY_LOCATION_CONFIG`
- Default value: Same path as the Xray file.
This environment variable specifies a folder location that should contain the `config.json` file.
## Multiple Configuration Directories
- Name`xray.location.confdir` or `XRAY_LOCATION_CONFDIR`
- Default value`""`。
The `.json` files in this directory will be read in alphabetical order by filename and used as options for multiple configurations.