Commit Graph

18 Commits

Author SHA1 Message Date
Simon Frei
3d0e8ac0ee
Merge remote-tracking branch 'upstream/main' into conn-test 2022-04-10 12:46:51 +02:00
Simon Frei
b947056e62
lib: Removal global connection registry (#8254) 2022-04-09 16:04:56 +02:00
Jakob Borg
ccf5553d10 wip 2021-11-22 09:46:14 +01:00
Jakob Borg
842934347d debug 2021-11-22 08:58:34 +01:00
Jakob Borg
a9c9fb1a2f Merge branch 'main' into conn-test
* main: (32 commits)
  cmd/syncthing: Implement generate as a subcommand with optional API credential setting (fixes #8021) (#8043)
  lib/model: Correct "reverting folder" log entry
  lib/model: Correct handling of fakefs cache
  gui, lib: Fix tracking deleted locally-changed on encrypted (fixes #7715) (#7726)
  lib/config: Move the bcrypt password hashing to GUIConfiguration (#8028)
  lib/syncthing: Clean up / refactor LoadOrGenerateCertificate() utility function. (#8025)
  lib/api: http.Request.BasicAuth instead of custom code (#8039)
  Normalize CLI options to always use two dashes. (#8037)
  gui: Display identicons for discovered device IDs. (#8022)
  cmd/syncthing/cli: indexDumpSize doesn't need a heap (#8024)
  lib/model: Optimize jobQueue performance and memory use (#8023)
  lib/model: Limit the number of default hashers on Android (ref #2220)
  lib/model: Set mod. time after writing trailer in shortcut (ref #7992)
  lib/protocol: Simplify codeToError, errorToCode
  lib/protocol: Eliminate nativeModel on Unix
  gui: Add direct link to Ignore Patterns from folder panel (fixes #4293) (#7993)
  gui: Translate theme names in settings (#8006)
  lib/model: Pull when a new connection is established (fixes #8012) (#8013)
  gui, man, authors: Update docs, translations, and contributors
  gui, man, authors: Update docs, translations, and contributors
  ...
2021-11-22 08:48:18 +01:00
André Colomb
ec8a748514
lib/syncthing: Clean up / refactor LoadOrGenerateCertificate() utility function. (#8025)
LoadOrGenerateCertificate() takes two file path arguments, but then
uses the locations package to determine the actual path.  Fix that
with a minimally invasive change, by using the arguments instead.
Factor out GenerateCertificate().

The only caller of this function is cmd/syncthing, which passes the
same values, so this is technically a no-op.

* lib/tlsutil: Make storing generated certificate optional.  Avoid
  temporary cert and key files in tests, keep cert in memory.
2021-11-07 23:59:48 +01:00
Jakob Borg
375e9b3b97 wip 2021-09-26 12:27:32 +02:00
Jakob Borg
739bbe2ad5 lib/connections: Always run a simple connection test
Establish a connection over both TCP and QUIC and transmit a simple
message over it. Presumably this should weed out panics and crap from
the QUIC package at test time...
2021-08-03 13:05:41 +02:00
Simon Frei
857caf3637
lib/connections: Trigger dialer when connection gets closed (#7753) 2021-06-17 13:57:44 +02:00
Audrius Butkevicius
eb178caf3a
lib/connections: Add connection benchmarks, allow binding to port zero addresses (#7648)
* Add connbench

* Refactor port fixup

* More cleanup

* touch for build

Co-authored-by: Jakob Borg <jakob@kastelo.net>
2021-05-10 15:44:47 +01:00
Jakob Borg
b62b7d269e
lib/connections: Correctly fixup port in IPv6 listen URLs (#6786)
Previously tcp://[fe80::1] would get "fixed" to tcp://[[fe80::1]]:22000
which is not great.
2020-06-22 16:47:15 +01:00
Simon Frei
680b0b14db
lib/connections: Refactor status for testing (ref #6361) (#6362) 2020-02-25 21:18:31 +01:00
Jakob Borg
b97d5bcca8
Remove KCP (fixes #4737) (#4741) 2018-02-09 11:40:57 +01:00
Jakob Borg
dd1f7a5ab7 lib/connections: Allow negative ACL entries on devices (fixes #4096)
Prefix an entry with "!" to make it a negative entry. First match wins.

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4097
2017-04-13 17:43:29 +00:00
Jakob Borg
c5e0c47989 lib/connections, lib/model, gui: Specify allowed networks per device (fixes #219)
This adds a new config AllowedNetworks per device, which when set should
contain a list of network prefixes (192.168.0.0/126 etc) that are
allowed for the given device. The connection service will not attempt
connections to addresses outside of the given networks and incoming
connections will be rejected as well.

I've added the config to the normal device editor and shown it (when
set) in the device summary on the main screen.

There's a unit test for the IsAllowedNetwork method, I've done some
manual sanity testing on top of that.

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4073
2017-04-01 09:52:31 +00:00
Audrius Butkevicius
0da0774ce4 lib/connections: Add KCP support (fixes #804)
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3489
2017-03-07 12:44:16 +00:00
Jakob Borg
f7fc0c1d3e all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
Jakob Borg
9c67bd2550 lib/connections: Fix port fixup in Go 1.8 (fixes #3817)
The test for the error string is fragile, and the error string changed
in Go 1.8 so the relevant part is no longer a prefix. This covers it
with a test though, so it should be fine in the future as well.

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3818
2016-12-18 11:28:18 +00:00