aboutsummaryrefslogtreecommitdiff
path: root/spec/dir-spec/nonterminals-server-descriptors.md
blob: e2240ae83020fba4856a9216e9e8f0cd3cb8101e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<a id="dir-spec.txt-2.1.3"></a>

# Nonterminals in server descriptors

```text
   nickname ::= between 1 and 19 alphanumeric characters ([A-Za-z0-9]),
      case-insensitive.
   hexdigest ::= a '$', followed by 40 hexadecimal characters
      ([A-Fa-f0-9]). [Represents a relay by the digest of its identity
      key.]
```

exitpattern ::= addrspec ":" portspec
portspec ::= "\*" | port | port "-" port
port ::= an integer between 1 and 65535, inclusive.

```text
      [Some implementations incorrectly generate ports with value 0.
       Implementations SHOULD accept this, and SHOULD NOT generate it.
       Connections to port 0 are never permitted.]
```

addrspec ::= "\*" | ip4spec | ip6spec
ipv4spec ::= ip4 | ip4 "/" num_ip4_bits | ip4 "/" ip4mask
ip4 ::= an IPv4 address in dotted-quad format
ip4mask ::= an IPv4 mask in dotted-quad format
num_ip4_bits ::= an integer between 0 and 32
ip6spec ::= ip6 | ip6 "/" num_ip6_bits
ip6 ::= an IPv6 address, surrounded by square brackets.
num_ip6_bits ::= an integer between 0 and 128

bool ::= "0" | "1"