From 2b2af93791e60c1a798315368237f69cae1cbf31 Mon Sep 17 00:00:00 2001 From: m1m1sha <18262227804@163.com> Date: Tue, 7 May 2024 18:26:06 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=83=20docs:=20=E9=87=8D=E5=91=BD?= =?UTF-8?q?=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 11 ++++ .vitepress/config.ts | 57 ------------------- .vitepress/config/cn.ts | 39 +++++++++++++ .vitepress/config/en.ts | 38 +++++++++++++ .vitepress/config/index.ts | 11 ++++ en/guide/introduction.md | 3 +- en/guide/network/configurations.md | 3 + ...multi-node.md => multi-node-networking.md} | 0 ...-ip.md => networking-without-public-ip.md} | 0 en/guide/network/other.md | 3 - .../{point-to.md => point-to-networking.md} | 0 .../{two-node.md => two-node-networking.md} | 0 ... => use-easytier-with-wirefuard-client.md} | 0 en/guide/networking.md | 4 +- en/index.md | 35 ++++++++++++ guide/introduction.md | 3 +- guide/network/configurations.md | 57 +++++++++++++++++++ ...multi-node.md => multi-node-networking.md} | 0 ...-ip.md => networking-without-public-ip.md} | 0 guide/network/other.md | 3 - .../{point-to.md => point-to-networking.md} | 6 +- .../{two-node.md => two-node-networking.md} | 6 +- ... => use-easytier-with-wirefuard-client.md} | 0 package.json | 4 +- tsconfig.json | 24 ++++++++ 25 files changed, 229 insertions(+), 78 deletions(-) create mode 100644 .gitignore delete mode 100644 .vitepress/config.ts create mode 100644 .vitepress/config/cn.ts create mode 100644 .vitepress/config/en.ts create mode 100644 .vitepress/config/index.ts create mode 100644 en/guide/network/configurations.md rename en/guide/network/{multi-node.md => multi-node-networking.md} (100%) rename en/guide/network/{without-public-ip.md => networking-without-public-ip.md} (100%) delete mode 100644 en/guide/network/other.md rename en/guide/network/{point-to.md => point-to-networking.md} (100%) rename en/guide/network/{two-node.md => two-node-networking.md} (100%) rename en/guide/network/{use-wireguard-client.md => use-easytier-with-wirefuard-client.md} (100%) create mode 100644 en/index.md create mode 100644 guide/network/configurations.md rename guide/network/{multi-node.md => multi-node-networking.md} (100%) rename guide/network/{without-public-ip.md => networking-without-public-ip.md} (100%) delete mode 100644 guide/network/other.md rename guide/network/{point-to.md => point-to-networking.md} (90%) rename guide/network/{two-node.md => two-node-networking.md} (89%) rename guide/network/{use-wireguard-client.md => use-easytier-with-wirefuard-client.md} (100%) create mode 100644 tsconfig.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..22b34c0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,11 @@ +*.log +*.tgz +.DS_Store +.idea +.temp +.vite_opt_cache +.vscode +dist +cache +temp +node_modules \ No newline at end of file diff --git a/.vitepress/config.ts b/.vitepress/config.ts deleted file mode 100644 index 8f240ef..0000000 --- a/.vitepress/config.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { defineConfig } from 'vitepress' - -// https://vitepress.dev/reference/site-config -export default defineConfig({ - title: 'Easytier', - description: '一个简单、安全、去中心化的内网穿透 VPN 组网方案,使用 Rust 语言和 Tokio 框架实现', - locales: { - root: { - label: '简体中文', - lang: 'zh-CN', - title: 'Easytier', - description: '一个简单、安全、去中心化的内网穿透 VPN 组网方案,使用 Rust 语言和 Tokio 框架实现' - }, - en: { - label: 'English', - lang: 'en', - title: 'Easytier', - description: 'A simple, secure, decentralized VPN mesh network solution, implemented using Rust language and Tokio framework.' - } - }, - themeConfig: { - // https://vitepress.dev/reference/default-theme-config - - sidebar: [ - { - text: '开始', - items: [ - { text: '简介', link: '/guide/introduction' }, - { text: '安装', link: '/guide/installation' }, - ] - }, - { - text: '组网', - link: '/guide/networking', - items: [ - { text: '双节点', link: '/guide/network/two-node' }, - { text: '多节点', link: '/guide/network/multi-node' }, - { text: '子网代理(点对网)', link: '/guide/network/point-to' }, - { text: '无公网IP', link: '/guide/network/without-public-ip' }, - { text: '使用 WireGuard 客户端接入', link: '/guide/network/use-wireguard-client' } - ] - }, - { - items: [ - { text: '路线图', link: '/guide/roadmap' }, - { text: '社区和贡献', link: '/guide/community-and-contribution' }, - { text: '许可证', link: '/guide/license' }, - { text: '联系方式', link: '/guide/contact' }, - ] - } - ], - - socialLinks: [ - { icon: 'github', link: 'https://github.com/KKRainbow/EasyTier' } - ] - } -}) diff --git a/.vitepress/config/cn.ts b/.vitepress/config/cn.ts new file mode 100644 index 0000000..82c59f9 --- /dev/null +++ b/.vitepress/config/cn.ts @@ -0,0 +1,39 @@ +import { defineConfig } from 'vitepress' + +export const cn = defineConfig({ + lang: 'cn', + description: '一个简单、安全、去中心化的内网穿透 VPN 组网方案,使用 Rust 语言和 Tokio 框架实现', + + themeConfig: { + + sidebar: [ + { + text: '开始', + items: [ + { text: '简介', link: '/guide/introduction' }, + { text: '安装', link: '/guide/installation' }, + ] + }, + { + text: '组网', + link: '/guide/networking', + items: [ + { text: '双节点', link: '/guide/network/two-node-networking' }, + { text: '多节点', link: '/guide/network/multi-node-networking' }, + { text: '子网代理(点对网)', link: '/guide/network/point-to-networking' }, + { text: '无公网IP', link: '/guide/network/networking-without-public-ip' }, + { text: '使用 WireGuard 客户端接入', link: '/guide/network/use-easytier-with-wirefuard-client' }, + { text: '其他配置', link: '/guide/network/configurations' }, + ] + }, + { + items: [ + { text: '路线图', link: '/guide/roadmap' }, + { text: '社区和贡献', link: '/guide/community-and-contribution' }, + { text: '许可证', link: '/guide/license' }, + { text: '联系方式', link: '/guide/contact' }, + ] + }, + ] + } +}) diff --git a/.vitepress/config/en.ts b/.vitepress/config/en.ts new file mode 100644 index 0000000..c65a9d8 --- /dev/null +++ b/.vitepress/config/en.ts @@ -0,0 +1,38 @@ +import { defineConfig } from 'vitepress' + +export const en = defineConfig({ + lang: 'en', + description: 'a simple, safe and decentralized VPN networking solution implemented with the Rust language and Tokio framework.', + + themeConfig: { + sidebar: [ + { + text: 'Getting Started', + items: [ + { text: 'Introduction', link: '/en/guide/introduction' }, + { text: 'installation', link: '/en/guide/installation' }, + ] + }, + { + text: 'networking', + link: '/en/guide/networking', + items: [ + { text: 'Two Node', link: '/en//guide/network/two-node-networking' }, + { text: 'Multi Node', link: '/en//guide/network/multi-node-networking' }, + { text: 'Subnet Proxy', link: '/en//guide/network/point-to-networking' }, + { text: 'Without Public IP', link: '/en//guide/network/networking-without-public-ip' }, + { text: 'Use WireGuard Client', link: '/en//guide/network/use-easytier-with-wirefuard-client' }, + { text: 'Other Configurations', link: '/en//guide/network/configurations' }, + ] + }, + { + items: [ + { text: 'Roadmap', link: '/en/guide/roadmap' }, + { text: 'Community and Contribution', link: '/en/guide/community-and-contribution' }, + { text: 'License', link: '/en/guide/license' }, + { text: 'Contact', link: '/en/guide/contact' }, + ] + } + ] + } +}) diff --git a/.vitepress/config/index.ts b/.vitepress/config/index.ts new file mode 100644 index 0000000..f1e3a61 --- /dev/null +++ b/.vitepress/config/index.ts @@ -0,0 +1,11 @@ +import { defineConfig } from 'vitepress' +import { en } from './en' +import { cn } from './cn' + +export default defineConfig({ + title: 'Easytier', + locales: { + root: { label: '简体中文', ...cn }, + en: { label: 'English', ...en }, + }, +}) \ No newline at end of file diff --git a/en/guide/introduction.md b/en/guide/introduction.md index 739bb15..30b03ed 100644 --- a/en/guide/introduction.md +++ b/en/guide/introduction.md @@ -2,8 +2,7 @@ EasyTier is a simple, safe and decentralized VPN networking solution implemented with the Rust language and Tokio framework. -![alt text](/assets/image-5.png) -![alt text](/assets/image-4.png) +![alt text](/assets/image-5.png)![alt text](/assets/image-4.png) ## Features diff --git a/en/guide/network/configurations.md b/en/guide/network/configurations.md new file mode 100644 index 0000000..3dc80c8 --- /dev/null +++ b/en/guide/network/configurations.md @@ -0,0 +1,3 @@ +# Configurations + +You can use ``easytier-core --help`` to view all configuration items \ No newline at end of file diff --git a/en/guide/network/multi-node.md b/en/guide/network/multi-node-networking.md similarity index 100% rename from en/guide/network/multi-node.md rename to en/guide/network/multi-node-networking.md diff --git a/en/guide/network/without-public-ip.md b/en/guide/network/networking-without-public-ip.md similarity index 100% rename from en/guide/network/without-public-ip.md rename to en/guide/network/networking-without-public-ip.md diff --git a/en/guide/network/other.md b/en/guide/network/other.md deleted file mode 100644 index 8372e3c..0000000 --- a/en/guide/network/other.md +++ /dev/null @@ -1,3 +0,0 @@ -# 其他 - -可使用 ``easytier-core --help`` 查看全部配置项 \ No newline at end of file diff --git a/en/guide/network/point-to.md b/en/guide/network/point-to-networking.md similarity index 100% rename from en/guide/network/point-to.md rename to en/guide/network/point-to-networking.md diff --git a/en/guide/network/two-node.md b/en/guide/network/two-node-networking.md similarity index 100% rename from en/guide/network/two-node.md rename to en/guide/network/two-node-networking.md diff --git a/en/guide/network/use-wireguard-client.md b/en/guide/network/use-easytier-with-wirefuard-client.md similarity index 100% rename from en/guide/network/use-wireguard-client.md rename to en/guide/network/use-easytier-with-wirefuard-client.md diff --git a/en/guide/networking.md b/en/guide/networking.md index d98ad8c..941c231 100644 --- a/en/guide/networking.md +++ b/en/guide/networking.md @@ -1,6 +1,6 @@ # Networking -::: tip 注意 +::: tip tips The following text only describes the use of the command-line tool; the GUI program can be configured by referring to the following concepts. ::: -Make sure EasyTier is installed according to the [Installation Guide](/guide/installation), and both easytier-core and easytier-cli commands are available. \ No newline at end of file +Make sure EasyTier is installed according to the [Installation Guide](/en/guide/installation), and both easytier-core and easytier-cli commands are available. \ No newline at end of file diff --git a/en/index.md b/en/index.md new file mode 100644 index 0000000..a318e1d --- /dev/null +++ b/en/index.md @@ -0,0 +1,35 @@ +--- +# https://vitepress.dev/reference/default-theme-home-page +layout: home + +hero: + name: Easytier + text: implemented using Rust language and Tokio framework + tagline: A simple, secure, decentralized VPN mesh network solution + actions: + - theme: brand + text: Quickstart + link: /en/guide/introduction + - theme: alt + text: Github + link: https://github.com/KKRainbow/EasyTier + +features: + - title: Decentralized + details: No need to rely on centralized services, nodes are equal and independent. + - title: Safe + details: Use WireGuard protocol to encrypt data. + - title: High Performance + details: Full-link zero-copy, with performance comparable to mainstream networking software. + - title: Cross-platform + details: Supports MacOS/Linux/Windows, will support IOS and Android in the future. The executable file is statically linked, making deployment simple. + - title: Networking without public IP + details: Supports networking using shared public nodes, refer to Configuration Guide + - title: NAT traversal + details: Supports UDP-based NAT traversal, able to establish stable connections even in complex network environments. + - title: Subnet Proxy (Point-to-Network) + details: Nodes can expose accessible network segments as proxies to the VPN subnet, allowing other nodes to access these subnets through the node. + - title: Smart Routing + details: Selects links based on traffic to reduce latency and increase throughput. +--- + diff --git a/guide/introduction.md b/guide/introduction.md index a38a7a1..1158029 100644 --- a/guide/introduction.md +++ b/guide/introduction.md @@ -2,8 +2,7 @@ 一个简单、安全、去中心化的内网穿透 VPN 组网方案,使用 Rust 语言和 Tokio 框架实现。 -![alt text](/assets/image-6.png) -![alt text](/assets/image-7.png) +![alt text](/assets/image-6.png)![alt text](/assets/image-7.png) ## 特点 diff --git a/guide/network/configurations.md b/guide/network/configurations.md new file mode 100644 index 0000000..519d988 --- /dev/null +++ b/guide/network/configurations.md @@ -0,0 +1,57 @@ +# 其他 + +可使用 `easytier-core --help` 查看全部配置项 + +```` sh +Options: + --network-name + network name to identify this vpn network + [default: default] + --network-secret + network secret to verify this node belongs to the vpn network + [default: ] + -i, --ipv4 + ipv4 address of this vpn node + -p, --peers + peers to connect initially + -e, --external-node + use a public shared node to discover peers + -n, --proxy-networks + export local networks to other peers in the vpn + -r, --rpc-portal + rpc portal address to listen for management + [default: 127.0.0.1:15888] + -l, --listeners + listeners to accept connections, pass '' to avoid listening. + [default: tcp://0.0.0.0:11010 udp://0.0.0.0:11010 wg://0.0.0.0:11011] + --net-ns + specify the linux network namespace, default is the root namespace + --console-log-level + console log level + [possible values: trace, debug, info, warn, error, off] + --file-log-level + file log level + [possible values: trace, debug, info, warn, error, off] + --file-log-dir + directory to store log files + -m, --instance-name + instance name to identify this vpn node in same machine + [default: default] + -d, --instance-id + instance uuid to identify this vpn node in whole vpn network example: 123e4567-e89b-12d3-a456-426614174000 + --vpn-portal + url that defines the vpn portal, allow other vpn clients to connect. + example: wg://0.0.0.0:11010/10.14.14.0/24, means the vpn portal is a wireguard server listening on vpn.example.com:11010, and the vpn client is in network of 10.14.14.0/24 + --default-protocol + default protocol to use when connecting to peers + -u, --disable-encryption + disable encryption for peers communication, default is false, must be same with peers + --multi-thread + use multi-thread runtime, default is single-thread + --disable-ipv6 + do not use ipv6 + -h, --help + Print help + -V, --version + Print version +```` \ No newline at end of file diff --git a/guide/network/multi-node.md b/guide/network/multi-node-networking.md similarity index 100% rename from guide/network/multi-node.md rename to guide/network/multi-node-networking.md diff --git a/guide/network/without-public-ip.md b/guide/network/networking-without-public-ip.md similarity index 100% rename from guide/network/without-public-ip.md rename to guide/network/networking-without-public-ip.md diff --git a/guide/network/other.md b/guide/network/other.md deleted file mode 100644 index 8372e3c..0000000 --- a/guide/network/other.md +++ /dev/null @@ -1,3 +0,0 @@ -# 其他 - -可使用 ``easytier-core --help`` 查看全部配置项 \ No newline at end of file diff --git a/guide/network/point-to.md b/guide/network/point-to-networking.md similarity index 90% rename from guide/network/point-to.md rename to guide/network/point-to-networking.md index fef758f..017b96a 100644 --- a/guide/network/point-to.md +++ b/guide/network/point-to-networking.md @@ -6,16 +6,16 @@ flowchart LR subgraph 节点 A IP 22.1.1.1 -nodea[EasyTier\n10.144.144.1] +nodeA[EasyTier\n10.144.144.1] end subgraph 节点 B -nodeb[EasyTier\n10.144.144.2] +nodeB[EasyTier\n10.144.144.2] end id1[[10.1.1.0/24]] -nodea <--> nodeb <-.-> id1 +nodeA <--> nodeB <-.-> id1 ``` diff --git a/guide/network/two-node.md b/guide/network/two-node-networking.md similarity index 89% rename from guide/network/two-node.md rename to guide/network/two-node-networking.md index 968c1c6..d223256 100644 --- a/guide/network/two-node.md +++ b/guide/network/two-node-networking.md @@ -6,14 +6,14 @@ flowchart LR subgraph 节点 A IP 22.1.1.1 - nodea[EasyTier\n10.144.144.1] + nodeA[EasyTier\n10.144.144.1] end subgraph 节点 B - nodeb[EasyTier\n10.144.144.2] + nodeB[EasyTier\n10.144.144.2] end - nodea <-----> nodeb + nodeA <-----> nodeB ``` diff --git a/guide/network/use-wireguard-client.md b/guide/network/use-easytier-with-wirefuard-client.md similarity index 100% rename from guide/network/use-wireguard-client.md rename to guide/network/use-easytier-with-wirefuard-client.md diff --git a/package.json b/package.json index 3fefb58..6cd716c 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,5 @@ "docs:dev": "vitepress dev", "docs:build": "vitepress build", "docs:preview": "vitepress preview" - }, - "keywords": [], - "author": "" + } } \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..d28e05d --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "outDir": "dist", + "target": "esnext", + "module": "esnext", + "moduleResolution": "node", + "esModuleInterop": true, + "resolveJsonModule": true, + "allowJs": true, + "strict": true, + "jsx": "preserve", + "baseUrl": ".", + "paths": { + "@theme/*": [ + ".vitepress/theme/*" + ] + } + }, + "include": [ + "env.d.ts", + "src/**/*", + ".vitepress/**/*" + ] +} \ No newline at end of file