Skip to content

Commit e1ef970

Browse files
authored
Merge branch 'main' into main
2 parents 893ace5 + 70f34c3 commit e1ef970

25 files changed

+299
-475
lines changed

AUTHORS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ Edd Barrett <[email protected]>
8383
eddsalkield <[email protected]>
8484
Emil Lundberg <[email protected]>
8585
86+
8687
Evgeny Kuznetsov <[email protected]>
8788
8889
Felix Ableitner (Nutomic) <[email protected]>
@@ -233,6 +234,7 @@ terrycloth <[email protected]>
233234
terzinnorbert <[email protected]>
234235
theincogtion <[email protected]>
235236
Thomas Dalichow <[email protected]>
237+
Thomas De Rocker <[email protected]>
236238
237239
Tim Abell <[email protected]>
238240
Tim Boudreau <[email protected]>

advanced/device-numconnections.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ numConnections
44
.. versionadded:: 1.25.0
55

66
``numConnections`` is a device setting that affects connection handling. A
7-
zero value means to use the Syncthing default. As of version 1.25.0 the
8-
default is to use one connection, like earlier versions of Syncthing. This
9-
may change in the future.
7+
zero value means to use the Syncthing default.
108

119
Multiple connections will be maintained to the device if you set this to a
1210
value greater than one. Multiple connections can yield improved performance

advanced/option-database-tuning.rst

Lines changed: 0 additions & 29 deletions
This file was deleted.

conf.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import sys
1616
import os
1717
import re
18+
from datetime import datetime
1819

1920
# If extensions (or modules to document with autodoc) are in another directory,
2021
# add these directories to sys.path here. If the directory is relative to the
@@ -55,15 +56,16 @@
5556

5657
# General information about the project.
5758
project = u'Syncthing'
58-
copyright = u'2014-2019, The Syncthing Authors'
59+
year = datetime.now().year
60+
copyright = f'2014-{year}, The Syncthing Authors'
5961

6062
# The version info for the project you're documenting, acts as replacement for
6163
# |version| and |release|, also used in various other places throughout the
6264
# built documents.
6365
#
6466
# The full version, including alpha/beta/rc tags.
6567

66-
release = 'v1'
68+
release = 'v2'
6769
try:
6870
release = open('RELEASE', 'r').read().strip()
6971
except FileNotFoundError:

dev/building.rst

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ Prerequisites
3232
- The latest stable version of Go. The previous stable version should also
3333
work; older versions will likely not work. This largely follows Go's
3434
`Release Policy <https://go.dev/doc/devel/release#policy>`__.
35-
- Git
35+
- Usually, a C compiler. Syncthing uses SQLite for storing data and the
36+
most common implementation is written in C.
37+
- Git, unless you're building from a downloaded source tarball that includes
38+
a ``RELEASE`` marker with the version information.
3639
- If you want to build Debian packages FPM is required. See FPM's
3740
`installation information <https://fpm.readthedocs.io/en/latest/installation.html>`__.
3841
- To build Windows executables, installing `goversioninfo
@@ -44,11 +47,6 @@ If you're not already a Go developer, the easiest way to get going
4447
is to download the latest version of Go as instructed in
4548
https://go.dev/doc/install.
4649

47-
.. note::
48-
Because Syncthing uses Go modules you do not need to set or care about "GOPATH".
49-
However, the GOPATH still defaults to ``~/go`` and you'd be best to *not*
50-
put your Syncthing source in there, for now.
51-
5250
Building (Unix)
5351
---------------
5452

@@ -109,7 +107,13 @@ The following ``build.go`` subcommands and options exist.
109107
``go run build.go build``
110108
Builds just the named target, or ``syncthing`` by default, to the current
111109
directory. Use this when cross compiling, with parameters for what to cross
112-
compile to: ``go run build.go --goos linux --goarch 386 build``.
110+
compile to: ``go run build.go --goos linux --goarch 386 build``. When
111+
cross compiling you need to have a C compiler for the target platform, and
112+
you need to let Go know how to invoke it. The ``--cc`` flag to build.go
113+
controls this, together with the environment variable ``CGO_ENABLED=1``.
114+
For example, to cross build from Linux to Windows using Zig as the C
115+
compiler, ``go run build.go -goos windows -goarch amd64 -cc "zig cc
116+
-target x86_64-windows" build``.
113117

114118
``go run build.go test``
115119
Runs the tests.
@@ -120,11 +124,13 @@ The following ``build.go`` subcommands and options exist.
120124

121125
``go run build.go tar``
122126
Creates a Syncthing tar.gz dist file in the current directory. Assumes a
123-
Unixy build.
127+
Unixy build. Otherwise same considerations and parameters as for the
128+
``build`` subcommand.
124129

125130
``go run build.go zip``
126131
Creates a Syncthing zip dist file in the current directory. Assumes a
127-
Windows build.
132+
Windows build. Otherwise same considerations and parameters as for the
133+
``build`` subcommand.
128134

129135
The options ``--no-upgrade``, ``--goos`` and ``--goarch`` can be given to
130136
influence ``build``, ``tar`` and ``zip``. Examples:

dev/debugging.rst

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,6 @@ quite silent about it. A number of environment variables can be used to
88
set the logging to verbose for various parts of the program, and to
99
enable profiling.
1010

11-
Enabling any of the STTRACE facilities will also change the log format to
12-
include microsecond timestamps and file names plus line numbers. This
13-
can be used to enable this extra information on the normal logging
14-
level, without enabling any debugging: ``STTRACE=somethingnonexistent``
15-
for example.
16-
1711
Under Unix (including Mac) the easiest way to run Syncthing with an
1812
environment variable set is to prepend the variable to the command line.
1913
I.e:

includes/env-vars.rst

Lines changed: 37 additions & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -1,127 +1,46 @@
11
STTRACE
2-
Used to increase the debugging verbosity in specific or all facilities,
3-
generally mapping to a Go package. Enabling any of these also enables
4-
microsecond timestamps, file names plus line numbers. Enter a
5-
comma-separated string of facilities to trace. ``syncthing --help`` always
6-
outputs an up-to-date list. The valid facility strings are:
7-
8-
Main and operational facilities:
9-
config
10-
Configuration loading and saving.
11-
db
12-
The database layer.
13-
main
14-
Main package.
15-
model
16-
The root hub; the largest chunk of the system. File pulling, index
17-
transmission and requests for chunks.
18-
scanner
19-
File change detection and hashing.
20-
versioner
21-
File versioning.
22-
23-
Networking facilities:
24-
beacon
25-
Multicast and broadcast UDP discovery packets: Selected interfaces
26-
and addresses.
27-
connections
28-
Connection handling.
29-
dialer
30-
Dialing connections.
31-
discover
32-
Remote device discovery requests, replies and registration of
33-
devices.
34-
nat
35-
NAT discovery and port mapping.
36-
pmp
37-
NAT-PMP discovery and port mapping.
38-
protocol
39-
The BEP protocol.
40-
relay
41-
Relay interaction (``strelaysrv``).
42-
upnp
43-
UPnP discovery and port mapping.
44-
45-
Other facilities:
46-
fs
47-
Filesystem access.
48-
events
49-
Event generation and logging.
50-
http
51-
REST API.
52-
sha256
53-
SHA256 hashing package (this facility currently unused).
54-
stats
55-
Persistent device and folder statistics.
56-
sync
57-
Mutexes. Used for debugging race conditions and deadlocks.
58-
upgrade
59-
Binary upgrades.
60-
walkfs
61-
Filesystem access while walking.
62-
63-
all
64-
All of the above.
65-
66-
STBLOCKPROFILE
67-
Write block profiles to ``block-$pid-$timestamp.pprof`` every 20 seconds.
68-
69-
STCPUPROFILE
70-
Write a CPU profile to ``cpu-$pid.pprof`` on exit.
71-
72-
STDEADLOCKTIMEOUT
73-
Used for debugging internal deadlocks; sets debug sensitivity. Use only
74-
under direction of a developer.
2+
Used to increase the debugging verbosity in specific facilities,
3+
generally mapping to a Go package. Enter a comma-separated string of
4+
facilities to trace: ``api,beacon``. Optionally, a log level can be
5+
given per facility to specify something other than DEBUG:
6+
``api:WARN,beacon:ERR``, potentially overriding a global ``--log-level``
7+
adjustment.
8+
9+
The valid facility strings are listed below; additionally, ``syncthing
10+
serve --help`` always outputs the most up-to-date list.
11+
12+
api - REST API
13+
beacon - Multicast and broadcast discovery
14+
config - Configuration loading and saving
15+
connections - Connection handling
16+
db/sqlite - SQLite database
17+
dialer - Dialing connections
18+
discover - Remote device discovery
19+
events - Event generation and logging
20+
fs - Filesystem access
21+
main - Main package
22+
model - The root hub
23+
nat - NAT discovery and port mapping
24+
pmp - NAT-PMP discovery and port mapping
25+
protocol - The BEP protocol
26+
relay/client - Relay client
27+
scanner - File change detection and hashing
28+
stun - STUN functionality
29+
syncthing - Main run facility
30+
upgrade - Binary upgrades
31+
upnp - UPnP discovery and port mapping
32+
ur - Usage reporting
33+
versioner - File versioning
34+
watchaggregator - Filesystem event watcher
7535

7636
STLOCKTHRESHOLD
7737
Used for debugging internal deadlocks; sets debug sensitivity. Use only
7838
under direction of a developer.
7939

80-
STGUIADDRESS
81-
Override GUI listen address. Equivalent to passing :option:`--gui-address`.
82-
83-
STGUIAPIKEY
84-
Override the API key needed to access the GUI / REST API. Equivalent to
85-
passing :option:`--gui-apikey`.
86-
87-
STGUIASSETS
88-
Directory to load GUI assets from. Overrides compiled in assets. Useful for
89-
developing webgui, commonly use ``STGUIASSETS=gui bin/syncthing``.
90-
91-
STHEAPPROFILE
92-
Write heap profiles to ``heap-$pid-$timestamp.pprof`` each time heap usage
93-
increases.
94-
95-
STNODEFAULTFOLDER
96-
Don't create a default folder when starting for the first time. This
97-
variable will be ignored anytime after the first run. Equivalent to the
98-
:option:`--no-default-folder` flag.
99-
100-
STNORESTART
101-
Equivalent to the :option:`--no-restart` flag.
102-
103-
STNOUPGRADE
104-
Disable automatic upgrades. Equivalent to the :option:`--no-upgrade` flag.
105-
106-
STPROFILER
107-
Set to a listen address such as "127.0.0.1:9090" to start the profiler with
108-
HTTP access, which then can be reached at
109-
http://localhost:9090/debug/pprof. See ``go tool pprof`` for more
110-
information.
111-
112-
STPERFSTATS
113-
Write running performance statistics to ``perf-$pid.csv``. Not supported on
114-
Windows.
115-
116-
STRECHECKDBEVERY
117-
Time before folder statistics (file, dir, ... counts) are recalculated from
118-
scratch. The given duration must be parseable by Go's ``time.ParseDuration``. If
119-
missing or not parseable, the default value of 1 month is used. To force
120-
recalculation on every startup, set it to ``1s``.
121-
122-
STGCINDIRECTEVERY
123-
Sets the time interval in between database garbage collection runs. The
124-
given duration must be parseable by Go's ``time.ParseDuration``.
40+
STVERSIONEXTRA
41+
Add extra information to the version string in logs and the version line
42+
in the GUI. Can be set to the name of a wrapper or tool controlling
43+
syncthing to communicate this to the end user.
12544

12645
GOMAXPROCS
12746
Set the maximum number of CPU cores to use. Defaults to all available CPU

rest/debug.rst

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,6 @@
11
Debug Endpoints
22
================
33

4-
These endpoints require the :stconf:opt:`gui.debugging` configuration option to
5-
be enabled and yield an access denied error code otherwise.
6-
7-
8-
GET /rest/debug/peerCompletion
9-
------------------------------
10-
11-
Summarizes the completion percentage for each remote device. Returns an object
12-
with device IDs as keys and an integer percentage as values.
13-
14-
15-
GET /rest/debug/httpmetrics
16-
---------------------------
17-
18-
Returns statistics about each served REST API endpoint, to diagnose how much
19-
time was spent generating the responses.
20-
21-
224
GET /rest/debug/cpuprof
235
-----------------------
246

rest/system-config-get.rst

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,7 @@ Returns the current configuration.
5050
"pullerPauseS": 0,
5151
"maxConflicts": -1,
5252
"disableSparseFiles": false,
53-
"disableTempIndexes": false,
5453
"paused": false,
55-
"weakHashThresholdPct": 25,
5654
"markerName": ".stfolder",
5755
"copyOwnershipFromParent": false,
5856
"modTimeWindowS": 0,
@@ -105,7 +103,6 @@ Returns the current configuration.
105103
"apiKey": "k1dnz1Dd0rzTBjjFFh7CXPnrF12C49B1",
106104
"insecureAdminAccess": false,
107105
"theme": "default",
108-
"debugging": false,
109106
"insecureSkipHostcheck": false,
110107
"insecureAllowFrameLoading": false
111108
},
@@ -171,7 +168,6 @@ Returns the current configuration.
171168
"stunServers": [
172169
"default"
173170
],
174-
"databaseTuning": "auto",
175171
"maxConcurrentIncomingRequestKiB": 0,
176172
"announceLANAddresses": true,
177173
"sendFullIndexOnUpgrade": false,
@@ -226,9 +222,7 @@ Returns the current configuration.
226222
"pullerPauseS": 0,
227223
"maxConflicts": 10,
228224
"disableSparseFiles": false,
229-
"disableTempIndexes": false,
230225
"paused": false,
231-
"weakHashThresholdPct": 25,
232226
"markerName": ".stfolder",
233227
"copyOwnershipFromParent": false,
234228
"modTimeWindowS": 0,

0 commit comments

Comments
 (0)