diff --git a/3proxy.cfg.mustach b/3proxy.cfg.mustach index 9a390cc..dd84d55 100644 --- a/3proxy.cfg.mustach +++ b/3proxy.cfg.mustach @@ -1,39 +1,44 @@ #!/bin/3proxy config /etc/3proxy/3proxy.cfg -# you may use system to execute some external command if proxy starts system "echo `which 3proxy`': Starting 3proxy'" -# We can configure nservers to avoid unsafe gethostbyname() usage (max 5 servers) {{#name_servers}} nserver {{ . }} {{/name_servers}} -# nscache is good to save speed, traffic and bandwidth nscache {{ name_servers_cache }} - -# Here we can change timeout values timeouts 1 5 30 60 180 1800 15 60 -# Logging docs: log {{ log.output }} logformat "-\""+_G{""time_unix"":%t, ""proxy"":{""type:"":""%N"", ""port"":%p}, ""error"":{""code"":""%E""}, ""auth"":{""user"":""%U""}, ""client"":{""ip"":""%C"", ""port"":%c}, ""server"":{""ip"":""%R"", ""port"":%r}, ""bytes"":{""sent"":%O, ""received"":%I}, ""request"":{""hostname"":""%n""}, ""message"":""%T""}" maxconn {{ max_connections }} -{{^auth.login=}}{{^auth.password=}} -users {{ auth.login }}:CL:{{ auth.password }}{{#auth.extra_accounts.*}} {{ * }}:CL:{{ . }}{{/auth.extra_accounts.*}} +{{#auth.login}} +{{#auth.password}} +users {{ auth.login }}:CL:{{ auth.password }} auth strong -allow {{ auth.login }}{{#auth.extra_accounts.*}},{{ * }}{{/auth.extra_accounts.*}} -{{/auth.password=}}{{/auth.login=}} +allow {{ auth.login }} +{{/auth.password}} +{{/auth.login}} -{{^extra_config=}} +# Listen on both IPv4 and IPv6 for incoming and outgoing traffic +external 0.0.0.0 +external :: +internal 0.0.0.0 +internal :: +{{#extra_config}} # Additional configuration {{extra_config}} -{{/extra_config=}} +{{/extra_config}} +# IPv4 & IPv6 Support for SOCKS5 & HTTP proxy -a -p{{ ports.proxy }} socks -a -p{{ ports.socks }} -flush +proxy -6 -a -p{{ ports.proxy }} +socks -6 -a -p{{ ports.socks }} + +flush \ No newline at end of file diff --git a/README.md b/README.md index 364b3b0..0419594 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,5 @@ -

- - - - - - -

+# This is a fork of https://github.com/tarampampam/3proxy-docker -

- - - - - -

# Docker image with [3proxy][link_3proxy] diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..6ecfd8c --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,21 @@ +version: "3.8" + +services: + 3proxy-docker: + container_name: 3proxy-server + hostname: 3proxy-server + build: + context: . + dockerfile: Dockerfile + network_mode: host + restart: unless-stopped + environment: + PROXY_LOGIN: username + PROXY_PASSWORD: "Password" + PRIMARY_RESOLVER: 1.1.1.1 + SECONDARY_RESOLVER: 152.53.118.246 + MAX_CONNECTIONS: 1024 + PROXY_PORT: 3128 + SOCKS_PORT: 1080 + labels: + com.centurylinklabs.watchtower.enable: "false"