Skip to content
Open
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
14 changes: 7 additions & 7 deletions en/guide/config/acl.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ Understanding the following key concepts is essential for configuring ACL:

## 🔧 Configuration Details

ACL configuration must be added to Easytier's configuration file `config.yaml`.
ACL configuration must be added to Easytier's configuration file `config.toml`.

### 1. Define Groups and Secrets

This is the most critical step. Each node needs to declare which groups it belongs to in its configuration and configure the shared secrets for all related groups.

```yaml
```toml
# This section defines the groups this node will join (for generating identity proof)
[acl.acl_v1.group]
members = ["admin", "web-server"] # This node's identity: both an administrator and a web server
Expand Down Expand Up @@ -65,7 +65,7 @@ group_secret = "guest-secret-key"

Rule chains determine how traffic is handled.

```yaml
```toml
# Define an inbound chain
[[acl.acl_v1.chains]]
name = "my_acl_policy" # Chain name
Expand All @@ -81,7 +81,7 @@ default_action = 2 # Default action: 1(Allow) 2(Deny)

Rules are the core of the policy and are defined within chains.

```yaml
```toml
# List of rules within the chain defined above
[[acl.acl_v1.chains.rules]]
name = "allow_admin_rdp"
Expand Down Expand Up @@ -121,7 +121,7 @@ stateful = true # Enable connection tracking

**Configuration**:

```yaml
```toml
[acl.acl_v1.group]
members = ["my-net"] # All devices join the same group

Expand Down Expand Up @@ -161,7 +161,7 @@ enabled = true

**ACL Rules on the Database Server**:

```yaml
```toml
[[acl.acl_v1.chains]]
name = "db_server_policy"
chain_type = 1
Expand Down Expand Up @@ -217,4 +217,4 @@ enabled = true

---

We hope this document helps you better understand and use Easytier's ACL features! If you have any questions, welcome to discuss them in the community. 🎉
We hope this document helps you better understand and use Easytier's ACL features! If you have any questions, welcome to discuss them in the community. 🎉
10 changes: 6 additions & 4 deletions en/guide/network/config-file.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Configuration File

Supports using the -c parameter to specify the configuration file path.
Supports using the `-c` parameter to specify the TOML configuration file path.

```sh
easytier-core -c ./config.yaml
easytier-core -c ./config.toml
```

::: warning Note
Note: Parameters in the configuration file can be overridden by command line parameters. For example, if `--hostname abc` is specified in the configuration file, but `--hostname xyz` is used in the command line, then the hostname parameter `xyz` from the command line will be used.
:::

Running with parameters can generate a configuration file with the corresponding parameters. The configuration file will be printed in the command line, and you can manually copy and save it as a toml file.
Running with parameters can generate a configuration file with the corresponding parameters. The configuration file will be printed in the command line, and you can manually copy and save it as a TOML file.

Running `easytier-core` directly without parameters will generate the minimal configuration file.

Expand All @@ -19,9 +19,11 @@ Running `easytier-core` directly without parameters will generate the minimal co
You can specify multiple configuration files through the `-c` parameter. EasyTier will load multiple configuration files in one process and start multiple virtual networks.

```sh
easytier-core -c ./config1.yaml -c ./config2.yaml
easytier-core -c ./config1.toml -c ./config2.toml
```

From the network tutorial pages in this section onward, any example that shows both CLI and configuration-file syntax uses TOML as the default config format.

## Configuration File Generator

The official website provides a configuration file generator, which you can access via <a target="_blank" href="https://easytier.cn/web/index.html#config_generator">Configuration File Generator</a> to generate configuration files.
42 changes: 39 additions & 3 deletions en/guide/network/decentralized-networking.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,20 @@ nodeA <-----> nodeB

1. Run the following command on Node A:

```sh
::: code-group

```sh [CLI Flags]
sudo easytier-core -i 10.144.144.1
```

```toml [Config File]
ipv4 = "10.144.144.1"
```

:::

Save the configuration above as `node-a.toml`, then start it with `sudo easytier-core -c ./node-a.toml`.

- `-i` specifies the virtual network IP address.

After startup, this node will listen on the following ports by default:
Expand All @@ -51,10 +61,23 @@ nodeA <-----> nodeB

2. Run the following command on Node B:

```sh
::: code-group

```sh [CLI Flags]
sudo easytier-core -d -p udp://22.1.1.1:11010
```

```toml [Config File]
dhcp = true

[[peer]]
uri = "udp://22.1.1.1:11010"
```

:::

Save the configuration above as `node-b.toml`, then start it with `sudo easytier-core -c ./node-b.toml`.

- `-d` represents DHCP mode, automatically assign virtual IP.
- `-p` specifies the public address and port of Node A.

Expand Down Expand Up @@ -83,10 +106,23 @@ nodeC <-----> nodeA

1. Run the following command on Node C:

```sh
::: code-group

```sh [CLI Flags]
sudo easytier-core -d -p udp://22.1.1.1:11010
```

```toml [Config File]
dhcp = true

[[peer]]
uri = "udp://22.1.1.1:11010"
```

:::

Save the configuration above as `node-c.toml`, then start it with `sudo easytier-core -c ./node-c.toml`.

- `-d` represents DHCP mode, automatically assign virtual IP.
- `-p` specifies the public address and port of Node A.

Expand Down
43 changes: 40 additions & 3 deletions en/guide/network/host-public-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,20 @@

Users can use their own public nodes to set up a public shared node for networking without a public IP, making it easier for other users without a public IP to network. Simply start EasyTier without any parameters, and the node can be used as a public server (no root privileges required):

```
::: code-group

```sh [CLI Flags]
easytier-core
```

```toml [Config File]
# An empty config file is enough to start a shared node
```

:::

Save an empty file as `config.toml`, then start it with `easytier-core -c ./config.toml`.

Additionally, EasyTier supports shared node clusters. Each virtual network (created with the same network name and key) can act as a shared node cluster, and nodes from other networks can connect to any node in the shared node cluster, discovering each other without a public IP. Running a self-built public server cluster is the same as running a virtual network, but you can skip configuring the IPv4 address.

If you wish to contribute a public server to the EasyTier community, you can contact the administrator, and we will inform you how to add your node to the community shared node list. Of course, this requires your node to have a certain level of bandwidth and stability.
Expand All @@ -18,16 +28,43 @@ To change this behavior, you can use the `--relay-network-whitelist` parameter t

EasyTier can avoid forwarding network packets for other virtual networks and only help them establish P2P links by setting the whitelist to empty and configuring it to only forward RPC traffic. The reference command is:

```
::: code-group

```sh [CLI Flags]
easytier-core --relay-network-whitelist --relay-all-peer-rpc
```

```toml [Config File]
[flags]
relay_network_whitelist = ""
relay_all_peer_rpc = true
```

:::

Save the configuration above as `config.toml`, then start it with `easytier-core -c ./config.toml`.

## Private Mode

If you want EasyTier to only provide services in your virtual network and don't want nodes from other virtual networks to connect to your node, you can start EasyTier with the `--private-mode true` parameter.

```
::: code-group

```sh [CLI Flags]
sudo easytier-core --private-mode true --network-name my-network --network-secret my-secret
```

```toml [Config File]
[network_identity]
network_name = "my-network"
network_secret = "my-secret"

[flags]
private_mode = true
```

:::

Save the configuration above as `config.toml`, then start it with `sudo easytier-core -c ./config.toml`.

This will only allow nodes with network name `my-network` and key `my-secret` to connect to this EasyTier node.
35 changes: 33 additions & 2 deletions en/guide/network/install-as-a-systemd-service.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,25 @@

On Linux distributions that support systemd, you can configure the service to start with the system by following these steps:

1. Create a new service file `/etc/systemd/system/easytier.service` and modify the command line parameters after `ExecStart` as needed.
1. Create a new service file `/etc/systemd/system/easytier.service`. Using a TOML config file is recommended; if you prefer, you can still keep the CLI-flags form.

```shell
::: code-group

```ini [Config File Mode]
[Unit]
Description=EasyTier Service
After=network.target syslog.target
Wants=network.target

[Service]
Type=simple
ExecStart=/root/easytier-core -c /etc/easytier/config.toml

[Install]
WantedBy=multi-user.target
```

```ini [CLI Flags Mode]
[Unit]
Description=EasyTier Service
After=network.target syslog.target
Expand All @@ -18,6 +34,21 @@ ExecStart=/root/easytier-core --ipv4 x.x.x.x --network-name xxx --network-secret
WantedBy=multi-user.target
```

:::

If you use the config-file mode, save the EasyTier configuration as `/etc/easytier/config.toml`:

```toml
ipv4 = "x.x.x.x"

[network_identity]
network_name = "xxx"
network_secret = "yyy"

[[peer]]
uri = "tcp://peer_host:11010"
```

2. After saving the file, run the following command in the terminal to enable the service:

```sh
Expand Down
Loading