Skip to content

Commit

Permalink
修改客户端默认配置
Browse files Browse the repository at this point in the history
  • Loading branch information
lanthora committed Jul 28, 2024
1 parent 6d07596 commit d7ddbdb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.18.4)

project(candy LANGUAGES C CXX VERSION 5.10.1)
project(candy LANGUAGES C CXX VERSION 5.10.2)

option(CANDY_NOEXE "Don't build executable")
option(CANDY_DEVEL "Build development library")
Expand Down
4 changes: 2 additions & 2 deletions candy.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ mode = "client"
# [Required] The address for communication between the client and the server.
# Server only supports ws and needs to provide wss through an external web
# service. Client supports ws and wss.
websocket = "wss://canets.org/demo"
websocket = "wss://canets.org"

# [Optional] Password used to verify identity
# Only the hashed content of the password and timestamp is transmitted on the
Expand Down Expand Up @@ -34,7 +34,7 @@ websocket = "wss://canets.org/demo"
################################# Client Only #################################
# [Optional] Network interface name
# Used to differentiate networks when running multiple clients.
name = "demo"
#name = ""

# [Optional] Static address
# If dhcp is not configured, tun must be configured. When there is an address
Expand Down
8 changes: 4 additions & 4 deletions docs/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@

详细用法请参考[配置文件](https://github.com/lanthora/candy/blob/master/candy.cfg).

## 接入测试网络
## 接入官方网络

使用默认配置启动即可接入测试网络.客户端会缓存服务端分配的地址,并在下次启动时优先申请使用这个地址,地址保存在 `/var/lib/candy` 目录下,启动容器服务前需要在 Host 创建一个目录用于映射,否则容器重启丢失数据将导致重新分配地址.
使用默认配置启动即可接入官方网络.客户端会缓存服务端分配的地址,并在下次启动时优先申请使用这个地址,地址保存在 `/var/lib/candy` 目录下,启动容器服务前需要在 Host 创建一个目录用于映射,否则容器重启丢失数据将导致重新分配地址.

创建与容器内相同的目录以方便理解.

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

以容器的方式接入测试网络
以容器的方式接入官方网络

```bash
docker run --detach --restart=always --privileged=true --net=host --volume /var/lib/candy:/var/lib/candy docker.io/lanthora/candy:latest
```

以 Linux 发行版 [Service](candy.service) 的方式接入测试网络
以 Linux 发行版 [Service](candy.service) 的方式接入官方网络

```bash
systemctl enable --now candy
Expand Down

0 comments on commit d7ddbdb

Please sign in to comment.