使用场景:

有时候国内的服务器想使用代理去下载一些被墙的资源的时候,既不想在本地安装shellcrash导致本地网络变的复杂,又不想使用远程的服务,这时候就可以尝试使用 docker 搭建,本地只要设置 http_proxy 和 http_proxy为 docker 映射的端口就好了

安装

docker-compose.yaml

version: '3.8'

services:
  shellcrash:
    image: naspilot/shellcrash:latest
    container_name: shellcrash
    hostname: shellcrash
    restart: always
    cap_add:
      - NET_ADMIN
      - NET_RAW
    ports:
      - "7890:7890"
      - "9999:9999"
    volumes:
      - ./shellcrash:/etc/ShellCrash
    stdin_open: true
    tty: true

配置

docker 配置

docker exec -it shellcrash sh
image.png
image.png

配置好对应的节点信息

宿主机配置

image.png

配合ProxyManager 进行本地代理管理,pstart 会自动检测 7890 为代理端口,或者手动 执行

export https_proxy=http://127.0.0.1:7890 http_proxy=http://127.0.0.1:7890 all_proxy=socks5://127.0.0.1:7890

设置本地代理