syncthing/lib/connections
Jakob Borg 9b660c1959
lib/config, lib/connections: Configurable protocol priority (ref #8626) (#8868)
This makes the various protocol priorities configurable among the other
options. With this, it's possible to prefer QUIC over TCP for WAN
connections, for example. Both sides need to be similarly configured for
this to work properly.

The default priority order remains the same as previously (TCP, QUIC,
Relay, with LAN better than WAN).

To make this happen I made each dialer & listener more priority aware,
and moved the check for whether a connection is LAN or not into the
dialer / listener -- this is the new "lanChecker" type that's passed
around.
2023-04-16 14:54:28 +02:00
..
mocks lib: Use counterfeiter to mock interfaces in tests (#7375) 2021-03-03 08:53:50 +01:00
registry lib: Removal global connection registry (#8254) 2022-04-09 16:04:56 +02:00
connections_test.go lib/config, lib/connections: Configurable protocol priority (ref #8626) (#8868) 2023-04-16 14:54:28 +02:00
debug.go all, lib/logger: Refactor SetDebug calls (#6054) 2019-10-04 13:03:34 +02:00
deprecated.go lib/connections: Handle QUIC not being available (#7186) 2020-12-09 19:23:50 +01:00
dialqueue_test.go all: Fix various user-facing and non-user-facing typos (#8509) 2022-08-23 15:44:11 +02:00
dialqueue.go lib/config, lib/connections: Add optional connection limits (fixes #7176) (#7223) 2021-01-11 15:14:44 +01:00
lan_test.go lib/config, lib/connections: Configurable protocol priority (ref #8626) (#8868) 2023-04-16 14:54:28 +02:00
limiter_test.go all: Use new Go 1.19 atomic types (#8772) 2023-02-07 12:07:34 +01:00
limiter.go all: Use new Go 1.19 atomic types (#8772) 2023-02-07 12:07:34 +01:00
quic_dial.go lib/config, lib/connections: Configurable protocol priority (ref #8626) (#8868) 2023-04-16 14:54:28 +02:00
quic_listen.go lib/config, lib/connections: Configurable protocol priority (ref #8626) (#8868) 2023-04-16 14:54:28 +02:00
quic_misc.go build: Update quic-go and pfilter for Go 1.20 (fixes #8768) (#8769) 2023-02-02 22:00:50 +01:00
quic_unsupported.go all: Unused errors 2022-07-28 19:08:51 +02:00
relay_dial.go lib/config, lib/connections: Configurable protocol priority (ref #8626) (#8868) 2023-04-16 14:54:28 +02:00
relay_listen.go lib/config, lib/connections: Configurable protocol priority (ref #8626) (#8868) 2023-04-16 14:54:28 +02:00
service.go lib/config, lib/connections: Configurable protocol priority (ref #8626) (#8868) 2023-04-16 14:54:28 +02:00
structs.go lib/config, lib/connections: Configurable protocol priority (ref #8626) (#8868) 2023-04-16 14:54:28 +02:00
tcp_dial.go lib/config, lib/connections: Configurable protocol priority (ref #8626) (#8868) 2023-04-16 14:54:28 +02:00
tcp_listen.go lib/config, lib/connections: Configurable protocol priority (ref #8626) (#8868) 2023-04-16 14:54:28 +02:00
util.go lib/connections: Add connection benchmarks, allow binding to port zero addresses (#7648) 2021-05-10 15:44:47 +01:00