Ind.ie is now
Small Technology Foundation
.
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Pulse
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
4
Issues
4
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ind.ie Projects
Pulse
Commits
b28c1410
Commit
b28c1410
authored
Jan 16, 2015
by
George MacRorie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Blanket renaming of syncthing and its permutations (urls and addresses) to pulse
parent
b0b34236
Changes
113
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
113 changed files
with
420 additions
and
420 deletions
+420
-420
.gitignore
.gitignore
+2
-2
CONTRIBUTING.md
CONTRIBUTING.md
+7
-7
Godeps/Godeps.json
Godeps/Godeps.json
+1
-1
README.md
README.md
+13
-13
auto/auto_test.go
auto/auto_test.go
+1
-1
auto/gui.files.go
auto/gui.files.go
+22
-22
beacon/debug.go
beacon/debug.go
+1
-1
build.go
build.go
+8
-8
cmd/.gitignore
cmd/.gitignore
+1
-1
cmd/pulse/.gitignore
cmd/pulse/.gitignore
+0
-0
cmd/pulse/debug.go
cmd/pulse/debug.go
+0
-0
cmd/pulse/gui.go
cmd/pulse/gui.go
+9
-9
cmd/pulse/gui_auth.go
cmd/pulse/gui_auth.go
+1
-1
cmd/pulse/gui_csrf.go
cmd/pulse/gui_csrf.go
+1
-1
cmd/pulse/gui_solaris.go
cmd/pulse/gui_solaris.go
+0
-0
cmd/pulse/gui_unix.go
cmd/pulse/gui_unix.go
+0
-0
cmd/pulse/gui_windows.go
cmd/pulse/gui_windows.go
+0
-0
cmd/pulse/heapprof.go
cmd/pulse/heapprof.go
+0
-0
cmd/pulse/limitedreader.go
cmd/pulse/limitedreader.go
+0
-0
cmd/pulse/limitedwriter.go
cmd/pulse/limitedwriter.go
+0
-0
cmd/pulse/main.go
cmd/pulse/main.go
+29
-29
cmd/pulse/main_test.go
cmd/pulse/main_test.go
+0
-0
cmd/pulse/memsize_darwin.go
cmd/pulse/memsize_darwin.go
+0
-0
cmd/pulse/memsize_linux.go
cmd/pulse/memsize_linux.go
+0
-0
cmd/pulse/memsize_solaris.go
cmd/pulse/memsize_solaris.go
+0
-0
cmd/pulse/memsize_unimpl.go
cmd/pulse/memsize_unimpl.go
+0
-0
cmd/pulse/memsize_windows.go
cmd/pulse/memsize_windows.go
+0
-0
cmd/pulse/monitor.go
cmd/pulse/monitor.go
+3
-3
cmd/pulse/openurl_unix.go
cmd/pulse/openurl_unix.go
+0
-0
cmd/pulse/openurl_windows.go
cmd/pulse/openurl_windows.go
+0
-0
cmd/pulse/perfstats_unix.go
cmd/pulse/perfstats_unix.go
+0
-0
cmd/pulse/tls.go
cmd/pulse/tls.go
+1
-1
cmd/pulse/usage.go
cmd/pulse/usage.go
+0
-0
cmd/pulse/usage_report.go
cmd/pulse/usage_report.go
+2
-2
cmd/stevents/main.go
cmd/stevents/main.go
+2
-2
cmd/stindex/main.go
cmd/stindex/main.go
+2
-2
cmd/transifexdl/main.go
cmd/transifexdl/main.go
+2
-2
config/config.go
config/config.go
+8
-8
config/config_test.go
config/config_test.go
+3
-3
config/testdata/overridenvalues.xml
config/testdata/overridenvalues.xml
+1
-1
discover/PROTOCOL.md
discover/PROTOCOL.md
+1
-1
discover/debug.go
discover/debug.go
+1
-1
discover/discover.go
discover/discover.go
+3
-3
events/debug.go
events/debug.go
+1
-1
events/events_test.go
events/events_test.go
+1
-1
files/debug.go
files/debug.go
+1
-1
files/leveldb.go
files/leveldb.go
+2
-2
files/set.go
files/set.go
+2
-2
files/set_test.go
files/set_test.go
+3
-3
gui/app.js
gui/app.js
+13
-13
gui/index.html
gui/index.html
+19
-19
gui/lang/README-FIRST.txt
gui/lang/README-FIRST.txt
+1
-1
gui/lang/lang-bg.json
gui/lang/lang-bg.json
+8
-8
gui/lang/lang-ca.json
gui/lang/lang-ca.json
+8
-8
gui/lang/lang-da.json
gui/lang/lang-da.json
+8
-8
gui/lang/lang-de.json
gui/lang/lang-de.json
+9
-9
gui/lang/lang-el.json
gui/lang/lang-el.json
+8
-8
gui/lang/lang-en.json
gui/lang/lang-en.json
+7
-7
gui/lang/lang-es.json
gui/lang/lang-es.json
+8
-8
gui/lang/lang-fr.json
gui/lang/lang-fr.json
+9
-9
gui/lang/lang-hu.json
gui/lang/lang-hu.json
+9
-9
gui/lang/lang-it.json
gui/lang/lang-it.json
+8
-8
gui/lang/lang-lt.json
gui/lang/lang-lt.json
+8
-8
gui/lang/lang-nl.json
gui/lang/lang-nl.json
+8
-8
gui/lang/lang-pt-PT.json
gui/lang/lang-pt-PT.json
+8
-8
gui/lang/lang-ru.json
gui/lang/lang-ru.json
+9
-9
gui/lang/lang-sv.json
gui/lang/lang-sv.json
+8
-8
gui/lang/lang-tr.json
gui/lang/lang-tr.json
+8
-8
gui/lang/lang-uk.json
gui/lang/lang-uk.json
+8
-8
gui/lang/lang-zh-CN.json
gui/lang/lang-zh-CN.json
+11
-11
gui/lang/lang-zh-TW.json
gui/lang/lang-zh-TW.json
+8
-8
ignore/ignore.go
ignore/ignore.go
+1
-1
ignore/ignore_test.go
ignore/ignore_test.go
+1
-1
integration/common_test.go
integration/common_test.go
+7
-7
integration/f1/config.xml
integration/f1/config.xml
+1
-1
integration/f2/config.xml
integration/f2/config.xml
+1
-1
integration/h1/config.xml
integration/h1/config.xml
+1
-1
integration/h2/config.xml
integration/h2/config.xml
+1
-1
integration/h3/config.xml
integration/h3/config.xml
+1
-1
integration/h4/config.xml
integration/h4/config.xml
+1
-1
integration/httpstress_test.go
integration/httpstress_test.go
+1
-1
integration/reconnect_test.go
integration/reconnect_test.go
+4
-4
integration/test-delupd.sh
integration/test-delupd.sh
+3
-3
integration/test-folders.sh
integration/test-folders.sh
+2
-2
integration/test-http.sh
integration/test-http.sh
+2
-2
integration/test-merge.sh
integration/test-merge.sh
+4
-4
luhn/luhn_test.go
luhn/luhn_test.go
+1
-1
model/blockqueue.go
model/blockqueue.go
+1
-1
model/debug.go
model/debug.go
+1
-1
model/model.go
model/model.go
+11
-11
model/model_test.go
model/model_test.go
+13
-13
model/puller.go
model/puller.go
+6
-6
model/tempname.go
model/tempname.go
+1
-1
model/tempname_windows.go
model/tempname_windows.go
+1
-1
protocol/PROTOCOL.md
protocol/PROTOCOL.md
+1
-1
protocol/debug.go
protocol/debug.go
+1
-1
protocol/nodeid.go
protocol/nodeid.go
+1
-1
scanner/blockqueue.go
scanner/blockqueue.go
+1
-1
scanner/blocks.go
scanner/blocks.go
+1
-1
scanner/blocks_test.go
scanner/blocks_test.go
+1
-1
scanner/debug.go
scanner/debug.go
+1
-1
scanner/walk.go
scanner/walk.go
+3
-3
scanner/walk_test.go
scanner/walk_test.go
+2
-2
stats/debug.go
stats/debug.go
+1
-1
stats/node.go
stats/node.go
+1
-1
upgrade/debug.go
upgrade/debug.go
+1
-1
upgrade/upgrade_supported.go
upgrade/upgrade_supported.go
+4
-4
upgrade/upgrade_windows.go
upgrade/upgrade_windows.go
+4
-4
upnp/debug.go
upnp/debug.go
+1
-1
upnp/upnp.go
upnp/upnp.go
+1
-1
versioner/debug.go
versioner/debug.go
+1
-1
versioner/simple.go
versioner/simple.go
+1
-1
versioner/staggered.go
versioner/staggered.go
+1
-1
No files found.
.gitignore
View file @
b28c1410
syncthing
pulse
syncthing
.exe
pulse
.exe
*.tar.gz
*.tar.gz
*.zip
*.zip
*.asc
*.asc
...
...
CONTRIBUTING.md
View file @
b28c1410
## Reporting Bugs
## Reporting Bugs
Please file bugs in the
[
Github Issue
Please file bugs in the
[
Github Issue
Tracker](https://
github.com/syncthing/syncthing
/issues). Include at
Tracker](https://
source.ind.ie/project/pulse
/issues). Include at
least the following:
least the following:
-
What happened
-
What happened
...
@@ -10,7 +10,7 @@ least the following:
...
@@ -10,7 +10,7 @@ least the following:
not crazy obvious
not crazy obvious
-
What operating system, operating system version and version of
-
What operating system, operating system version and version of
Syncthing
you are running
Pulse
you are running
-
The same for other connected nodes, where relevant
-
The same for other connected nodes, where relevant
...
@@ -24,7 +24,7 @@ too much information will never get you yelled at. :)
...
@@ -24,7 +24,7 @@ too much information will never get you yelled at. :)
## Contributing Translations
## Contributing Translations
All translations are done via
All translations are done via
[
Transifex
](
https://www.transifex.com/projects/p/
syncthing
/
)
. If you
[
Transifex
](
https://www.transifex.com/projects/p/
pulse
/
)
. If you
wish to contribute to a translation, just head over there and sign up.
wish to contribute to a translation, just head over there and sign up.
Before every release, the language resources are updated from the
Before every release, the language resources are updated from the
latest info on Transifex.
latest info on Transifex.
...
@@ -33,10 +33,10 @@ latest info on Transifex.
...
@@ -33,10 +33,10 @@ latest info on Transifex.
Please do contribute! If you want to contribute but are unsure where to
Please do contribute! If you want to contribute but are unsure where to
start, the
[
Contributions Needed
start, the
[
Contributions Needed
topic](http://
discourse.syncthing.net
/t/49) lists areas in need of
topic](http://
pulse-forum.ind.ie
/t/49) lists areas in need of
attention. In general, any open issues are fair game! Be prepared for a
attention. In general, any open issues are fair game! Be prepared for a
[
certain amount of
[
certain amount of
review](https://
discourse.syncthing.net
/t/733); it's all in the name of
review](https://
pulse-forum.ind.ie
/t/733); it's all in the name of
quality. :)
quality. :)
## Licensing
## Licensing
...
@@ -52,7 +52,7 @@ to add yourself as a separate commit in your first pull request.
...
@@ -52,7 +52,7 @@ to add yourself as a separate commit in your first pull request.
## Building
## Building
[
See the documentation
](
http://
discourse.syncthing.net
/t/44
)
on how to
[
See the documentation
](
http://
pulse-forum.ind.ie
/t/44
)
on how to
get started with a build environment.
get started with a build environment.
## Branches
## Branches
...
@@ -86,7 +86,7 @@ Yes please!
...
@@ -86,7 +86,7 @@ Yes please!
## Documentation
## Documentation
[
Over here!
](
http://
discourse.syncthing.net
/category/documentation
)
[
Over here!
](
http://
pulse-forum.ind.ie
/category/documentation
)
## License
## License
...
...
Godeps/Godeps.json
View file @
b28c1410
{
{
"ImportPath"
:
"
github.com/syncthing/syncthing
"
,
"ImportPath"
:
"
source.ind.ie/project/pulse
"
,
"GoVersion"
:
"go1.3.1"
,
"GoVersion"
:
"go1.3.1"
,
"Packages"
:
[
"Packages"
:
[
"./cmd/..."
"./cmd/..."
...
...
README.md
View file @
b28c1410
syncthing
pulse
=========
=========
[

](http://build.syncthing.net/job/syncthing
/lastBuild/)
[

](http://build.pulse.net/job/pulse
/lastBuild/)
[

](http://godoc.org/
github.com/syncthing/syncthing
)
[

](http://godoc.org/
source.ind.ie/project/pulse
)
[

](http://opensource.org/licenses/MIT)
[

](http://opensource.org/licenses/MIT)
This is the
`
syncthing
`
project. The following are the project goals:
This is the
`
pulse
`
project. The following are the project goals:
1.
Define a protocol for synchronization of a file repository between a
1.
Define a protocol for synchronization of a file repository between a
number of collaborating nodes. The protocol should be well defined,
number of collaborating nodes. The protocol should be well defined,
unambiguous, easily understood, free to use, efficient, secure and
unambiguous, easily understood, free to use, efficient, secure and
language neutral. This is the
[
Block Exchange
language neutral. This is the
[
Block Exchange
Protocol](https://
github.com/syncthing/syncthing
/blob/master/protocol/PROTOCOL.md).
Protocol](https://
source.ind.ie/project/pulse
/blob/master/protocol/PROTOCOL.md).
2.
Provide the reference implementation to demonstrate the usability of
2.
Provide the reference implementation to demonstrate the usability of
said protocol. This is the
`
syncthing
`
utility. It is the hope that
said protocol. This is the
`
pulse
`
utility. It is the hope that
alternative, compatible implementations of the protocol will come to
alternative, compatible implementations of the protocol will come to
exist.
exist.
The two are evolving together; the protocol is not to be considered
The two are evolving together; the protocol is not to be considered
stable until
syncthing
1.0 is released, at which point it is locked down
stable until
pulse
1.0 is released, at which point it is locked down
for incompatible changes.
for incompatible changes.
Getting Started
Getting Started
---------------
---------------
Take a look at the
[
getting started guide
](
http://
discourse.syncthing.net
/t/46
)
.
Take a look at the
[
getting started guide
](
http://
pulse-forum.ind.ie
/t/46
)
.
Building
Building
--------
--------
Building
Syncthing
from source is easy, and there's a
Building
Pulse
from source is easy, and there's a
[
guide
](
http://
discourse.syncthing.net
/t/44
)
[
guide
](
http://
pulse-forum.ind.ie
/t/44
)
that describes it for both Unix and Windows.
that describes it for both Unix and Windows.
Signed Releases
Signed Releases
...
@@ -45,8 +45,8 @@ md5sum.txt.asc and sha1sum.txt.asc files.
...
@@ -45,8 +45,8 @@ md5sum.txt.asc and sha1sum.txt.asc files.
Documentation
Documentation
=============
=============
The
[
syncthing
The
[
pulse
documentation](http://
discourse.syncthing.net
/category/documentation) is
documentation](http://
pulse-forum.ind.ie
/category/documentation) is
on the discourse site.
on the discourse site.
License
License
...
@@ -57,4 +57,4 @@ under the [Creative Commons Attribution 4.0 International
...
@@ -57,4 +57,4 @@ under the [Creative Commons Attribution 4.0 International
License](http://creativecommons.org/licenses/by/4.0/).
License](http://creativecommons.org/licenses/by/4.0/).
All code is licensed under the
[
MIT
All code is licensed under the
[
MIT
License](https://
github.com/syncthing/syncthing
/blob/master/LICENSE).
License](https://
source.ind.ie/project/pulse
/blob/master/LICENSE).
auto/auto_test.go
View file @
b28c1410
...
@@ -8,7 +8,7 @@ import (
...
@@ -8,7 +8,7 @@ import (
"bytes"
"bytes"
"testing"
"testing"
"
github.com/syncthing/syncthing
/auto"
"
source.ind.ie/project/pulse
/auto"
)
)
func
TestAssets
(
t
*
testing
.
T
)
{
func
TestAssets
(
t
*
testing
.
T
)
{
...
...
auto/gui.files.go
View file @
b28c1410
This source diff could not be displayed because it is too large. You can
view the blob
instead.
beacon/debug.go
View file @
b28c1410
...
@@ -8,7 +8,7 @@ import (
...
@@ -8,7 +8,7 @@ import (
"os"
"os"
"strings"
"strings"
"
github.com/syncthing/syncthing
/logger"
"
source.ind.ie/project/pulse
/logger"
)
)
var
(
var
(
...
...
build.go
View file @
b28c1410
...
@@ -85,7 +85,7 @@ func main() {
...
@@ -85,7 +85,7 @@ func main() {
install
(
pkg
)
install
(
pkg
)
case
"build"
:
case
"build"
:
pkg
:=
"./cmd/
syncthing
"
pkg
:=
"./cmd/
pulse
"
if
flag
.
NArg
()
>
2
{
if
flag
.
NArg
()
>
2
{
pkg
=
flag
.
Arg
(
1
)
pkg
=
flag
.
Arg
(
1
)
}
}
...
@@ -173,7 +173,7 @@ func install(pkg string) {
...
@@ -173,7 +173,7 @@ func install(pkg string) {
}
}
func
build
(
pkg
string
,
tags
[]
string
)
{
func
build
(
pkg
string
,
tags
[]
string
)
{
rmr
(
"
syncthing"
,
"syncthing
.exe"
)
rmr
(
"
pulse"
,
"pulse
.exe"
)
args
:=
[]
string
{
"go"
,
"build"
,
"-ldflags"
,
ldflags
()}
args
:=
[]
string
{
"go"
,
"build"
,
"-ldflags"
,
ldflags
()}
if
len
(
tags
)
>
0
{
if
len
(
tags
)
>
0
{
args
=
append
(
args
,
"-tags"
,
strings
.
Join
(
tags
,
","
))
args
=
append
(
args
,
"-tags"
,
strings
.
Join
(
tags
,
","
))
...
@@ -190,13 +190,13 @@ func buildTar() {
...
@@ -190,13 +190,13 @@ func buildTar() {
tags
=
[]
string
{
"noupgrade"
}
tags
=
[]
string
{
"noupgrade"
}
name
+=
"-noupgrade"
name
+=
"-noupgrade"
}
}
build
(
"./cmd/
syncthing
"
,
tags
)
build
(
"./cmd/
pulse
"
,
tags
)
filename
:=
name
+
".tar.gz"
filename
:=
name
+
".tar.gz"
tarGz
(
filename
,
[]
archiveFile
{
tarGz
(
filename
,
[]
archiveFile
{
{
"README.md"
,
name
+
"/README.txt"
},
{
"README.md"
,
name
+
"/README.txt"
},
{
"LICENSE"
,
name
+
"/LICENSE.txt"
},
{
"LICENSE"
,
name
+
"/LICENSE.txt"
},
{
"CONTRIBUTORS"
,
name
+
"/CONTRIBUTORS.txt"
},
{
"CONTRIBUTORS"
,
name
+
"/CONTRIBUTORS.txt"
},
{
"
syncthing"
,
name
+
"/syncthing
"
},
{
"
pulse"
,
name
+
"/pulse
"
},
})
})
log
.
Println
(
filename
)
log
.
Println
(
filename
)
}
}
...
@@ -208,13 +208,13 @@ func buildZip() {
...
@@ -208,13 +208,13 @@ func buildZip() {
tags
=
[]
string
{
"noupgrade"
}
tags
=
[]
string
{
"noupgrade"
}
name
+=
"-noupgrade"
name
+=
"-noupgrade"
}
}
build
(
"./cmd/
syncthing
"
,
tags
)
build
(
"./cmd/
pulse
"
,
tags
)
filename
:=
name
+
".zip"
filename
:=
name
+
".zip"
zipFile
(
filename
,
[]
archiveFile
{
zipFile
(
filename
,
[]
archiveFile
{
{
"README.md"
,
name
+
"/README.txt"
},
{
"README.md"
,
name
+
"/README.txt"
},
{
"LICENSE"
,
name
+
"/LICENSE.txt"
},
{
"LICENSE"
,
name
+
"/LICENSE.txt"
},
{
"CONTRIBUTORS"
,
name
+
"/CONTRIBUTORS.txt"
},
{
"CONTRIBUTORS"
,
name
+
"/CONTRIBUTORS.txt"
},
{
"
syncthing.exe"
,
name
+
"/syncthing
.exe"
},
{
"
pulse.exe"
,
name
+
"/pulse
.exe"
},
})
})
log
.
Println
(
filename
)
log
.
Println
(
filename
)
}
}
...
@@ -267,7 +267,7 @@ func deps() {
...
@@ -267,7 +267,7 @@ func deps() {
func
clean
()
{
func
clean
()
{
rmr
(
"bin"
,
"Godeps/_workspace/pkg"
,
"Godeps/_workspace/bin"
)
rmr
(
"bin"
,
"Godeps/_workspace/pkg"
,
"Godeps/_workspace/bin"
)
rmr
(
filepath
.
Join
(
os
.
Getenv
(
"GOPATH"
),
fmt
.
Sprintf
(
"pkg/%s_%s/github.com/
syncthing
"
,
goos
,
goarch
)))
rmr
(
filepath
.
Join
(
os
.
Getenv
(
"GOPATH"
),
fmt
.
Sprintf
(
"pkg/%s_%s/github.com/
pulse
"
,
goos
,
goarch
)))
}
}
func
ldflags
()
string
{
func
ldflags
()
string
{
...
@@ -338,7 +338,7 @@ func buildArch() string {
...
@@ -338,7 +338,7 @@ func buildArch() string {
}
}
func
archiveName
()
string
{
func
archiveName
()
string
{
return
fmt
.
Sprintf
(
"
syncthing
-%s-%s"
,
buildArch
(),
version
())
return
fmt
.
Sprintf
(
"
pulse
-%s-%s"
,
buildArch
(),
version
())
}
}
func
run
(
cmd
string
,
args
...
string
)
[]
byte
{
func
run
(
cmd
string
,
args
...
string
)
[]
byte
{
...
...
cmd/.gitignore
View file @
b28c1410
!
syncthing
!
pulse
cmd/
syncthing
/.gitignore
→
cmd/
pulse
/.gitignore
View file @
b28c1410
File moved
cmd/
syncthing
/debug.go
→
cmd/
pulse
/debug.go
View file @
b28c1410
File moved
cmd/
syncthing
/gui.go
→
cmd/
pulse
/gui.go
View file @
b28c1410
...
@@ -21,13 +21,13 @@ import (
...
@@ -21,13 +21,13 @@ import (
"time"
"time"
"code.google.com/p/go.crypto/bcrypt"
"code.google.com/p/go.crypto/bcrypt"
"
github.com/syncthing/syncthing
/auto"
"
source.ind.ie/project/pulse
/auto"
"
github.com/syncthing/syncthing
/config"
"
source.ind.ie/project/pulse
/config"
"
github.com/syncthing/syncthing
/events"
"
source.ind.ie/project/pulse
/events"
"
github.com/syncthing/syncthing
/logger"
"
source.ind.ie/project/pulse
/logger"
"
github.com/syncthing/syncthing
/model"
"
source.ind.ie/project/pulse
/model"
"
github.com/syncthing/syncthing
/protocol"
"
source.ind.ie/project/pulse
/protocol"
"
github.com/syncthing/syncthing
/upgrade"
"
source.ind.ie/project/pulse
/upgrade"
"github.com/vitrun/qart/qr"
"github.com/vitrun/qart/qr"
)
)
...
@@ -65,7 +65,7 @@ func startGUI(cfg config.GUIConfiguration, assetDir string, m *model.Model) erro
...
@@ -65,7 +65,7 @@ func startGUI(cfg config.GUIConfiguration, assetDir string, m *model.Model) erro
}
}
tlsCfg
:=
&
tls
.
Config
{
tlsCfg
:=
&
tls
.
Config
{
Certificates
:
[]
tls
.
Certificate
{
cert
},
Certificates
:
[]
tls
.
Certificate
{
cert
},
ServerName
:
"
syncthing
"
,
ServerName
:
"
pulse
"
,
}
}
rawListener
,
err
:=
net
.
Listen
(
"tcp"
,
cfg
.
Address
)
rawListener
,
err
:=
net
.
Listen
(
"tcp"
,
cfg
.
Address
)
...
@@ -191,7 +191,7 @@ func noCacheMiddleware(h http.Handler) http.Handler {
...
@@ -191,7 +191,7 @@ func noCacheMiddleware(h http.Handler) http.Handler {
func
withVersionMiddleware
(
h
http
.
Handler
)
http
.
Handler
{
func
withVersionMiddleware
(
h
http
.
Handler
)
http
.
Handler
{
return
http
.
HandlerFunc
(
func
(
w
http
.
ResponseWriter
,
r
*
http
.
Request
)
{
return
http
.
HandlerFunc
(
func
(
w
http
.
ResponseWriter
,
r
*
http
.
Request
)
{
w
.
Header
()
.
Set
(
"X-
Syncthing
-Version"
,
Version
)
w
.
Header
()
.
Set
(
"X-
Pulse
-Version"
,
Version
)
h
.
ServeHTTP
(
w
,
r
)
h
.
ServeHTTP
(
w
,
r
)
})
})
}
}
...
...
cmd/
syncthing
/gui_auth.go
→
cmd/
pulse
/gui_auth.go
View file @
b28c1410
...
@@ -14,7 +14,7 @@ import (
...
@@ -14,7 +14,7 @@ import (
"time"
"time"
"code.google.com/p/go.crypto/bcrypt"
"code.google.com/p/go.crypto/bcrypt"
"
github.com/syncthing/syncthing
/config"
"
source.ind.ie/project/pulse
/config"
)
)
var
(
var
(
...
...
cmd/
syncthing
/gui_csrf.go
→
cmd/
pulse
/gui_csrf.go
View file @
b28c1410
...
@@ -16,7 +16,7 @@ import (
...
@@ -16,7 +16,7 @@ import (
"sync"
"sync"
"time"
"time"
"
github.com/syncthing/syncthing
/osutil"
"
source.ind.ie/project/pulse
/osutil"
)
)
var
csrfTokens
[]
string
var
csrfTokens
[]
string
...
...
cmd/
syncthing
/gui_solaris.go
→
cmd/
pulse
/gui_solaris.go
View file @
b28c1410
File moved
cmd/
syncthing
/gui_unix.go
→
cmd/
pulse
/gui_unix.go
View file @
b28c1410
File moved
cmd/
syncthing
/gui_windows.go
→
cmd/
pulse
/gui_windows.go
View file @
b28c1410
File moved
cmd/
syncthing
/heapprof.go
→
cmd/
pulse
/heapprof.go
View file @
b28c1410
File moved
cmd/
syncthing
/limitedreader.go
→
cmd/
pulse
/limitedreader.go
View file @
b28c1410
File moved
cmd/
syncthing
/limitedwriter.go
→
cmd/
pulse
/limitedwriter.go
View file @
b28c1410
File moved
cmd/
syncthing
/main.go
→
cmd/
pulse
/main.go
View file @
b28c1410
...
@@ -27,15 +27,15 @@ import (
...
@@ -27,15 +27,15 @@ import (
"code.google.com/p/go.crypto/bcrypt"
"code.google.com/p/go.crypto/bcrypt"
"github.com/juju/ratelimit"
"github.com/juju/ratelimit"
"
github.com/syncthing/syncthing
/config"
"
source.ind.ie/project/pulse
/config"
"
github.com/syncthing/syncthing
/discover"
"
source.ind.ie/project/pulse
/discover"
"
github.com/syncthing/syncthing
/events"
"
source.ind.ie/project/pulse
/events"
"
github.com/syncthing/syncthing
/files"
"
source.ind.ie/project/pulse
/files"
"
github.com/syncthing/syncthing
/logger"
"
source.ind.ie/project/pulse
/logger"
"
github.com/syncthing/syncthing
/model"
"
source.ind.ie/project/pulse
/model"
"
github.com/syncthing/syncthing
/protocol"
"
source.ind.ie/project/pulse
/protocol"
"
github.com/syncthing/syncthing
/upgrade"
"
source.ind.ie/project/pulse
/upgrade"
"
github.com/syncthing/syncthing
/upnp"
"
source.ind.ie/project/pulse
/upnp"
"github.com/syndtr/goleveldb/leveldb"
"github.com/syndtr/goleveldb/leveldb"
"github.com/syndtr/goleveldb/leveldb/opt"
"github.com/syndtr/goleveldb/leveldb/opt"
)
)
...
@@ -75,7 +75,7 @@ func init() {
...
@@ -75,7 +75,7 @@ func init() {
BuildDate
=
time
.
Unix
(
int64
(
stamp
),
0
)
BuildDate
=
time
.
Unix
(
int64
(
stamp
),
0
)
date
:=
BuildDate
.
UTC
()
.
Format
(
"2006-01-02 15:04:05 MST"
)
date
:=
BuildDate
.
UTC
()
.
Format
(
"2006-01-02 15:04:05 MST"
)
LongVersion
=
fmt
.
Sprintf
(
"
syncthing
%s (%s %s-%s %s) %s@%s %s"
,
Version
,
runtime
.
Version
(),
runtime
.
GOOS
,
runtime
.
GOARCH
,
BuildEnv
,
BuildUser
,
BuildHost
,
date
)
LongVersion
=
fmt
.
Sprintf
(
"
pulse
%s (%s %s-%s %s) %s@%s %s"
,
Version
,
runtime
.
Version
(),
runtime
.
GOOS
,
runtime
.
GOARCH
,
BuildEnv
,
BuildUser
,
BuildHost
,
date
)
if
os
.
Getenv
(
"STTRACE"
)
!=
""
{
if
os
.
Getenv
(
"STTRACE"
)
!=
""
{
logFlags
=
log
.
Ltime
|
log
.
Ldate
|
log
.
Lmicroseconds
|
log
.
Lshortfile
logFlags
=
log
.
Ltime
|
log
.
Ldate
|
log
.
Lmicroseconds
|
log
.
Lshortfile
...
@@ -96,7 +96,7 @@ var (
...
@@ -96,7 +96,7 @@ var (
)
)
const
(
const
(
usage
=
"
syncthing
[options]"
usage
=
"
pulse
[options]"
extraUsage
=
`The value for the -logflags option is a sum of the following:
extraUsage
=
`The value for the -logflags option is a sum of the following:
1 Date
1 Date
...
@@ -109,7 +109,7 @@ I.e. to prefix each log line with date and time, set -logflags=3 (1 + 2 from
...
@@ -109,7 +109,7 @@ I.e. to prefix each log line with date and time, set -logflags=3 (1 + 2 from
above). The value 0 is used to disable all of the above. The default is to
above). The value 0 is used to disable all of the above. The default is to
show time only (2).
show time only (2).
The following enviroment variables are interpreted by
syncthing
:
The following enviroment variables are interpreted by
pulse
:
STGUIADDRESS Override GUI listen address set in config. Expects protocol type
STGUIADDRESS Override GUI listen address set in config. Expects protocol type
followed by hostname or an IP address, followed by a port, such
followed by hostname or an IP address, followed by a port, such
...
@@ -249,7 +249,7 @@ func main() {
...
@@ -249,7 +249,7 @@ func main() {
// Use leveldb database locks to protect against concurrent upgrades
// Use leveldb database locks to protect against concurrent upgrades
_
,
err
=
leveldb
.
OpenFile
(
filepath
.
Join
(
confDir
,
"index"
),
&
opt
.
Options
{
CachedOpenFiles
:
100
})
_
,
err
=
leveldb
.
OpenFile
(
filepath
.
Join
(
confDir
,
"index"
),
&
opt
.
Options
{
CachedOpenFiles
:
100
})
if
err
!=
nil
{
if
err
!=
nil
{
l
.
Fatalln
(
"Cannot upgrade, database seems to be locked. Is another copy of
Syncthing
already running?"
)
l
.
Fatalln
(
"Cannot upgrade, database seems to be locked. Is another copy of
Pulse
already running?"
)
}
}
err
=
upgrade
.
UpgradeTo
(
rel
,
GoArchExtra
)
err
=
upgrade
.
UpgradeTo
(
rel
,
GoArchExtra
)
...
@@ -269,13 +269,13 @@ func main() {
...
@@ -269,13 +269,13 @@ func main() {
}
}
if
os
.
Getenv
(
"STNORESTART"
)
!=
""
{
if
os
.
Getenv
(
"STNORESTART"
)
!=
""
{
syncthing
Main
()
pulse
Main
()
}
else
{
}
else
{
monitorMain
()
monitorMain
()
}
}
}
}
func
syncthing
Main
()
{
func
pulse
Main
()
{
var
err
error
var
err
error
if
len
(
os
.
Getenv
(
"GOGC"
))
==
0
{
if
len
(
os
.
Getenv
(
"GOGC"
))
==
0
{
...
@@ -290,16 +290,16 @@ func syncthingMain() {
...
@@ -290,16 +290,16 @@ func syncthingMain() {
if
_
,
err
=
os
.
Stat
(
confDir
);
err
!=
nil
&&
confDir
==
getDefaultConfDir
()
{
if
_
,
err
=
os
.
Stat
(
confDir
);
err
!=
nil
&&
confDir
==
getDefaultConfDir
()
{
// We are supposed to use the default configuration directory. It
// We are supposed to use the default configuration directory. It
// doesn't exist. In the past our default has been ~/.
syncthing
, so if
// doesn't exist. In the past our default has been ~/.
pulse
, so if
// that directory exists we move it to the new default location and
// that directory exists we move it to the new default location and
// continue. We don't much care if this fails at this point, we will
// continue. We don't much care if this fails at this point, we will
// be checking that later.
// be checking that later.
var
oldDefault
string
var
oldDefault
string
if
runtime
.
GOOS
==
"windows"
{
if
runtime
.
GOOS
==
"windows"
{
oldDefault
=
filepath
.
Join
(
os
.
Getenv
(
"AppData"
),
"
Syncthing
"
)
oldDefault
=
filepath
.
Join
(
os
.
Getenv
(
"AppData"
),
"
Pulse
"
)
}
else
{
}
else
{
oldDefault
=
expandTilde
(
"~/.
syncthing
"
)
oldDefault
=
expandTilde
(
"~/.
pulse
"
)
}
}
if
_
,
err
:=
os
.
Stat
(
oldDefault
);
err
==
nil
{
if
_
,
err
:=
os
.
Stat
(
oldDefault
);
err
==
nil
{
os
.
MkdirAll
(
filepath
.
Dir
(
confDir
),
0700
)
os
.
MkdirAll
(
filepath
.
Dir
(
confDir
),
0700
)
...
@@ -419,7 +419,7 @@ func syncthingMain() {
...
@@ -419,7 +419,7 @@ func syncthingMain() {
db
,
err
:=
leveldb
.
OpenFile
(
filepath
.
Join
(
confDir
,
"index"
),
&
opt
.
Options
{
CachedOpenFiles
:
100
})
db
,
err
:=
leveldb
.
OpenFile
(
filepath
.
Join
(
confDir
,
"index"
),
&
opt
.
Options
{
CachedOpenFiles
:
100
})
if
err
!=
nil
{
if
err
!=
nil
{
l
.
Fatalln
(
"Cannot open database:"
,
err
,
"- Is another copy of
Syncthing
already running?"
)
l
.
Fatalln
(
"Cannot open database:"
,
err
,
"- Is another copy of
Pulse
already running?"
)
}
}
// Remove database entries for repos that no longer exist in the config
// Remove database entries for repos that no longer exist in the config
...
@@ -431,7 +431,7 @@ func syncthingMain() {
...
@@ -431,7 +431,7 @@ func syncthingMain() {
}
}
}
}
m
:=
model
.
NewModel
(
confDir
,
&
cfg
,
myName
,
"
syncthing
"
,
Version
,
db
)
m
:=
model
.
NewModel
(
confDir
,
&
cfg
,
myName
,
"
pulse
"
,
Version
,
db
)
nextRepo
:
nextRepo
:
for
i
,
repo
:=
range
cfg
.
Repositories
{
for
i
,
repo
:=
range
cfg
.
Repositories
{
...
@@ -673,7 +673,7 @@ func setupExternalPort(igd *upnp.IGD, port int) int {
...
@@ -673,7 +673,7 @@ func setupExternalPort(igd *upnp.IGD, port int) int {
rnd
:=
rand
.
NewSource
(
certSeed
(
cert
.
Certificate
[
0
]))
rnd
:=
rand
.
NewSource
(
certSeed
(
cert
.
Certificate
[
0
]))
for
i
:=
0
;
i
<
10
;
i
++
{
for
i
:=
0
;
i
<
10
;
i
++
{
r
:=
1024
+
int
(
rnd
.
Int63
()
%
(
65535
-
1024
))
r
:=
1024
+
int
(
rnd
.
Int63
()
%
(
65535
-
1024
))
err
:=
igd
.
AddPortMapping
(
upnp
.
TCP
,
r
,
port
,
"
syncthing
"
,
cfg
.
Options
.
UPnPLease
*
60
)
err
:=
igd
.
AddPortMapping
(
upnp
.
TCP
,
r
,
port
,
"
pulse
"
,
cfg
.
Options
.
UPnPLease
*
60
)
if
err
==
nil
{
if
err
==
nil
{
return
r
return
r
}
}
...
@@ -692,7 +692,7 @@ func renewUPnP(port int) {
...
@@ -692,7 +692,7 @@ func renewUPnP(port int) {
// Just renew the same port that we already have
// Just renew the same port that we already have
if
externalPort
!=
0
{
if
externalPort
!=
0
{
err
=
igd
.
AddPortMapping
(
upnp
.
TCP
,
externalPort
,
port
,
"
syncthing
"
,
cfg
.
Options
.
UPnPLease
*
60
)
err
=
igd
.
AddPortMapping
(
upnp
.
TCP
,
externalPort
,
port
,
"
pulse
"
,
cfg
.
Options
.
UPnPLease
*
60
)
if
err
==
nil
{
if
err
==
nil
{
l
.
Infoln
(
"Renewed UPnP port mapping - external port"
,
externalPort
)
l
.
Infoln
(
"Renewed UPnP port mapping - external port"
,
externalPort
)
continue
continue
...
@@ -715,7 +715,7 @@ func renewUPnP(port int) {
...
@@ -715,7 +715,7 @@ func renewUPnP(port int) {
}
}
func
resetRepositories
()
{
func
resetRepositories
()
{
suffix
:=
fmt
.
Sprintf
(
".
syncthing
-reset-%d"
,
time
.
Now
()
.
UnixNano
())
suffix
:=
fmt
.
Sprintf
(
".
pulse
-reset-%d"
,
time
.
Now
()
.
UnixNano
())
for
_
,
repo
:=
range
cfg
.
Repositories
{
for
_
,
repo
:=
range
cfg
.
Repositories
{
if
_
,
err
:=
os
.
Stat
(
repo
.
Directory
);
err
==
nil
{
if
_
,
err
:=
os
.
Stat
(
repo
.
Directory
);
err
==
nil
{
l
.
Infof
(
"Reset: Moving %s -> %s"
,
repo
.
Directory
,
repo
.
Directory
+
suffix
)
l
.
Infof
(
"Reset: Moving %s -> %s"
,
repo
.
Directory
,
repo
.
Directory
+
suffix
)
...
@@ -810,11 +810,11 @@ next:
...
@@ -810,11 +810,11 @@ next:
for
_
,
nodeCfg
:=
range
cfg
.
Nodes
{
for
_
,
nodeCfg
:=
range
cfg
.
Nodes
{
if
nodeCfg
.
NodeID
==
remoteID
{
if
nodeCfg
.
NodeID
==
remoteID
{
// Verify the name on the certificate. By default we set it to
// Verify the name on the certificate. By default we set it to
// "
syncthing
" when generating, but the user may have replaced
// "
pulse
" when generating, but the user may have replaced
// the certificate and used another name.
// the certificate and used another name.
certName
:=
nodeCfg
.
CertName
certName
:=
nodeCfg
.
CertName
if
certName
==
""
{
if
certName
==
""
{
certName
=
"
syncthing
"
certName
=
"
pulse
"
}
}
err
:=
remoteCert
.
VerifyHostname
(
certName
)
err
:=
remoteCert
.
VerifyHostname
(
certName
)
if
err
!=
nil
{
if
err
!=
nil
{
...
@@ -1036,16 +1036,16 @@ func ensureDir(dir string, mode int) {
...
@@ -1036,16 +1036,16 @@ func ensureDir(dir string, mode int) {
func
getDefaultConfDir
()
string
{
func
getDefaultConfDir
()
string
{
switch
runtime
.
GOOS
{
switch
runtime
.
GOOS
{
case
"windows"
:
case
"windows"
:
return
filepath
.
Join
(
os
.
Getenv
(
"LocalAppData"
),
"
Syncthing
"
)
return
filepath
.
Join
(
os
.
Getenv
(
"LocalAppData"
),
"
Pulse
"
)
case
"darwin"
:
case
"darwin"
:
return
expandTilde
(
"~/Library/Application Support/
Syncthing
"
)
return
expandTilde
(
"~/Library/Application Support/
Pulse
"
)
default
:
default
:
if
xdgCfg
:=
os
.
Getenv
(
"XDG_CONFIG_HOME"
);
xdgCfg
!=
""
{
if
xdgCfg
:=
os
.
Getenv
(
"XDG_CONFIG_HOME"
);
xdgCfg
!=
""
{
return
filepath
.
Join
(
xdgCfg
,
"
syncthing
"
)
return
filepath
.
Join
(
xdgCfg
,
"
pulse
"
)
}
else
{
}
else
{
return
expandTilde
(
"~/.config/
syncthing
"
)
return
expandTilde
(
"~/.config/
pulse
"
)
}
}
}
}
}
}
...
...
cmd/
syncthing
/main_test.go
→
cmd/
pulse
/main_test.go
View file @
b28c1410
File moved
cmd/
syncthing
/memsize_darwin.go
→
cmd/
pulse
/memsize_darwin.go
View file @
b28c1410
File moved
cmd/
syncthing
/memsize_linux.go
→
cmd/
pulse
/memsize_linux.go
View file @
b28c1410
File moved
cmd/
syncthing
/memsize_solaris.go
→
cmd/
pulse
/memsize_solaris.go
View file @
b28c1410
File moved
cmd/
syncthing
/memsize_unimpl.go
→
cmd/
pulse
/memsize_unimpl.go
View file @
b28c1410
File moved
cmd/
syncthing
/memsize_windows.go
→
cmd/
pulse
/memsize_windows.go
View file @
b28c1410
File moved
cmd/
syncthing
/monitor.go
→
cmd/
pulse
/monitor.go
View file @
b28c1410
...
@@ -60,7 +60,7 @@ func monitorMain() {
...
@@ -60,7 +60,7 @@ func monitorMain() {
l
.
Fatalln
(
err
)
l
.
Fatalln
(
err
)
}
}
l
.
Infoln
(
"Starting
syncthing
"
)
l
.
Infoln
(
"Starting
pulse
"
)
err
=
cmd
.
Start
()
err
=
cmd
.
Start
()
if
err
!=
nil
{
if
err
!=
nil
{
l
.
Fatalln
(
err
)
l
.
Fatalln
(
err
)
...
@@ -109,7 +109,7 @@ func monitorMain() {
...
@@ -109,7 +109,7 @@ func monitorMain() {
}
}
}
}
l
.
Infoln
(
"
Syncthing
exited:"
,
err
)
l
.
Infoln
(
"
Pulse
exited:"
,
err
)
time
.
Sleep
(
1
*
time
.
Second
)
time
.
Sleep
(
1
*
time
.
Second
)
// Let the next child process know that this is not the first time
// Let the next child process know that this is not the first time
...
@@ -139,7 +139,7 @@ func copyStderr(stderr io.ReadCloser) {
...
@@ -139,7 +139,7 @@ func copyStderr(stderr io.ReadCloser) {
}
}
l
.
Warnf
(
"Panic detected, writing to
\"
%s
\"
"
,
panicFd
.
Name
())
l
.
Warnf
(
"Panic detected, writing to
\"
%s
\"
"
,
panicFd
.
Name
())