mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-22 15:59:41 +08:00
Install chrooted configuration with make install on linux
This commit is contained in:
1 parent
836fffddbe
commit
f860ea9e54
4 files changed
+44
-24
No files matched your search
+9
-14
@@ -1,23 +1,18 @@
|
||||
#!/bin/3proxy
|
||||
daemon
|
||||
pidfile /var/run/3proxy/3proxy.pid
|
||||
nscache 65536
|
||||
nserver 127.0.0.1
|
||||
nserver 8.8.8.8
|
||||
nserver 8.8.4.4
|
||||
|
||||
config /etc/3proxy/3proxy.cfg
|
||||
monitor /etc/3proxy/3proxy.cfg
|
||||
monitor /etc/3proxy/counters
|
||||
monitor /etc/3proxy/passwd
|
||||
monitor /etc/3proxy/bandlimiters
|
||||
config /conf/3proxy.cfg
|
||||
monitor /conf/3proxy.cfg
|
||||
|
||||
log /var/log/3proxy/3proxy-%y%m%d.log D
|
||||
log /logs/3proxy-%y%m%d.log D
|
||||
rotate 60
|
||||
counter /var/run/3proxy/3proxy.3cf
|
||||
counter /count/3proxy.3cf
|
||||
|
||||
users $/etc/3proxy/passwd
|
||||
users $/conf/passwd
|
||||
|
||||
include /etc/3proxy/counters
|
||||
include /etc/3proxy/bandlimiters
|
||||
include /conf/counters
|
||||
include /conf/bandlimiters
|
||||
|
||||
auth strong
|
||||
deny * * 127.0.0.1
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
#!/bin/3proxy
|
||||
daemon
|
||||
pidfile /var/run/3proxy/3proxy.pid
|
||||
chroot /usr/local/3proxy proxy proxy
|
||||
include /conf/3proxy.cfg
|
||||
@@ -1,12 +1,12 @@
|
||||
#!/bin/sh
|
||||
if [ $4 ]; then
|
||||
echo bandlimin $4 $1 >> /etc/3proxy/bandlimiters
|
||||
echo bandlimin $4 $1 >> /etc/3proxy/conf/bandlimiters
|
||||
fi
|
||||
if [ $3 ]; then
|
||||
echo countin \"`wc -l /etc/3proxy/counters|awk '{print $1}'`/$1\" D $3 $1 >> /etc/3proxy/counters
|
||||
echo countin \"`wc -l /etc/3proxy/conf/counters|awk '{print $1}'`/$1\" D $3 $1 >> /etc/3proxy/conf/counters
|
||||
fi
|
||||
if [ $2 ]; then
|
||||
echo $1:`/bin/mycrypt $$ $2` >> /etc/3proxy/passwd
|
||||
echo $1:`/bin/mycrypt $$ $2` >> /etc/3proxy/conf/passwd
|
||||
else
|
||||
echo usage: $0 username password [day_limit] [bandwidth]
|
||||
echo " "day_limit - traffic limit in MB per day
|
||||
|
||||
Reference in new issue
Block a user