-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
19 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +1,69 @@ | ||
############################## Client and Server ############################## | ||
# [Required] Working mode, "client" or "server" | ||
mode = "client"; | ||
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/demo" | ||
|
||
# [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; | ||
#debug = false | ||
|
||
# [Optional] Restart interval | ||
# default configuration is 0 which means no restart. | ||
#restart = 0; | ||
#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 = "172.16.0.0/16"; | ||
#dhcp = "172.16.0.0/16" | ||
|
||
# [Optional] software-defined wide area network | ||
# IP packets entering 172.16.0.1/32 with the destination address 192.168.2.0/24 | ||
# will be forwarded to 172.16.0.2. Multiple rules are separated by semicolons. | ||
# Extraneous whitespace characters are prohibited. | ||
#sdwan = "172.16.0.1/32,192.168.2.0/24,172.16.0.2;172.16.0.2/32,192.168.1.0/24,172.16.0.1"; | ||
#sdwan = "172.16.0.1/32,192.168.2.0/24,172.16.0.2;172.16.0.2/32,192.168.1.0/24,172.16.0.1" | ||
|
||
################################# Client Only ################################# | ||
# [Optional] Network interface name | ||
# Used to differentiate networks when running multiple clients. | ||
name = "demo"; | ||
name = "demo" | ||
|
||
# [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 = "172.16.0.1/16"; | ||
#tun = "172.16.0.1/16" | ||
|
||
# [Optional] STUN server address | ||
# If the STUN server is not configured, P2P will be disabled. | ||
stun = "stun://stun.canets.org"; | ||
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; | ||
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; | ||
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; | ||
#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"; | ||
#localhost = "127.0.0.1" |