2.0 KiB
2.0 KiB
Xray + VLESS + XTLS + Nginx fallback in Docker!
What is d2ray?
d2ray is a single Docker container that provides easy and braindead configuration for Xray + XTLS + Nginx fallback. d2ray also offers currently hardcoded setup instructions and Xray binary packages for various OSes and architectures.
Features
- Easy 5-minutes setup.
- Automatic generation and renewal of Let's Encrypt SSL certificates.
- Packaged Xray binary on the fallback website.
- Per-user setup instructions for various architectures.
How to use?
- Download the
docker-compose.yml
from this repo. - Create a
.env
file in the same directory and configure the instance to your liking.- See
.env
in the current repo. PORT
: the port to run Xray on.FQDN
: the domain name of your server, used to generate SSL certificates.USERS
: comma separated list ofUSERCONF
allowed access to both Xray and resource downloads. EachUSERCONF
is of formatuserid@flow
.userid
is used as the credential for Xray. Ifflow
is not specified it defaults toxtls-rprx-vision
. For example, settingUSERS
touser1@xtls-rprx-direct,user2
means two users:user1
with flowxtls-rprx-direct
anduser2
with flowxtls-rprx-vision
.LOGDIR
: the directory to store logs, currently required.
- See
docker compose up -d
- You can access the Xray service using an Xray client. You can access the per-user resource downloads by accessing
https://your-domain:your-port
, entering theuserid
in the textbox at the bottom of the page and clicking theDownload
button next to it.
How to update?
docker compose down
docker compose pull
docker compose up -d
Notes
- Port 80 must be available on the host as it is required to obtain SSL certificates.
- Note the
docker compose
instead ofdocker-compose
commands. d2ray is only tested with the newer docker-compose-plugin (install with your distribution's package manager) as opposed to legacy docker-compose.