mirror of
https://github.com/tailscale/tailscale.git
synced 2025-12-28 08:13:11 +00:00
ipn: move Options.ServerURL into Prefs.
We can't rely on a frontend to provide a control server URL, so this naturally belongs in server-persisted state. Signed-off-by: David Anderson <dave@natulte.net>
This commit is contained in:
committed by
Dave Anderson
parent
45d687e213
commit
cf1e386cbd
@@ -78,6 +78,7 @@ func main() {
|
||||
// TODO(apenwarr): fix different semantics between prefs and uflags
|
||||
// TODO(apenwarr): allow setting/using CorpDNS
|
||||
prefs := ipn.Prefs{
|
||||
ControlURL: *server,
|
||||
WantRunning: true,
|
||||
RouteAll: *routeall,
|
||||
AllowSingleHosts: !*nuroutes,
|
||||
@@ -106,8 +107,7 @@ func main() {
|
||||
bc := ipn.NewBackendClient(log.Printf, clientToServer)
|
||||
bc.SetPrefs(prefs)
|
||||
opts := ipn.Options{
|
||||
StateKey: globalStateKey,
|
||||
ServerURL: *server,
|
||||
StateKey: globalStateKey,
|
||||
Notify: func(n ipn.Notify) {
|
||||
if n.ErrMessage != nil {
|
||||
log.Fatalf("backend error: %v\n", *n.ErrMessage)
|
||||
|
||||
Reference in New Issue
Block a user