Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 23 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,21 @@ jobs:
with:
command: check licenses

linux-gnu:
test:
needs: lint-audit
name: cargo test --lib
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Rust Cache
uses: swatinem/rust-cache@v2
with:
key: test-ubuntu
- name: Run unit tests
run: cargo test --lib

linux-gnu:
needs: [lint-audit, test]
name: Build Linux (GNU)
runs-on: ubuntu-latest
strategy:
Expand All @@ -29,7 +42,8 @@ jobs:
- target: x86_64
target_triple: x86_64-unknown-linux-gnu
apt_packages: ""
custom_env: {}
custom_env:
RUSTFLAGS: -C target-cpu=x86-64-v3
- target: arm64
target_triple: aarch64-unknown-linux-gnu
apt_packages: crossbuild-essential-arm64
Expand Down Expand Up @@ -69,7 +83,7 @@ jobs:
path: dist/

linux-musl:
needs: lint-audit
needs: [lint-audit, test]
name: Build Linux (musl)
runs-on: ubuntu-latest
strategy:
Expand All @@ -83,6 +97,7 @@ jobs:
CXX: x86_64-linux-musl-g++
CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_LINKER: x86_64-linux-musl-g++
RUSTC_LINKER: x86_64-linux-musl-g++
RUSTFLAGS: -C target-cpu=x86-64-v3
- target: arm64
target_triple: aarch64-unknown-linux-musl
package: aarch64-linux-musl-cross
Expand Down Expand Up @@ -124,14 +139,16 @@ jobs:
path: dist/

windows:
needs: lint-audit
needs: [lint-audit, test]
name: Build Windows
runs-on: windows-latest
strategy:
matrix:
include:
- target: x86_64
target_triple: x86_64-pc-windows-msvc
custom_env:
RUSTFLAGS: -C target-cpu=x86-64-v3
- target: arm64
target_triple: aarch64-pc-windows-msvc
steps:
Expand Down Expand Up @@ -162,7 +179,7 @@ jobs:
path: dist/

darwin:
needs: lint-audit
needs: [lint-audit, test]
name: Build Darwin
runs-on: macos-latest
strategy:
Expand Down Expand Up @@ -196,7 +213,7 @@ jobs:
path: dist/

android:
needs: lint-audit
needs: [lint-audit, test]
name: Build Android
runs-on: ubuntu-latest
strategy:
Expand Down
15 changes: 14 additions & 1 deletion CONFIGURATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@ Generate a secure bearer token. **The secret used here must match the `secret` i
./server gen-token --secret "my_secret_key" --user "admin" --exp 1768281600
```

## Keypair Generation

Generate an X25519 keypair for end-to-end encryption. **The public key will be used in the client configuration, while the private key must be kept secure on the server.**

> **Note**: End-to-end encryption is optional. If the `public_key` is not configured in the client, encryption will be disabled.

```bash
./server gen-key
```

## Client Configuration

`config.toml`:
Expand All @@ -30,6 +40,8 @@ Generate a secure bearer token. **The secret used here must match the `secret` i
[client]
listen = "127.0.0.1:8080"
remote = "https://your-server-domain/YOUR_SECRET_PATH"
# address = "your-server-ip"
# public_key = "your-public-key"

[auth]
token = "your-token"
Expand Down Expand Up @@ -85,6 +97,7 @@ padding_threshold = 2000
[server]
listen = "/dev/shm/httproxy.sock"
path = "/YOUR_SECRET_PATH"
# private_key = "your-private-key"

[auth]
secret = "my_secret_key"
Expand Down Expand Up @@ -191,7 +204,7 @@ server {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_request_buffering off;
proxy_http_version 1.1;
client_max_body_size 0;
client_max_body_size 1m;
proxy_buffering off;
proxy_buffer_size 16k;
proxy_buffers 2 16k;
Expand Down
Loading
Loading