Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/daeuniverse/dae-wing
dae-wing is a backend of dae, provides a method to bundle arbitrary frontend and dae into one binary.
https://github.com/daeuniverse/dae-wing
dae ebpf graphql proxy transparent-proxy
Last synced: about 1 month ago
JSON representation
dae-wing is a backend of dae, provides a method to bundle arbitrary frontend and dae into one binary.
- Host: GitHub
- URL: https://github.com/daeuniverse/dae-wing
- Owner: daeuniverse
- License: agpl-3.0
- Created: 2023-02-27T16:45:44.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-19T15:05:29.000Z (about 1 year ago)
- Last Synced: 2023-12-19T16:36:04.254Z (about 1 year ago)
- Topics: dae, ebpf, graphql, proxy, transparent-proxy
- Language: Go
- Homepage:
- Size: 330 KB
- Stars: 12
- Watchers: 3
- Forks: 5
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# dae-wing
## Prerequisites
[Git](https://git-scm.com), [Docker](https://www.docker.com), [Golang](https://go.dev), [GNU GCC](https://gcc.gnu.org)
## Fetch the source code
> Clone the repository with git submodules (dae-core) using git
```shell
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:
```bash
make deps
go run . run -c ./ --api-only
# go build -o dae-wing && ./dae-wing run -c ./ --api-only
```To run with dae:
```bash
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:
```bash
# 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](https://graphql.org/). UI developers can export schema and write queries and mutations easily.
```bash
git clone https://github.com/daeuniverse/dae-wing
go build -o dae-wing
./dae-wing export schema > schema.graphql
```[graphql-playground](https://github.com/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](https://github.com/daeuniverse/dae/blob/main/example.dae), use [dae-outline2config](https://github.com/daeuniverse/dae-outline2config) to generate config related raw format.
To generate outline:
```bash
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](https://github.com/daeuniverse/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.