Skip to content

Commit aaaa99b

Browse files
Rename private to local in address space overrides (#135)
In https://github.com/WICG/local-network-access/issues/91, we decided to rename Private Network Access to Local Network Access. The spec has already been renamed in https://github.com/WICG/local-network-access/pull/97. The latest spec: https://wicg.github.io/local-network-access/ Chromium has also renamed private to local in https://source.chromium.org/chromium/chromium/src/+/d5b320062c4982d2e215386e068826f8bc97c512 so the ip-address-overrides switch value needs to be updated too. This PR makes the corresponding changes in the RFC.
1 parent d703284 commit aaaa99b

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

rfcs/address_space_overrides.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
## Summary
44

55
The goal of this RFC is to enable web platform tests to cover the
6-
[Private Network Access](https://wicg.github.io/private-network-access)
6+
[Local Network Access](https://wicg.github.io/local-network-access)
77
specification entirely. More specifically, to enable tests to exercise user
8-
agent behavior in the face of responses served from `local`, `private` and
8+
agent behavior in the face of responses served from `loopback`, `local` and
99
`public`
10-
[address spaces](https://wicg.github.io/private-network-access#ip-address-space).
10+
[address spaces](https://wicg.github.io/local-network-access#ip-address-space).
1111

1212
This is achieved by passing configuration parameters to the browser under test
1313
forcing it to artificially consider specific (IP address, port) pairs to be
14-
`local`, `private` or `public`.
14+
`loopback`, `local` or `public`.
1515

1616
This RFC aims to fix
1717
[web-platform-tests/wpt#26166](https://github.com/web-platform-tests/wpt/issues/26166).
@@ -26,24 +26,24 @@ address space derived from specific (IP address, port) endpoints. For example,
2626
this could be a command-line flag:
2727

2828
```sh
29-
--ip-address-space-overrides=127.0.0.1:8000=private,127.0.0.1:8001=public
29+
--ip-address-space-overrides=127.0.0.1:8000=local,127.0.0.1:8001=public
3030
```
3131

3232
Test-only code wires this command-line flag to the code in the browser under
3333
test that determines the address space of a network endpoint.
3434

3535
### Test environment changes
3636

37-
New ports are introduced on which to serve artificially-`private` and
37+
New ports are introduced on which to serve artificially-`local` and
3838
artificially-`public` resources. These are named after the existing protocols
39-
with `-private` and `-public` suffixes. Concretely, the server `Config` object
39+
with `-local` and `-public` suffixes. Concretely, the server `Config` object
4040
sees its `ports` field extended with entries like the following:
4141

4242
```python
4343
{
44-
"http-private": [8002],
44+
"http-local": [8002],
4545
"http-public": [8003],
46-
"https-private": [8445],
46+
"https-local": [8445],
4747
"https-public": [8446],
4848
}
4949
```
@@ -58,7 +58,7 @@ that the browsers implement the custom address space mapping described above
5858
during tests.
5959

6060
This allows web platform tests to exercise browser behavior in the face of
61-
`private` and `public` IP addresses, simply by targeting the above ports.
61+
`local` and `public` IP addresses, simply by targeting the above ports.
6262

6363
For example, a JS test wishing to make a request to a `public` server can
6464
make use of the server-side substitution feature of `wptserve` to do so:
@@ -88,7 +88,7 @@ of other IP addresses than 127.0.0.1 to run `wptserve` on.
8888
The following IP addresses see their IP address space overridden:
8989

9090
```
91-
127.1.0.1: private
91+
127.1.0.1: local
9292
127.2.0.1: public
9393
```
9494

@@ -97,7 +97,7 @@ is otherwise very similar to that described in the proposal above.
9797

9898
The WPT infrastructure is modified to run new servers on these IP addresses, by
9999
the way of two new domains: `public-web-platform.test` and
100-
`private-web-platform.test`. These are added to the system hosts file. All
100+
`local-web-platform.test`. These are added to the system hosts file. All
101101
subdomains and protocols are supported on these new domains.
102102

103103
See web-platform-tests/wpt#28768 for an abandoned experimental implementation.
@@ -135,15 +135,15 @@ per subnet.
135135
The marginal difficulty of overriding per subnet seems low, and provides plenty
136136
of test IP addresses to exercise intra-address-space, cross-ip-address requests,
137137
which might come in handy [in the
138-
future](https://github.com/WICG/private-network-access/pull/1#issuecomment-721110250).
138+
future](https://github.com/WICG/local-network-access/pull/1#issuecomment-721110250).
139139

140140
### Use real IP addresses
141141

142142
If we need to test user agent behavior in the face of a variety of IP addresses,
143143
then... just do it!
144144

145145
This approach would have the web platform test runner configure additional
146-
loopback network devices and assign them `private` and `public` IP addresses.
146+
loopback network devices and assign them `local` and `public` IP addresses.
147147
Alternatively, the test runner could probably reroute traffic heading for these
148148
IP addresses to `127.0.0.1` through some iptables magic. Then we could configure
149149
the hosts file to resolve specific domains to those IP addresses, and test the

0 commit comments

Comments
 (0)