lib/connections: Add QUIC protocol support (fixes #5377) (#5737)

This commit is contained in:
Audrius Butkevicius
2019-05-29 08:56:40 +01:00
committed by Jakob Borg
parent d8fa61e27c
commit e714df013f
32 changed files with 1290 additions and 128 deletions

22
lib/stun/debug.go Normal file
View File

@@ -0,0 +1,22 @@
// Copyright (C) 2019 The Syncthing Authors.
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at https://mozilla.org/MPL/2.0/.
package stun
import (
"os"
"strings"
"github.com/syncthing/syncthing/lib/logger"
)
var (
l = logger.DefaultLogger.NewFacility("stun", "STUN functionality")
)
func init() {
l.SetDebug("stun", strings.Contains(os.Getenv("STTRACE"), "stun") || os.Getenv("STTRACE") == "all")
}