Jakob Borg
362da59396
cmd/strelaypoolsrv: Expose check error to client, fix incorrect response code handling
2020-04-04 13:31:42 +02:00
Jakob Borg
dd92b2b8f4
all: Tweak error creation ( #6391 )
...
- In the few places where we wrap errors, use the new Go 1.13 "%w"
construction instead of %s or %v.
- Where we create errors with constant strings, consistently use
errors.New and not fmt.Errorf.
- Remove capitalization from errors in the few places where we had that.
2020-03-03 22:40:00 +01:00
Simon Frei
f0e33d052a
lib: More contextification ( #6343 )
2020-02-24 21:57:15 +01:00
Audrius Butkevicius
17b441c993
lib/relays: Fix incorrect timeout, bring back logging (ref #6289 ) ( #6291 )
...
* lib/relays: Fix incorrect timeout, bring back logging (ref #6289 )
* Fix format strings
2020-01-23 21:37:35 +00:00
Simon Frei
1bae4b7f50
all: Use context in lib/dialer ( #6177 )
...
* all: Use context in lib/dialer
* a bit slimmer
* https://github.com/syncthing/syncthing/pull/5753
* bot
* missed adding debug.go
* errors.Cause
* simultaneous dialing
* anti-leak
2019-11-26 07:39:51 +00:00
Simon Frei
cf312abc72
lib: Wrap errors with errors.Wrap instead of fmt.Errorf ( #6181 )
2019-11-23 15:20:54 +00:00
Simon Frei
de886b3f22
lib/relay: Prevent lock nil deref when creation dynamic client ( #6175 )
2019-11-21 17:45:06 +00:00
Simon Frei
90d85fd0a2
lib: Replace done channel with contexts in and add names to util services ( #6166 )
2019-11-21 08:41:15 +01:00
Audrius Butkevicius
98a1adebe1
all: Remove dead code, fix lost msgLen checks ( #6129 )
2019-11-06 07:09:58 +01:00
Lukas Lihotzki
96bb1c8e29
all, lib/logger: Refactor SetDebug calls ( #6054 )
2019-10-04 13:03:34 +02:00
Simon Frei
4d3432af3e
lib: Ensure timely service termination ( fixes #5860 ) ( #5863 )
2019-07-19 19:40:40 +02:00
Jakob Borg
e7e177a6fa
lib/relay: Prevent spurious relay error message ( fixes #5861 ) ( #5864 )
2019-07-17 10:55:28 +02:00
Simon Frei
485acda63b
lib/relay: Call the proper Error method (ref #5806 ) ( #5841 )
2019-07-09 22:29:19 +01:00
Simon Frei
ba056578ec
lib: Add util.Service as suture.Service template ( fixes #5801 ) ( #5806 )
2019-07-09 11:40:30 +02:00
Audrius Butkevicius
e714df013f
lib/connections: Add QUIC protocol support ( fixes #5377 ) ( #5737 )
2019-05-29 09:56:40 +02:00
Jakob Borg
c2ddc83509
all: Revert the underscore sillyness
2019-02-02 12:16:27 +01:00
Jakob Borg
0b2cabbc31
all: Even more boring linter fixes ( #5501 )
2019-02-02 11:45:17 +01:00
Jakob Borg
944ddcf768
all: Become a Go module ( fixes #5148 ) ( #5384 )
...
* go mod init; rm -rf vendor
* tweak proto files and generation
* go mod vendor
* clean up build.go
* protobuf literals in tests
* downgrade gogo/protobuf
2018-12-18 12:36:38 +01:00
Simon Frei
603da2dce2
cmd/syncthing, lib/relay: Fixes regarding stopping of services ( #5293 )
2018-11-07 11:05:07 +01:00
Jakob Borg
f7fc0c1d3e
all: Update license url to https (ref #3976 )
2017-02-09 08:04:16 +01:00
Audrius Butkevicius
38d28c3f4a
lib/relay: Close invitation channel in all error cases ( fixes #3726 )
2016-11-13 09:32:05 +01:00
Jakob Borg
a4ed50ca85
build, lib: Correct total test coverage calculation
...
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3483
2016-08-08 16:29:32 +00:00
Jakob Borg
4970bd7f65
lib/relay: Correctly get IP from remote addr via proxy ( fixes #3223 )
...
Correctly handles addresses, and fixes one more panicing place.
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3230
2016-05-31 14:42:10 +00:00
Jakob Borg
ac40b27c79
lib/connections: Handle wrapped connection in SetTCPOptions ( fixes #3223 )
...
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3225
2016-05-31 08:11:57 +00:00
Jakob Borg
2c1323ece6
lib/connections: Un-deprecate relaysEnabled ( fixes #3074 )
...
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3098
2016-05-17 00:05:38 +00:00
klemens
bd41e21c26
all: Correct spelling in comments
...
Skip-check: authors pr-build-mac
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3056
2016-05-08 10:54:22 +00:00
Audrius Butkevicius
674fc566bb
lib/connections: Refactor
...
1. Removes separate relay lists and relay clients/services, just makes it a listen address
2. Easier plugging-in of other transports
3. Allows "hot" disabling and enabling NAT services
4. Allows "hot" listen address changes
5. Changes listen address list with a preferable "default" value just like for discovery
6. Debounces global discovery announcements as external addresses change (which it might alot upon starting)
7. Stops this whole "pick other peers relay by latency". This information is no longer available,
but I don't think it matters as most of the time other peer only has one relay.
8. Rename ListenAddress to ListenAddresses, as well as in javascript land.
9. Stop serializing deprecated values to JSON
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/2982
2016-05-04 19:38:12 +00:00
Jakob Borg
a492cfba13
cmd/syncthing: Extract interfaces for things the API depends on
...
Enables testing of the API service, in the long run.
2016-03-21 19:36:08 +00:00
Audrius Butkevicius
a49b8a2608
lib/relay/client: Log relay client messages ( fixes #2624 )
2016-03-18 07:25:37 +00:00
Lars K.W. Gohlke
9b1bebc9b2
Correct path to genxdr after the change to Go1.5+ vendoring
2016-03-09 12:43:16 +00:00
Jakob Borg
e1ac740ac4
Use v2 of XDR package (actual changes)
2016-02-02 15:33:46 +01:00
Jakob Borg
4feeaf1641
Use v2 of XDR package (auto generated)
2016-02-02 12:44:33 +01:00
Audrius Butkevicius
1827dda0c6
Svc -> Service
2015-12-23 15:31:12 +00:00
Audrius Butkevicius
c9e67fb460
Log when we fail to connect to relay
2015-12-20 22:14:13 +00:00
AudriusButkevicius
e8016abd97
Always exit via error select, making sure reader routine is exits ( fixes #2547 )
2015-12-18 22:29:04 +00:00
Antony Male
345d727936
staticClient.connect(): don't handshake twice ( fixes #2547 , #2548 )
...
The first handshake occurred before setting the Deadline, which could
cause an unintended hang.
2015-12-04 12:01:01 +00:00
Audrius Butkevicius
ed792b97c0
Take timeout into account when dialing
2015-11-26 23:41:11 +00:00
Jakob Borg
e5b33ce9f6
Regenerate XDR for empty struct types
2015-11-24 20:54:49 +01:00
Audrius Butkevicius
431d51f5c4
Add timeouts to relay methods
2015-11-23 21:14:46 +00:00
Audrius Butkevicius
eeb5d99942
Sort relays in 50ms latency increments, shuffle relays within the same increment
2015-11-21 13:23:49 +00:00
Audrius Butkevicius
9047d56aa0
Add RelayFull message
2015-11-20 23:42:49 +00:00
Audrius Butkevicius
73236e58c5
Close channel after the client is stopped
2015-10-22 23:09:02 +01:00
Jakob Borg
f3dc78d457
Don't deadlock after checking relay client status ( fixes #2404 )
2015-10-22 20:32:15 +02:00
Audrius Butkevicius
4f0680c3c8
Add separate client for dynamic relays ( fixes #2368 )
...
Did some manual tests in the playground, such as kicking off two clients in parallel, first connecting,
second one getting a message about already being connected, falling back to the second address.
2015-10-21 20:08:14 +01:00
Jakob Borg
aa42aafe33
Don't panic on clean shutdown
2015-10-20 15:59:37 +02:00
Jakob Borg
6578ffe2c9
Merge pull request #2320 from AudriusButkevicius/proto
...
More proto changes
2015-10-18 08:47:30 +02:00
Audrius Butkevicius
9f4cd7716e
Add more information about the folders to ClusterConfig
2015-10-17 09:46:46 +01:00
Audrius Butkevicius
e4e3c19e96
Our dialer sets up TCP options
2015-10-16 19:18:22 +01:00
Audrius Butkevicius
985ea29940
Add proxy support ( fixes #271 )
2015-10-15 21:01:42 +01:00
Audrius Butkevicius
2972472179
Add missing close
2015-10-12 17:10:59 +01:00