mirror of
https://github.com/octoleo/syncthing.git
synced 2025-01-10 18:24:44 +00:00
Merge pull request #2203 from calmh/discoport
Local discovery should use the same port on v4 as v6 (fixes #2201)
This commit is contained in:
commit
4d12df5424
@ -217,7 +217,7 @@ type OptionsConfiguration struct {
|
|||||||
GlobalAnnServers []string `xml:"globalAnnounceServer" json:"globalAnnounceServers" json:"globalAnnounceServer" default:"udp4://announce.syncthing.net:22027, udp6://announce-v6.syncthing.net:22027"`
|
GlobalAnnServers []string `xml:"globalAnnounceServer" json:"globalAnnounceServers" json:"globalAnnounceServer" default:"udp4://announce.syncthing.net:22027, udp6://announce-v6.syncthing.net:22027"`
|
||||||
GlobalAnnEnabled bool `xml:"globalAnnounceEnabled" json:"globalAnnounceEnabled" default:"true"`
|
GlobalAnnEnabled bool `xml:"globalAnnounceEnabled" json:"globalAnnounceEnabled" default:"true"`
|
||||||
LocalAnnEnabled bool `xml:"localAnnounceEnabled" json:"localAnnounceEnabled" default:"true"`
|
LocalAnnEnabled bool `xml:"localAnnounceEnabled" json:"localAnnounceEnabled" default:"true"`
|
||||||
LocalAnnPort int `xml:"localAnnouncePort" json:"localAnnouncePort" default:"21025"`
|
LocalAnnPort int `xml:"localAnnouncePort" json:"localAnnouncePort" default:"21027"`
|
||||||
LocalAnnMCAddr string `xml:"localAnnounceMCAddr" json:"localAnnounceMCAddr" default:"[ff12::8384]:21027"`
|
LocalAnnMCAddr string `xml:"localAnnounceMCAddr" json:"localAnnounceMCAddr" default:"[ff12::8384]:21027"`
|
||||||
RelayServers []string `xml:"relayServer" json:"relayServers" default:"dynamic+https://relays.syncthing.net"`
|
RelayServers []string `xml:"relayServer" json:"relayServers" default:"dynamic+https://relays.syncthing.net"`
|
||||||
MaxSendKbps int `xml:"maxSendKbps" json:"maxSendKbps"`
|
MaxSendKbps int `xml:"maxSendKbps" json:"maxSendKbps"`
|
||||||
@ -509,6 +509,11 @@ func convertV11V12(cfg *Configuration) {
|
|||||||
cfg.Options.LocalAnnMCAddr = "[ff12::8384]:21027"
|
cfg.Options.LocalAnnMCAddr = "[ff12::8384]:21027"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Use new local discovery port
|
||||||
|
if cfg.Options.LocalAnnPort == 21025 {
|
||||||
|
cfg.Options.LocalAnnPort = 21027
|
||||||
|
}
|
||||||
|
|
||||||
cfg.Version = 12
|
cfg.Version = 12
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ func TestDefaultValues(t *testing.T) {
|
|||||||
GlobalAnnServers: []string{"udp4://announce.syncthing.net:22027", "udp6://announce-v6.syncthing.net:22027"},
|
GlobalAnnServers: []string{"udp4://announce.syncthing.net:22027", "udp6://announce-v6.syncthing.net:22027"},
|
||||||
GlobalAnnEnabled: true,
|
GlobalAnnEnabled: true,
|
||||||
LocalAnnEnabled: true,
|
LocalAnnEnabled: true,
|
||||||
LocalAnnPort: 21025,
|
LocalAnnPort: 21027,
|
||||||
LocalAnnMCAddr: "[ff12::8384]:21027",
|
LocalAnnMCAddr: "[ff12::8384]:21027",
|
||||||
RelayServers: []string{"dynamic+https://relays.syncthing.net"},
|
RelayServers: []string{"dynamic+https://relays.syncthing.net"},
|
||||||
MaxSendKbps: 0,
|
MaxSendKbps: 0,
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
<listenAddress>tcp://127.0.0.1:22002</listenAddress>
|
<listenAddress>tcp://127.0.0.1:22002</listenAddress>
|
||||||
<globalAnnounceServer>udp4://announce.syncthing.net:22027</globalAnnounceServer>
|
<globalAnnounceServer>udp4://announce.syncthing.net:22027</globalAnnounceServer>
|
||||||
<globalAnnounceServer>udp6://announce-v6.syncthing.net:22027</globalAnnounceServer>
|
<globalAnnounceServer>udp6://announce-v6.syncthing.net:22027</globalAnnounceServer>
|
||||||
<globalAnnounceEnabled>false</globalAnnounceEnabled>
|
<globalAnnounceEnabled>true</globalAnnounceEnabled>
|
||||||
<localAnnounceEnabled>true</localAnnounceEnabled>
|
<localAnnounceEnabled>true</localAnnounceEnabled>
|
||||||
<localAnnouncePort>21025</localAnnouncePort>
|
<localAnnouncePort>21025</localAnnouncePort>
|
||||||
<localAnnounceMCAddr>[ff12::8384]:21027</localAnnounceMCAddr>
|
<localAnnounceMCAddr>[ff12::8384]:21027</localAnnounceMCAddr>
|
||||||
|
Loading…
Reference in New Issue
Block a user