Skip to content

Commit 8b32761

Browse files
tcpipukFizzadar
authored andcommitted
Added README
1 parent adf112b commit 8b32761

File tree

1 file changed

+86
-0
lines changed

1 file changed

+86
-0
lines changed

README.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# DummyBridge
2+
3+
[![Go Reference](https://pkg.go.dev/badge/github.com/beeper/dummybridge.svg)](https://pkg.go.dev/github.com/beeper/dummybridge)
4+
[![Go Report Card](https://goreportcard.com/badge/github.com/beeper/dummybridge)](https://goreportcard.com/report/github.com/beeper/dummybridge)
5+
[![Build Docker](https://github.com/beeper/dummybridge/actions/workflows/docker.yaml/badge.svg?branch=main)](https://github.com/beeper/dummybridge/actions/workflows/docker.yaml)
6+
7+
DummyBridge is a Go-based bridge designed for testing purposes. It provides an echo bridge
8+
functionality and supports various login flows, including password, cookies, local storage,
9+
and display-and-wait.
10+
11+
## Features
12+
13+
- **Echo Bridge Functionality**: Acts as a simple echo bridge for testing.
14+
- **Login Flows**: Supports multiple login flows such as password, cookies, local storage,
15+
and display-and-wait.
16+
- **Automation**: Configurable automation options for management rooms, login, portals,
17+
and backfill.
18+
19+
## Docker Images
20+
21+
To install Docker, refer to the [Docker Engine install guide](https://docs.docker.com/engine/install/).
22+
23+
The DummyBridge project provides several Docker images:
24+
25+
- `ghcr.io/beeper/dummybridge:latest`: The main DummyBridge application.
26+
- `ghcr.io/beeper/dummybridge/loginhelper:latest`: A helper service for managing login flows.
27+
- `ghcr.io/beeper/dummybridge/go:latest`: A base image for Go applications.
28+
29+
To pull the latest version of the image, use the following:
30+
31+
```sh
32+
docker pull ghcr.io/beeper/dummybridge:latest
33+
```
34+
35+
## Configuration
36+
37+
DummyBridge can be configured using a YAML file. Below is an example configuration:
38+
39+
```yaml
40+
automation:
41+
open_management_room: false # Open a management room for admins.
42+
login: false # Automatically log in admins.
43+
portals:
44+
count: 0 # Number of portals to create during startup.
45+
members: 0 # Number of members initially in each portal.
46+
messages: 0 # Number of messages initially sent to each portal.
47+
backfill:
48+
timelimit: 0s # Duration for the initial startup infinite backfill, e.g. 10s, 1m, 1h
49+
```
50+
51+
## Running
52+
53+
To run DummyBridge using Docker, execute the following command:
54+
55+
```sh
56+
docker run -d --name dummybridge -v /path/to/config.yaml:/etc/dummybridge/config.yaml ghcr.io/beeper/dummybridge:latest
57+
```
58+
59+
Replace `/path/to/config.yaml` with the path to your configuration file.
60+
61+
## Login Flows
62+
63+
Once DummyBridge is launched, you can interact with it using various login flows:
64+
65+
1. **Password Login**:
66+
- Navigate to the login page and enter any username and password.
67+
These credentials are used as the ID.
68+
69+
2. **Cookies Login**:
70+
- Visit the `/pages/cookies.html` page and enter your username and password.
71+
These will be saved as cookies.
72+
73+
3. **Local Storage Login**:
74+
- Visit the `/pages/localstorage.html` page and enter your username and password.
75+
These will be saved in local storage.
76+
77+
4. **Display and Wait Login**:
78+
- A code will be generated, which you need to enter on the `/pages/daw_submit.html` page.
79+
80+
DummyBridge supports several commands for testing purposes, such as creating new rooms,
81+
generating ghosts, and sending messages. These commands can be executed within the bridge's
82+
management room.
83+
84+
## License
85+
86+
This project currently does not have a published license.

0 commit comments

Comments
 (0)