From 22ae84f73d1dac5efa557a27ec483720eced2a1c Mon Sep 17 00:00:00 2001 From: magras Date: Tue, 8 Jul 2025 23:14:39 +0300 Subject: [PATCH] Add information about docker to the readme --- README.md | 6 +++++ dist/docker/README.md | 48 ++++++++++++++++++++++++++++++++++++++++ dist/docker/compose.yaml | 12 ++++++++++ 3 files changed, 66 insertions(+) create mode 100644 dist/docker/README.md create mode 100644 dist/docker/compose.yaml diff --git a/README.md b/README.md index c7a8694..1e9376a 100644 --- a/README.md +++ b/README.md @@ -332,6 +332,12 @@ TCP может отсылать данные вне основного пото * Linux: `make` * Windows: `make windows CC=x86_64-w64-mingw32-gcc` +------ +### Docker образ + +Docker образ выкладывается на [DockerHub](https://hub.docker.com/r/hufrea/byedpi). +Пример конфигурации контейнера можно найти в [dist/docker](dist/docker). + ------ ### Дополнительная информация о DPI, источники идей * https://github.com/bol-van/zapret/blob/master/docs/readme.md diff --git a/dist/docker/README.md b/dist/docker/README.md new file mode 100644 index 0000000..1961dfd --- /dev/null +++ b/dist/docker/README.md @@ -0,0 +1,48 @@ +# Docker + +## Docker Hub + +An official container image available at https://hub.docker.com/r/hufrea/byedpi. + +Images are tagged by full version number (`major.minor.patch`) and `major.minor`. As usual the latest stable release has `latest` tag. + +## Building + +To build a container image from the source execute: + +```sh +docker build . --tag my/byedpi +``` + +A tag allows to reference built image by human-readable name instead of hash and is optional. + +Provided `Dockerfile` is compatible with podman if you want an alternative to docker. + +## Running + +To run a byedpi container use the command: + +```sh +docker run -it --rm hufrea/byedpi --help +``` + +Don't forget to expose a port to communicate with the container. For example to have local only access to byedpi SOCKS proxy on port 1234 add `-p 127.0.0.1:1234:1080` before the image name: + +```sh +docker run -it --rm -p 127.0.0.1:1234:1080 hufrea/byedpi --fake -1 --md5sig +``` + +## Compose + +Docker compose is useful to simplify management of docker containers. + +To use provided `compose.yaml` edit +1) arguments passed to byedpi in `command` array +2) `published` port if 1080 is already allocated +and run the command inside a directory containing `compose.yaml` + +```sh +docker compose up -d +``` + +If docker daemon configured to start on system boot, it will keep byedpi container always up. diff --git a/dist/docker/compose.yaml b/dist/docker/compose.yaml new file mode 100644 index 0000000..2daf6b4 --- /dev/null +++ b/dist/docker/compose.yaml @@ -0,0 +1,12 @@ +services: + byedpi: + image: hufrea/byedpi + command: ["--fake", "-1", "--md5sig"] + restart: unless-stopped + user: 1000:1000 + ports: + - name: SOCKS proxy + target: 1080 + host_ip: 127.0.0.1 + published: 1080 + protocol: tcp