first commit - enable ipv6
This commit is contained in:
@@ -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: <https://3proxy.org/doc/howtor.html#LOGFORMAT>
|
||||
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
|
||||
Reference in New Issue
Block a user