Skip to content

be-io/mesh

Repository files navigation

logo

Mesh: A lightweight, distributed, relational network architecture for MPC

Financial Contributors on Open Collective codecov license

Private Transmission Protocol -- PTP/1.0 README

中文版 README

Introduction

Mesh is an MPC network solution to serve resource as service.

Features

As an open source network proxy, Mesh has the following core functions:

  • Support full dynamic resource configuration through xDS API integrated with Service Mesh.
  • Support proxy with TCP, HTTP, and RPC protocols.
  • Support rich routing features.
  • Support reliable upstream management and load balancing capabilities.
  • Support network and protocol layer observability.
  • Support mTLS and protocols on TLS.
  • Support rich extension mechanism to provide highly customizable expansion capabilities.
  • Support process smooth upgrade.

Get Started

Install go compile time.

brew install go

Set the go dependency proxy host.

go env -w GOPROXY="https://mirrors.aliyun.com/goproxy/,https://goproxy.cn,https://goproxy.io,https://proxy.golang.org,direct"

Compile mesh project.

go mod tidy

Test project.

make test

Build distribute package for multiplatform.

make build

Generate software develop kits for C++, Python, Java, Golang language.

make babel

Release packages.

make publish

Documentation

Mesh default listened port list. Mesh server boot with data port 7700 and control port 7305. These port communication from node to node.

  • 570 Mesh port in node
  • 7304 Mesh port out node
  • 80/443 Mesh port in panel

Cli usage

# Container
docker run -d -v 7304:7304 bfia/mesh:latest

# MacOS
brew install mesh

# CentOS
yum install mesh -y

# Alpine
apk add mesh

Mesh man usage

ducer@coyzeng mesh % mesh --help

Usage:
  Mesh [flags]
  Mesh [command]

Examples:
mesh COMMAND

Available Commands:
  access      Mesh data access commands.
  babel       Mesh babel.
  completion  Generate the autocompletion script for the specified shell
  domain      Remove mesh net domains.
  dump        Dump the mesh cluster metadata tables.
  exec        Execute the mesh actor, Such mesh exec actor -i '{}'.
  help        Help about any command
  http        Mesh curl.
  inspect     Return low-level information on mesh plugin objects.
  issue       Mesh issue.
  kv          Mesh kv store.
  net         Display a live stream of mesh cluster resource usage statistics.
  os          Mesh OS 🚀🚀🚀.
  start       Start mesh with the run mode(server/operator/node/panel).
  status      Display a live stream of mesh cluster resource usage statistics.
  stop        Stop the mesh process if available.
  token       Mesh token center.

Flags:
  -c, --config string   Mesh configuration input, it can be url/path/body, default is {}. (default "{}")
  -d, --debug           Set the run mode to debug with more information.
  -f, --format string   Mesh configuration format, it can be json/yaml, default is yaml. (default "yaml")
  -h, --help            help for Mesh
  -v, --version         version for Mesh

Use "Mesh [command] --help" for more information about a command.

Client usage

Golang

go get github.com/be-io/mesh/client/golang

Java

<dependency>
    <groupId>io.be.mesh</groupId>
    <artfactId>mesh</artfactId>
    <version>0.0.17</version>
</dependency>

Python

poetry add imesh==0.0.17

or

pip install imesh==0.0.17

Typescript

yarn add imesh

Rust

cargo add imesh

Setting node information

curl --location 'http://10.99.28.33:7304/v1/interconn/node/refresh' --header 'Content-Type: application/json' --data '{
    "version": "1.0.0",
    "node_id": "LX0000010000280",
    "inst_id": "JG0100002800000000",
    "inst_name": "互联互通节点X",
    "root_crt": "-----BEGIN CERTIFICATE-----\nMIIEZTCCA02gAwIBAgIRAKkfFud6oGcbEmGOZ2i917wwDQYJKoZIhvcNAQELBQAw\ngZIxCzAJBgNVBAYTAkNOMQswCQYDVQQIEwJaSjELMAkGA1UEBxMCSFoxJDAiBgNV\nBAoTG0xYMDAwMDAxMDAwMDI3MC50cnVzdGJlLm5ldDEkMCIGA1UECxMbTFgwMDAw\nMDEwMDAwMjcwLnRydXN0YmUubmV0MR0wGwYDVQQDDBTok53osaHpm4blm6IyN+WF\nrOWPuDAgFw0yMjA5MjEwNjU1MTRaGA8yMTIyMDkyMTA2NTUxNFowgZIxCzAJBgNV\nBAYTAkNOMQswCQYDVQQIEwJaSjELMAkGA1UEBxMCSFoxJDAiBgNVBAoTG0xYMDAw\nMDAxMDAwMDI3MC50cnVzdGJlLm5ldDEkMCIGA1UECxMbTFgwMDAwMDEwMDAwMjcw\nLnRydXN0YmUubmV0MR0wGwYDVQQDDBTok53osaHpm4blm6IyN+WFrOWPuDCCASIw\nDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOy3fx+vyvaRBTg9hXSXW/XEz5A9\nazavO4KN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NWl62nG9/8Jx+PI5vHvYdgvyfp+E+5rIl131DDGAoByP3+W2/ScYL0Y6s490gFCP\ngeajDL1ZMktmX0hYxQeioVe3w6azqZIozWcP4vsrspsSWCBPEQmePrO5Ozk4p+Nt\nTMkGdX3700LWaBFdIxt9hEcCgYAf7CvW49bPRMkHE/SWIYVP6hULy2VPjb9ssYI8\novhzf2BIYpr8yuBPFp4wMb+NYjP/7NyJaYHYRAjANr8GA/9NCJM5QtwXx7bV5YcI\nFlGkTQovY7AcWhSK9OLJfGN1QYLLAlvUwQDRrY+1CInYBQaAVKL7b5pD8rkJmdvW\nKamiAQKBgQCq3cjGNqvMBVWeq0qJRsouSXRaHFRTmS9hgrRD/GZ+GQJNuhsDwfV9\nhb74cz7EqaFhQVhLHZ2QP/AauqtZ+p9wIM5X9xJDCaEKGVR+95vvxilBIOqua5IK\nphkbWGfS/Wp0fWGDaBoc05xuMm3Zv7GdiNeKr6soT1dOOCA88L3eTQ==\n-----END RSA PRIVATE KEY-----\n"
}'

Weave partner network

curl --location 'http://10.99.27.33:7304/v1/interconn/net/refresh' --header 'Content-Type: application/json' --data '{
    "node_id": "LX0000010000280",
    "inst_id": "JG0100002800000000",
    "address": "192.168.100.63:27304",
    "guest_root": "",
    "guest_crt": ""
}'

About

Mesh: A lightweight, distributed, relational network architecture for MPC

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published