From bfd0243b04b68172bf193440ac6af7a6ba57b174 Mon Sep 17 00:00:00 2001 From: Kevin Yu Date: Mon, 10 Apr 2023 00:19:38 +0800 Subject: [PATCH 01/12] Delete docker.yml --- .github/workflows/docker.yml | 63 ------------------------------------ 1 file changed, 63 deletions(-) delete mode 100644 .github/workflows/docker.yml diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml deleted file mode 100644 index d703d4122c..0000000000 --- a/.github/workflows/docker.yml +++ /dev/null @@ -1,63 +0,0 @@ -name: Docker - -on: - push: - branches: - - main - - fix* - - feat* - paths: - - "**/*.go" - - "**/*.c" - - "**/*.h" - - "go.mod" - - "go.sum" - - ".github/workflows/*.yml" - release: - types: [ prereleased ] - -jobs: - docker: - runs-on: ubuntu-22.04 - steps: - - name: Checkout codebase - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Prepare - id: prep - env: - REF: ${{ github.ref }} - run: | - if [[ "$REF" == "refs/tags/v"* ]]; then - tag=$(git describe --tags $(git rev-list --tags --max-count=1)) - tag=${tag:1} - else - tag=$(git log -1 --format="%cd" --date=short | sed s/-//g) - fi - echo "IMAGE=daeuniverse/dae" >> $GITHUB_OUTPUT - echo "TAG=$tag" >> $GITHUB_OUTPUT - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Login to DockerHub - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build production image - uses: docker/build-push-action@v4 - with: - context: . - builder: ${{ steps.buildx.outputs.name }} - file: Dockerfile - platforms: linux/arm/v6,linux/arm/v7,linux/arm64,linux/amd64,linux/386 - push: true - tags: | - ${{ steps.prep.outputs.IMAGE }}:${{ steps.prep.outputs.TAG }} - ${{ steps.prep.outputs.IMAGE }}:latest - cache-from: type=gha - cache-to: type=gha,mode=max From cfe9eaed3829f10cdd1b4c17ee7849f1d566026a Mon Sep 17 00:00:00 2001 From: yqlbu Date: Tue, 11 Apr 2023 17:38:49 +0800 Subject: [PATCH 02/12] chore: add badges to README --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index d59daf6541..6a91751193 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,14 @@ +

+ License + + version + + lastcommit +

+ **_dae_**, means goose, is a high-performance transparent proxy solution. In order to improve the traffic split performance as much as possible, dae runs the transparent proxy and traffic split suite in the linux kernel by eBPF. Therefore, dae has the opportunity to make the direct traffic bypass the forwarding by proxy application and achieve true direct traffic through. Under such a magic trick, there is almost no performance loss and additional resource consumption for direct traffic. From 87b2858ff2fb569019aff38d12110bff88e2e704 Mon Sep 17 00:00:00 2001 From: yqlbu Date: Tue, 11 Apr 2023 17:40:59 +0800 Subject: [PATCH 03/12] doc: add license section --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 6a91751193..c986538695 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,10 @@ See [How it works](docs/how_it_works_zh.md). - [ ] Add quick-start guide - [ ] ... +## License + +[AGPL-3.0 (C) daeuniverse](https://github.com/daeuniverse/dae/blob/master/LICENSE) + ## Stargazers over time [![Stargazers over time](https://starchart.cc/daeuniverse/dae.svg)](https://starchart.cc/daeuniverse/dae) From 496fb2a6b3bef1d5c24faa4c5a0b97f61c49971f Mon Sep 17 00:00:00 2001 From: yqlbu Date: Tue, 11 Apr 2023 17:44:44 +0800 Subject: [PATCH 04/12] doc: add contribution guide --- README.md | 4 ++ docs/commit-msg-guide.md | 80 ++++++++++++++++++++++++++++++++++++++++ docs/contribute.md | 39 ++++++++++++++++++++ 3 files changed, 123 insertions(+) create mode 100644 docs/commit-msg-guide.md create mode 100644 docs/contribute.md diff --git a/README.md b/README.md index c986538695..5e2c43cc5e 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,10 @@ See [How it works](docs/how_it_works_zh.md). - [ ] Add quick-start guide - [ ] ... +## Contributors + +Special thanks goes to all [contributors](https://github.com/daeuniverse/dae/graphs/contributors). If you would like to contribute, please see the [instructions](./docs/contribute.md). Also, it is recommended following the [commit-msg-guide](./docs/commit-msg-guide.md). + ## License [AGPL-3.0 (C) daeuniverse](https://github.com/daeuniverse/dae/blob/master/LICENSE) diff --git a/docs/commit-msg-guide.md b/docs/commit-msg-guide.md new file mode 100644 index 0000000000..d2135cf2c1 --- /dev/null +++ b/docs/commit-msg-guide.md @@ -0,0 +1,80 @@ +# Semantic Commit Messages + +## The reasons for these conventions: + +- automatic generating of the changelog +- simple navigation through git history (e.g. ignoring the style changes) + +See how a minor change to your commit message style can make you a better developer. + +## Format + +``` +`(): ` + +`` is optional +``` + +## Example + +``` +feat: add hat wobble +^--^ ^------------^ +| | +| +-> Summary in present tense. +| ++-------> Type: chore, docs, feat, fix, refactor, style, or test. +``` + +Example `` values: + +- `feat`: (new feature for the user, not a new feature for build script) +- `fix`: (bug fix for the user, not a fix to a build script) +- `docs`: (changes to the documentation) +- `style`: (formatting, missing semi colons, etc; no production code change) +- `refactor`: (refactoring production code, eg. renaming a variable) +- `test`: (adding missing tests, refactoring tests; no production code change) +- `chore`: (updating grunt tasks etc; no production code change, e.g. dependencies upgrade) +- `perf`: (perfomance improve change, e.g. better concurrency performance) + +Example `` values: + +- `init` +- `runner` +- `watcher` +- `config` +- `web-server` +- `proxy` + +The `` can be empty (e.g. if the change is a global or difficult to assign to a single component), in which case the parentheses are omitted. In smaller projects such as Karma plugins, the `` is empty. + +## Message Subject (First Line) + +The first line cannot be longer than `72` characters and should be followed by a blank line. The type and scope should always be lowercase as shown below + +## Message Body + +ust as in the ``, use the imperative, present tense: "change" not "changed" nor "changes". Message body should include motivation for the change and contrasts with previous behavior. + +## Message footer + +##### Referencing issues + +Closed issues should be listed on a separate line in the footer prefixed with "Closes" keyword as the following: + +``` +Closes #234 +``` + +or in the case of multiple issues: + +``` +Closes #123, #245, #992 +``` + +## References + +- https://www.conventionalcommits.org/ +- https://seesparkbox.com/foundry/semantic_commit_messages +- http://karma-runner.github.io/1.0/dev/git-commit-msg.html +- https://wadehuanglearning.blogspot.com/2019/05/commit-commit-commit-why-what-commit.html diff --git a/docs/contribute.md b/docs/contribute.md new file mode 100644 index 0000000000..ad1b5e775a --- /dev/null +++ b/docs/contribute.md @@ -0,0 +1,39 @@ +## Contribute + +If you want to contribute to a project and make it better, your help is very welcome. Contributing is also a great way to learn more about social coding on Github, new technologies and and their ecosystems and how to make constructive, helpful bug reports, feature requests and the noblest of all contributions: a good, clean pull request. + +### Bug Reports and Feature Requests + +If you have found a `bug` or have a `feature request`, please use the search first in case a similar issue already exists. If not, please create an [issue](https://github.com/daeuniverse/dae/issues/new) in this repository + +### Code + +If you would like to fix a bug or implement a feature, please `fork` the repository and `create a Pull Request`. + +Before you start any Pull Request, `it is recommended that you create an issue` to discuss first if you have any doubts about requirement or implementation. That way you can be sure that the maintainer(s) agree on what to change and how, and you can hopefully get a quick merge afterwards. + +`Pull Requests` can only be merged once all status checks are green. + +### How to make a clean pull request + +- Create a `personal fork` of the project on Github. +- Clone the fork on your local machine. Your remote repo on Github is called `origin`. +- Add the original repository as a remote called `upstream`. +- If you created your fork a while ago be sure to pull upstream changes into your local repository. +- Create a new branch to work on! Branch from `develop` if it exists, else from `master`. +- Implement/fix your feature, comment your code. +- Follow the code style of the project, including indentation. +- If the project has tests run them! +- Write or adapt tests as needed. +- Add or change the documentation as needed. +- Squash your commits into a single commit with git's [interactive rebase](https://help.github.com/articles/interactive-rebase). Create a new branch if necessary. +- Push your branch to your fork on Github, the remote `origin`. +- From your fork open a pull request in the correct branch. Target the project's `develop` branch if there is one, else go for `master`! +- Once the pull request is approved and merged you can pull the changes from `upstream` to your local repo and delete + your extra branch(es). + +And last but not least: Always write your commit messages in the present tense. Your commit message should describe what the commit, when applied, does to the code – not what you did to the code. + +### Re-requesting a review + +Please do not ping your reviewer(s) by mentioning them in a new comment. Instead, use the re-request review functionality. Read more about this in the [ GitHub docs, Re-requesting a review ](https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/incorporating-feedback-in-your-pull-request#re-requesting-a-review). From 1c7cdbedad1d34110c5129a2aa7719222107bdf3 Mon Sep 17 00:00:00 2001 From: yqlbu Date: Tue, 11 Apr 2023 17:46:48 +0800 Subject: [PATCH 05/12] doc: fix headers --- docs/contribute.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/contribute.md b/docs/contribute.md index ad1b5e775a..3e32c230d0 100644 --- a/docs/contribute.md +++ b/docs/contribute.md @@ -1,4 +1,4 @@ -## Contribute +# Contribute If you want to contribute to a project and make it better, your help is very welcome. Contributing is also a great way to learn more about social coding on Github, new technologies and and their ecosystems and how to make constructive, helpful bug reports, feature requests and the noblest of all contributions: a good, clean pull request. From 3ed2d65970dcdc08d683a2baff05a590de5231c4 Mon Sep 17 00:00:00 2001 From: yqlbu Date: Tue, 11 Apr 2023 17:49:16 +0800 Subject: [PATCH 06/12] doc: set alignment to left --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5e2c43cc5e..4523c23af7 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ -

+

License version From 0df59cdd65c54ebf99501271ee82d7308b147a25 Mon Sep 17 00:00:00 2001 From: yqlbu Date: Tue, 11 Apr 2023 17:52:22 +0800 Subject: [PATCH 07/12] doc: add documentation link --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 4523c23af7..877bda5906 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,8 @@ As a successor of [v2rayA](https://github.com/v2rayA/v2rayA), dae abandoned v2ra Please refer to [Quick Start Guide](./docs/getting-started) to start using `dae` right away! +Documentation: https://dae.v2raya.org + ## Notes 1. If you setup dae and also a shadowsocks server (or any UDP servers) on the same machine in public network, such as a VPS, don't forget to add `l4proto(udp) && sport(your server ports) -> must_direct` rule for your UDP server port. Because states of UDP are hard to maintain, all outgoing UDP packets will potentially be proxied (depends on your routing), including traffic to your client. This behaviour is not what we want to see. `must_direct` makes all traffic from this port including DNS traffic direct. From f478e70841a52de348fbd33ec1b156512e21c415 Mon Sep 17 00:00:00 2001 From: Kevin Yu Date: Tue, 11 Apr 2023 21:52:54 +0800 Subject: [PATCH 08/12] fix: fix typos --- docs/commit-msg-guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/commit-msg-guide.md b/docs/commit-msg-guide.md index d2135cf2c1..766c0d1674 100644 --- a/docs/commit-msg-guide.md +++ b/docs/commit-msg-guide.md @@ -54,7 +54,7 @@ The first line cannot be longer than `72` characters and should be followed by a ## Message Body -ust as in the ``, use the imperative, present tense: "change" not "changed" nor "changes". Message body should include motivation for the change and contrasts with previous behavior. +use as in the ``, use the imperative, present tense: "change" not "changed" nor "changes". Message body should include motivation for the change and contrasts with previous behavior. ## Message footer From a092b299628365c899355992095b34c2bcdb994d Mon Sep 17 00:00:00 2001 From: yqlbu Date: Tue, 11 Apr 2023 21:58:23 +0800 Subject: [PATCH 09/12] fix: add back deleted file --- .github/workflows/docker.yml | 63 ++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 .github/workflows/docker.yml diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 0000000000..d703d4122c --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,63 @@ +name: Docker + +on: + push: + branches: + - main + - fix* + - feat* + paths: + - "**/*.go" + - "**/*.c" + - "**/*.h" + - "go.mod" + - "go.sum" + - ".github/workflows/*.yml" + release: + types: [ prereleased ] + +jobs: + docker: + runs-on: ubuntu-22.04 + steps: + - name: Checkout codebase + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Prepare + id: prep + env: + REF: ${{ github.ref }} + run: | + if [[ "$REF" == "refs/tags/v"* ]]; then + tag=$(git describe --tags $(git rev-list --tags --max-count=1)) + tag=${tag:1} + else + tag=$(git log -1 --format="%cd" --date=short | sed s/-//g) + fi + echo "IMAGE=daeuniverse/dae" >> $GITHUB_OUTPUT + echo "TAG=$tag" >> $GITHUB_OUTPUT + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Login to DockerHub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build production image + uses: docker/build-push-action@v4 + with: + context: . + builder: ${{ steps.buildx.outputs.name }} + file: Dockerfile + platforms: linux/arm/v6,linux/arm/v7,linux/arm64,linux/amd64,linux/386 + push: true + tags: | + ${{ steps.prep.outputs.IMAGE }}:${{ steps.prep.outputs.TAG }} + ${{ steps.prep.outputs.IMAGE }}:latest + cache-from: type=gha + cache-to: type=gha,mode=max From c41f84246e10ad10335910dca51f93611e632687 Mon Sep 17 00:00:00 2001 From: Kevin Yu Date: Tue, 11 Apr 2023 22:04:27 +0800 Subject: [PATCH 10/12] fix: fix typos Co-authored-by: kunish <17328586+kunish@users.noreply.github.com> --- docs/commit-msg-guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/commit-msg-guide.md b/docs/commit-msg-guide.md index 766c0d1674..1dc22e6149 100644 --- a/docs/commit-msg-guide.md +++ b/docs/commit-msg-guide.md @@ -35,7 +35,7 @@ Example `` values: - `refactor`: (refactoring production code, eg. renaming a variable) - `test`: (adding missing tests, refactoring tests; no production code change) - `chore`: (updating grunt tasks etc; no production code change, e.g. dependencies upgrade) -- `perf`: (perfomance improve change, e.g. better concurrency performance) +- `perf`: (perfomance improvement change, e.g. better concurrency performance) Example `` values: From a6ec83c4fb467341217cd56c2a4da24bb8f11356 Mon Sep 17 00:00:00 2001 From: yqlbu Date: Tue, 11 Apr 2023 22:05:38 +0800 Subject: [PATCH 11/12] doc: add ci --- docs/commit-msg-guide.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/commit-msg-guide.md b/docs/commit-msg-guide.md index 1dc22e6149..c75be3e90a 100644 --- a/docs/commit-msg-guide.md +++ b/docs/commit-msg-guide.md @@ -36,6 +36,7 @@ Example `` values: - `test`: (adding missing tests, refactoring tests; no production code change) - `chore`: (updating grunt tasks etc; no production code change, e.g. dependencies upgrade) - `perf`: (perfomance improvement change, e.g. better concurrency performance) +- `ci`: (updating CI configuration files and scripts e.g. .github/workflows/*.yml ) Example `` values: From 63f297020be7581da4950e28745e98f627696d24 Mon Sep 17 00:00:00 2001 From: yqlbu Date: Wed, 12 Apr 2023 12:39:26 +0800 Subject: [PATCH 12/12] doc(license): reset default branch to main --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 877bda5906..64506653db 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ Special thanks goes to all [contributors](https://github.com/daeuniverse/dae/gra ## License -[AGPL-3.0 (C) daeuniverse](https://github.com/daeuniverse/dae/blob/master/LICENSE) +[AGPL-3.0 (C) daeuniverse](https://github.com/daeuniverse/dae/blob/main/LICENSE) ## Stargazers over time