Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: server code && upgrade go mod #15

Merged
merged 1 commit into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/conf/.goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ builds:
- binary: client
env:
- CGO_ENABLED=0
main: ./cmd/client.go
main: ./main.go
goos:
- linux
- windows
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.18
go-version: 1.21
- name: Build
run: go build --ldflags "-s -w -X github.com/DVKunion/SeaMoon/pkg/consts.Version=${{github.ref_name}}" cmd/client.go
run: go build --ldflags "-s -w -X github.com/DVKunion/SeaMoon/pkg/consts.Version=${{github.ref_name}}" main.go

2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.18
go-version: 1.21
id: go
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
*.key

dist/
web/
*.log
*.toml
.config
Expand Down
67 changes: 59 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,72 @@
# 1.1.0 (2022-09-27)
# CHANGELOG

## SeaMoon 1.1.3

### Bug Fixes
### ❤️ What's New

* optimize connection ([70dfc5a](https://github.com/DVKunion/SeaMoon/commit/70dfc5ad4d25fd5b529097183c873d87ec37f126))
* optimize connection ([2b416c0](https://github.com/DVKunion/SeaMoon/commit/2b416c0b106ad0a6a21aa3da838cf311061e9ef8))
* 📝 docs: 增加手册页面sitemap站点地图(#7)(#8)
* ✨ feat(server): 修改了阿里云默认的部署资源类型(vcpu 0.1/mem 128),来降低普通用户使用的价格消费 (#10)
* ✨ feat(server): 增加了sealos部署方案,用更加便宜的价格使用seamoon (#11)
* ✨ feat(server): 增加了docker server, 现在可以通过docker来启动服务端 (#12)
* 🔧 fix(config): 用更友好的方式来使用config,不再单一的通过域名特征来判断服务端地址类型。(#13)

**Full Changelog**: https://github.com/DVKunion/SeaMoon/compare/1.1.2...1.1.3

* 41c5ce8 feat(docker): add docker server (#12)
* 1414293 feat: low cpu && mem cost (#10)
* 99c98fd fix(client): use more friendly config (#13)

## SeaMoon 1.1.2

### ❤️ What's New

* 🔧 fix(websocket): 修正了protocol error detect 时仍挂起gorouting导致卡死的问题 (#6)
* ✨ feat(dockerfile): 增加了docker client, 现在可以通过docker来启动客户端 (#6)

**Full Changelog**: https://github.com/DVKunion/SeaMoon/compare/1.1.1...1.1.2

## SeaMoon 1.1.1

### ❤️ What's New

* 🔧 fix(websocket): 修正了 websocket 在超出 32768 slice导致的 panic。 (#4)
* 🔧 fix(websocket): 修整了 websocket 在 close 时写入 message 导致的 panic。 (#4)
* 🔧 fix(websocket): 忽略了大量 websocket 链接导致的 1006 abnormal close 报错。 (#4)
* 🔧 fix(s.yaml): 修整了 serverless-devs 工具编排文件,目前可以通过 serverless-devs 工具`s deploy`一件部署至阿里云。 (#4)
* 🔧 fix(ci): 修整了 go-releaser ci 配置 (#3)
* 🔧 fix(docs): 更新了 README.md 较为过时的使用手册。

# 1.0.0 (2022-09-09)
### 🌈 Small Talk

> Hi, 各位,SeaMoon成功挤入2023Kcon兵器谱,使得整个项目获得了一批关注;在此感谢大家对SeaMoon项目的浓厚兴趣与支持,谢谢各位🙏
> 由于工作原因,以及个人的一些想法枯竭,项目于去年创建,直到现在目前也仅支持了阿里云一个demo QAQ,因此整体给人并不是一个较为完善的使用效果。1.1.1 版本后,我会尽量保证一些活跃性质的更新,以及一些比较有意思的想法demo迭代。
> 也欢迎对serverless感兴趣的安全小伙伴留言来交个朋友~
**Full Changelog**: https://github.com/DVKunion/SeaMoon/compare/1.1.0...1.1.1

* bc209a9 doc: update README.md
* a2e7360 fix: go-releaser ci config (#3)
* 8f51e63 fix: readme.md
* fe658ff fix: some websocket error optimization (#4)
* c316527 hotfix: some docs and code format

## 1.1.0 (2022-09-27)

### Bug Fixes

* optimize connection ([70dfc5a](https://github.com/DVKunion/SeaMoon/commit/70dfc5ad4d25fd5b529097183c873d87ec37f126))
* optimize connection ([2b416c0](https://github.com/DVKunion/SeaMoon/commit/2b416c0b106ad0a6a21aa3da838cf311061e9ef8))

## 1.0.0 (2022-09-09)

### Features

* **ci:** add build client ([215400c](https://github.com/DVKunion/SeaMoon/commit/215400cb7a3ae6c3f5f12df6828c8735156b810b))
* **pkg/socks5:** socks5 proxy beta version ([20d586c](https://github.com/DVKunion/SeaMoon/commit/20d586ce1ac36f143c1e340aa3bf9132e35af230))
* **pkg/http:** http proxy beta version ([3b41846](https://github.com/DVKunion/SeaMoon/commit/3b41846f75fe6d9510a9d040d76f97b35ce8c494))
* **ci:** add build
client ([215400c](https://github.com/DVKunion/SeaMoon/commit/215400cb7a3ae6c3f5f12df6828c8735156b810b))
* **pkg/socks5:** socks5 proxy beta
version ([20d586c](https://github.com/DVKunion/SeaMoon/commit/20d586ce1ac36f143c1e340aa3bf9132e35af230))
* **pkg/http:** http proxy beta
version ([3b41846](https://github.com/DVKunion/SeaMoon/commit/3b41846f75fe6d9510a9d040d76f97b35ce8c494))



16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# build stage
FROM golang:alpine AS build
ARG VERSION
COPY .. /src
WORKDIR /src
ENV CGO_ENABLED 0
ENV VERSION=${VERSION}
RUN go build -ldflags "-X github.com/DVKunion/SeaMoon/server/consts.Version=${VERSION}" -o /tmp/seamoon main.go
RUN chmod +x /tmp/seamoon
# run stage
FROM alpine:3.19
LABEL maintainer="[email protected]"
WORKDIR /app
COPY --from=build /tmp/seamoon /app/seamoon
EXPOSE 1080,8080,7777,9000
ENTRYPOINT ["/app/seamoon"]
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p align="center">
<img src="https://cdn.dvkunion.cn/SeaMoon/logo.png" width="360" alt="logo"/>
<img src="https://seamoon.oss-cn-hangzhou.aliyuncs.com/logo.png" width="360" alt="logo"/>
</p>
<h1 align="center">Sea Moon</h1>

Expand Down Expand Up @@ -28,22 +28,22 @@

直白来讲,月海其实就是一款利用云函数来代理/隐匿攻击行踪以及一些安全相关的匿名性对抗。

想要了解更多,请移步[官方手册](https://seamoon.dvkunion.cn)
想要了解更多,请移步 [官方手册](https://seamoon.dvkunion.cn)

觉得项目不错的话,[还请给一个star ✨](https://github.com/DVKunion/SeaMoon), 你的支持是更新的最大动力~

## 🔥 使用展示
![](https://cdn.dvkunion.cn/seamoon/bf0f8d2fc5084c329f9638d5c3f0bf46.png)


## 🕹 快速开始

[快速开始](https://seamoon.dvkunion.cn/guide/start)
[⚡️ 快速开始](https://seamoon.dvkunion.cn/guide/start)

[🔥新增Sealos部署, 价格更低更实惠!](https://seamoon.dvkunion.cn/guide/deploy/sealos)
[新增Sealos部署, 价格更低更实惠!](https://seamoon.dvkunion.cn/guide/deploy/sealos)

## 💻 技术文档

[技术文档](https://seamoon.dvkunion.cn/tech/feature)
[🧑‍💻 技术文档](https://seamoon.dvkunion.cn/tech/feature)

## ❗ 免责声明

Expand Down
16 changes: 0 additions & 16 deletions cmd/aliyun_server.go

This file was deleted.

51 changes: 0 additions & 51 deletions cmd/client.go

This file was deleted.

16 changes: 0 additions & 16 deletions docker/client/Dockerfile

This file was deleted.

16 changes: 0 additions & 16 deletions docker/server/Dockerfile

This file was deleted.

4 changes: 2 additions & 2 deletions package.json → docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"repository": "https://github.com/DVKunion/SeaMoon",
"author": "DVKunion",
"scripts": {
"dev": "vuepress dev docs",
"build": "vuepress build docs",
"dev": "vuepress dev .",
"build": "vuepress build .",
"updateTheme": "yarn remove vuepress-theme-vdoing && rm -rf node_modules && yarn && yarn add vuepress-theme-vdoing -D",
"editFm": "node utils/editFrontmatter.js"
},
Expand Down
59 changes: 40 additions & 19 deletions docs/tech/00.写在前面/01.feature.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ article: false
## SeaMoon 1.1.3

### ❤️ What's New
* 🎡 docs: 增加手册页面sitemap站点地图(#7)(#8)
* 🔥 feat(server): 修改了阿里云默认的部署资源类型(vcpu 0.1/mem 128),来降低普通用户使用的价格消费 (#10)
* 🔥 feat(server): 增加了sealos部署方案,用更加便宜的价格使用seamoon (#11)
* 🔥 feat(server): 增加了docker server, 现在可以通过docker来启动服务端 (#12)
* 🔧 fix(config): 用更友好的方式来使用config,不再单一的通过域名特征来判断服务端地址类型。(#13)

[**Full Changelog**](https://github.com/DVKunion/SeaMoon/compare/1.1.2...1.1.3)
* 📝 docs: 增加手册页面sitemap站点地图(#7)(#8)
* ✨ feat(server): 修改了阿里云默认的部署资源类型(vcpu 0.1/mem 128),来降低普通用户使用的价格消费 (#10)
* ✨ feat(server): 增加了sealos部署方案,用更加便宜的价格使用seamoon (#11)
* ✨ feat(server): 增加了docker server, 现在可以通过docker来启动服务端 (#12)
* 🔧 fix(config): 用更友好的方式来使用config,不再单一的通过域名特征来判断服务端地址类型。(#13)

**Full Changelog**: https://github.com/DVKunion/SeaMoon/compare/1.1.2...1.1.3

* 41c5ce8 feat(docker): add docker server (#12)
* 1414293 feat: low cpu && mem cost (#10)
Expand All @@ -25,34 +26,54 @@ article: false
## SeaMoon 1.1.2

### ❤️ What's New
* 🔧 fix(websocket): 修正了protocol error detect 时仍挂起gorouting导致卡死的问题 (#6)
* 🔥 feat(dockerfile): 增加了docker client, 现在可以通过docker来启动客户端 (#6)

[**Full Changelog**](https://github.com/DVKunion/SeaMoon/compare/1.1.1...1.1.2)
* 🔧 fix(websocket): 修正了protocol error detect 时仍挂起gorouting导致卡死的问题 (#6)
* ✨ feat(dockerfile): 增加了docker client, 现在可以通过docker来启动客户端 (#6)

**Full Changelog**: https://github.com/DVKunion/SeaMoon/compare/1.1.1...1.1.2

## SeaMoon 1.1.1

### ❤️ What's New
* 🔧 fix(websocket): 修正了websocket在超出32768slice导致的panic。 (#4)
* 🔧 fix(websocket): 修整了websocket在close时写入message导致的panic。 (#4)
* 🔧 fix(websocket): 忽略了大量websocket链接导致的1006 abnormal close报错。 (#4)
* 🔧 fix(s.yaml): 修整了serverless-devs工具编排文件,目前可以通过serverless-devs工具`s deploy`一件部署至阿里云。 (#4)
* 🔧 fix(ci): 修整了 go-releaser ci 配置 (#3)
* 🔧 fix(docs): 更新了 README.md 较为过时的使用手册。

* 🔧 fix(websocket): 修正了 websocket 在超出 32768 slice导致的 panic。 (#4)
* 🔧 fix(websocket): 修整了 websocket 在 close 时写入 message 导致的 panic。 (#4)
* 🔧 fix(websocket): 忽略了大量 websocket 链接导致的 1006 abnormal close 报错。 (#4)
* 🔧 fix(s.yaml): 修整了 serverless-devs 工具编排文件,目前可以通过 serverless-devs 工具`s deploy`一件部署至阿里云。 (#4)
* 🔧 fix(ci): 修整了 go-releaser ci 配置 (#3)
* 🔧 fix(docs): 更新了 README.md 较为过时的使用手册。

### 🌈 Small Talk
> Hi, 各位,SeaMoon成功挤入2023 Kcon兵器谱,使得整个项目获得了一批关注;在此感谢大家对SeaMoon项目的浓厚兴趣与支持,谢谢各位🙏
> 由于工作原因,以及个人的一些想法枯竭,项目于去年创建,直到现在目前也仅支持了阿里云一个demo QAQ,因此整体给人并不是一个较为完善的使用效果。
> 1.1.1 版本后,我会尽量保证一些活跃性质的更新,以及一些比较有意思的想法demo迭代。

> Hi,各位,SeaMoon成功挤入2023Kcon兵器谱,使得整个项目获得了一批关注;在此感谢大家对SeaMoon项目的浓厚兴趣与支持,谢谢各位🙏
> 由于工作原因,以及个人的一些想法枯竭,项目于去年创建,直到现在目前也仅支持了阿里云一个demo QAQ,因此整体给人并不是一个较为完善的使用效果。1.1.1 版本后,我会尽量保证一些活跃性质的更新,以及一些比较有意思的想法demo迭代。
> 也欢迎对serverless感兴趣的安全小伙伴留言来交个朋友~
[**Full Changelog**](https://github.com/DVKunion/SeaMoon/compare/1.1.0...1.1.1)
**Full Changelog**: https://github.com/DVKunion/SeaMoon/compare/1.1.0...1.1.1

* bc209a9 doc: update README.md
* a2e7360 fix: go-releaser ci config (#3)
* 8f51e63 fix: readme.md
* fe658ff fix: some websocket error optimization (#4)
* c316527 hotfix: some docs and code format

## 1.1.0 (2022-09-27)

### Bug Fixes

* optimize connection ([70dfc5a](https://github.com/DVKunion/SeaMoon/commit/70dfc5ad4d25fd5b529097183c873d87ec37f126))
* optimize connection ([2b416c0](https://github.com/DVKunion/SeaMoon/commit/2b416c0b106ad0a6a21aa3da838cf311061e9ef8))

## 1.0.0 (2022-09-09)

### Features

* **ci:** add build
client ([215400c](https://github.com/DVKunion/SeaMoon/commit/215400cb7a3ae6c3f5f12df6828c8735156b810b))
* **pkg/socks5:** socks5 proxy beta
version ([20d586c](https://github.com/DVKunion/SeaMoon/commit/20d586ce1ac36f143c1e340aa3bf9132e35af230))
* **pkg/http:** http proxy beta
version ([3b41846](https://github.com/DVKunion/SeaMoon/commit/3b41846f75fe6d9510a9d040d76f97b35ce8c494))


## SeaMoon 1.1.0
Expand Down
10 changes: 1 addition & 9 deletions docs/tech/01.网络层/02.SOCKS5.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,4 @@ FC的不成熟的确限制了大部分的玩法,比如触发器种类,比如

最后就是处理好断开连接问题,来防止异常断开导致的panic,和节约云函数计费成本。

最终达成上图效果。

### SS

待开发

### VMess

待开发
最终达成上图效果。
File renamed without changes.
Loading
Loading