Centos下Socks5代理服务器kingate安装配置

发布于 2013-12-20  116 次阅读


Kingate是国人开发的一款开源多功能代理服务器,可以在unix及windows系统下安装使用,支持http,https,socks,ftp,pop3,smtp,dns,telnet代理。
Kingate安装:

1
2
3
4
5
6
wget http://downloads.sourceforge.net/project/kingate/kingate/2.1/kingate-2.1.tar.gz
tar zxvf kingate-2.1.tar.gz
cd kingate-2.1
./configure --prefix=/usr/local/kingate
make
make install


Kingate主配置文件:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
vim /usr/local/kingate/etc/kingate.conf
http on
socks on
manage on
max 2000
max_per_ip 0
min_free_thread 3
http_port 8082
http_accelerate off
x_forwarded_for on
http_time_out 30
socks_port 1082
socks_time_out 300
socks5_user off
manage_port 2222
manage_time_out 300
log_model user
log_level 2
log_rotate {0 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23 * * * }
log_close_msg off
mem_min_cache 50m
mem_max_cache 12m
disk_min_cache 20m
disk_max_cache 30m
use_disk_cache off
refresh never
refresh_time 300
user_time_out 0
mem_cache 50m
disk_cache 100m
max_deny_per_ip 0
max_queue_thread 15
min_limit_speed_size 1m
limit_speed 20k
max_request 50
total_seconds 10
bind_addr
run_user
insert_via off


Kingate访问控制:

1
2
3
4
5
6
7
8
9
10
vim /usr/local/kingate/etc/access.conf
first deny
model deny
model allow
{ * * * * }
{manage * * * * } #允许所有管理
{ * * * * } #允许匿名代理
#{ * all * * } #用户验证代理
#访问控制格式,不填写时间代表全部时间。
{服务 用户 源IP 目标IP} {分 时 日 月 星期}


Kingate启动管理:

1
2
/usrlocal/kingate/bin/kingate #启动kingate
/usrlocal/kingate/bin/kingate -q #停止kingate


Web界面管理Kingate,访问http://ip:2222,默认用户root,密码kingate。