d2ray/README.md

30 lines
2.2 KiB
Markdown
Raw Normal View History

2021-08-13 07:42:11 +00:00
[![Build Status](https://ci.quacker.org/api/badges/d/d2ray/status.svg)](https://ci.quacker.org/d/d2ray)
2023-02-17 03:36:26 +00:00
# Xray + xtls-vision + nginx fallback all in Docker!
2022-12-02 13:12:46 +00:00
## What is d2ray?
2023-02-17 03:36:26 +00:00
d2ray is a single Docker container that provides easy and braindead configuration for xtls-vision + nginx fallback. d2ray also offers currently hardcoded setup instructions and Xray binary packages for various OSes and architectures.
2021-11-25 05:59:39 +00:00
2022-12-02 13:12:46 +00:00
## Features
2022-12-02 13:25:14 +00:00
- Easy 5-minutes setup.
- Automatic generation and renewal of Let's Encrypt SSL certificates.
2022-12-02 13:12:46 +00:00
- Packaged Xray binary on the fallback website.
2022-12-05 07:46:24 +00:00
- Per-user setup instructions for various architectures.
2022-12-02 13:12:46 +00:00
## How to use?
1. Download the `docker-compose.yml` from this repo.
2. 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.
2023-02-17 03:34:54 +00:00
- `USERS`: comma separated list of `USERCONF` allowed access to both Xray and resource downloads. Each `USERCONF` is of format `userid@flow`. `userid` is used as the credential for Xray. If `flow` is not specified it defaults to `xtls-rprx-vision`. For example, setting `USERS` to `user1@xtls-rprx-direct,user2` means two users: `user1` with flow `xtls-rprx-direct` and `user2` with flow `xtls-rprx-vision`. Note that since Xray 1.7.2, xtls-direct is deprecated so I recommend you not specify `flow` and just use the default.
2022-12-02 13:12:46 +00:00
- `LOGDIR`: the directory to store logs, currently required.
3. `docker compose up -d`
2022-12-05 07:46:24 +00:00
4. 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 the `userid` in the textbox at the bottom of the page and clicking the `Download` button next to it.
2022-12-02 13:12:46 +00:00
## How to update?
- `docker compose down`
- `docker compose pull`
- `docker compose up -d`
## Notes
1. Port 80 must be available on the host as it is required to obtain SSL certificates.
2022-12-02 13:15:04 +00:00
2. Note the `docker compose` instead of `docker-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.