forked from lanthora/candy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
candy.cfg
76 lines (61 loc) · 2.99 KB
/
candy.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
############################## Client and Server ##############################
# [Required] Working mode, "client" or "server"
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"
# [Optional] Password used to verify identity
# Only the hashed content of the password and timestamp is transmitted on the
# network, and the password cannot be obtained from the message.
#password = "this is the password"
# [Optional] Show debug log
#debug = false
# [Optional] Restart interval
# default configuration is 0 which means no restart.
#restart = 0
################################# Server Only #################################
# [Optional] The range of addresses automatically assigned by the server
# Server address allocation is not enabled by default, and the client needs to
# configure a static address through tun.
#dhcp = "192.168.202.0/24"
# [Optional] software-defined wide area network
# IP packets entering 192.168.202.1/32 with the destination address 172.17.0.0/16
# will be forwarded to 192.168.202.2. Multiple rules are separated by semicolons.
# Extraneous whitespace characters are prohibited.
#sdwan = "192.168.202.1/32,172.17.0.0/16,192.168.202.2;192.168.202.2/32,172.16.0.0/16,192.168.202.1"
################################# Client Only #################################
# [Optional] Network interface name
# Used to differentiate networks when running multiple clients.
#name = ""
# [Optional] Static address
# If dhcp is not configured, tun must be configured. When there is an address
# conflict, the previous client will be kicked out.
#tun = "192.168.202.1/24"
# [Optional] STUN server address
# If the STUN server is not configured, P2P will be disabled.
stun = "stun://stun.canets.org"
# [Optional] Active discovery interval
# Periodically sends broadcasts to try to establish P2P with devices on the
# network. The default configuration is 0, which means disabled.
discovery = 300
# [Optional] The cost of routing through this machine
# Use all nodes in the network to establish the link with the lowest latency.
# This configuration represents the cost of using this node as a relay. The
# default configuration is 0 which means disabled.
route = 5
# [Optional] Local UDP port used for P2P
# The default configuration is 0, which means it is allocated by the operating
# system. This configuration can be used when the firewall is strict and can
# only open specific ports.
#port = 0
# [Optional] Local IPv4 address used for peering connections
# By default the IPv4 address of the local physical network card will be
# detected. When there are multiple physical network cards, the detection
# results may not be the best. You can specify it manually.
#localhost = "127.0.0.1"
# [Optional] Number of worker threads
# Default is 0 means no independent worker threads are enabled
#workers=0
# [Optional] Maximum Transmission Unit
#mtu=1400