Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use IP addresses from documentation ranges cf. rfc5737 #28135

Merged
merged 2 commits into from
Jul 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion files/en-us/glossary/dns/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ page-type: glossary-definition

**DNS** (Domain Name System) is a hierarchical and decentralized naming system for Internet connected resources. DNS maintains a list of {{Glossary("domain name","domain names")}} along with the resources, such as IP addresses, that are associated with them.

The most prominent function of DNS is the translation of human-friendly domain names (such as mozilla.org) to a numeric {{Glossary("IP address")}} (such as 151.106.5.172); this process of mapping a domain name to the appropriate IP address is known as a **DNS lookup**. By contrast, a **reverse DNS lookup** (rDNS) is used to determine the domain name associated with an IP address.
The most prominent function of DNS is the translation of human-friendly domain names (such as mozilla.org) to a numeric {{Glossary("IP address")}} (such as 192.0.2.172); this process of mapping a domain name to the appropriate IP address is known as a **DNS lookup**. By contrast, a **reverse DNS lookup** (rDNS) is used to determine the domain name associated with an IP address.

## See also

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ So we are connected to the telephone infrastructure. The next step is to send th

### Finding computers

If you want to send a message to a computer, you have to specify which one. Thus any computer linked to a network has a unique address that identifies it, called an "IP address" (where IP stands for _Internet Protocol_). It's an address made of a series of four numbers separated by dots, for example: `192.168.2.10`.
If you want to send a message to a computer, you have to specify which one. Thus any computer linked to a network has a unique address that identifies it, called an "IP address" (where IP stands for _Internet Protocol_). It's an address made of a series of four numbers separated by dots, for example: `192.0.2.172`.

That's perfectly fine for computers, but we human beings have a hard time remembering that sort of address. To make things easier, we can alias an IP address with a human-readable name called a _domain name_. For example (at the time of writing; IP addresses can change) `google.com` is the domain name used on top of the IP address `142.250.190.78`. So using the domain name is the easiest way for us to reach a computer over the Internet.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ page-type: learn-faq

Domain names are a key part of the Internet infrastructure. They provide a human-readable address for any web server available on the Internet.

Any Internet-connected computer can be reached through a public {{Glossary("IP Address")}}, either an IPv4 address (e.g. `173.194.121.32`) or an IPv6 address (e.g., `2027:0da8:8b73:0000:0000:8a2e:0370:1337`).
Any Internet-connected computer can be reached through a public {{Glossary("IP Address")}}, either an IPv4 address (e.g. `192.0.2.172`) or an IPv6 address (e.g., `2001:db8:8b73:0000:0000:8a2e:0370:1337`).
bsmth marked this conversation as resolved.
Show resolved Hide resolved

Computers can handle such addresses easily, but people have a hard time finding out who is running the server or what service the website offers. IP addresses are hard to remember and might change over time.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ When browsers send requests to servers for HTML files, those HTML files often co

## DNS explained

Real web addresses aren't the nice, memorable strings you type into your address bar to find your favorite websites. They are special numbers that look like this: `63.245.215.20`.
Real web addresses aren't the nice, memorable strings you type into your address bar to find your favorite websites. They are special numbers that look like this: `192.0.2.172`.

This is called an {{Glossary("IP Address", "IP address")}}, and it represents a unique location on the web. However, it's not very easy to remember, is it? That's why the Domain Name System was invented. This system uses special servers that match up a web address you type into your browser (like "mozilla.org") to the website's real (IP) address.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function resolved(record) {
let resolving = browser.dns.resolve("example.com");
resolving.then(resolved);

// > e.g. Array [ "73.284.240.12" ]
// > e.g. Array [ "192.0.2.172" ]
```

Bypass the cache, and ask for the canonical name:
Expand All @@ -82,7 +82,7 @@ let resolving = browser.dns.resolve("developer.mozilla.org", [
resolving.then(resolved);

// > e.g. xyz.us-west-2.elb.amazonaws.com
// > e.g. Array [ "78.18.187.134", "34.79.135.234" ]
// > e.g. Array [ "192.0.2.172", "198.51.100.45" ]
```

{{WebExtExamples}}
4 changes: 2 additions & 2 deletions files/en-us/web/api/rtcicecandidate/address/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ left out of the pool of candidates, as are any other candidates which aren't rel
Consider this {{Glossary("SDP")}} attribute line (a-line) which describes an ICE candidate:

```
a=candidate:4234997325 1 udp 2043278322 192.168.0.56 44323 typ host
a=candidate:4234997325 1 udp 2043278322 192.0.2.172 44323 typ host
```

The fifth field, `"192.168.0.56"` is the IP address in this candidate's a-line string.
The fifth field, `"192.0.2.172"` is the IP address in this candidate's a-line string.

## Examples

Expand Down
6 changes: 3 additions & 3 deletions files/en-us/web/api/rtcicecandidate/candidate/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ If the `candidate` is an empty string (`""`), the end of the candidate list has
The syntax of the candidate string is described in {{RFC(5245, "", 15.1)}}. For an a-line (attribute line) that looks like this:

```
a=candidate:4234997325 1 udp 2043278322 192.168.0.56 44323 typ host
a=candidate:4234997325 1 udp 2043278322 192.0.2.172 44323 typ host
```

the corresponding `candidate` string's value will be: `"candidate:4234997325 1 udp 2043278322 192.168.0.56 44323 typ host"`.
the corresponding `candidate` string's value will be: `"candidate:4234997325 1 udp 2043278322 192.0.2.172 44323 typ host"`.

The {{Glossary("user agent")}} always prefers candidates with the highest
{{domxref("RTCIceCandidate.priority", "priority")}}, all else being equal. In the
Expand All @@ -37,7 +37,7 @@ attributes for this example candidate is:
- {{domxref("RTCIceCandidate.component", "component")}} = `"rtp"` (the number 1 is encoded to this string; 2 becomes `"rtcp"`)
- {{domxref("RTCIceCandidate.protocol", "protocol")}} = `"udp"`
- {{domxref("RTCIceCandidate.priority", "priority")}} = 2043278322
- {{domxref("RTCIceCandidate/address", "ip")}} = `"192.168.0.56"`
- {{domxref("RTCIceCandidate/address", "ip")}} = `"192.0.2.172"`
- {{domxref("RTCIceCandidate.port", "port")}} = 44323
- {{domxref("RTCIceCandidate.type", "type")}} = `"host"`

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/rtcicecandidate/component/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ A string which is one of the following:
Consider this {{Glossary("SDP")}} attribute line (a-line):

```
a=candidate:4234997325 1 udp 2043278322 192.168.0.56 44323 typ host
a=candidate:4234997325 1 udp 2043278322 192.0.2.172 44323 typ host
```

This is an ICE candidate a-line, whose {{domxref("RTCIceCandidate.foundation",
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/rtcicecandidate/foundation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Consider this {{Glossary("SDP")}} attribute line (a-line) which describes an ICE
candidate:

```
a=candidate:4234997325 1 udp 2043278322 192.168.0.56 44323 typ host
a=candidate:4234997325 1 udp 2043278322 192.0.2.172 44323 typ host
```

The field `"4234997325"` is the foundation.
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/rtcicecandidate/port/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Consider this {{Glossary("SDP")}} attribute line (a-line) which describes an ICE
candidate:

```
a=candidate:4234997325 1 udp 2043278322 192.168.0.56 44323 typ host
a=candidate:4234997325 1 udp 2043278322 192.0.2.172 44323 typ host
```

The port number is found in the sixth field, which is `"44323"`. In this case, the value of `port` will be 44323.
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/rtcicecandidate/priority/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The larger this value is, the more preferable the remote peer considers this can
Consider this {{Glossary("SDP")}} attribute line (a-line) which describes an ICE candidate:

```
a=candidate:4234997325 1 udp 2043278322 192.168.0.56 44323 typ host
a=candidate:4234997325 1 udp 2043278322 192.0.2.172 44323 typ host
```

The priority is the number after the protocol, so it's the fourth field in the candidate string.
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/rtcicecandidate/protocol/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ A string that indicates what network protocol the candidate uses:
Here's an example candidate a-line from an ICE transaction:

```
a=candidate:4234997325 1 udp 2043278322 192.168.0.56 44323 typ host
a=candidate:4234997325 1 udp 2043278322 192.0.2.172 44323 typ host
```

The third field, `"udp"`, is the protocol type, indicating that the
Expand Down
4 changes: 2 additions & 2 deletions files/en-us/web/api/rtcicecandidate/relatedaddress/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ addresses. `relatedAddress` can also be used by Quality-of-Service (QoS) mechani
Here's an [SDP](/en-US/docs/Web/API/WebRTC_API/Protocols#sdp) attribute line (a-line) describing an ICE candidate discovered by the STUN server:

```
a=candidate:4234997325 1 udp 2043278322 192.168.0.56 6502 typ srflx raddr 192.168.2.77 rport 32768 generation 0
a=candidate:4234997325 1 udp 2043278322 192.0.2.172 6502 typ srflx raddr 198.51.100.45 rport 32768 generation 0
```

The remote address, `relatedAddress`, is the dotted quad (for IPv4) or
colon-delineated 64-bit address (for IPv6) immediately following the text `"raddr"`, or `"192.168.2.77"`.
colon-delineated 64-bit address (for IPv6) immediately following the text `"raddr"`, or `"198.51.100.45"`.

## Examples

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/rtcicecandidate/relatedport/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Here's an {{Glossary("SDP")}} attribute line (a-line) describing an ICE candidat
discovered by the STUN server:

```
a=candidate:4234997325 1 udp 2043278322 192.168.0.56 6502 typ srflx raddr 192.168.2.77 rport 32768 generation 0
a=candidate:4234997325 1 udp 2043278322 192.0.2.172 6502 typ srflx raddr 198.51.100.45 rport 32768 generation 0
```

The remote port, `relatedPort`, is the number immediately following the `"rport"` label on the a-line, or 32768.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ new RTCIceCandidate(candidateInfo)
For an a-line (attribute line) that looks like this:

```
a=candidate:4234997325 1 udp 2043278322 192.168.0.56 44323 typ host
a=candidate:4234997325 1 udp 2043278322 192.0.2.172 44323 typ host
```

the corresponding `candidate` string's value will be
`"candidate:4234997325 1 udp 2043278322 192.168.0.56 44323 typ host"`.
`"candidate:4234997325 1 udp 2043278322 192.0.2.172 44323 typ host"`.

The {{Glossary("user agent")}} always prefers candidates with the highest {{domxref("RTCIceCandidate.priority", "priority")}}, all else being equal.
In the example above, the priority is `2043278322`. The attributes are all separated by a single space character, and are in a specific order.
Expand All @@ -53,7 +53,7 @@ new RTCIceCandidate(candidateInfo)
- {{domxref("RTCIceCandidate.component", "component")}} = `"rtp"` (the number 1 is encoded to this string; 2 becomes `"rtcp"`)
- {{domxref("RTCIceCandidate.protocol", "protocol")}} = `"udp"`
- {{domxref("RTCIceCandidate.priority", "priority")}} = 2043278322
- {{domxref("RTCIceCandidate/address", "ip")}} = `"192.168.0.56"`
- {{domxref("RTCIceCandidate/address", "ip")}} = `"192.0.2.172"`
- {{domxref("RTCIceCandidate.port", "port")}} = 44323
- {{domxref("RTCIceCandidate.type", "type")}} = `"host"`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ addIceCandidate(candidate, successCallback, failureCallback) // deprecated
For an a-line (attribute line) that looks like this:

```
a=candidate:4234997325 1 udp 2043278322 192.168.0.56 44323 typ host
a=candidate:4234997325 1 udp 2043278322 192.0.2.172 44323 typ host
```

the corresponding `candidate` string's value will be
`"candidate:4234997325 1 udp 2043278322 192.168.0.56 44323 typ host"`.
`"candidate:4234997325 1 udp 2043278322 192.0.2.172 44323 typ host"`.

The {{Glossary("user agent")}} always prefers candidates with the highest {{domxref("RTCIceCandidate.priority", "priority")}}, all else being equal.
In the example above, the priority is `2043278322`. The attributes are all separated by a single space character, and are in a specific order.
Expand All @@ -61,7 +61,7 @@ addIceCandidate(candidate, successCallback, failureCallback) // deprecated
- {{domxref("RTCIceCandidate.component", "component")}} = `"rtp"` (the number 1 is encoded to this string; 2 becomes `"rtcp"`)
- {{domxref("RTCIceCandidate.protocol", "protocol")}} = `"udp"`
- {{domxref("RTCIceCandidate.priority", "priority")}} = 2043278322
- {{domxref("RTCIceCandidate/address", "ip")}} = `"192.168.0.56"`
- {{domxref("RTCIceCandidate/address", "ip")}} = `"192.0.2.172"`
- {{domxref("RTCIceCandidate.port", "port")}} = 44323
- {{domxref("RTCIceCandidate.type", "type")}} = `"host"`

Expand Down Expand Up @@ -170,7 +170,7 @@ signalingChannel.onmessage = (receivedString) => {
if (message.ice) {
// A typical value of ice here might look something like this:
//
// {candidate: "candidate:0 1 UDP 2122154243 192.168.1.9 53421 typ host", sdpMid: "0", …}
// {candidate: "candidate:0 1 UDP 2122154243 192.0.2.43 53421 typ host", sdpMid: "0", …}
//
// Pass the whole thing to addIceCandidate:

Expand Down
4 changes: 2 additions & 2 deletions files/en-us/web/http/headers/forwarded/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ If your application, server, or proxy supports the standardized `Forwarded` head
Note that IPv6 address is quoted and enclosed in square brackets in `Forwarded`.

```http
X-Forwarded-For: 123.34.567.89
Forwarded: for=123.34.567.89
X-Forwarded-For: 192.0.2.172
Forwarded: for=192.0.2.172

X-Forwarded-For: 192.0.2.43, "[2001:db8:cafe::17]"
Forwarded: for=192.0.2.43, for="[2001:db8:cafe::17]"
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/http/headers/x-forwarded-for/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ X-Forwarded-For: 203.0.113.195

X-Forwarded-For: 203.0.113.195, 2001:db8:85a3:8d3:1319:8a2e:370:7348

X-Forwarded-For: 203.0.113.195,2001:db8:85a3:8d3:1319:8a2e:370:7348,150.172.238.178
X-Forwarded-For: 203.0.113.195,2001:db8:85a3:8d3:1319:8a2e:370:7348,198.51.100.178
```

## Parsing
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/http/network_error_logging/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ In these examples, the entire reporting API payload is shown. The top-level **`"
"protocol": "http/1.1",
"referrer": "https://example.com/previous-page",
"sampling_fraction": 1,
"server_ip": "137.205.28.66",
"server_ip": "192.0.2.172",
"status_code": 400,
"type": "http.error",
"url": "https://example.com/bad-request"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,8 @@ function alertEval(str) {
alert(`${str} is ${eval(str)}`);
}
function FindProxyForURL(url, host) {
alertEval('isInNet(host, "63.245.213.24", "255.255.255.255")');
// "PAC-alert: isInNet(host, "63.245.213.24", "255.255.255.255") is true"
alertEval('isInNet(host, "192.0.2.172", "255.255.255.255")');
// "PAC-alert: isInNet(host, "192.0.2.172", "255.255.255.255") is true"
}
```

Expand Down Expand Up @@ -288,7 +288,7 @@ Concatenates the four dot-separated bytes into one 4-byte word and converts it t
#### Example

```js
convert_addr("104.16.41.2"); // returns the decimal number 1745889538
convert_addr("192.0.2.172"); // returns the decimal number 1745889538
```

### myIpAddress()
Expand Down Expand Up @@ -615,7 +615,7 @@ In this example all of the hosts in a given subnet are connected-to directly, ot

```js
function FindProxyForURL(url, host) {
if (isInNet(host, "198.95.0.0", "255.255.0.0")) {
if (isInNet(host, "192.0.2.172", "255.255.0.0")) {
return "DIRECT";
}
return "PROXY proxy.mydomain.com:8080";
Expand All @@ -629,7 +629,7 @@ function FindProxyForURL(url, host) {
if (
isPlainHostName(host) ||
dnsDomainIs(host, ".mydomain.com") ||
isInNet(host, "198.95.0.0", "255.255.0.0")
isInNet(host, "192.0.2.0", "255.255.0.0")
) {
return "DIRECT";
} else {
Expand Down