Socks5 Dante脚本使用

仓库地址:https://github.com/Lozy/danted

Docker #

# sockd.passwd is a `htpasswd` file contains socks5 auth user/password.
docker run -d \
    --name sockd \
    --publish 2020:2020 \
    --volume sockd.passwd:/home/danted/conf/sockd.passwd \
    lozyme/sockd

Docker Compose #

#
# wget https://raw.githubusercontent.com/Lozy/danted/dev/docker/docker-compose.yaml
#
version: '3'

services:

  sockd:
    image: lozyme/sockd
    container_name: sockd
    restart: always
    ports:
      - 2020:2020
    volumes:
      - sockd.passwd:/home/danted/conf/sockd.passwd
      # - sockd.conf:/home/danted/conf/sockd.conf

Docker管理 #

docker exec sockd script/pam add sockd sockd

编译安装 #

wget --no-check-certificate https://raw.github.com/Lozy/danted/master/install.sh -O install.sh
bash install.sh --ip="A.A.A.A:B.B.B.B" --port=2016 --user=sockd --passwd=sockd --whitelist="X.X.X.X/32"

卸载 #

bash install.sh --uninstall

添加用户 #

/etc/init.d/sockd adduser USERNAME PASSWORD