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
51 lines
1.1 KiB
Go
51 lines
1.1 KiB
Go
// Copyright (C) 2016 The Syncthing Authors.
|
|
//
|
|
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
// You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
package main
|
|
|
|
import (
|
|
"github.com/syncthing/syncthing/lib/config"
|
|
"github.com/syncthing/syncthing/lib/protocol"
|
|
)
|
|
|
|
type mockedConfig struct {
|
|
gui config.GUIConfiguration
|
|
}
|
|
|
|
func (c *mockedConfig) GUI() config.GUIConfiguration {
|
|
return c.gui
|
|
}
|
|
|
|
func (c *mockedConfig) ListenAddresses() []string {
|
|
return nil
|
|
}
|
|
|
|
func (c *mockedConfig) Raw() config.Configuration {
|
|
return config.Configuration{}
|
|
}
|
|
|
|
func (c *mockedConfig) Options() config.OptionsConfiguration {
|
|
return config.OptionsConfiguration{}
|
|
}
|
|
|
|
func (c *mockedConfig) Replace(cfg config.Configuration) config.CommitResponse {
|
|
return config.CommitResponse{}
|
|
}
|
|
|
|
func (c *mockedConfig) Subscribe(cm config.Committer) {}
|
|
|
|
func (c *mockedConfig) Folders() map[string]config.FolderConfiguration {
|
|
return nil
|
|
}
|
|
|
|
func (c *mockedConfig) Devices() map[protocol.DeviceID]config.DeviceConfiguration {
|
|
return nil
|
|
}
|
|
|
|
func (c *mockedConfig) Save() error {
|
|
return nil
|
|
}
|