Skip to content

Commit 289b2d7

Browse files
committed
2 parents b14a174 + 65336ac commit 289b2d7

File tree

1 file changed

+80
-3
lines changed

1 file changed

+80
-3
lines changed

README.md

Lines changed: 80 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,97 @@ Get the latest version of the `docker-compose.yaml` file:
99
```yaml
1010
---
1111
services:
12-
myservice:
13-
container_name: myservice
12+
signal-api:
13+
image: bbernhard/signal-cli-rest-api
14+
container_name: signal-api
15+
environment:
16+
- MODE=normal
17+
volumes:
18+
- ./data:/home/.local/share/signal-cli
19+
networks:
20+
backend:
21+
aliases:
22+
- signal-api
23+
restart: unless-stopped
24+
25+
secured-signal:
26+
image: ghcr.io/codeshelldev/secured-signal-api
27+
container_name: secured-signal
28+
networks:
29+
backend:
30+
aliases:
31+
- secured-signal-api
32+
environment:
33+
SIGNAL_API_URL: http://signal-api:8080
34+
DEFAULT_RECIPIENTS: '[ "000", "001", "002" ]'
35+
SENDER: 123456789
36+
ports:
37+
- "8880:8880"
38+
restart: unless-stopped
39+
40+
networks:
41+
backend:
42+
```
43+
44+
### Reverse proxy
45+
46+
Take a look at traefik implementation:
47+
48+
```yaml
49+
{ { file.example/traefik.docker-compose.yaml } }
1450
```
1551

52+
## Setup
53+
54+
Before you can send messages via `secured-signal-api` you must first setup [`signal-api`](https://github.com/bbernhard/signal-cli-rest-api/blob/master/doc/EXAMPLES.md),
55+
56+
to send messages you have to either:
57+
58+
- register a Signal Account
59+
60+
OR
61+
62+
- link Signal Api to a already registered Signal Device
63+
1664
## Usage
1765

1866
To send a message to `number`: `1234567`:
1967

2068
```bash
21-
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer TOKEN" -d '{"message": "Hello World!", "recipients": ["1234567"]}' http://signal-api/v2/send
69+
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer TOKEN" -d '{"message": "Hello World!", "recipients": ["1234567"]}' http://signal-api:8880/v2/send
70+
```
71+
72+
### Configuration
73+
74+
Because `secured-signal-api` is just a secure proxy you can use all of the [Signal REST Api](https://github.com/bbernhard/signal-cli-rest-api/blob/master/doc/EXAMPLES.md) endpoints with an Exception of:
75+
76+
```python
77+
DEFAULT_BLOCKED_ENDPOINTS = [
78+
"/v1/about",
79+
"/v1/configuration",
80+
"/v1/devices",
81+
"/v1/register",
82+
"/v1/unregister",
83+
"/v1/qrcodelink",
84+
"/v1/accounts",
85+
"/v1/contacts"
86+
]
87+
```
88+
89+
Which are blocked by default to increase Security, but you these can be modified by setting the `BLOCKED_ENDPOINTS` environment variable as a valid json array
90+
91+
```yaml
92+
environment:
93+
BLOCKED_ENDPOINTS: '[ "/v1/register","/v1/unregister","/v1/qrcodelink","/v1/contacts" ]'
2294
```
2395
2496
## Contributing
2597
98+
Found a bug? Want to change or add something?
99+
Feel free to open up an issue or create a Pull Request!
100+
101+
_This is a small project so don't expect any huge changes in the future_
102+
26103
## License
27104
28105
[MIT](https://choosealicense.com/licenses/mit/)

0 commit comments

Comments
 (0)