meele/xray
Xray, Penetrates Everything. Also the best v2ray-core, with XTLS support. Fully compatible configuration.
If you need to install docker by yourself, follow the official installation guide.
If you need to install Docker Compose by yourself,follow the official installation guide.
For more information on docker and containerization technologies, refer to official document.
docker pull meele/xray:latest
Create a configuration file config.json in the /etc/xray directory. The content is as follows:
{
"inbounds": [{
"port": 9000,
"protocol": "vmess",
"settings": {
"clients": [
{
"id": "meele"
}
]
}
}],
"outbounds": [{
"protocol": "freedom",
"settings": {}
}]
}
Container Run
docker run -d -p 9000:9000 --name xraybc --restart=always -v /etc/xray:/etc/xray meele/xray --config /etc/xray/config.json
xray_vless_reality/
├── config/
│ └── config.json
├── docker-compose.yml
Run using docker-compose
touch docker-compose.yml
version: '3.8'
services:
xray:
image: meele/xray:latest
container_name: xray
restart: unless-stopped
ports:
- "443:443"
- "80:80"
volumes:
- ./config:/etc/xray
- ./logs:/var/log/xray
environment:
- TZ=Asia/Shanghai
command: ["-config", "/etc/xray/config.json"]
volumes:
config:
logs:
The following is an example configuration:
{
"log": {
"access": "/var/log/xray/access.log",
"error": "/var/log/xray/error.log",
"loglevel": "warning"
},
"inbounds": [
{
"port": 443,
"protocol": "vless",
"settings": {
"clients": [
{
"id": "UUID",
"flow": "xtls-rprx-vision",
"level": 0,
"email": "example@example.com"
}
],
"decryption": "none"
},
"streamSettings": {
"network": "tcp",
"security": "reality",
"realitySettings": {
"show": true,
"dest": "www.example.com:443",
"serverNames": [
"www.example.com"
],
"privateKey": "PRIVATE_KEY",
"shortIds": [
"short_id"
]
}
}
}
],
"outbounds": [
{
"protocol": "freedom",
"settings": {}
}
]
}
docker-compose up -d
docker-compose ps
docker-compose logs -f xray
docker-compose down
docker-compose up -d
docker pull meele/xray