Skip to content

Commit 482ade3

Browse files
author
VPNDevelop
committed
发布 VPN 软件开发指南首个版本
0 parents  commit 482ade3

28 files changed

Lines changed: 606 additions & 0 deletions

.github/CODEOWNERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
* @VPNDevelop
2+
/.github/ @VPNDevelop
3+
/SECURITY.md @VPNDevelop

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: 错误报告
2+
description: 报告可以公开讨论且可重复的问题
3+
title: "[Bug] "
4+
labels: ["bug"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: 安全漏洞请不要公开提交,请阅读 SECURITY.md。
9+
- type: textarea
10+
id: description
11+
attributes:
12+
label: 问题描述
13+
description: 请说明预期行为和实际行为。
14+
validations:
15+
required: true
16+
- type: textarea
17+
id: reproduce
18+
attributes:
19+
label: 复现步骤
20+
validations:
21+
required: true
22+
- type: input
23+
id: version
24+
attributes:
25+
label: 版本或提交
26+
validations:
27+
required: true

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: gomod
4+
directory: /
5+
schedule:
6+
interval: weekly
7+
- package-ecosystem: github-actions
8+
directory: /
9+
schedule:
10+
interval: weekly

.github/pull_request_template.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
## 改动内容
2+
3+
## 改动原因
4+
5+
## 验证方式
6+
7+
- [ ] 已运行相关测试
8+
- [ ] 已更新相关文档
9+
- [ ] 未包含密钥、生产节点或用户数据
10+
- [ ] 安全影响已说明

.github/workflows/ci.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-24.04
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
17+
- name: Set up Go
18+
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
19+
with:
20+
go-version: "1.23.x"
21+
- name: Format check
22+
run: test -z "$(gofmt -l .)"
23+
- name: Vet
24+
run: go vet ./...
25+
- name: Test
26+
run: go test -race -cover ./...

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.DS_Store
2+
.idea/
3+
.vscode/
4+
bin/
5+
coverage.out
6+
*.log
7+
.env
8+
.env.*
9+
!.env.example

CODE_OF_CONDUCT.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# 社区行为准则
2+
3+
我们欢迎专业、尊重且基于证据的技术讨论。
4+
5+
不接受骚扰、歧视、人身攻击、公开他人隐私信息,以及引导他人攻击未经授权系统的内容。维护者可以编辑、隐藏或删除不符合准则的内容,并限制相关账号参与项目。
6+
7+
请通过 `support@vpndevelop.com` 私下报告社区行为问题。

CONTRIBUTING.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# 贡献指南
2+
3+
1. 先搜索现有 Issue,避免重复工作。
4+
2. 较大的功能先创建讨论 Issue。
5+
3. 每个 Pull Request 只解决一个明确问题。
6+
4. 新代码必须包含测试,文档必须说明适用平台和版本。
7+
5. 不得提交真实密钥、节点、用户数据或第三方专有源码。
8+
6. 提交前运行 `go test ./...``go vet ./...`
9+
10+
参与者提交的贡献将按照仓库的 Apache-2.0 许可证发布。

Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM golang:1.23-alpine AS builder
2+
WORKDIR /src
3+
COPY go.mod ./
4+
COPY cmd ./cmd
5+
COPY internal ./internal
6+
RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o /out/control-plane ./cmd/control-plane
7+
8+
FROM gcr.io/distroless/static-debian12:nonroot
9+
COPY --from=builder /out/control-plane /control-plane
10+
ENV VPNDEV_LISTEN_ADDR=0.0.0.0:8080
11+
EXPOSE 8080
12+
USER nonroot:nonroot
13+
ENTRYPOINT ["/control-plane"]

LICENSE

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Apache License
2+
Version 2.0, January 2004
3+
http://www.apache.org/licenses/
4+
5+
Copyright 2026 VPNDevelop
6+
7+
Licensed under the Apache License, Version 2.0 (the "License");
8+
you may not use this file except in compliance with the License.
9+
You may obtain a copy of the License at
10+
11+
http://www.apache.org/licenses/LICENSE-2.0
12+
13+
Unless required by applicable law or agreed to in writing, software
14+
distributed under the License is distributed on an "AS IS" BASIS,
15+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
See the License for the specific language governing permissions and
17+
limitations under the License.

0 commit comments

Comments
 (0)