https://github.com/machsix/docker-v2fly
https://github.com/machsix/docker-v2fly
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/machsix/docker-v2fly
- Owner: machsix
- License: mit
- Created: 2025-03-25T06:00:41.000Z (2 months ago)
- Default Branch: master
- Last Pushed: 2025-03-25T06:30:55.000Z (2 months ago)
- Last Synced: 2025-03-25T07:26:27.269Z (2 months ago)
- Language: Shell
- Size: 87.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Docker Fly
docker build repo for v2fly
https://hub.docker.com/r/v2fly/v2fly-core
## Usage
```bash
docker run --rm v2fly/v2fly-core helpdocker run --name v2ray v2fly/v2fly-core $v2ray_args (help, eun etc...)
docker run -d --name v2ray -v /path/to/config.json:/etc/v2ray/config.json -p 10086:10086 v2fly/v2fly-core run -c /etc/v2ray/config.json
# If you want to use v5 format config
docker run -d --name v2ray -v /path/to/config.json:/etc/v2ray/config.json -p 10086:10086 v2fly/v2fly-core run -c /etc/v2ray/config.json -format jsonv5
```## 使用TPROXY透明代理的额外说明
- 需要添加容器启动参数 `--privileged` 使用特权模式启动
- 使用容器macvlan功能,为容器分配一个独占的主网络IP地址
- macvlan默认不支持dns,启动容器时挂载宿主机 `-v /etc/resolv.conf:/etc/resolv.conf` 文件保证容器内域名可以正常解析
- 为宿主机的主网卡开启混杂模式
- 如果容器以host网络方式启动,则不需要以上几步操作,直接就可以用(不推荐host方式,还是推荐容器完全隔离模式启动)
- 启动容器使用 `--entrypoint="/usr/bin/v2ray-tproxy"` 覆盖默认的 entrypoint