lib/config, lib/connections: Configurables for KCP, disable by default

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4030
This commit is contained in:
Jakob Borg
2017-03-07 12:55:50 +00:00
committed by Audrius Butkevicius
parent 0da0774ce4
commit 81af29e3e2
9 changed files with 48 additions and 24 deletions

View File

@@ -44,9 +44,12 @@ var (
// config.
DefaultListenAddresses = []string{
util.Address("tcp", net.JoinHostPort("0.0.0.0", strconv.Itoa(DefaultTCPPort))),
util.Address("kcp", net.JoinHostPort("0.0.0.0", strconv.Itoa(DefaultKCPPort))),
"dynamic+https://relays.syncthing.net/endpoint",
}
// DefaultKCPListenAddress gets added to the default listen address set
// when the appropriate feature flag is set. Feature flag stuff to be
// removed later.
DefaultKCPListenAddress = util.Address("kcp", net.JoinHostPort("0.0.0.0", strconv.Itoa(DefaultKCPPort)))
// DefaultDiscoveryServersV4 should be substituted when the configuration
// contains <globalAnnounceServer>default-v4</globalAnnounceServer>.
DefaultDiscoveryServersV4 = []string{