mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2024-12-01 19:41:35 +00:00
update admin socket error message and run gofmt
This commit is contained in:
parent
face270298
commit
bf90447cc4
@ -245,7 +245,7 @@ func (a *admin) listen() {
|
|||||||
case "tcp":
|
case "tcp":
|
||||||
a.listener, err = net.Listen("tcp", u.Host)
|
a.listener, err = net.Listen("tcp", u.Host)
|
||||||
default:
|
default:
|
||||||
err = errors.New("protocol not supported")
|
err = errors.New(fmt.Sprint("protocol not supported: ", u.Scheme))
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
a.listener, err = net.Listen("tcp", a.listenaddr)
|
a.listener, err = net.Listen("tcp", a.listenaddr)
|
||||||
|
@ -5,7 +5,7 @@ package defaults
|
|||||||
// for the platform being targeted. They must be set.
|
// for the platform being targeted. They must be set.
|
||||||
type platformDefaultParameters struct {
|
type platformDefaultParameters struct {
|
||||||
// Admin socket
|
// Admin socket
|
||||||
DefaultAdminListen string
|
DefaultAdminListen string
|
||||||
|
|
||||||
// TUN/TAP
|
// TUN/TAP
|
||||||
MaximumIfMTU int
|
MaximumIfMTU int
|
||||||
|
@ -6,13 +6,13 @@ package defaults
|
|||||||
// may be replaced by the running configuration.
|
// may be replaced by the running configuration.
|
||||||
func GetDefaults() platformDefaultParameters {
|
func GetDefaults() platformDefaultParameters {
|
||||||
return platformDefaultParameters{
|
return platformDefaultParameters{
|
||||||
// Admin
|
// Admin
|
||||||
DefaultAdminListen: "tcp://localhost:9001",
|
DefaultAdminListen: "tcp://localhost:9001",
|
||||||
|
|
||||||
// TUN/TAP
|
// TUN/TAP
|
||||||
MaximumIfMTU: 65535,
|
MaximumIfMTU: 65535,
|
||||||
DefaultIfMTU: 65535,
|
DefaultIfMTU: 65535,
|
||||||
DefaultIfName: "auto",
|
DefaultIfName: "auto",
|
||||||
DefaultIfTAPMode: false,
|
DefaultIfTAPMode: false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,13 +6,13 @@ package defaults
|
|||||||
// may be replaced by the running configuration.
|
// may be replaced by the running configuration.
|
||||||
func GetDefaults() platformDefaultParameters {
|
func GetDefaults() platformDefaultParameters {
|
||||||
return platformDefaultParameters{
|
return platformDefaultParameters{
|
||||||
// Admin
|
// Admin
|
||||||
DefaultAdminListen: "tcp://localhost:9001",
|
DefaultAdminListen: "tcp://localhost:9001",
|
||||||
|
|
||||||
// TUN/TAP
|
// TUN/TAP
|
||||||
MaximumIfMTU: 65535,
|
MaximumIfMTU: 65535,
|
||||||
DefaultIfMTU: 65535,
|
DefaultIfMTU: 65535,
|
||||||
DefaultIfName: "auto",
|
DefaultIfName: "auto",
|
||||||
DefaultIfTAPMode: false,
|
DefaultIfTAPMode: false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,13 +6,13 @@ package defaults
|
|||||||
// may be replaced by the running configuration.
|
// may be replaced by the running configuration.
|
||||||
func GetDefaults() platformDefaultParameters {
|
func GetDefaults() platformDefaultParameters {
|
||||||
return platformDefaultParameters{
|
return platformDefaultParameters{
|
||||||
// Admin
|
// Admin
|
||||||
DefaultAdminListen: "tcp://localhost:9001",
|
DefaultAdminListen: "tcp://localhost:9001",
|
||||||
|
|
||||||
// TUN/TAP
|
// TUN/TAP
|
||||||
MaximumIfMTU: 65535,
|
MaximumIfMTU: 65535,
|
||||||
DefaultIfMTU: 65535,
|
DefaultIfMTU: 65535,
|
||||||
DefaultIfName: "none",
|
DefaultIfName: "none",
|
||||||
DefaultIfTAPMode: false,
|
DefaultIfTAPMode: false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,13 +6,13 @@ package defaults
|
|||||||
// may be replaced by the running configuration.
|
// may be replaced by the running configuration.
|
||||||
func GetDefaults() platformDefaultParameters {
|
func GetDefaults() platformDefaultParameters {
|
||||||
return platformDefaultParameters{
|
return platformDefaultParameters{
|
||||||
// Admin
|
// Admin
|
||||||
DefaultAdminListen: "tcp://localhost:9001",
|
DefaultAdminListen: "tcp://localhost:9001",
|
||||||
|
|
||||||
// TUN/TAP
|
// TUN/TAP
|
||||||
MaximumIfMTU: 65535,
|
MaximumIfMTU: 65535,
|
||||||
DefaultIfMTU: 65535,
|
DefaultIfMTU: 65535,
|
||||||
DefaultIfName: "auto",
|
DefaultIfName: "auto",
|
||||||
DefaultIfTAPMode: true,
|
DefaultIfTAPMode: true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user