Skip to content

Repository files navigation

ret2shell-v2proxy

Docker registry API for Ret2Shell. External deployment.

Feature

User who have Game permission to specific game can push/pull ret.sh.cn/{namespace}/{image} where namespace can be game id or bucket. And the user can only pull ret.sh.cn/{image} or ret.sh.cn/library/{image}.

User who have both Game and DevOps permissions can push/pull ret.sh.cn/{image} or ret.sh.cn/library/{image}.

Command docker login is supported.

Deployment

You need to pass config.toml to /etc/ret2shell, and ensure the database and registry can be visited.

Optionally mount /etc/ret2shell/registry.htpasswd alongside it. Each non-empty line must be username:$... in Bcrypt format. These users are independent of the database and only have read-only permission. This may help pull images in Kubernetes clusters or other CI/CD pipelines.

You can use the following command to generate a htpasswd line for a user:

htpasswd -Bn <username>
name: ret2shell

services:

  database:
    image: postgres:16-alpine
    # ...

  platform:
    image: ret2shell:latest
    volumes:
      - ./config:/etc/ret2shell:ro
      # ...
    # ...

  v2proxy:
    image: r2s-v2proxy:latest
    build: .
    depends_on:
      - platform
    environment:
      LISTEN_PORT: 1331
      V2_SERVICE: ret2shell
    # extra_hosts:
    #   - host.docker.internal:host-gateway
    volumes:
      - ./config:/etc/ret2shell:ro
    ports:
      - 1331:1331

License

Copyright (c) Cnily03. All rights reserved.

Licensed under the MIT license.

About

Docker registry API for Ret2Shell. External deployment.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages