server: fix build
This commit is contained in:
parent
bb701a0b0b
commit
122e1a87ce
|
@ -82,7 +82,6 @@ func New(cfg Config) (*Server, error) {
|
|||
cfg: &cfg,
|
||||
|
||||
db: db,
|
||||
tor: t,
|
||||
|
||||
rpcS: rpcs,
|
||||
rpcAddr: l.Addr().String(),
|
||||
|
@ -196,11 +195,6 @@ func (s *Server) restore() error {
|
|||
return err
|
||||
}
|
||||
|
||||
_, err = s.tor.AddOnion(pKey, 80, "127.0.0.1:"+s.cfg.WebPort)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
log.Printf("added: %s (%s)", rt.Hostname, rt.OnionHostname)
|
||||
}
|
||||
|
||||
|
@ -234,12 +228,6 @@ func (rs *RPCServer) AddHost(req routerpc.AddHostRequest, resp *routerpc.AddHost
|
|||
return errors.New("there must be a 1024 bit RSA private key")
|
||||
}
|
||||
|
||||
oi, err := rs.tor.AddOnion(pKey, 80, "127.0.0.1:"+rs.cfg.WebPort)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
resp.OnionHostname = oi.OnionID + ".onion"
|
||||
resp.Token = token
|
||||
resp.PrivKey = pKey
|
||||
|
||||
|
@ -249,7 +237,7 @@ func (rs *RPCServer) AddHost(req routerpc.AddHostRequest, resp *routerpc.AddHost
|
|||
resp.Hostname = elfs.MakeName() + rs.cfg.DomainSuffix
|
||||
}
|
||||
|
||||
err = rs.db.SaveRoute(resp)
|
||||
err := rs.db.SaveRoute(resp)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue