join.go 657 B

123456789101112131415161718192021222324252627282930
  1. package cmd
  2. import (
  3. "github.com/mudler/edgevpn/pkg/edgevpn"
  4. "github.com/urfave/cli"
  5. )
  6. func Join() cli.Command {
  7. return cli.Command{
  8. Name: "join",
  9. Usage: "Join the network without activating any interface",
  10. Description: `Connect over the p2p network without establishing a VPN.
  11. Useful for setting up relays or hop nodes to improve the network connectivity.`,
  12. UsageText: "edgevpn join",
  13. Flags: CommonFlags,
  14. Action: func(c *cli.Context) error {
  15. e := edgevpn.New(cliToOpts(c)...)
  16. displayStart(e)
  17. // Join the node to the network, using our ledger
  18. if err := e.Join(); err != nil {
  19. return err
  20. }
  21. for {
  22. }
  23. },
  24. }
  25. }