33## Summary
44
55The 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 )
77specification 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
1212This is achieved by passing configuration parameters to the browser under test
1313forcing it to artificially consider specific (IP address, port) pairs to be
14- ` local ` , ` private ` or ` public ` .
14+ ` loopback ` , ` local ` or ` public ` .
1515
1616This 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,
2626this 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
3232Test-only code wires this command-line flag to the code in the browser under
3333test 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
3838artificially-` 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
4040sees 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
5858during tests.
5959
6060This 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
6363For example, a JS test wishing to make a request to a ` public ` server can
6464make 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.
8888The following IP addresses see their IP address space overridden:
8989
9090```
91- 127.1.0.1: private
91+ 127.1.0.1: local
9292127.2.0.1: public
9393```
9494
@@ -97,7 +97,7 @@ is otherwise very similar to that described in the proposal above.
9797
9898The WPT infrastructure is modified to run new servers on these IP addresses, by
9999the 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
101101subdomains and protocols are supported on these new domains.
102102
103103See web-platform-tests/wpt #28768 for an abandoned experimental implementation.
@@ -135,15 +135,15 @@ per subnet.
135135The marginal difficulty of overriding per subnet seems low, and provides plenty
136136of test IP addresses to exercise intra-address-space, cross-ip-address requests,
137137which 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
142142If we need to test user agent behavior in the face of a variety of IP addresses,
143143then... just do it!
144144
145145This 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.
147147Alternatively, the test runner could probably reroute traffic heading for these
148148IP addresses to ` 127.0.0.1 ` through some iptables magic. Then we could configure
149149the hosts file to resolve specific domains to those IP addresses, and test the
0 commit comments