Skip to content

Commit b30505e

Browse files
committed
init
1 parent a094195 commit b30505e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+5486
-11
lines changed

.dockerignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.github/
2+
.gitignore
3+
.golangci.yaml
4+
5+
# Other
6+
docs/
7+
build/
8+
tests/

.github/CODE_OF_CONDUCT.md

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
* Focusing on what is best not just for us as individuals, but for the
26+
overall community
27+
28+
Examples of unacceptable behavior include:
29+
30+
* The use of sexualized language or imagery, and sexual attention or
31+
advances of any kind
32+
* Trolling, insulting or derogatory comments, and personal or political attacks
33+
* Public or private harassment
34+
* Publishing others' private information, such as a physical or email
35+
address, without their explicit permission
36+
* Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at
63+
xjasonlyu@gmail.com.
64+
All complaints will be reviewed and investigated promptly and fairly.
65+
66+
All community leaders are obligated to respect the privacy and security of the
67+
reporter of any incident.
68+
69+
## Enforcement Guidelines
70+
71+
Community leaders will follow these Community Impact Guidelines in determining
72+
the consequences for any action they deem in violation of this Code of Conduct:
73+
74+
### 1. Correction
75+
76+
**Community Impact**: Use of inappropriate language or other behavior deemed
77+
unprofessional or unwelcome in the community.
78+
79+
**Consequence**: A private, written warning from community leaders, providing
80+
clarity around the nature of the violation and an explanation of why the
81+
behavior was inappropriate. A public apology may be requested.
82+
83+
### 2. Warning
84+
85+
**Community Impact**: A violation through a single incident or series
86+
of actions.
87+
88+
**Consequence**: A warning with consequences for continued behavior. No
89+
interaction with the people involved, including unsolicited interaction with
90+
those enforcing the Code of Conduct, for a specified period of time. This
91+
includes avoiding interactions in community spaces as well as external channels
92+
like social media. Violating these terms may lead to a temporary or
93+
permanent ban.
94+
95+
### 3. Temporary Ban
96+
97+
**Community Impact**: A serious violation of community standards, including
98+
sustained inappropriate behavior.
99+
100+
**Consequence**: A temporary ban from any sort of interaction or public
101+
communication with the community for a specified period of time. No public or
102+
private interaction with the people involved, including unsolicited interaction
103+
with those enforcing the Code of Conduct, is allowed during this period.
104+
Violating these terms may lead to a permanent ban.
105+
106+
### 4. Permanent Ban
107+
108+
**Community Impact**: Demonstrating a pattern of violation of community
109+
standards, including sustained inappropriate behavior, harassment of an
110+
individual, or aggression toward or disparagement of classes of individuals.
111+
112+
**Consequence**: A permanent ban from any sort of public interaction within
113+
the community.
114+
115+
## Attribution
116+
117+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118+
version 2.0, available at
119+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120+
121+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
122+
enforcement ladder](https://github.com/mozilla/diversity).
123+
124+
[homepage]: https://www.contributor-covenant.org
125+
126+
For answers to common questions about this code of conduct, see the FAQ at
127+
https://www.contributor-covenant.org/faq. Translations are available at
128+
https://www.contributor-covenant.org/translations.
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Bug report
2+
description: Create a report to help us improve
3+
title: "[Bug] "
4+
body:
5+
- type: checkboxes
6+
id: ensure
7+
attributes:
8+
label: Verify steps
9+
description: Please verify that you've followed these steps
10+
options:
11+
- label: Is this something you can **debug and fix**? Send a pull request! Bug fixes and documentation fixes are welcome.
12+
required: true
13+
14+
- label: I have searched on the [issue tracker](……/) for a related issue.
15+
required: true
16+
17+
- type: input
18+
attributes:
19+
label: Version
20+
validations:
21+
required: true
22+
23+
- type: dropdown
24+
id: os
25+
attributes:
26+
label: What OS are you seeing the problem on?
27+
multiple: true
28+
options:
29+
- Windows
30+
- Linux
31+
- macOS
32+
- OpenBSD/FreeBSD
33+
- Other
34+
35+
- type: textarea
36+
attributes:
37+
label: Description
38+
validations:
39+
required: true
40+
41+
- type: textarea
42+
attributes:
43+
label: CLI or Config
44+
description: Paste the command line parameters or configuration below.
45+
46+
- type: textarea
47+
attributes:
48+
render: shell
49+
label: Logs
50+
description: Paste the logs below with the log level set to `DEBUG`.
51+
52+
- type: textarea
53+
attributes:
54+
label: How to Reproduce
55+
description: Steps to reproduce the behavior, if any.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
blank_issues_enabled: false
2+
3+
contact_links:
4+
- name: GitHub Discussions
5+
url: https://github.com/shahradelahi/cloudflare-warp/discussions
6+
about: Ask questions and get help on GitHub Discussions
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Feature request
2+
description: Suggest an idea or improvement
3+
title: "[Feature] "
4+
body:
5+
- type: textarea
6+
id: description
7+
attributes:
8+
label: Description
9+
placeholder: A clear description of the feature or enhancement.
10+
validations:
11+
required: true
12+
13+
- type: textarea
14+
id: related
15+
attributes:
16+
label: Is this feature related to a specific bug?
17+
description: Please include a bug references if yes.
18+
19+
- type: textarea
20+
id: solution
21+
attributes:
22+
label: Do you have a specific solution in mind?
23+
description: >
24+
Please include any details about a solution that you have in mind,
25+
including any alternatives considered.

.github/dependabot.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "gomod"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"
7+
commit-message:
8+
prefix: "fix"
9+
include: "scope"
10+
open-pull-requests-limit: 20
11+
12+
- package-ecosystem: "docker"
13+
directory: "/"
14+
schedule:
15+
interval: "daily"
16+
commit-message:
17+
prefix: "fix"
18+
include: "scope"
19+
open-pull-requests-limit: 20
20+
21+
- package-ecosystem: "github-actions"
22+
directory: "/"
23+
schedule:
24+
interval: "daily"
25+
commit-message:
26+
prefix: "fix"
27+
include: "scope"
28+
open-pull-requests-limit: 20
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: "CodeQL"
2+
3+
concurrency:
4+
group: codeql-${{ github.event_name }}-${{ github.ref }}
5+
cancel-in-progress: true
6+
7+
on:
8+
push:
9+
branches: [ main ]
10+
pull_request:
11+
12+
jobs:
13+
analyze:
14+
name: Analyze
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
language: [ 'go' ]
21+
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v4
25+
26+
- name: Setup Go
27+
uses: actions/setup-go@v5
28+
with:
29+
check-latest: true
30+
go-version-file: 'go.mod'
31+
32+
- name: Initialize CodeQL
33+
uses: github/codeql-action/init@v3
34+
with:
35+
languages: ${{ matrix.language }}
36+
37+
- name: Autobuild
38+
uses: github/codeql-action/autobuild@v3
39+
40+
- name: Perform CodeQL Analysis
41+
uses: github/codeql-action/analyze@v3

.github/workflows/docker.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: Publish Docker Image
2+
3+
concurrency:
4+
group: docker-${{ github.event_name }}-${{ github.ref }}
5+
cancel-in-progress: true
6+
7+
on:
8+
push:
9+
branches:
10+
- 'main'
11+
tags:
12+
- '*'
13+
14+
jobs:
15+
docker:
16+
name: Docker
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
23+
24+
- name: Set up QEMU
25+
uses: docker/setup-qemu-action@v3
26+
with:
27+
platforms: all
28+
29+
- name: Set up Docker Buildx
30+
uses: docker/setup-buildx-action@v3
31+
with:
32+
version: latest
33+
34+
- name: Login to DockerHub
35+
uses: docker/login-action@v3
36+
with:
37+
username: ${{ secrets.DOCKER_USERNAME }}
38+
password: ${{ secrets.DOCKER_PASSWORD }}
39+
40+
- name: Login to GitHub Container Registry
41+
uses: docker/login-action@v3
42+
with:
43+
registry: ghcr.io
44+
username: ${{ github.repository_owner }}
45+
password: ${{ secrets.GITHUB_TOKEN }}
46+
47+
- name: Get Version
48+
id: shell
49+
run: |
50+
echo "version=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT
51+
52+
- name: Build and Push (dev)
53+
if: github.ref == 'refs/heads/main'
54+
uses: docker/build-push-action@v6
55+
with:
56+
context: .
57+
push: true
58+
platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
59+
tags: |
60+
shahradelahi/cloudflare-warp:dev
61+
ghcr.io/shahradelahi/cloudflare-warp:dev
62+
cache-from: type=gha
63+
cache-to: type=gha,mode=max
64+
65+
- name: Build and Push (latest)
66+
if: startsWith(github.ref, 'refs/tags/')
67+
uses: docker/build-push-action@v6
68+
with:
69+
context: .
70+
push: true
71+
platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
72+
tags: |
73+
shahradelahi/cloudflare-warp:latest
74+
shahradelahi/cloudflare-warp:${{ steps.shell.outputs.version }}
75+
ghcr.io/shahradelahi/cloudflare-warp:latest
76+
ghcr.io/shahradelahi/cloudflare-warp:${{ steps.shell.outputs.version }}
77+
cache-from: type=gha
78+
cache-to: type=gha,mode=max

0 commit comments

Comments
 (0)