31 lines
902 B
INI
31 lines
902 B
INI
#!/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
|
|
nserver 1.0.0.1
|
|
nserver 1.1.1.1
|
|
nserver 8.8.4.4
|
|
nserver 8.8.8.8
|
|
|
|
# nscache is good to save speed, traffic and bandwidth
|
|
nscache 65536
|
|
|
|
# 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 /dev/stdout
|
|
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 1024
|
|
|
|
#AUTH_SETTINGS
|
|
|
|
proxy -a -p3128
|
|
socks -a -p1080
|
|
|
|
flush
|