Skip to content

Commit 1c443ae

Browse files
authored
Update docs, prepare for v0.2 release (#30)
1 parent 8302f03 commit 1c443ae

File tree

3 files changed

+37
-116
lines changed

3 files changed

+37
-116
lines changed

README.md

Lines changed: 5 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -5,131 +5,23 @@
55
## Current State
66

77
As part of the initial [Kickstart Spike], we are working towards an early preview of
8-
the `river` tool. This work will be released in a binary format, see
9-
[this issue][dist-rfc] for more details.
8+
the `river` tool.
109

1110
[Kickstart Spike]: https://github.com/memorysafety/river/milestone/1
12-
[dist-rfc]: https://github.com/memorysafety/river/issues/15
1311

14-
**Until releases begin, there is no expectation of stability.**
12+
**Until further notice, there is no expectation of stability.**
1513

1614
### Demonstration steps
1715

1816
At the moment, `river` can be invoked from the command line. See `--help` for
1917
all options.
2018

2119
Configuration is currently done exclusively via configuration file. See
22-
[`test-config.toml`] for an example configuration file.
20+
[`test-config.toml`] for an example configuration file. Additionally, see
21+
[`toml-configuration.md`] for more configuration details.
2322

2423
[`test-config.toml`]: ./source/river/assets/test-config.toml
25-
26-
The server can be launched as follows:
27-
28-
```sh
29-
# starting in the root of this repository
30-
cd source/river
31-
cargo run --release -- --config-toml ./assets/test-config.toml
32-
```
33-
34-
Requests against the proxy can be made via `curl`, for example with `HTTP`:
35-
36-
```
37-
curl -v http://127.0.0.1:8080
38-
* processing: http://127.0.0.1:8080
39-
* Trying 127.0.0.1:8080...
40-
* Connected to 127.0.0.1 (127.0.0.1) port 8080
41-
> GET / HTTP/1.1
42-
> Host: 127.0.0.1:8080
43-
> User-Agent: curl/8.2.1
44-
> Accept: */*
45-
>
46-
< HTTP/1.1 403 Forbidden
47-
< Server: cloudflare
48-
< Date: Thu, 04 Apr 2024 13:17:27 GMT
49-
< Content-Type: text/html
50-
< Content-Length: 151
51-
< Connection: keep-alive
52-
< CF-RAY: 86f194286d6158de-TXL
53-
<
54-
<html>
55-
<head><title>403 Forbidden</title></head>
56-
<body>
57-
<center><h1>403 Forbidden</h1></center>
58-
<hr><center>cloudflare</center>
59-
</body>
60-
</html>
61-
* Connection #0 to host 127.0.0.1 left intact
62-
```
63-
64-
Or using HTTPS:
65-
66-
```
67-
curl -vk -H 'host: one.one.one.one' https://127.0.0.1:4443 | wc -c
68-
* processing: https://127.0.0.1:4443
69-
% Total % Received % Xferd Average Speed Time Time Time Current
70-
Dload Upload Total Spent Left Speed
71-
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 127.0.0.1:4443...
72-
* Connected to 127.0.0.1 (127.0.0.1) port 4443
73-
* ALPN: offers h2,http/1.1
74-
} [5 bytes data]
75-
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
76-
} [512 bytes data]
77-
* TLSv1.3 (IN), TLS handshake, Server hello (2):
78-
{ [122 bytes data]
79-
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
80-
{ [6 bytes data]
81-
* TLSv1.3 (IN), TLS handshake, Certificate (11):
82-
{ [1028 bytes data]
83-
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
84-
{ [264 bytes data]
85-
* TLSv1.3 (IN), TLS handshake, Finished (20):
86-
{ [52 bytes data]
87-
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
88-
} [1 bytes data]
89-
* TLSv1.3 (OUT), TLS handshake, Finished (20):
90-
} [52 bytes data]
91-
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
92-
* ALPN: server did not agree on a protocol. Uses default.
93-
* Server certificate:
94-
* subject: C=DE; ST=Berlin; L=Berlin; O=River Test Organization; OU=River Test Unit; CN=NOT FOR ACTUAL USE
95-
* start date: Apr 3 17:53:06 2024 GMT
96-
* expire date: Apr 1 17:53:06 2034 GMT
97-
* issuer: C=DE; ST=Berlin; L=Berlin; O=River Test Organization; OU=River Test Unit; CN=NOT FOR ACTUAL USE
98-
* SSL certificate verify result: self-signed certificate (18), continuing anyway.
99-
* using HTTP/1.x
100-
} [5 bytes data]
101-
> GET / HTTP/1.1
102-
> Host: one.one.one.one
103-
> User-Agent: curl/8.2.1
104-
> Accept: */*
105-
>
106-
{ [5 bytes data]
107-
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
108-
{ [233 bytes data]
109-
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
110-
{ [233 bytes data]
111-
* old SSL session ID is stale, removing
112-
{ [5 bytes data]
113-
< HTTP/1.1 200 OK
114-
< Date: Thu, 04 Apr 2024 13:19:07 GMT
115-
< Content-Type: text/html; charset=utf-8
116-
< Content-Length: 56604
117-
< Connection: keep-alive
118-
< CF-Ray: 86f196978c3e4534-TXL
119-
< Access-Control-Allow-Origin: *
120-
< Cache-Control: public, max-age=0, must-revalidate
121-
< ETag: "5dd740d0e716a31c1b8437db0263fa93"
122-
< Vary: Accept-Encoding
123-
< referrer-policy: strict-origin-when-cross-origin
124-
< x-content-type-options: nosniff
125-
< Server: cloudflare
126-
< alt-svc: h3=":443"; ma=86400
127-
<
128-
{ [570 bytes data]
129-
100 56604 100 56604 0 0 310k 0 --:--:-- --:--:-- --:--:-- 310k
130-
* Connection #0 to host 127.0.0.1 left intact
131-
56604
132-
```
24+
[`toml-configuration.md`]: ./docs/toml-configuration.md
13325

13426
## License
13527

docs/toml-configuration.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# TOML configuration
2+
3+
This is a full explanation of the supported TOML configuration files.
4+
5+
Until the 1.0 release, expect breaking changes in the TOML configuration format.
6+
7+
## Full Configuration Tree
8+
9+
The following is a full tree of configuration options
10+
11+
* `system`: struct
12+
* `system.threads-per-service`: integer - number of threads per service worker
13+
* `basic-proxy`: array
14+
* `basic-proxy.listeners`: array
15+
* `basic-proxy.listeners.source`: struct
16+
* `basic-proxy.listeners.source.kind`: String - "Tcp" or "Uds"
17+
* `basic-proxy.listeners.source.value`: struct
18+
* `basic-proxy.listeners.source.value.addr`: String - Host:Port
19+
* `basic-proxy.listeners.source.value.tls`: struct
20+
* `basic-proxy.listeners.source.value.tls.cert_path`: Path
21+
* `basic-proxy.listeners.source.value.tls.key_path`: Path
22+
* `basic-proxy.connector`: struct
23+
* `basic-proxy.connector.proxy_addr`: String - Host:Port
24+
* `basic-proxy.connector.tls_sni`: String
25+
* `basic-proxy.path-control`: struct
26+
* `basic-proxy.path-control.upstream-request-filters`: array
27+
* `basic-proxy.path-control.upstream-request-filters.kind`: String
28+
* `basic-proxy.path-control.upstream-request-filters.*`: Additional Key:Value parameters
29+

source/river/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ name = "river"
33

44
# VERSION NOTE:
55
#
6-
# We need to start our numbering at 0.2.0, as there was a parked
7-
# crate published using 0.1.0. We should yank that version and
8-
# remove this comment block when publishing v0.2.0.
6+
# Once we have our first crates-io release, we should yank the v0.1
7+
# placeholder release. At the moment, we can't publish on crates-io
8+
# as we are carrying patches of pingora.
99
version = "0.2.0"
1010

1111
authors = [

0 commit comments

Comments
 (0)