Code Monkey home page Code Monkey logo

cli-client's Introduction

Sentinel CLI Client

Go GoReport Licence Tag TotalLines

Install dependencies

Linux

sudo apt-get update && \
sudo apt-get install curl openresolv wireguard-tools && \
sudo sh -c "curl -fsLS https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh | bash -s -- --version v5.2.1"

Mac

brew install v2ray wireguard-tools

or

port install v2ray wireguard-tools

Install Sentinel CLI client

curl --silent https://raw.githubusercontent.com/sentinel-official/cli-client/master/scripts/install.sh | sh

Connect to a dVPN node

  1. Create or recover a key

    Need not perform this step again in case you have already done it once.

    sentinelcli keys add \
        --home "${HOME}/.sentinelcli" \
        --keyring-backend file \
        <KEY_NAME>

    Pass flag --recover to recover the key.

  2. Query the active nodes and choose one

    sentinelcli query nodes \
        --home "${HOME}/.sentinelcli" \
        --node https://rpc.sentinel.co:443 \
        --status Active \
        --page 1

    Increase the page number to get more nodes

  3. Subscribe to a node

    sentinelcli tx subscription subscribe-to-node \
        --home "${HOME}/.sentinelcli" \
        --keyring-backend file \
        --chain-id sentinelhub-2 \
        --node https://rpc.sentinel.co:443 \
        --gas-prices 0.1udvpn \
        --from <KEY_NAME> <NODE_ADDRESS> <DEPOSIT>
  4. Query the active subscriptions of your account address

    sentinelcli query subscriptions \
        --home "${HOME}/.sentinelcli" \
        --node https://rpc.sentinel.co:443 \
        --status Active \
        --page 1 \
        --address <ACCOUNT_ADDRESS>
  5. Connect

    sudo sentinelcli connect \
        --home "${HOME}/.sentinelcli" \
        --keyring-backend file \
        --chain-id sentinelhub-2 \
        --node https://rpc.sentinel.co:443 \
        --gas-prices 0.1udvpn \
        --yes \
        --from <KEY_NAME> <SUBSCRIPTION_ID> <NODE_ADDRESS>

Disconnect from a dVPN node

  1. Disconnect

    sudo sentinelcli disconnect \
        --home "${HOME}/.sentinelcli"

Click here to know more!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.