dante-server是一個很好的socks4/5代理服務器軟件。
- 使用apt-get安裝
1
|
apt
-
get
install
dante
-
server
|
- 添加一個用戶
1
2
|
useradd
proxyuser
passwd
proxyuser
|
- 禁止proxyuser用戶登錄系統(安全考慮)
1
|
sudo
vim
/
etc
/
passwd
|
將proxyuser的shell改成 /bin/false
- 配置danted.conf
1
2
|
sudo
mv
/
etc
/
danted
.conf
/
etc
/
danted
.conf_old
sudo
vim
/
etc
/
danted
.conf
|
輸入以下內容:
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
#
#
logoutput
:
stderr
#
logoutput
:
syslog
logoutput
:
/
var
/
log
/
sockd
/
sockd
.
log
internal
:
0.0.0.0
port
=
10080
external
:
eth0
#
method
:
username
none
#
method
:
pam
method
:
username
user
.
privileged
:
root
user
.
notprivileged
:
proxyuser
user
.
libwrap
:
nobody
compatibility
:
sameport
compatibility
:
reuseaddr
extension
:
bind
client
pass
{
from
:
0.0.0.0
/
0
to
:
0.0.0.0
/
0
log
:
connect
disconnect
error
}
pass
{
from
:
0.0.0.0
/
0
to
:
0.0.0.0
/
0
command
:
bind
log
:
connect
disconnect
error
}
pass
{
from
:
0.0.0.0
/
0
to
:
0.0.0.0
/
0
command
:
bindreply
udpreply
log
:
connect
error
}
pass
{
from
:
0.0.0.0
/
0
to
:
0.0.0.0
/
0
port
1
-
65535
protocol
:
tcp
udp
}
pass
{
from
:
0.0.0.0
/
0
to
:
0.0.0.0
/
0
port
1
-
65535
command
:
udpassociate
}
#
block
{
#
from
:
0.0.0.0
/
0
to
:
0.0.0.0
/
0
port
1
-
65535
#
protocol
:
tcp
udp
#
log
:
connect
erro
#
}
|
- 創建log文件夾
1
|
mkdir
/
var
/
log
/
sockd
|
- 啟動dante-server
1
|
/
etc
/
init
.d
/
danted
start
|
- 查看是否監聽成功:
1
|
netstat
-
anp
|
grep
10080
|
現在你就可以使用socks5了