-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
skywire-cli vpn
subcommands + separate-systray (#1317)
* add flags for skywire-cli vpn list * remove accidentally included files * establish transport before starting VPN * update vpn list cli command logic * add skywire-cli vpn stop after successful tests with skywire-cli vpn start ; fix make check errors * improve detection of vpn-client app config in api with range loop instead of hardcoding index ; make format check * remove extra logging from cmd/skywire-visor/commands/root.go * make separate-systray work with vpn cli commands * update cmd/skywire-cli/commands/vpn/vvpn.go * add version flag for skywire-cli ; filter results of skywire-cli vpn list by buildinfo.Version() instead of hardcoded version by default * update cmd/skywire-systray/skywire-systray.go to match restructured skywire-cli subcommands * make format check * skywire-cli visor vpn list query filtering * comment out query filtering ; make format check
- Loading branch information
Showing
29 changed files
with
903 additions
and
311 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package clirpc | ||
|
||
import ( | ||
"net" | ||
"time" | ||
|
||
"github.com/skycoin/skywire-utilities/pkg/logging" | ||
"github.com/skycoin/skywire/pkg/visor" | ||
) | ||
|
||
var ( | ||
logger = logging.MustGetLogger("skywire-cli") | ||
//Addr is the address (ip:port) of the rpc server | ||
Addr string | ||
) | ||
|
||
// Client is used by other skywire-cli commands to query the visor rpc | ||
func Client() visor.API { | ||
const rpcDialTimeout = time.Second * 5 | ||
conn, err := net.DialTimeout("tcp", Addr, rpcDialTimeout) | ||
if err != nil { | ||
logger.Fatal("RPC connection failed; is skywire running?\n", err) | ||
} | ||
return visor.NewRPCClient(logger, conn, visor.RPCPrefix, 0) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.