diff --git a/en/FAQ/many-nodes-same-machine.md b/en/FAQ/many-nodes-same-machine.md deleted file mode 100644 index b0c0f7d..0000000 --- a/en/FAQ/many-nodes-same-machine.md +++ /dev/null @@ -1,23 +0,0 @@ -# Running 1+ nodes on 1 machine - -Running more than 1 Earendil node on the same machine is quite easy: - -1. Create a separate config file for each node. Be sure to add the following 3 fields, with different values, to each config file: - - ```yaml - # where to store this Earendil daemon's database. - # make sure the Earendil daemon can access this location - db_path: /your/path/node1.db - - # listen port for this daemon's control protocol - control_listen: 127.0.0.1: - - # listen port for socks5 proxy - socks5: - listen: 127.0.0.1: - fallback: pass_through - ``` - - Manually specifying these fields is necessary when you're running more than 1 Earendil node on the same machine, because otherwise the different nodes will try to use the same default value. And two daemon cannot use the same database or listen to the same port! - -2. Start a separate daemon for each node using the config files. diff --git a/en/SUMMARY.md b/en/SUMMARY.md index fd3bb09..6aa214d 100644 --- a/en/SUMMARY.md +++ b/en/SUMMARY.md @@ -22,10 +22,10 @@ * [Type-I and II censorship resistance](wiki/type-i-and-ii-censorship-resistance.md) * [Network architecture](wiki/architecture.md) * [Protocols](wiki/protocols/README.md) - * [N2R (node-to-relay) protocol](wiki/protocols/n2r-protocol.md) + * [Mixnet protocol](wiki/protocols/mix-protocol.md) * [GlobalRPC](wiki/protocols/globalrpc.md) * [Haven protocol](wiki/protocols/haven-protocol.md) - * [Link protocol](wiki/protocols/link-protocol.md) + * ["LowNet" transport protocol](wiki/protocols/lownet-protocol.md) * [Stream protocol](wiki/protocols/stream-protocol.md) * [WIP: Debt accounting](wiki/protocols/debt-accounting.md) * [Onion packet format](wiki/onion-packet-format/README.md) diff --git a/en/faq/1+-nodes-on-1-machine.md b/en/faq/1+-nodes-on-1-machine.md index 03bdd7f..b0c0f7d 100644 --- a/en/faq/1+-nodes-on-1-machine.md +++ b/en/faq/1+-nodes-on-1-machine.md @@ -1,2 +1,23 @@ -# 1+ nodes on 1 machine +# Running 1+ nodes on 1 machine +Running more than 1 Earendil node on the same machine is quite easy: + +1. Create a separate config file for each node. Be sure to add the following 3 fields, with different values, to each config file: + + ```yaml + # where to store this Earendil daemon's database. + # make sure the Earendil daemon can access this location + db_path: /your/path/node1.db + + # listen port for this daemon's control protocol + control_listen: 127.0.0.1: + + # listen port for socks5 proxy + socks5: + listen: 127.0.0.1: + fallback: pass_through + ``` + + Manually specifying these fields is necessary when you're running more than 1 Earendil node on the same machine, because otherwise the different nodes will try to use the same default value. And two daemon cannot use the same database or listen to the same port! + +2. Start a separate daemon for each node using the config files. diff --git a/en/getting-started/config.md b/en/getting-started/config.md index d73d496..5906ff2 100644 --- a/en/getting-started/config.md +++ b/en/getting-started/config.md @@ -17,8 +17,8 @@ db_path: ./.cache/earendil control_listen: 127.0.0.1:11111 # ------------------------ routing config ---------------------------- -# relays to connect to as neighbors. Client configs *must* contain at least one `out_route`; optional for relays. -out_routes: +# relays to connect to as neighbors. Client configs *must* contain at least one `out_link`; optional for relays. +out_links: example-relay: # IP address and port where the relay is listening for incoming connections connect: 62.210.93.59:12345 @@ -30,17 +30,6 @@ out_routes: # - `sosistab3`: a TCP-based obfuscated transport with a symmetric cookie, defined by the relay. This obfuscation protocol is developed as a part of [geph5](https://github.com/geph-official/geph5) obfs: sosistab3: shove-mistake-wish-endless-antique-citizen-filter-employ-cigar-clip-acid-defense - # price and debt config for this link - price_config: - # how much you charge per incoming packet, in µMELs - inbound_price: 0 - # debt limit for inbound packets, in µMELs - inbound_debt_limit: 0 - # max price you're willing to pay per outgoing packet, in µMELs - outbound_max_price: 10 - # min debt limit you accept for outbound packets, in µMELs - # Negative debt limit means prepayment is required - outbound_min_debt_limit: -100 # more relays to connect to relay-2: connect: ... @@ -106,12 +95,12 @@ relay_config: identity_file: /your/path/identity.secret # where & how to accept incoming connections - in_routes: + in_links: main_obfs: # obfuscation protocol to use, for resisting ISP-level censorship obfs: sosistab3: snake-before-antenna-toward-floor-stuff-frozen-power-avocado-retire-grunt-nation - # TCP port this in_route listens at + # TCP port this in_link listens at listen: 0.0.0.0:19999 # price config for this route, in µMELs price_config: @@ -119,7 +108,7 @@ relay_config: inbound_debt_limit: 50000 outbound_max_price: 0 outbound_min_debt_limit: 0 - # another in_route, with no obfuscation + # another in_link, with no obfuscation no_obfs: obfs: none listen: 0.0.0.0:19998 diff --git a/en/getting-started/havens.md b/en/getting-started/havens.md index 9151ca8..cf45840 100644 --- a/en/getting-started/havens.md +++ b/en/getting-started/havens.md @@ -9,17 +9,12 @@ This tutorial will teach you how to use and host basic Earendil havens. You can access HTTP-based havens right in your browser. Paste the following config file into the "Settings" tab of your Earendil GUI: ```yaml -out_routes: +out_links: example-relay-free: connect: 62.210.93.59:12345 fingerprint: 4b7a641b77c2d6ceb8b3fecec2b2978dfe81ae045ed9a25ed78b828009c4967a obfs: sosistab3: "randomly-generated-cookie-lala-doodoo" - price_config: - inbound_price: 0 - inbound_debt_limit: 0 - outbound_max_price: 0 - outbound_min_debt_limit: 0 ``` Then, set your browser to use `localhost:30003` as a SOCKS5 proxy. For Firefox this looks like: @@ -73,17 +68,12 @@ server { Paste this config file into your Earendil GUI's "Settings" tab: ```yaml -out_routes: +out_links: example-relay-free: connect: 62.210.93.59:12345 fingerprint: 4b7a641b77c2d6ceb8b3fecec2b2978dfe81ae045ed9a25ed78b828009c4967a obfs: sosistab3: "randomly-generated-cookie-lala-doodoo" - price_config: - inbound_price: 0 - inbound_debt_limit: 0 - outbound_max_price: 0 - outbound_min_debt_limit: 0 # havens we're hosting havens: diff --git a/en/getting-started/host-proxy.md b/en/getting-started/host-proxy.md index 1906743..7de89a2 100644 --- a/en/getting-started/host-proxy.md +++ b/en/getting-started/host-proxy.md @@ -7,17 +7,12 @@ Both client and relay Earendil nodes can host web proxies. When you host an Eare To host a web proxy, paste this config file into the "Settings" tab of your Earendil GUI: ```yaml -out_routes: +out_links: example-relay-free: connect: 62.210.93.59:12345 fingerprint: 4b7a641b77c2d6ceb8b3fecec2b2978dfe81ae045ed9a25ed78b828009c4967a obfs: sosistab3: "randomly-generated-cookie-lala-doodoo" - price_config: - inbound_price: 0 - inbound_debt_limit: 0 - outbound_max_price: 0 - outbound_min_debt_limit: 0 exit_config: # you want to be an exit node allowed_ports: # destination ports that your exit node will allow; to only allow browsing http and https websites through your proxy, only put 80 and 443 here diff --git a/en/getting-started/pay.md b/en/getting-started/pay.md index 0d7eb4c..aa29266 100644 --- a/en/getting-started/pay.md +++ b/en/getting-started/pay.md @@ -1,5 +1,9 @@ # Pay and get paid +{% hint style="warning" %} +This is a **design document** for an _unimplemented_ feature. +{% endhint %} + In the Earendil network, nodes pay and get paid by their _immediate neighbors_. This creates a free market for bandwidth --- if one neighbor is too expensive or unreliable, simply disconnect from them and find a cheaper or more reliable provider. Once you pay your neighbor, it's their responsibility to route your packets to their destinations. This is just like using the internet: you pay your ISP (like T-Mobile) and don't worry about the rest. @@ -8,10 +12,10 @@ To learn more about Earendil's incentive system, read [this post](https://nullch ## Price & debt limit -Two neighbors agree **out-of-band** on a price and debt limit for sending packets when they first connect to each other. They then specify this information in the `price_config` section of the `in_route` or `out_route` block: +Two neighbors agree **out-of-band** on a price and debt limit for sending packets when they first connect to each other. They then specify this information in the `price_config` section of the `in_link` or `out_link` block: ```yaml -# every in_route and out_route has a price_config +# every in_link and out_link has a price_config price_config: # how much you charge per incoming packet, in µMEL inbound_price: 5 @@ -26,7 +30,7 @@ price_config: outbound_min_debt_limit: -100 ``` -As an example, say we have relay Alice and client Bob. Alice has this `price_config` in her in_route for Bob: +As an example, say we have relay Alice and client Bob. Alice has this `price_config` in her in_link for Bob: ```yaml price_config: @@ -36,7 +40,7 @@ price_config: outbound_min_debt_limit: 0 ``` -While Bob has this `price_config` in his out_route for connecting to Alice: +While Bob has this `price_config` in his out_link for connecting to Alice: ```yaml price_config: diff --git a/en/getting-started/quick-start.md b/en/getting-started/quick-start.md index 8cc7e0c..4d685da 100644 --- a/en/getting-started/quick-start.md +++ b/en/getting-started/quick-start.md @@ -16,7 +16,7 @@ Paste this config file into your Settings tab: ```yaml # relays to connect to -out_routes: +out_links: # arbitrary name for this relay example-relay-free: # IP and port where the relay is listening diff --git a/en/getting-started/run-relay.md b/en/getting-started/run-relay.md index c8266ad..5501f4e 100644 --- a/en/getting-started/run-relay.md +++ b/en/getting-started/run-relay.md @@ -1,43 +1,32 @@ # Run a relay -We currently only support running relays using the CLI version. Relays should be run on machines with public IP addresses. +We currently only support running relays using the CLI version. **Relays should be run on machines with public IP addresses**. -Relays and clients nodes use the same `earendil` executable. The defining difference is in their config file: relay configs have a `relay_config` section that specifies `identity_file` (to store the relay's long-term identity) and `in_routes` (where and how to accept incoming connections), while client configs do not. +Relays and clients nodes use the same `earendil` executable. The defining difference is in their config file: relay configs have a `relay_config` section that specifies `identity_file` (to store the relay's long-term identity) and `in_links` (where and how to accept incoming connections), while client configs do not. To run a relay, save this config file into a file named `relay-cfg.yaml`. Be sure to replace "/your/path/\` with an appropriate path: ```yaml # neighbors, same as in client config -out_routes: +out_links: example-relay-free: connect: 62.210.93.59:12345 fingerprint: 4b7a641b77c2d6ceb8b3fecec2b2978dfe81ae045ed9a25ed78b828009c4967a obfs: sosistab3: "randomly-generated-cookie-lala-doodoo" - price_config: - inbound_price: 0 - inbound_debt_limit: 0 - outbound_max_price: 0 - outbound_min_debt_limit: 0 # relay-only settings relay_config: # replace with a writable path for storing identity secret identity_file: /your/path/earendil-relay-id.secret - in_routes: + in_links: main_udp: obfs: # random seed for obfsudp cookie. Generate your own with `earendil generate-seed` sosistab3: # port where this in-route listens listen: 0.0.0.0:19999 - # price, debt limit etc. for this in-route - price_config: - inbound_price: 0 - inbound_debt_limit: 0 - outbound_max_price: 0 - outbound_min_debt_limit: 0 ``` You can learn about paying and getting paid on the Earendil network, as well as the `price_config` [here](pay.md). @@ -69,7 +58,7 @@ main_udp: outbound_min_debt_limit: 0 ``` -Replace `` with your server's public IP address. Other nodes (both clients and relays) can simply paste this block into the `out_routes` section of their config file to add your relay as a neighbor. +Replace `` with your server's public IP address. Other nodes (both clients and relays) can simply paste this block into the `out_links` section of their config file to add your relay as a neighbor. {% hint style="warning" %} To serve users in regions with internet censorship, you should _avoid_ posting your relay's contact information publicly. Instead, distribute it in a way that reaches legitimate users but not censors--your relay will be blacklisted if the censor learns its IP address! diff --git a/en/wiki/protocols/README.md b/en/wiki/protocols/README.md index 216ebed..1048fc5 100644 --- a/en/wiki/protocols/README.md +++ b/en/wiki/protocols/README.md @@ -4,4 +4,29 @@ Earendil presents a pretty simple interface (basically a virtual IPv6-like netwo This is illustrated by the following picture. **Note that A->B means A **_**depends**_** on B**, not that A somehow sends data unidirectionally to B! -![](../../.gitbook/assets/protocols.png) +```mermaid +flowchart TB + subgraph network["Network layer"] + socket["Unified socket abstraction"] + haven["Haven protocol"] + dht["Rendezvous DHT"] + forward["Haven forwarding"] + rpc["GlobalRPC"] + mixnet["Mixnet protocol"] + onion["Onion routing"] + end + subgraph lownet["LowNet"] + link["Link transport"] + end + socket --> haven + haven --> dht & forward + dht --> rpc + forward --> mixnet + rpc --> mixnet + mixnet --> onion + socks["SOCKS5 interface"] --> sosistab["Optionally reliable streams (virta)"] + tcp["TCP port forwarding"] --> sosistab + sosistab --> socket + tun["tun-based VPN interface"] --> socket + onion --> link & routegraph[("Route graph")] +``` \ No newline at end of file diff --git a/en/wiki/protocols/debt-accounting.md b/en/wiki/protocols/debt-accounting.md index eca1964..e7d49f1 100644 --- a/en/wiki/protocols/debt-accounting.md +++ b/en/wiki/protocols/debt-accounting.md @@ -20,7 +20,7 @@ Each sides refuses to peel/relay any packets until the other side has signaled a `push_price` may be called at any point, with the understanding that the other side may take a while to apply the changes to how debt etc is calculated. -`in_route` and `out_route` in config files specify maximum allowable prices and debt limit ranges. +`in_link` and `out_link` in config files specify maximum allowable prices and debt limit ranges. ## Tracking debt diff --git a/en/wiki/protocols/globalrpc.md b/en/wiki/protocols/globalrpc.md index 73c8667..11c09ac 100644 --- a/en/wiki/protocols/globalrpc.md +++ b/en/wiki/protocols/globalrpc.md @@ -4,7 +4,7 @@ description: RPC protocol that any node can call any node # GlobalRPC -GlobalRPC is the primary RPC protocol exposed by all relays, that any node can call. It runs over the node-to-relay protocol (N2R). +GlobalRPC is the primary RPC protocol exposed by all relays, that any node can call. It runs over the [mixnet protocol](mix-protocol.md). Like all RPC protocols in Earendil, it is based on JSON-RPC 2.0. diff --git a/en/wiki/protocols/haven-protocol.md b/en/wiki/protocols/haven-protocol.md index f2e4fe8..15411a4 100644 --- a/en/wiki/protocols/haven-protocol.md +++ b/en/wiki/protocols/haven-protocol.md @@ -38,13 +38,13 @@ In this example, Bob is a haven, Rob is the rendezvous relay, and Alice is a cli There is one RPC method exposed in the global RPC: `alloc_forward` which takes in a signed request from a particular fingerprint and instructs the relay to process forwarding packets to this particular fingerprint. Bob must call this method before any of the following happens: -* Alice sends N2R messages to Rob to a special, well-known dock (**dock number 100002**). The messages are of the format `(bob_endpoint, inner)`. The inner part is separately end-to-end encrypted between Alice and Bob, using the same packet format as the [N2R protocol](n2r-protocol.md), but without the padding and onion encryption. +* Alice sends N2R messages to Rob to a special, well-known dock (**dock number 100002**). The messages are of the format `(bob_endpoint, inner)`. The inner part is separately end-to-end encrypted between Alice and Bob, using the same packet format as the [N2R protocol](mix-protocol.md), but without the padding and onion encryption. * Rob sends to Bob the messages with the inner part verbatim, tagged as `(inner, bob_endpoint)`. * Bob sends messages to Alice by sending messages of the format `(inner, alice_endpoint)` to Rob. Rob's internal state is something like a NAT table --- it allows anyone to send messages to Bob, and it allows Bob to send messages to anybody who has talked to Bob, but it refuses to forward any other messages, so it's not an open proxy. Rob identifies "backwards" messages because they are coming from Bob, somebody who has registered forwarding with Rob. ## Socket abstraction -Similar to sockets in the [N2R protocol](n2r-protocol.md), we have a socket abstraction for haven communication. +Similar to sockets in the [N2R protocol](mix-protocol.md), we have a socket abstraction for haven communication. Both havens and clients who wish to talk to havens use the same protocol: diff --git a/en/wiki/protocols/link-protocol.md b/en/wiki/protocols/link-protocol.md deleted file mode 100644 index 7547e27..0000000 --- a/en/wiki/protocols/link-protocol.md +++ /dev/null @@ -1,42 +0,0 @@ -# Link protocol - -The link protocol controls every node-node link in the Earendil network, both relay-relay links and relay-client links. - -The basic outline is such: - -- Every link is a `picomux` session -- Each end of a link can call "LinkRPC" methods on the other end, by using JSON-RPC over `picomux` streams. These streams have label `"!rpc"` -- Onion-routed messages are passed through a stream with label `""`. - -## LinkRPC - -Each end of a link separately establishes one or more `sosistab2` streams labelled `"n2n_control"`. Over these streams, JSON-RPC requests are sent in a newline-delimitated manner analogous to JSON-RPC over TCP. For example, here is an example of the send and receive ends of a LinkRPC stream, while one end pings the other: - -```json ---> {"jsonrpc":"2.0","method":"ping","params":[123],"id":1} -<-- {"jsonrpc":"2.0","result":123,"id":1} -``` - -LinkRPC methods are used for actions such as: - -- Checking the liveness and performance of a link by "pinging" it -- Gossipping the relay graph -- Negotiating prices and keeping track of debt - -We now discuss some of these functions in more detail. - -## Relay graph gossip - -The purpose of the relay graph gossip is to ensure that between two connected nodes Alice and Bob, they eventually agree on the shape of the relay graph. Since we assume that the network is ultimately globally connected, this means that _everyone_'s view is eventually consistent. - -We use a simple pull-based approach. Both ends of every link expose this LinkRPC endpoint: - -``` -get_adjacencies(fingerprints: string[]) -> AdjacencyDescriptor[] -``` - -which takes a list of relay fingerprints, and returns all the adjacency descriptors where one end is one of the provided relay fingerprints. - -Each side continually calls `get_adjacencies` on the other side, passing in a random subset of fingerprints they know about. The responses are then added to the local relay graph. - -This ensures that relay graphs of both of the sides eventually stay in sync. diff --git a/en/wiki/protocols/lownet-protocol.md b/en/wiki/protocols/lownet-protocol.md new file mode 100644 index 0000000..effbeed --- /dev/null +++ b/en/wiki/protocols/lownet-protocol.md @@ -0,0 +1,41 @@ +# LowNet: low-level datagram transport + +The lowest-level abstraction in Earendil is **LowNet**, an IP-like, best-effort datagram network. +LowNet hides the physical topology of the Earendil relay graph and gives every node—relay _or_ client—an addressable, flat namespace. + +## Address format + +LowNet uses addresses that look like the following + +``` +na-- +``` + +| Field | Size | Meaning | +|-------|------|---------| +| `relay‐fingerprint` | 32 B (printed as 64 hex chars) | the `RelayFingerprint` (public key hash) of some relay | +| `client-id` | 8 B unsigned integer | `0` identifies the relay itself; any other value is a client slot behind that relay. | + + +For instance, `na-d4c5b1e6a0ff…ce09` refers to client #42 behind the relay `d4c5b1e6a0ff…ce09`. + + +## Datagram structure + +Every packet that crosses LowNet is a `Datagram`: + +```rust +pub struct Datagram { + pub ttl: u8, + pub dest_addr: NodeAddr, + pub payload: Bytes, +} +``` + +* **TTL** is decremented at every hop; frames with `ttl == 0` are dropped. +* **Payload** is an opaque byte slice—mixing, congestion control and higher-level framing live at upper layers. +--- + +## Learn more + +* 🗂 **Source code**: \ No newline at end of file diff --git a/en/wiki/protocols/n2r-protocol.md b/en/wiki/protocols/mix-protocol.md similarity index 84% rename from en/wiki/protocols/n2r-protocol.md rename to en/wiki/protocols/mix-protocol.md index d2104e8..2c114b6 100644 --- a/en/wiki/protocols/n2r-protocol.md +++ b/en/wiki/protocols/mix-protocol.md @@ -1,6 +1,6 @@ -# N2R (node-to-relay) protocol +# Mixnet protocol -N2R allows communication between any two nodes, _as long as one of them is a relay_. +The **mixnet** allows communication between any two nodes, _as long as one of them is a relay_. The other party is kept anonymous. ## Packet format @@ -37,7 +37,7 @@ This picture roughly illustrates the structure of a fully encoded `InnerPacket` ## Socket abstraction -The typical interface exposed by N2R is not raw functions for sending and receiving packets. Instead, we use a _socket_ abstraction inspired by UDP. Each socket represents an `Endpoint`, a _local fingerprint:dock pair,_ that can receive and send messages. More specifically: +The typical interface exposed by the mixnet protocol is not raw functions for sending and receiving packets. Instead, we use a _socket_ abstraction inspired by UDP. Each socket represents an `Endpoint`, a _local fingerprint:dock pair,_ that can receive and send messages. More specifically: - The user constructs a socket by **binding** to an identity and a dock number. - This identity can either be the long-term identity of the node, or a temporary anonymous identity. diff --git a/en/wiki/relay-configuration.md b/en/wiki/relay-configuration.md index 9742d3b..0ba3544 100644 --- a/en/wiki/relay-configuration.md +++ b/en/wiki/relay-configuration.md @@ -4,7 +4,7 @@ Every connection between relays is bidirectional and symmetric once established. But how these connections are configured is not symmetric. There is a distinction between accepting a connection from a peer passively, and contacting a peer actively. -This is reflected in the configuration file, where the `in_routes` mapping specifies _ways to accept_ incoming connections, while the `out_routes` mapping specifies _specific outgoing connections_. +This is reflected in the configuration file, where the `in_links` mapping specifies _ways to accept_ incoming connections, while the `out_links` mapping specifies _specific outgoing connections_. {% code title="/etc/earendil/config.yaml" %} ```yaml @@ -12,7 +12,7 @@ identity: /etc/earendil/identity.asc state_cache: /etc/earendil/state_cache.db # listeners for incoming connections -in_routes: +in_links: main_udp: protocol: obfsudp listen: 0.0.0.0:19999 @@ -26,7 +26,7 @@ in_routes: certificate: autoconf # list of all outgoing connections -out_routes: +out_links: alice: fingerprint: KCKUhWZfluAzMzwiw721CNrvyhc protocol: obfsudp @@ -39,7 +39,3 @@ out_routes: tls-fingerprint-seed: helloworld ``` {% endcode %} - -{% hint style="info" %} -Currently, two relays cannot simultaneously specify the other in their `out_routes`. We may change this in the future. -{% endhint %} diff --git a/zh-cn/ru-men-zhi-nan/bi-feng-gang-havens.md b/zh-cn/ru-men-zhi-nan/bi-feng-gang-havens.md index fa62804..e467772 100644 --- a/zh-cn/ru-men-zhi-nan/bi-feng-gang-havens.md +++ b/zh-cn/ru-men-zhi-nan/bi-feng-gang-havens.md @@ -10,7 +10,7 @@ ```yaml state_cache: /your/path/.cache/earendil # 用于存储持久信息的位置。必须是绝对路径 -out_routes: # 要连接的中继 +out_links: # 要连接的中继 example-relay: # 此中继的任意名称 connect: 62.210.93.59:12345 # 中继监听的 IP 和端口 fingerprint: 4b7a641b77c2d6ceb8b3fecec2b2978dfe81ae045ed9a25ed78b828009c4967a # 中继的长期身份 @@ -71,7 +71,7 @@ server { ```yaml state_cache: /your/path/.cache/earendil # 用于存储持久信息的位置。必须是绝对路径 -out_routes: # 要连接的中继 +out_links: # 要连接的中继 example-relay: # 此中继的任意名称 connect: 62.210.93.59:12345 # 中继监听的 IP 和端口 fingerprint: 4b7a641b77c2d6ceb8b3fecec2b2978dfe81ae045ed9a25ed78b828009c4967a # 中继的长期身份 diff --git a/zh-cn/ru-men-zhi-nan/kuai-su-ru-men.md b/zh-cn/ru-men-zhi-nan/kuai-su-ru-men.md index 7722a8f..6d70ce1 100644 --- a/zh-cn/ru-men-zhi-nan/kuai-su-ru-men.md +++ b/zh-cn/ru-men-zhi-nan/kuai-su-ru-men.md @@ -15,7 +15,7 @@ 将此配置文件粘贴到您的设置标签中。请确保将 "/your/path/" 替换为适当的路径: ```yaml -out_routes: # 要连接的中继 +out_links: # 要连接的中继 example-relay: # 此中继的任意名称 connect: 62.210.93.59:12345 # 中继监听的 IP 和端口 fingerprint: 4b7a641b77c2d6ceb8b3fecec2b2978dfe81ae045ed9a25ed78b828009c4967a # 中继的长期身份 diff --git a/zh-cn/ru-men-zhi-nan/pei-zhi-wen-jian.md b/zh-cn/ru-men-zhi-nan/pei-zhi-wen-jian.md index 8b63dc4..9028536 100644 --- a/zh-cn/ru-men-zhi-nan/pei-zhi-wen-jian.md +++ b/zh-cn/ru-men-zhi-nan/pei-zhi-wen-jian.md @@ -17,8 +17,8 @@ db_path: ./.cache/earendil control_listen: 127.0.0.1:11111 # ------------------------ 路由配置 ---------------------------- -# 作为邻居连接的中继。客户端配置*必须*至少包含一个 `out_route`;对于中继是可选的。 -out_routes: +# 作为邻居连接的中继。客户端配置*必须*至少包含一个 `out_link`;对于中继是可选的。 +out_links: example-relay: # 中继监听传入连接的 IP 地址和端口 connect: 62.210.93.59:12345 @@ -106,12 +106,12 @@ relay_config: identity_file: /your/path/identity.secret # 接受传入连接的位置和方式 - in_routes: + in_links: main_obfs: # 使用的混淆协议,用于抵抗 ISP 级别的审查 obfs: sosistab3: snake-before-antenna-toward-floor-stuff-frozen-power-avocado-retire-grunt-nation - # 此 in_route 监听的 TCP 端口 + # 此 in_link 监听的 TCP 端口 listen: 0.0.0.0:19999 # 此路由的价格配置,以 µMEL 为单位 price_config: @@ -119,7 +119,7 @@ relay_config: inbound_debt_limit: 50000 outbound_max_price: 0 outbound_min_debt_limit: 0 - # 另一个 in_route,无混淆 + # 另一个 in_link,无混淆 no_obfs: obfs: none listen: 0.0.0.0:19998 diff --git a/zh-cn/ru-men-zhi-nan/yun-xing-wang-ye-dai-li.md b/zh-cn/ru-men-zhi-nan/yun-xing-wang-ye-dai-li.md index f7326b7..dac65d2 100644 --- a/zh-cn/ru-men-zhi-nan/yun-xing-wang-ye-dai-li.md +++ b/zh-cn/ru-men-zhi-nan/yun-xing-wang-ye-dai-li.md @@ -7,7 +7,7 @@ Earendil 客户端和中继节点均可运营网页代理。当您托管一个 E 要托管网页代理,请将此配置文件粘贴到您的 Earendil 图形界面的 "Settings" 标签中: ```yaml -out_routes: +out_links: example-relay-free: connect: 62.210.93.59:12345 fingerprint: 4b7a641b77c2d6ceb8b3fecec2b2978dfe81ae045ed9a25ed78b828009c4967a diff --git a/zh-cn/ru-men-zhi-nan/yun-xing-zhong-ji.md b/zh-cn/ru-men-zhi-nan/yun-xing-zhong-ji.md index 951f7a2..1006822 100644 --- a/zh-cn/ru-men-zhi-nan/yun-xing-zhong-ji.md +++ b/zh-cn/ru-men-zhi-nan/yun-xing-zhong-ji.md @@ -11,7 +11,7 @@ state_cache: /your/path/.cache/earendil # 存储持久信息的位置。必须是绝对路径 # 邻居,与客户端配置相同 -out_routes: +out_links: example-relay: connect: 62.210.93.59:12345 fingerprint: 4b7a641b77c2d6ceb8b3fecec2b2978dfe81ae045ed9a25ed78b828009c4967a @@ -21,7 +21,7 @@ out_routes: # 中继设置 identity_file: /your/path/identity.secret # 替换为一个可写入的路径用于存储身份秘钥 -in_routes: +in_links: main_udp: obfs: sosistab3: # obfsudp cookie 的随机种子。使用 `earendil generate-seed` 生成您自己的种子 @@ -50,7 +50,7 @@ main_udp: sosistab3: ``` -请将 `` 替换为您服务器的公网 IP 地址。其他节点(客户端和中继都一样)可以地将这个块粘贴到他们的配置文件的 `out_routes` 部分,以添加您的中继作为邻居。 +请将 `` 替换为您服务器的公网 IP 地址。其他节点(客户端和中继都一样)可以地将这个块粘贴到他们的配置文件的 `out_links` 部分,以添加您的中继作为邻居。 {% hint style="warning" %} 如果您想服务于有着互联网审查地区的用户,请避免公开发布您的中继联系信息。您应使用一种避免让审查者发现中继信息的方式把信息传递给真正的用户——如果审查者了解到您中继的 IP 地址,您的中继会被列入黑名单。 diff --git a/zh-cn/ru-men-zhi-nan/zhi-fu.md b/zh-cn/ru-men-zhi-nan/zhi-fu.md index a5f814d..9161e53 100644 --- a/zh-cn/ru-men-zhi-nan/zhi-fu.md +++ b/zh-cn/ru-men-zhi-nan/zhi-fu.md @@ -1,5 +1,9 @@ # 支付与获得支付 +{% hint style="warning" %} +支付系统目前仍在开发中,以下只是一个简短的设计文档! +{% endhint %} + 在 Earendil 网络中,节点通过他们的**直接邻居**进行支付与受支付。 这创造了一个带宽的自由市场 --- 如果一个邻居太贵或不可靠,只需断开连接并找到一个更便宜或更可靠的提供者。一旦你支付你的邻居,就由他们负责将你的数据包路由到目的地。这就像使用互联网一样:你支付你的 ISP(例如 T-Mobile),然后不用担心其余的。 @@ -8,10 +12,10 @@ ## 价格与债务限额 -两个邻居在首次连接时**离线**同意一个发送数据包的价格和债务限额。然后他们在 `in_route` 或 `out_route` 块的 `price_config` 部分中指定这些信息: +两个邻居在首次连接时**离线**同意一个发送数据包的价格和债务限额。然后他们在 `in_link` 或 `out_link` 块的 `price_config` 部分中指定这些信息: ```yaml -# 每个 in_route 和 out_route 都有一个 price_config +# 每个 in_link 和 out_link 都有一个 price_config price_config: # 你对每个传入的数据包收取的费用,以 µMEL 为单位 inbound_price: 5 @@ -26,7 +30,7 @@ price_config: outbound_min_debt_limit: -100 ``` -例如,假设我们有中继 Alice 和客户端 Bob。Alice 在她的连接到 Bob 的`in_route`中有以下 `price_config`: +例如,假设我们有中继 Alice 和客户端 Bob。Alice 在她的连接到 Bob 的`in_link`中有以下 `price_config`: ```yaml price_config: @@ -36,7 +40,7 @@ price_config: outbound_min_debt_limit: 0 ``` -而 Bob 在他连接到 Alice 的`out_route`中有以下 `price_config`: +而 Bob 在他连接到 Alice 的`out_link`中有以下 `price_config`: ```yaml price_config: