Skip to content

Commit

Permalink
Final changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mrunix00 committed Jul 3, 2024
1 parent 4dc90bd commit 6cf65de
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 1 deletion.
18 changes: 18 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Docker Image CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:

build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Build the Docker image
run: docker build . --file Dockerfile --tag stargate-proxy
42 changes: 41 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,42 @@
# Stargate Proxy
WIP
A forward proxy with support for TLS Tunneling and caching with redis.

## How to use
1. Create a self-signed certificate.
```bash
openssl req -new -newkey rsa:2048 -days 3650 -nodes -x509 -keyout myCA.key -out myCA.pem
```
2. Optional: Load the certificate to your local system.
```bash
sudo cp myCA.pem /etc/pki/ca-trust/source/anchors/
sudo update-ca-trust
```

3. Build the docker image.
```bash
docker build -t stargate-proxy .
```
4. Create a docker compose file with the following content and change it to your needs.
```yaml
version: '3.7'
services:
stargate-proxy:
image: "stargate-proxy"
ports:
- 8080:8080
volumes:
- /path/to/myCA.pem:/etc/stargate-proxy/myCA.pem
- /path/to/myCA.key:/etc/stargate-proxy/myCA.key
environment:
SP_HOSTNAME: "0.0.0.0"
SP_PORT: "8080"
SP_CERT_FILE: "/etc/stargate-proxy/myCA.pem"
SP_KEY_FILE: "/etc/stargate-proxy/myCA.key"
SP_REDIS_HOSTNAME: "rediscache"
SP_REDIS_PORT: "6379"
redis:
image: "redis:alpine"
hostname: "rediscache"
ports:
- 6379:6379
```

0 comments on commit 6cf65de

Please sign in to comment.