This commit is contained in:
Sijie.Sun
2024-09-30 09:45:41 +08:00
committed by GitHub
parent 5206009e75
commit b6bd5de98d
8 changed files with 34 additions and 18 deletions
+11 -3
View File
@@ -1,13 +1,21 @@
# Self-Hosted Public Server
Users can use their own public IP nodes to host a public server for mesh networking without a public IP, making it convenient for other users without public IPs to form networks.
To start EasyTier as a public server, simply launch `easytier-core` without any parameters (no root permissions required):
Users can use their own public IP nodes to host a public server, making it convenient for other users without public IPs to form networks. To start EasyTier as a public server, simply launch `easytier-core` without any parameters (no root permissions required):
```
easytier-core
```
EasyTier supports public server clusters. Each virtual network (created using the same network name and key) can function as a public server cluster. Nodes from other networks can connect to any node in the public server cluster and discover each other without the need for a public IP. Running a self-hosted public server cluster is identical to running a virtual network, except you can skip configuring an IPv4 address.
You can also use the following command to join the official public server cluster. In the future, load balancing between nodes in the public server cluster will be implemented:
```
sudo easytier-core --network-name easytier --network-secret easytier -p tcp://public.easytier.top:11010
```
## Disable Forwarding
By default, every node of EasyTier is capable of providing forwarding services for other virtual networks, even if the node has specified a `--network-name` and `--network-secret` and has joined a virtual network.
If you wish to change this behavior, you can use the `--relay-network-whitelist` parameter to define a whitelist of network names (a space-separated list of wildcard patterns, e.g., `"ab* abc"`). When the list for this parameter is empty, the node will not provide forwarding services for all other networks.
@@ -2,7 +2,7 @@
1. Go to the NSSM official website [https://nssm.cc/download] to download NSSM and extract it to a local directory.
2. Download the command-line version of `easytier-core.exe`, remember the installation directory, such as `D:\Software\Easytier\cli\easytier-core.exe`.
3. Register it as a Windows service, naming it `easytier_service`:
- `nssm.exe install easytier_service D:\Software\Easytier\cli\easytier-core.exe --ipv4 10.144.144.2 --network-name abc --network-secret abc -e tcp://easytier.public.kkrainbow.top:11010`
- `nssm.exe install easytier_service D:\Software\Easytier\cli\easytier-core.exe --ipv4 10.144.144.2 --network-name abc --network-secret abc -e tcp://public.easytier.top:11010`
4. Run `services.msc`, locate the `easytier_service` service, enable it, and set it to start with a delay.
5. To remove the service: `nssm.exe remove easytier_service`.
6. Note that after registering as a service, the program (referring to easytier-core.exe) cannot be modified, deleted, or moved. Otherwise, it needs to be removed for re-registration or modifying the Windows registry.
+2 -2
View File
@@ -30,7 +30,7 @@ To achieve network-to-network, Node A needs to be the gateway of the 192.168.1.0
Node A
```bash
# Start EasyTier and proxy the 192.168.1.0/24 subnet, and use a public server to help network
easytier-core -i 10.144.144.1 -n 192.168.1.0/24 -p tcp://easytier.public.kkrainbow.top:11010 --network-name n2n_test
easytier-core -i 10.144.144.1 -n 192.168.1.0/24 -p tcp://public.easytier.top:11010 --network-name n2n_test
# Allow the gateway to forward traffic and configure the firewall to allow forwarding traffic
sysctl -w net.ipv4.ip_forward=1
@@ -41,5 +41,5 @@ iptables -A FORWARD -d 192.168.1.0/24 -j ACCEPT
Node B
```bash
# Start EasyTier and proxy the 10.1.1.0/24 subnet, and use a public server to help network
easytier-core -i 10.144.144.2 -n 10.1.1.0/24 -p tcp://easytier.public.kkrainbow.top:11010 --network-name n2n_test $
easytier-core -i 10.144.144.2 -n 10.1.1.0/24 -p tcp://public.easytier.top:11010 --network-name n2n_test $
```
@@ -2,20 +2,20 @@
EasyTier supports networking using shared public nodes. The currently deployed shared public node is
`tcp://easytier.public.kkrainbow.top:11010`
`tcp://public.easytier.top:11010`
When using shared nodes, each node entering the network needs to provide the same `--network-name` and `--network-secret` parameters as the unique identifier of the network.
Taking two nodes as an example, Node A executes:
```sh
sudo easytier-core -i 10.144.144.1 --network-name abc --network-secret abc -p tcp://easytier.public.kkrainbow.top:11010
sudo easytier-core -i 10.144.144.1 --network-name abc --network-secret abc -p tcp://public.easytier.top:11010
```
Node B executes
```sh
sudo easytier-core --ipv4 10.144.144.2 --network-name abc --network-secret abc -p tcp://easytier.public.kkrainbow.top:11010
sudo easytier-core --ipv4 10.144.144.2 --network-name abc --network-secret abc -p tcp://public.easytier.top:11010
```
After the command is successfully executed, Node A can access Node B through the virtual IP 10.144.144.2.