Sign inSign up

yuriyvlasov/socks5-proxy

By yuriyvlasov

•Updated 3 days ago

SOCKS5 proxy with autoconfiguration PAC file

Image
3

5.5K

yuriyvlasov/socks5-proxy repository overview

Repository: GitLab⁠

⁠SOCKS5 proxy

Based on openssh-server⁠. Expose SSH on 22 port and Nginx on 80. Nginx returns PAC file.

Pros:

  • read one from base openssh image :)
  • provides proxy autoconfiguration file

⁠Settings

Default user and password are the same one: tunnel. You should change defaults using configuration which is described here⁠.

NameDefaultDescription
SOCKS5_HOSTPublic IPv4External domain name where this server will be reachable
SOCKS5_PORT4145Port which will be used for SOCKS5 tunnel on target host
EXTERNAL_SSH_PORT22External port which is forwarded to 22 port inside of container
PROXY_SITES''Comma-separated list of DNS wildcards

Container will run its SSH server on port 22 and web server on port 80, but we need to know exactly what port will be used for tunnel to this server in order to write it to PAC file. Just follow example below.

⁠Example
version: '3.5'  
services:  
  socks5:  
    image: yuriyvlasov/socks5-proxy  
    restart: unless-stopped  
    ports:  
      - "2020:22"  
      - "80:80"  
    environment:  
      - PROXY_SITES=yandex.*,mail.ru,vk.com,ok.ru,kinopoisk.ru,yastatic.*  
      - SOCKS5_PORT=1329  
      - EXTERNAL_SSH_PORT=2020  
    logging:  
      driver: json-file  
      options:  
        max-size: 10m  

Connection script can be now obtained at path /connect and PAC file at /pac.
In order to connect to the server do:

curl -fsSL localhost | sh -  

Tag summary

Content type

Image

Digest

sha256:afb46f774…

Size

17.5 MB

Last updated

3 days ago

docker pull yuriyvlasov/socks5-proxy