Files
OBS/2. Проекты/PROXY/1. Настройка и запуск прокси.md

48 lines
949 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
>[!Danger] клонируем 3прокси
>[!BUG] Готовим конфиг докер композ!
```
cat > /opt/3proxy/config/docker-compose.yml <<'YML'
services:
proxy:
image: 3proxy/3proxy:latest
container_name: 3proxy
restart: unless-stopped
ports:
- "3128:3128" # HTTP наружу
- "1081:1080" # SOCKS наружу, внутри 1080
volumes:
- /opt/3proxy/config/3proxy.cfg:/etc/3proxy/3proxy.cfg:ro
YML
```
>[!Warning] Создание конфига!
```
cat > /opt/3proxy/config/3proxy.cfg <<'CFG'
nscache 65536
timeouts 1 5 30 60 180 1800 15 60
log /dev/stdout
rotate 0
auth strong
users LOGIN:CL:PASSWORD
allow * * * *
proxy -p3128
socks -p1080
CFG
```
>[!Bug] запуск конта
```
cd /opt/3proxy/config
docker compose up -d
docker logs -f 3proxy
```
>[!tip]- Ожидаемые логи
>Starting 3proxy
Starting proxy on 0.0.0.0:3128
Starting socks on 0.0.0.0:1080