############################## 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 # When an internal exception is detected, the service will be automatically # restarted. When configured to 0, the process will exit without restarting. # Otherwise, it will restart after an interval of n seconds. #restart = 0 # [Optional] Set NTP Server # The time difference between the client and the server should not exceed 30 # seconds. If the local time is inaccurate, the current real time can be # obtained from the NTP server. ntp = "pool.ntp.org" ################################# 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