Coder Social home page Coder Social logo

wugeer / dae-wing Goto Github PK

View Code? Open in Web Editor NEW

This project forked from daeuniverse/dae-wing

0.0 0.0 0.0 302 KB

dae-wing is a backend of dae, provides a method to bundle arbitrary frontend and dae into one binary.

License: GNU Affero General Public License v3.0

Go 97.88% Makefile 1.63% Dockerfile 0.49%

dae-wing's Introduction

dae-wing

License lastcommit

Prerequisites

Git, Docker, Golang, GNU GCC

Fetch the source code

Clone the repository with git submodules (dae-core) using git

git clone https://github.com/daeuniverse/dae-wing
cd dae-wing

# Initialize git submodules
git submodule update --init --recursive

Run Locally

To run the api only:

make deps
go run . run -c ./ --api-only
# go build -o dae-wing && ./dae-wing run -c ./ --api-only

To run with dae:

make deps
go run -exec sudo . run
# go build -o dae-wing && sudo ./dae-wing run -c ./ --api-only

Run with Docker

This feature is implemented for container orchestration with the dashboards that call this API, which also facilitates testing and development.

Prebuilt image is available at ghcr.io. To pull this prebuilt image, you can replace image name into ghcr.io/daeuniverse/dae-wing.

To build container from source:

# use docker compose
sudo docker compose up -d

# Or you can build then run with CLI
# build image
sudo docker build -t dae-wing .

# run container
sudo docker run -d \
    --privileged \
    --network=host \
    --pid=host \
    --restart=always \
    -v /sys:/sys \
    -v /etc/dae-wing:/etc/dae-wing \
    --name=dae-wing \
    dae-wing

API

API is powered by GraphQL. UI developers can export schema and write queries and mutations easily.

git clone https://github.com/daeuniverse/dae-wing
go build -o dae-wing
./dae-wing export schema > schema.graphql

graphql-playground is recommended for developers. It integrates docs and debug environment for API. Choose URL ENDPOINT and fill in http://localhost:2023/graphql to continue.

Config generator

Alternatively, you can use raw format inputs, use dae-outline2config to generate config related raw format.

To generate outline:

git clone https://github.com/daeuniverse/dae-wing
go build -o dae-wing .
./dae-wing export outline > outline.json

Structure

Config

Config defined in dae-wing includes global, dns and routing sections in dae.

Users can switch between multiple configs. Nodes, subscriptions and groups are selectively shared by all configs.

Run

Selected config is the running config or config to run. If dae is not running, you can select a config and invoke run. If dae is already running with a config, selecting a new config will cause automatic switching and reloading, and removing the running config will cause to stop running.

Subscription

Subscription consists of its link and the collection of nodes resolved by the link.

Node

A generalized node refer to a proxy profile, which can be imported by link. A node can be in a subscription or not. It depends on how it is imported. Nodes in the same collection must have unique links, which means nodes will be deduplicated by dae-wing before being added to a collection.

Group

A group has the following features:

  • A group is as an outbound of routing.
  • A group consists of subscriptions, nodes and a node selection policy for every new connection.

If a node in a subscription also belongs to a group, it will be preserved when the subscription is updated.

dae-wing's People

Contributors

mzz2017 avatar dae-prow[bot] avatar piyoki avatar shenghuang147 avatar kunish avatar integral-tech avatar hero-intelligent avatar wugeer avatar

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.