|
1 | 1 | # httpjet |
2 | 2 |
|
3 | | -httpjet is an experimental, high-performance Rust web server for Linux. It is |
4 | | -designed as a drop-in replacement for the parts of LiteSpeed Web Server used by |
5 | | -an existing deployment: it reads the same XML configuration, speaks LSAPI to |
6 | | -`lsphp`, and implements HTTP/1.1, HTTP/2, HTTP/3, TLS, rewrite rules, reverse |
7 | | -proxying, static files, and an opt-in origin page cache. |
| 3 | +httpjet is an experimental Linux web server written in Rust. It reads |
| 4 | +LiteSpeed-compatible XML, speaks LSAPI to `lsphp`, and supports H1/H2/H3, TLS, |
| 5 | +static files, proxying, rewrites, compression, and an opt-in page cache. |
8 | 6 |
|
9 | | -> **Status: 0.1.0, early-stage.** FaraTech runs httpjet in production, but the |
10 | | -> project has been developed against a specific configuration and is not a |
11 | | -> claim of complete LiteSpeed compatibility. Stage it on alternate ports, |
12 | | -> review the security model, and test every required directive before a |
13 | | -> cutover. |
| 7 | +It is early-stage software built around one production configuration. Test on |
| 8 | +alternate ports before using it elsewhere. |
14 | 9 |
|
15 | | -httpjet is completely open source under |
16 | | -[GPL-3.0-only](LICENSE). There is no paid edition, license key, or |
17 | | -sponsor-only feature set. Sponsorship supports maintenance but does not change |
18 | | -the software license or feature access. |
| 10 | +## Build and try it |
19 | 11 |
|
20 | | -## Current scope |
21 | | - |
22 | | -- **LiteSpeed XML compatibility** — reads `conf/httpd_config.xml`, |
23 | | - `conf/vhosts/*.xml`, `mime.properties`, and supported `.htaccess` directives. |
24 | | -- **Linux io_uring transport** — per-core monoio runtimes serve H1, native |
25 | | - H2/h2c, TLS H1/H2, and quinn-proto-backed H3. |
26 | | -- **Native LSAPI** — LSAPI codec, owned `lsphp` supervision, and an optional |
27 | | - independently supervised external pool. |
28 | | -- **TLS with rustls** — SNI certificates and optional client-certificate |
29 | | - verification from the imported listener configuration. |
30 | | -- **Static, proxy, rewrite, and compression** — ranges and conditionals, |
31 | | - HTTP/WebSocket/SSE proxying, Apache-style rewrite rules, gzip, Brotli, and |
32 | | - zstd. |
33 | | -- **Origin page cache** — opt-in, sharded cache with private variants, |
34 | | - stale handling, tag purge, optional tmpfs persistence, and dictionary |
35 | | - compression. |
36 | | - |
37 | | -The current release does **not** have a native TOML configuration format or |
38 | | -automatic configuration migration command. `--root` always names a |
39 | | -LiteSpeed-compatible configuration tree. |
40 | | - |
41 | | -## Requirements |
42 | | - |
43 | | -- Linux with io_uring support |
44 | | -- Rust 1.97 or newer |
45 | | -- A LiteSpeed-compatible XML configuration tree |
46 | | -- Optional: an LSAPI-compatible `lsphp` binary for PHP sites |
47 | | - |
48 | | -The workspace crates are source components of the application and currently |
49 | | -set `publish = false`; they are not published independently to crates.io. |
50 | | - |
51 | | -## Build |
| 12 | +Requires Linux with io_uring and Rust 1.97+. |
52 | 13 |
|
53 | 14 | ```bash |
54 | 15 | git clone https://github.com/faratech/httpjet.git |
55 | 16 | cd httpjet |
56 | 17 | cargo build --release -p httpjet |
57 | | -``` |
58 | | - |
59 | | -The binary is `target/release/httpjet`. |
60 | | - |
61 | | -## Try the static example |
62 | | - |
63 | | -The repository includes a self-contained, HTTP-only example on |
64 | | -`127.0.0.1:8080`: |
65 | | - |
66 | | -```bash |
67 | | -target/release/httpjet --root "$(pwd)/examples/litespeed" check --strict |
68 | | -target/release/httpjet --root "$(pwd)/examples/litespeed" serve \ |
69 | | - --http-addr 127.0.0.1:8080 \ |
70 | | - --https-addr "" \ |
71 | | - --workers 1 \ |
72 | | - --no-php |
73 | | -``` |
74 | | - |
75 | | -Then request it with: |
76 | | - |
77 | | -```bash |
| 18 | +target/release/httpjet --root "$PWD/examples/litespeed" check --strict |
| 19 | +target/release/httpjet --root "$PWD/examples/litespeed" serve \ |
| 20 | + --http-addr 127.0.0.1:8080 --https-addr "" --workers 1 --no-php |
78 | 21 | curl -H 'Host: example.test' http://127.0.0.1:8080/ |
79 | 22 | ``` |
80 | 23 |
|
81 | | -`--no-php` is appropriate only for a configuration that cannot expose PHP |
82 | | -source files. Do not add PHP content to this static example. |
| 24 | +Use `--root` with an existing LiteSpeed configuration tree. Run |
| 25 | +`httpjet serve --help` for runtime options. |
83 | 26 |
|
84 | | -For an existing installation, validate its configuration before serving: |
| 27 | +## Development |
85 | 28 |
|
86 | | -```bash |
87 | | -httpjet --root /path/to/litespeed check --strict |
88 | | -httpjet --root /path/to/litespeed serve \ |
89 | | - --http-addr 127.0.0.1:8080 \ |
90 | | - --https-addr 127.0.0.1:4443 \ |
91 | | - --workers 1 \ |
92 | | - --no-mtls \ |
93 | | - --php-socket /tmp/httpjet-test-lsphp.sock \ |
94 | | - --php-children 2 |
95 | | -``` |
96 | | - |
97 | | -Use alternate ports and a non-production PHP socket until application, |
98 | | -protocol, cache, and rollback testing is complete. `--no-mtls` is for explicit |
99 | | -local testing only. |
100 | | - |
101 | | -## Test |
| 29 | +The `httpjet` binary is under `crates/httpjet`; reusable components are the |
| 30 | +`hj-*` crates. |
102 | 31 |
|
103 | 32 | ```bash |
104 | 33 | cargo fmt --all --check |
105 | 34 | cargo check -p httpjet --bin httpjet |
106 | | -cargo check -p httpjet --bin httpjet --features profiling |
107 | 35 | cargo test --workspace |
108 | 36 | ``` |
109 | 37 |
|
110 | | -Ignored tests can depend on local software or configuration and must be invoked |
111 | | -separately. The profiling feature exposes raw pprof data for external tools; it |
112 | | -does not bundle a flamegraph renderer. |
113 | | - |
114 | | -## Architecture |
115 | | - |
116 | | -The workspace contains one binary crate and fourteen `hj-*` libraries. See |
117 | | -[ARCHITECTURE.md](ARCHITECTURE.md) for the dependency map and request |
118 | | -pipeline. |
119 | | - |
120 | | -## Installation |
121 | | - |
122 | | -[packaging/systemd](packaging/systemd) contains an unprivileged, static-only |
123 | | -example service for the bundled configuration. It deliberately listens on |
124 | | -port 8080 and enables neither TLS, PHP, nor the page cache. Production policy |
125 | | -belongs in a reviewed local unit or drop-in. |
126 | | - |
127 | | -## Contributing and security |
128 | | - |
129 | | -Contributions use DCO sign-offs and are accepted under GPL-3.0-only; FaraTech |
130 | | -does not require a proprietary-relicensing CLA. See |
131 | | -[CONTRIBUTING.md](CONTRIBUTING.md). |
132 | | - |
133 | | -Report vulnerabilities privately as described in [SECURITY.md](SECURITY.md). |
134 | | -Third-party attributions are in [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md). |
135 | | - |
136 | | -## Sponsorship |
137 | | - |
138 | | -Donations are optional support for maintenance. They do not buy private |
139 | | -features, support obligations, or influence over the roadmap. Funding links |
140 | | -will appear in GitHub's **Sponsor** button when enrollment is enabled. |
141 | | - |
142 | | -## License and names |
143 | | - |
144 | | -Copyright © FaraTech. |
| 38 | +See [CONTRIBUTING.md](CONTRIBUTING.md), [SECURITY.md](SECURITY.md), and |
| 39 | +[THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md). |
145 | 40 |
|
146 | | -FaraTech-owned code and documentation are licensed under |
147 | | -[GNU GPL version 3 only](LICENSE). Third-party components retain their own |
148 | | -licenses. |
| 41 | +Donations support maintenance only; they do not buy features or influence. |
| 42 | +Funding links will appear in GitHub's Sponsor button when enabled. |
149 | 43 |
|
150 | | -LiteSpeed and OpenLiteSpeed are names of their respective owners. httpjet is |
151 | | -an independent project and is not affiliated with or endorsed by LiteSpeed |
152 | | -Technologies. |
| 44 | +httpjet is [GPL-3.0-only](LICENSE), with no paid edition or license key. It is |
| 45 | +independent of and not endorsed by LiteSpeed Technologies. |
0 commit comments