Skip to content

Commit 56b0acc

Browse files
committed
Fix compose networking for V2Ray and validate config syntax
1 parent 943238b commit 56b0acc

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
Добавлен `docker-compose.yml`, который поднимает:
1313
- WireGuard-клиент с подключением к существующему серверу Amnezia.
1414
- Proxy-сервис (3proxy), работающий через VPN-туннель.
15-
- Опционально `v2ray-server` (профиль `v2ray`).
15+
- Опционально `v2ray-server` (профиль `v2ray`) в том же network namespace, что и WireGuard.
1616

1717
Логи отключены для контейнеров через `logging.driver: "none"`.
1818

@@ -21,9 +21,10 @@
2121
- `proxy/3proxy.cfg` — прокси с авторизацией (шаблон без реальных логина/пароля).
2222
- `v2ray/server-config.json` — конфиг V2Ray-сервера (VMess + WS).
2323

24-
### Доступ к прокси
25-
- SOCKS5: `127.0.0.1:1080`
26-
- HTTP: `127.0.0.1:3128`
24+
### Доступ к сервисам
25+
- SOCKS5 (3proxy): `127.0.0.1:1080`
26+
- HTTP (3proxy): `127.0.0.1:3128`
27+
- V2Ray VMess+WS: `127.0.0.1:10000`
2728

2829
Перед запуском обязательно замените шаблонные значения:
2930
- `REPLACE_WITH_*` в `wireguard/wg_confs/wg0.conf` и `v2ray/server-config.json`

docker-compose.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ services:
2020
ports:
2121
- "1080:1080" # SOCKS5 proxy (with auth)
2222
- "3128:3128" # HTTP proxy (with auth)
23+
- "10000:10000" # V2Ray VMess + WS
2324
logging:
2425
driver: "none"
2526

@@ -39,10 +40,11 @@ services:
3940
image: v2fly/v2fly-core:latest
4041
container_name: v2ray-server
4142
command: ["run", "-c", "/etc/v2ray/config.json"]
43+
depends_on:
44+
- wireguard
45+
network_mode: "service:wireguard"
4246
restart: unless-stopped
4347
profiles: ["v2ray"]
44-
ports:
45-
- "10000:10000"
4648
volumes:
4749
- ./v2ray/server-config.json:/etc/v2ray/config.json:ro
4850
logging:

0 commit comments

Comments
 (0)