fbi-proxy 1.1.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Caddyfile +30 -2
- package/README.md +121 -94
- package/package.json +47 -12
- package/{release-flat/proxy-linux-arm64 → release/fbi-proxy-linux-arm64} +0 -0
- package/{release-flat/proxy-linux-x64 → release/fbi-proxy-linux-x64} +0 -0
- package/release/{proxy-macos-arm64/proxy-macos-arm64 → fbi-proxy-macos-arm64} +0 -0
- package/release/{proxy-macos-x64/proxy-macos-x64 → fbi-proxy-macos-x64} +0 -0
- package/{release-flat/proxy-windows-arm64.exe → release/fbi-proxy-windows-arm64.exe} +0 -0
- package/{release-flat/proxy-windows-x64.exe → release/fbi-proxy-windows-x64.exe} +0 -0
- package/ts/buildFbiProxy.ts +33 -0
- package/ts/cli.ts +71 -91
- package/ts/dRun.ts +112 -0
- package/ts/download-fbiproxy.ts +35 -0
- package/ts/getProxyFilename.ts +11 -0
- package/.gitattributes +0 -31
- package/.github/workflows/release.yml +0 -114
- package/.releaserc.json +0 -37
- package/CHANGELOG.md +0 -24
- package/Dockerfile +0 -38
- package/INSTALL.md +0 -161
- package/PINGORA_PROXY.md +0 -127
- package/RUST_PROXY.md +0 -85
- package/build-proxy.bat +0 -15
- package/build-proxy.sh +0 -15
- package/bun.lock +0 -1238
- package/docker-compose.yml +0 -9
- package/release/proxy-linux-arm64/proxy-linux-arm64 +0 -0
- package/release/proxy-linux-x64/proxy-linux-x64 +0 -0
- package/release/proxy-windows-arm64.exe/proxy-windows-arm64.exe +0 -0
- package/release/proxy-windows-x64.exe/proxy-windows-x64.exe +0 -0
- package/release-flat/proxy-macos-arm64 +0 -0
- package/release-flat/proxy-macos-x64 +0 -0
- package/rs/.cargo/config.toml +0 -5
- package/rs/Cargo.lock +0 -1220
- package/rs/Cargo.toml +0 -19
- package/rs/build-windows.bat +0 -60
- package/rs/proxy.rs +0 -248
- package/tsconfig.json +0 -22
package/RUST_PROXY.md
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
# Rust Proxy Migration
|
|
2
|
-
|
|
3
|
-
The proxy functionality has been migrated from TypeScript/Bun to Rust for better performance and reliability.
|
|
4
|
-
|
|
5
|
-
## Architecture
|
|
6
|
-
|
|
7
|
-
- **TypeScript (`src/cli.ts`)**: Main entry point that:
|
|
8
|
-
- Checks for Rust and Caddy installation
|
|
9
|
-
- Launches the Rust proxy server
|
|
10
|
-
- Starts Caddy with the appropriate configuration
|
|
11
|
-
- **Rust (`rs/proxy.rs`)**: High-performance proxy server that:
|
|
12
|
-
- Handles HTTP requests and WebSocket upgrades
|
|
13
|
-
- Processes host header port encoding (e.g., `example.com--3000` → `example.com:3000`)
|
|
14
|
-
- Forwards requests to local services
|
|
15
|
-
- Runs on port 24306
|
|
16
|
-
|
|
17
|
-
## Building
|
|
18
|
-
|
|
19
|
-
### Using npm/bun scripts:
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
# Build release version
|
|
23
|
-
bun run build-proxy
|
|
24
|
-
|
|
25
|
-
# Build development version
|
|
26
|
-
bun run build-proxy-dev
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
### Manual build:
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
cd rs
|
|
33
|
-
cargo build --release
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
### Platform-specific build scripts:
|
|
37
|
-
|
|
38
|
-
```bash
|
|
39
|
-
# Linux/macOS
|
|
40
|
-
./build-proxy.sh
|
|
41
|
-
|
|
42
|
-
# Windows
|
|
43
|
-
build-proxy.bat
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
## Dependencies
|
|
47
|
-
|
|
48
|
-
### System Requirements:
|
|
49
|
-
|
|
50
|
-
- Rust (install from https://rustup.rs/)
|
|
51
|
-
- Caddy web server
|
|
52
|
-
- Bun runtime
|
|
53
|
-
|
|
54
|
-
### Rust Dependencies:
|
|
55
|
-
|
|
56
|
-
- `hyper` - HTTP server and client
|
|
57
|
-
- `tokio` - Async runtime
|
|
58
|
-
- `tokio-tungstenite` - WebSocket support
|
|
59
|
-
- `futures-util` - Stream utilities
|
|
60
|
-
- `url` - URL parsing
|
|
61
|
-
- `regex` - Pattern matching
|
|
62
|
-
|
|
63
|
-
## Features
|
|
64
|
-
|
|
65
|
-
- **High Performance**: Native Rust implementation for better speed and memory usage
|
|
66
|
-
- **WebSocket Support**: Full WebSocket proxying capabilities
|
|
67
|
-
- **Port Encoding**: Supports special host header format for port specification
|
|
68
|
-
- **Error Handling**: Robust error handling and logging
|
|
69
|
-
- **Hot Reloading**: Development-friendly with auto-restart capabilities
|
|
70
|
-
|
|
71
|
-
## Usage
|
|
72
|
-
|
|
73
|
-
```bash
|
|
74
|
-
# Start the full proxy system
|
|
75
|
-
bun start
|
|
76
|
-
|
|
77
|
-
# Development mode with hot reloading
|
|
78
|
-
bun run dev
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
The proxy will:
|
|
82
|
-
|
|
83
|
-
1. Start the Rust proxy server on port 24306
|
|
84
|
-
2. Launch Caddy with the configured Caddyfile
|
|
85
|
-
3. Handle all incoming requests and forward them to local services
|
package/build-proxy.bat
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
@echo off
|
|
2
|
-
|
|
3
|
-
REM Build script for the Rust proxy
|
|
4
|
-
echo Building Rust proxy...
|
|
5
|
-
|
|
6
|
-
cd rs
|
|
7
|
-
cargo build --release
|
|
8
|
-
|
|
9
|
-
if %errorlevel% equ 0 (
|
|
10
|
-
echo ✅ Rust proxy built successfully
|
|
11
|
-
echo Binary location: rs\target\release\proxy.exe
|
|
12
|
-
) else (
|
|
13
|
-
echo ❌ Failed to build Rust proxy
|
|
14
|
-
exit /b 1
|
|
15
|
-
)
|
package/build-proxy.sh
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
# Build script for the Rust proxy
|
|
4
|
-
echo "Building Rust proxy..."
|
|
5
|
-
|
|
6
|
-
cd rs
|
|
7
|
-
cargo build --release
|
|
8
|
-
|
|
9
|
-
if [ $? -eq 0 ]; then
|
|
10
|
-
echo "✅ Rust proxy built successfully"
|
|
11
|
-
echo "Binary location: rs/target/release/proxy"
|
|
12
|
-
else
|
|
13
|
-
echo "❌ Failed to build Rust proxy"
|
|
14
|
-
exit 1
|
|
15
|
-
fi
|