mirror of
https://github.com/NeoCloud/NeoNetwork
synced 2024-11-25 18:00:40 +08:00
document: rewrite
TOML has been using for a while, but the documentation is still describing the old Bash syntax. Rewrite them.
This commit is contained in:
parent
b273553899
commit
232f4e8630
10 changed files with 101 additions and 95 deletions
|
@ -1,18 +0,0 @@
|
||||||
# as-dir Template
|
|
||||||
# ===============
|
|
||||||
# Filename format: AS<Number>
|
|
||||||
# ASN range: 4201270000 ~ 4201279999
|
|
||||||
# Remove any line which starts with '#' when applying
|
|
||||||
# AS Name
|
|
||||||
NAME=""
|
|
||||||
# Owner
|
|
||||||
OWNER=""
|
|
||||||
# Description
|
|
||||||
DESC=""
|
|
||||||
# Source of this ASN
|
|
||||||
# Possible values: "NeoNetwork", "DN42" or "INET"
|
|
||||||
SOURCE=""
|
|
||||||
# if it's a ASN registered from *NIC, this variable records
|
|
||||||
# whether members of NeoNetwork have validated its ownership yet
|
|
||||||
# Possible values: "YES" "NO"
|
|
||||||
VALID=""
|
|
27
document/asn.toml
Normal file
27
document/asn.toml
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
# Template file for the AS registry (asn/)
|
||||||
|
# Before submission, please:
|
||||||
|
# - Rename the file to "AS<ASN>.toml", without the quotes.
|
||||||
|
# - Remove any blank lines, comments, and unneeded options.
|
||||||
|
|
||||||
|
# AS name (optional). Can be an arbitrary string.
|
||||||
|
name = ""
|
||||||
|
|
||||||
|
# AS owner (mandatory). This should match the ID (file name) of a registered
|
||||||
|
# entity in entity/ .
|
||||||
|
owner = ""
|
||||||
|
|
||||||
|
# AS source (optional). Possible values are:
|
||||||
|
# - NeoNetwork
|
||||||
|
# - DN42
|
||||||
|
# - Internet
|
||||||
|
# Often you don't need to include this option: if the AS number falls into the
|
||||||
|
# range of NeoNetwork or DN42, then our script can automatically find it out.
|
||||||
|
#source = ""
|
||||||
|
|
||||||
|
# AS description (optional). Can be an arbitrary string.
|
||||||
|
description = ""
|
||||||
|
|
||||||
|
# AS ownership validation status for NeoNetwork (optional). If the AS is
|
||||||
|
# registered in other NICs, and members of NeoNetwork have validated the
|
||||||
|
# ownership status, then this can be set to true. Otherwise, remove this option.
|
||||||
|
#vaild = false
|
|
@ -1,20 +0,0 @@
|
||||||
# entity-dir Template
|
|
||||||
# ===================
|
|
||||||
# Filename format: <Name>
|
|
||||||
# Remove any line which starts with '#' when applying
|
|
||||||
# Description (maybe short self introduction)
|
|
||||||
DESC=""
|
|
||||||
# Contact
|
|
||||||
CONTACT=(
|
|
||||||
"EMAIL:"
|
|
||||||
"TELEGRAM:"
|
|
||||||
"IRC:"
|
|
||||||
"MASTODON:"
|
|
||||||
"GITHUB:"
|
|
||||||
)
|
|
||||||
# Babel (https://en.wikipedia.org/wiki/Wikipedia:Babel)
|
|
||||||
BABEL=(
|
|
||||||
""
|
|
||||||
)
|
|
||||||
# OpenPGP key fingerprint
|
|
||||||
AUTH="PGP:"
|
|
24
document/entity.toml
Normal file
24
document/entity.toml
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
# Template file for the entity registry (entity/)
|
||||||
|
# Before submission, please:
|
||||||
|
# - Rename the file to "<entity_id>.toml", without the quotes.
|
||||||
|
# - Remove any blank lines, comments, and unneeded options.
|
||||||
|
|
||||||
|
# Entity name (optional). Can be an arbitrary string.
|
||||||
|
name = ""
|
||||||
|
|
||||||
|
# Babel (optional) to describe the working language of this entity. See
|
||||||
|
# https://en.wikipedia.org/wiki/Wikipedia:Babel for how to fill this list.
|
||||||
|
babel = []
|
||||||
|
|
||||||
|
# Entity contacts (optional). The listed options are all optional.
|
||||||
|
[contact]
|
||||||
|
email = ""
|
||||||
|
telegram = ""
|
||||||
|
mastodon = ""
|
||||||
|
github = ""
|
||||||
|
|
||||||
|
# Details on identifying the entity online (optional). Usually, a PGP key
|
||||||
|
# fingerprint can be put here to help others communicate with the entity more
|
||||||
|
# securely.
|
||||||
|
[persona]
|
||||||
|
pgp = ""
|
|
@ -1,14 +0,0 @@
|
||||||
# node-dir Template
|
|
||||||
# =================
|
|
||||||
# It's used to store ASN information and generate DNS records
|
|
||||||
# that were neither Tunnel /30 or Point to Point Address.
|
|
||||||
# Remove any line which starts with '#' when applying
|
|
||||||
# Filename format: <Node Name>
|
|
||||||
# ASN
|
|
||||||
ASN=""
|
|
||||||
# Description
|
|
||||||
DESC=""
|
|
||||||
# IP addresses excluding TUN30 and PTP
|
|
||||||
IP=(
|
|
||||||
"10.127.x.x/x"
|
|
||||||
)
|
|
18
document/node.toml
Normal file
18
document/node.toml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
# Template file for the node registry (node/)
|
||||||
|
# Before submission, please:
|
||||||
|
# - Rename the file to "<entity_id>.toml", without the quotes.
|
||||||
|
# - Remove any blank lines, comments, and unneeded options.
|
||||||
|
|
||||||
|
# Multiple nodes can be declared in one file: start a node with its name as the
|
||||||
|
# table name.
|
||||||
|
[example_node]
|
||||||
|
|
||||||
|
# Node owner (mandatory). This should match the ASN of a registered AS in asn/ .
|
||||||
|
asn = 4201279999
|
||||||
|
|
||||||
|
# Node description (optional). Can be an arbitrary string.
|
||||||
|
description = ""
|
||||||
|
|
||||||
|
# The IP address of the node, written in CIDR notation (optional). This option
|
||||||
|
# is only used to generate DNS records automatically.
|
||||||
|
cidr = []
|
|
@ -1 +0,0 @@
|
||||||
DESC=""
|
|
8
document/peer.toml
Normal file
8
document/peer.toml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
# Template file for the peering registry (peer/)
|
||||||
|
# Before submission, please:
|
||||||
|
# - Rename the file to "<node_name>.toml", without the quotes.
|
||||||
|
# - Remove any blank lines, comments, and unneeded options.
|
||||||
|
|
||||||
|
# A list of peers that this node is peering to (mandatory). Items in this list
|
||||||
|
# should match the name of registered nodes in node/ .
|
||||||
|
to-peer = []
|
|
@ -1,42 +0,0 @@
|
||||||
IP Registration Directory Format Specification
|
|
||||||
==============================================
|
|
||||||
|
|
||||||
According to the common usage of this VPN network, the IP allocation can be
|
|
||||||
classified into the following rules, with its format normalized, as the
|
|
||||||
file name of the routing distribution definition file:
|
|
||||||
|
|
||||||
1. /30 Tunnel: `10.127.0.x/30` (where x is divisible by 4) **DEPRECATED**
|
|
||||||
2. Normal Subnet: `10.127.x.y/z` (where z must be greater than 16)
|
|
||||||
4. Loopback Address: `10.127.255.x/32`
|
|
||||||
|
|
||||||
Definition Format
|
|
||||||
=================
|
|
||||||
|
|
||||||
The content of the file can be divided into the following fields.
|
|
||||||
To simplify processing, Shell Script variable definition syntax
|
|
||||||
will be used as the syntax of the definition file. In addition, variables must
|
|
||||||
be present if it's not optional and defined in the same order as the following:
|
|
||||||
|
|
||||||
TYPE=
|
|
||||||
PROTO= (only for peer-to-peer /30 tunnels)
|
|
||||||
NAME= (optional for anything other than Contiguous Subnet and Loopback Address)
|
|
||||||
ASN= (only for Contiguous Subnet and Loopback Address)
|
|
||||||
UPSTREAM= (only for peer-to-peer /30 tunnels)
|
|
||||||
DOWNSTREAM= (only for peer-to-peer /30 tunnels)
|
|
||||||
DESC=
|
|
||||||
|
|
||||||
Detailed Information of Each Variable
|
|
||||||
=====================================
|
|
||||||
|
|
||||||
1. TYPE: IP Usage Type
|
|
||||||
Available options are: TUN30, SUBNET, PTP, LO (corresponding to the IP address
|
|
||||||
allocation type in the first section respectively)
|
|
||||||
|
|
||||||
2. PROTO: VPN Protocol Used
|
|
||||||
Available options are: Tinc, WireGuard, L2TP, GRE, IPsec/L2TP, IPsec/GRE, OpenVPN, SLIRP, PPP
|
|
||||||
|
|
||||||
3. NAME: Name
|
|
||||||
4. ASN: ASN (without prefix "AS")
|
|
||||||
5. UPSTREAM: Upstream Node Name
|
|
||||||
6. DOWNSTREAM: Downstream Node Name
|
|
||||||
7. DESC: Description
|
|
24
document/route.toml
Normal file
24
document/route.toml
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
# Template file for the route registry (route/)
|
||||||
|
# Before submission, please:
|
||||||
|
# - Rename the file to "AS<ASN>.toml", without the quotes.
|
||||||
|
# - Remove any blank lines, comments, and unneeded options.
|
||||||
|
|
||||||
|
# Multiple IP prefixes can be announced in one file: start every prefix with its
|
||||||
|
# CIDR notation as the table name.
|
||||||
|
["10.127.0.0/32"]
|
||||||
|
|
||||||
|
# IP usage (mandatory). Possible values:
|
||||||
|
# - subnet: this is a subnetwork announced by this AS.
|
||||||
|
# - loopback: this is a loopback IP. The IP prefix should be a /32 one.
|
||||||
|
type = ""
|
||||||
|
|
||||||
|
# IP name (mandatory).
|
||||||
|
name = ""
|
||||||
|
|
||||||
|
# IP description (optional).
|
||||||
|
description = ""
|
||||||
|
|
||||||
|
# The supernet of this IP network (optional). Overlapping IP prefixes are
|
||||||
|
# regarded as an error, so if this IP network is a subnet of another one, write
|
||||||
|
# their IP prefix here.
|
||||||
|
supernet = ""
|
Loading…
Reference in a new issue