dante-server 1.1.19 命令详解 (未集成)
Socks4/Socks5 代理服务器。
另请参阅: danted.conf ifconfig IP 地址查询 默认TCP/IP端口
01. 安装 dante-server apt-get install dante-server 02. 添加用户socks5user 设置口令4 useradd socks5user passwd socks5user 03. 禁止 socks5user 用户远程登录系统 (安全考虑) vi /etc/passwd 将 socks5user 的 shell 改为 /bin/false,如下所示 socks5user:x:1002:1002::/home/socks5user:/bin/false 04. 备份配置文件 cp /etc/danted.conf /home/ftp/danted.conf 更名配置文件 mv /etc/danted.conf /etc/danted.conf.bak 05. 创建日志目录 mkdir /var/log/socks_dante 06. 自定义配置 cd /etc rm /etc/danted.conf vi /etc/danted.conf 粘贴自定义配置内容 07. 启动 Dante /etc/init.d/danted stop /etc/init.d/danted start
08. 检查启动情况
netstat -anp | grep 1080
若无输出信息
vi /var/log/socks_dante/socks_dante.log
rm /var/log/socks_dante/socks_dante.log
杀除所有 danted 进程
killall danted
09. 阿里云 ECS 云服务器
通过后台启用 ECS 安全组入网 1080 端口 (默认禁用)
自定义 danted.conf 配置文件
#
logoutput: /var/log/socks_dante/socks_dante.log
internal: eth0 port = 1080
external: eth0
method: username none
clientmethod: none
user.privileged: root
user.notprivileged: socks5user
user.libwrap: nobody
compatibility: sameport
compatibility: reuseaddr
extension: bind
client pass {
from: 0.0.0.0/0 port 1-65535 to: 0.0.0.0/0
log: connect disconnect error
}
pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
protocol: tcp udp
log: connect error
}
基本语法
danted [-DLNVdfhnv]
选项参数
| 参数 | EN 解释 | 中文翻译 | Remark |
|---|---|---|---|
| -D | run in daemon mode | 在守护模式下运行 | |
| -L | shows the license for this program | 展示此程序的许可 | |
| -N <number> | fork of <number> servers [1] | <number> 服务器的分叉 [1] | |
| -V | verify configuration and exit | 验证配置并退出 | |
| -d | enable debugging | 启用调试 | |
| -f <filename> | use <filename> as configuration file [/etc/danted.conf] | 使用 <filename> 作为配置文件 [/etc/danted.conf] | |
| -h | print this information | 打印此信息 | |
| -n | disable TCP keep-alive | 禁用 TCP 保持存活 | |
| -v | print version info | 打印版本信息 |
| Function | 命令 | 文字解释 | 示例 | 示例解释 |
|---|---|---|---|---|
| 帮助 | danted -h | 展示帮助信息 | ||
| danted -help | ||||
| danted -v | 展示版本信息 |
Copyright Notice: This article is an exclusive original manuscript, copyright belongs to Happy Digits Software , shall not be reproduced without permission.