Git Product home page Git Product logo

rgosocks5's Introduction

Dockerized socks5 proxy written in Go.

Docker image builds for linux/amd64 linux/arm/v7 linux/arm64/v8

Binary builds for linux/amd64 linux/arm/v7 linux/arm64/v8 windows

๐Ÿ†• Image available as raerten/rgosocks5

Build status Go version

Docker Pulls Docker Image Size (tag)

Installation

To install rgoSocks5, you can use Docker Compose with the provided docker-compose.yml file:

version: "3"

services:
  socks5:
    image: raerten/rgosocks5
    ports:
      - "1080:1080" # socks5 port
    environment:
      - PROXY_USER=secret
      # example command for generate random string
      # openssl rand -hex 32
      - PROXY_PASSWORD=secret_random_password
      - PROXY_PORT=1080
      # Timezone for accurate log times
      - TZ=Europe/Moscow

Run the following command in the same directory as your docker-compose.yml file:

docker-compose up

Env variables

Environment variable Description Default value
PROXY_USER Username for proxy
PROXY_PASSWORD Password for proxy
PROXY_HOST Host for proxy 0.0.0.0
PROXY_PORT Port for proxy 1080
PROXY_ADDRESS Address for proxy $PROXY_HOST:$PROXY_PORT
TZ Timezone for accurate log times UTC
LOG_LEVEL_DEBUG Enable debug logs false
PROXY_ALLOWED_DEST_FQDN Comma separated white list of dest FQDN
PROXY_REJECT_DEST_FQDN Comma separated black list of dest FQDN
PROXY_ALLOWED_IPS Comma separated white list of dest IP or CIDR
PROXY_REJECT_IPS Comma separated black list of dest IP or CIDR
PROXY_DISABLE_BIND Disable bind false
PROXY_DISABLE_ASSOCIATE Disable associate false
DNS_HOST Host for of custom UDP DNS server
If empty - use system resolve
DNS_PORT Port for custom UDP DNS server 53
DNS_USE_CACHE Use program cache for custom DNS server
Respect TTL
Works only for custom DNS server
true
PREFER_IPV6 Prefer IPv6 IP when resolve FQDN false
STATUS_ENABLED Enable status server false
STATUS_HOST Host for status server 0.0.0.0
STATUS_PORT Port for status server 2080
STATUS_ADDRESS Address for status server $STATUS_HOST:$STATUS_PORT
STATUS_TOKEN Auth token for status server

Status endpoint

If env STATUS_ENABLED is true, statistics about current active connections available on http://$STATUS_HOST:$STATUS_PORT/status

If env STATUS_TOKEN is set, header "Authorization: Bearer $STATUS_TOKEN" is required

License

MIT

rgosocks5's People

Contributors

raerten avatar

Stargazers

Xinos avatar  avatar Daniil avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

rgosocks5's Issues

enhance name resolution

add env variables for:

  • custom DNS server
  • prefer IPv6/IPv4 name resolution
  • cache dns query response

accept CIDR

accept CIDR for PROXY_ALLOWED_IPS and PROXY_REJECT_IPS

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.