44 lines
1.1 KiB
Plaintext
44 lines
1.1 KiB
Plaintext
#!/bin/3proxy
|
|
config /etc/3proxy/3proxy.cfg
|
|
|
|
system "echo `which 3proxy`': Starting 3proxy'"
|
|
|
|
{{#name_servers}}
|
|
nserver {{ . }}
|
|
{{/name_servers}}
|
|
|
|
nscache {{ name_servers_cache }}
|
|
timeouts 1 5 30 60 180 1800 15 60
|
|
|
|
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 strong
|
|
allow {{ auth.login }}
|
|
{{/auth.password}}
|
|
{{/auth.login}}
|
|
|
|
# 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}}
|
|
|
|
# IPv4 & IPv6 Support for SOCKS5 & HTTP
|
|
proxy -a -p{{ ports.proxy }}
|
|
socks -a -p{{ ports.socks }}
|
|
|
|
proxy -6 -a -p{{ ports.proxy }}
|
|
socks -6 -a -p{{ ports.socks }}
|
|
|
|
flush |