Skip to content

Commit 6878f9b

Browse files
committed
Update README.md
1 parent 058e049 commit 6878f9b

File tree

2 files changed

+34
-22
lines changed

2 files changed

+34
-22
lines changed

README.md

Lines changed: 29 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,8 @@
7676
### Installation
7777

7878
```bash
79-
# Using local code
80-
git clone https://github.com/eddietisma/krp.git
81-
cd krp
82-
dotnet run
79+
# Using winget
80+
winget install EddieTisma.Krp
8381
```
8482

8583
```bash
@@ -90,12 +88,15 @@ krp
9088

9189
```bash
9290
# Using docker
93-
docker compose -f https://raw.githubusercontent.com/eddietisma/krp/main/docker-compose.yml up
91+
curl -fsSL https://raw.githubusercontent.com/eddietisma/krp/main/docker-compose.yml -o docker-compose.yaml
92+
docker compose up
9493
```
9594

9695
```bash
97-
# Setup HTTPS
98-
dotnet dev-certs https -ep "%USERPROFILE%\.krp\krp.pfx" -p your-cert-password --trust
96+
# Using local code
97+
git clone https://github.com/eddietisma/krp.git
98+
cd krp
99+
dotnet run
99100
```
100101

101102
## **Usage**
@@ -123,6 +124,9 @@ Options:
123124
Default value is: windivert.
124125
-?|-h|--help Show help information.
125126

127+
Commands:
128+
https Manage HTTPS certificates
129+
126130
Environment variables:
127131
KRP_HOSTS Override path to hosts file
128132
```
@@ -179,14 +183,20 @@ Environment variables:
179183
>
180184
> For HTTPS we could use SNI to detect hostnames and use for routing but ran into issues with reacting to network changes due to already established TCP tunnels (need some more work to break existing TCP connections when needed).
181185
186+
### HTTPS certificate management
187+
188+
`krp` uses its own certificate authority (CA) for optional local HTTPS routing.
189+
- Run `krp https --trust` to create a new certificate and trust it.
190+
- When HTTPS requests are proxied, `krp` dynamically generates per-host leaf certificates signed by that CA, so each routed hostname gets a valid certificate.
191+
182192
## **Running in Docker**
183193

184194
To run `krp` in a Docker container, follow these steps:
185195

186196
1. **Start Docker Desktop** as an administrator (required for hosts file modification).
187197
2. **Build and run the Docker container:**
188198
```cli
189-
docker buildx bake
199+
docker buildx bake -f .buildcharts\docker-bake.hcl docker
190200
docker compose up -d
191201
```
192202

@@ -203,6 +213,11 @@ To run `krp` in a Docker container, follow these steps:
203213
# For EKS
204214
todo...
205215
```
216+
4. **Setup HTTPS:**
217+
- `krp https --trust`
218+
- `krp https --export /root/.krp/krp.pfx -p "your-cert-password"`
219+
- Install the exported CA cert on the host machine's trust store.
220+
- Note the CA is created inside the container, so you must export it and import on the host.
206221

207222
### Example `docker-compose.yml`
208223

@@ -214,18 +229,15 @@ services:
214229
restart: unless-stopped
215230
ports:
216231
- "80:80"
217-
# - "443:443"
232+
- "443:443" # optional
218233
environment:
219-
## Setup HTTPS using: dotnet dev-certs https -ep "$env:USERPROFILE\.krp\krp.pfx" -p "your-cert-password"
220-
# ASPNETCORE_Kestrel__Certificates__Default__Password: your-cert-password
221-
# ASPNETCORE_Kestrel__Certificates__Default__Path: /root/.krp/krp.pfx
222234
AZURE_CONFIG_DIR: /root/.krp/.azure
223-
KRP_HOSTS: /mnt/hosts
235+
KRP_HOSTS: /mnt/etc
224236
volumes:
225237
- ~/.kube:/root/.kube
226238
- ~/.krp:/root/.krp
227-
- /c/Windows/System32/drivers/etc/:/host_etc/ # win
228-
# - /etc/hosts:/mtn/hosts/ # Linux/macOS
239+
- /c/Windows/System32/drivers/etc/:/mnt/etc/ # win
240+
# - /etc/:/mnt/etc/ # linux/mac
229241
```
230242

231243
## Roadmap / Ideas
@@ -235,6 +247,6 @@ services:
235247
- [ ] Support for low-level UDP traffic.
236248
- [ ] Support for translating internal Kubernetes IPs.
237249
- [x] Eliminate hosts file dependency using **WinDivert**/**PF**/**iptables** (or mitmproxy) for more flexible routing.
238-
- [ ] Cross-platform support (Linux/macOS).
250+
- [x] Cross-platform support (Linux/macOS).
239251
- [x] User interface.
240-
- [x] Add GIF recordings of terminal use cases in README.
252+
- [x] Add GIF recordings of terminal use cases in README.

docker-compose.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@ services:
33
krp:
44
# Run build first using:
55
# docker buildx bake -f .buildcharts\docker-bake.hcl docker
6-
image: eddietisma/krp:1.0.0-local
6+
# image: eddietisma/krp:1.0.0-local
7+
image: eddietisma/krp:latest
78
container_name: krp
89
restart: unless-stopped
910
ports:
1011
- "80:80"
11-
- "443:443"
12+
- "443:443" # optional
1213
environment:
13-
ASPNETCORE_Kestrel__Certificates__Default__Password: your-cert-password
14-
ASPNETCORE_Kestrel__Certificates__Default__Path: /root/.krp/krp.pfx
1514
AZURE_CONFIG_DIR: /root/.krp/.azure
1615
KRP_HOSTS: /windows_etc/hosts
1716
volumes:
1817
- ~/.kube:/root/.kube
1918
- ~/.krp:/root/.krp
20-
- /c/Windows/System32/drivers/etc/:/windows_etc/
19+
- /c/Windows/System32/drivers/etc/:/windows_etc/ # win
20+
# - /etc/:/mnt/etc/ # linux/mac

0 commit comments

Comments
 (0)