Skip to content

Commit

Permalink
更新文档
Browse files Browse the repository at this point in the history
  • Loading branch information
lanthora committed Dec 2, 2023
1 parent 8304163 commit aa8532f
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 29 deletions.
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@

中文 | [English](README_en.md)

一款易部署并支持对等连接的虚拟专用网络工具.
一款易部署并支持对等连接的虚拟专用网络工具.请参考[文档](https://icandy.one)获取更多信息.

## 使用方法
## 特点

我们提供了一个用于测试的网络 172.16.0.0/16, 接入后自动分配地址,一行命令就可加入这个网络.更多用法请参考[文档](https://icandy.one).
- 易用: 简单配置即可完成组网
- 跨平台兼容: 支持 Linux, MacOS 和 Windows
- 高效与可靠: 主机之间将优先尝试对等连接,失败后再通过服务端转发确确保连接有效

```bash
docker run --rm --privileged=true --net=host docker.io/lanthora/candy:latest
```
## 联系我们

[Telegram Group](https://t.me/CandyUserGroup)
14 changes: 8 additions & 6 deletions README_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@

[中文](README.md) | English

A easy-to-deploy and peer-to-peer virtual private network.
A virtual private network tool that is easy to deploy and supports peer-to-peer connections. Please refer to [the documentation](https://icandy.one) for more information.

## Usage
## Features

We provide a network for testing, 172.16.0.0/16, which dynamically assigns addresses from the server side. You can join this network with one command. For more usage, please refer to the [document](https://icandy.one).
- Easy to use: Simple configuration to complete the network setup
- Cross-platform compatible: Supports Linux, MacOS and Windows
- Efficient and reliable: The hosts will try to establish peer-to-peer connections first, and use server forwarding if they fail to ensure connection availability.

```bash
docker run --rm --privileged=true --net=host docker.io/lanthora/candy:latest
```
## Contact us

[Telegram Group](https://t.me/CandyUserGroup)
43 changes: 26 additions & 17 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

## 组网工具而非代理工具

Candy 是一款易部署并支持对等连接的组网工具,而非代理工具.
Candy 是组网工具 VPN, 而非代理工具 Proxy.

VPN 是"虚拟专用网络"的缩写,是一种利用公共网络(如互联网)构建专用网络的技术. VPN 允许远程用户通过加密隧道连接到企业或组织的内部网络,并访问内部资源和服务.
虚拟专用网络是一种利用公共网络(如互联网)构建专用网络的技术.允许远程用户通过加密隧道连接到企业或组织的内部网络,并访问内部资源和服务.

代理是一种常见的网络安全工具.其作用是在用户和目标服务器之间建立一个中介服务,从而隐藏用户的真实IP地址和位置信息,增强网络访问的私密性和安全性.

Expand All @@ -19,38 +19,45 @@ VPN 是"虚拟专用网络"的缩写,是一种利用公共网络(如互联网)

## 如何安装

### Docker
### Linux

镜像已上传到 [Docker Hub](https://hub.docker.com/r/lanthora/candy)[Github Packages](https://github.com/lanthora/candy/pkgs/container/candy), 我们建议 Linux 用户使用 Docker 镜像.
建议 Linux 用户使用 Docker 镜像,镜像已上传到 [Docker Hub](https://hub.docker.com/r/lanthora/candy)[Github Packages](https://github.com/lanthora/candy/pkgs/container/candy).

### AUR
Candy 会缓存上次从服务端分配到的地址,并在下次启动时优先申请使用这个地址,地址保存在 `/var/lib/candy` 目录下,启动容器服务前需要在 Host 创建一个目录用于映射,否则容器重启丢失数据将导致重新分配地址.方便理解创建与容器内相同的目录.

如果你是 Arch Linux 用户,并且不喜欢容器化部署,推荐使用 [AUR](https://aur.archlinux.org/packages/candy).

### Homebrew
```bash
mkdir -p /var/lib/candy
```

如果你是 Mac 用户,可以使用 Homebrew 安装.
容器需要管理员权限读取设备创建虚拟网卡并设置路由,同时需要 Host 网络命名空间共享虚拟网卡.

```bash
# 添加第三方用户仓库
brew tap lanthora/repo
# 安装
brew install candy
docker run --rm --privileged=true --net=host --volume /var/lib/candy:/var/lib/candy docker.io/lanthora/candy:latest
```

如果你是 Arch Linux 用户,并且不喜欢容器化部署,可以使用 [AUR](https://aur.archlinux.org/packages/candy).

### MacOS

请参考 [Homebrew](https://github.com/lanthora/homebrew-repo) 仓库中提供的方法安装.

### Windows

目前已经编译出可直接运行的二进制,由于没有找到可靠的打包和服务管理方式还没有达到发布统一部署方式的完成度. Windows 版本不接受命令行参数,启动时直接读取安装目录的配置文件.

### 从源码构建

你也可以从源码构建,代码托管在 [Github](https://github.com/lanthora/candy).
代码托管在 [Github](https://github.com/lanthora/candy).你可以从源码构建.

## 如何使用

能够启动客户端的最简单命令.此时会连接到我们公开的测试服务器环境.虚拟网络的地址范围是 172.16.0.0/16, 你的客户端会被随机分配一个地址,请确保没有地址冲突.
这是能够启动 Linux 和 Mac 客户端的最简单命令.此时会连接到公开的测试服务器环境.虚拟网络的地址范围是 172.16.0.0/16, 请确保网络没有冲突.

```bash
candy -m client -w wss://zone.icandy.one/demo
```

如果要使用客户端之间的对等连接.可以配置 [STUN](https://en.wikipedia.org/wiki/STUN) 服务器.这也是 Docker 容器启动的默认命令.
如果要使用客户端之间的对等连接.可以配置 [STUN](https://en.wikipedia.org/wiki/STUN) 服务器.这也是容器启动的默认命令.

```bash
candy -m client -w wss://zone.icandy.one/demo -s stun://stun.qq.com
Expand All @@ -62,4 +69,6 @@ candy -m client -w wss://zone.icandy.one/demo -s stun://stun.qq.com
candy --help
```

或者加入 [Telegram Group](https://t.me/CandyUserGroup) 直接反馈.
# 联系我们

[Telegram Group](https://t.me/CandyUserGroup)

0 comments on commit aa8532f

Please sign in to comment.