Centos7上用docker安装dante搭建socks5代理

By gavin

一、环境安装

参考https://gaving.top/index.php/2020/06/15/centos7%E4%B8%8B%E5%AE%89%E8%A3%85docker

二、下载dante

git clone https://github.com/gaving2016/docker-dante.git

三、修改Dockerfile,增加以下内容,标红的为用户密码

FROM wernight/dante

# TODO: Replace ‘john’ and ‘MyPassword’ by any username/password you want.

RUN printf ‘socks123\nsocks123\n’ adduser socks

四、进入docker logor的命令行 vi sockd.conf

取消注释这行

#socksmethod: username

五、制作镜像

docker build -t gaving ./

docker run -d -p 1080:1080 gaving

问题:

使用docker下载dante速度较慢,可取Makefile中dante下载地址手动下载,编译;编译过程中遇到问题:cpupolicy2num 找不到,解决修改config_scan.c和.l文件,将用到cpupolicy2num的行注释掉即可