diff options
author | Jakob Borg <jakob@nym.se> | 2014-05-22 09:35:54 +0200 |
---|---|---|
committer | Jakob Borg <jakob@nym.se> | 2014-05-22 09:35:54 +0200 |
commit | ae0193b724823138149836975dd9a11790d99c21 (patch) | |
tree | 342ad17eebd8d3564fc8d7dba2a7f4cc2b27a882 /config | |
parent | 2e1c33206f1840d1231e23d22e98b7470c0274c0 (diff) |
Configurable local announcement port (fixes #256)
Diffstat (limited to 'config')
-rw-r--r-- | config/config.go | 1 | ||||
-rw-r--r-- | config/config_test.go | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/config/config.go b/config/config.go index a084919539..37c79ad3ac 100644 --- a/config/config.go +++ b/config/config.go @@ -55,6 +55,7 @@ type OptionsConfiguration struct { GlobalAnnServer string `xml:"globalAnnounceServer" default:"announce.syncthing.net:22025"` GlobalAnnEnabled bool `xml:"globalAnnounceEnabled" default:"true"` LocalAnnEnabled bool `xml:"localAnnounceEnabled" default:"true"` + LocalAnnPort int `xml:"localAnnouncePort" default:"21025"` ParallelRequests int `xml:"parallelRequests" default:"16"` MaxSendKbps int `xml:"maxSendKbps"` RescanIntervalS int `xml:"rescanIntervalS" default:"60"` diff --git a/config/config_test.go b/config/config_test.go index ece912f110..34f5f70616 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -14,6 +14,7 @@ func TestDefaultValues(t *testing.T) { GlobalAnnServer: "announce.syncthing.net:22025", GlobalAnnEnabled: true, LocalAnnEnabled: true, + LocalAnnPort: 21025, ParallelRequests: 16, MaxSendKbps: 0, RescanIntervalS: 60, @@ -145,6 +146,7 @@ func TestOverriddenValues(t *testing.T) { <globalAnnounceServer>syncthing.nym.se:22025</globalAnnounceServer> <globalAnnounceEnabled>false</globalAnnounceEnabled> <localAnnounceEnabled>false</localAnnounceEnabled> + <localAnnouncePort>42123</localAnnouncePort> <parallelRequests>32</parallelRequests> <maxSendKbps>1234</maxSendKbps> <rescanIntervalS>600</rescanIntervalS> @@ -161,6 +163,7 @@ func TestOverriddenValues(t *testing.T) { GlobalAnnServer: "syncthing.nym.se:22025", GlobalAnnEnabled: false, LocalAnnEnabled: false, + LocalAnnPort: 42123, ParallelRequests: 32, MaxSendKbps: 1234, RescanIntervalS: 600, |