Skip to content

Commit

Permalink
feat: add Dockerfile (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
DVKunion committed Jul 18, 2023
1 parent 4216747 commit f6e1ac7
Show file tree
Hide file tree
Showing 8 changed files with 83 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
tags:
- "*"
pull_request:
branches: [ main ]
branches: [ "main" ]

jobs:
build:
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/package.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Package
on:
push:
tags:
- "*"

jobs:
package-docker:
name: package-docker
runs-on: ubuntu-20.04
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v3
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: docker/build-push-action@v3
with:
push: true
platforms: |
linux/amd64
linux/arm64
linux/386
tags: |
dvkunion/seamoon-client:latest
dvkunion/seamoon-client:${{github.ref_name}}
build-args: |
VERSION=${{github.ref_name}}
context: ./
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 "-s -w -X github.com/DVKunion/SeaMoon/pkg/consts.Version=${VERSION}" -o /tmp/client cmd/client.go
RUN chmod +x /tmp/client
# run stage
FROM scratch
LABEL maintainer="[email protected]"
WORKDIR /app
COPY --from=build /tmp/client /app/client
EXPOSE 7777 1080 9000
ENTRYPOINT ["/app/client"]
20 changes: 0 additions & 20 deletions docs/tech/00.定位与特性/01.FEATURE.md

This file was deleted.

29 changes: 27 additions & 2 deletions docs/tech/00.定位与特性/01.feature.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,39 @@ article: false

# FEATURE

## 1.1.0
## 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 较为过时的使用手册。

### 🌈 Small Talk
> Hi, 各位,SeaMoon成功挤入2023 Kcon兵器谱,使得整个项目获得了一批关注;在此感谢大家对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



## SeaMoon 1.1.0

+ 修复了HTTP连接的一些bug,并使用更活跃的客户端代理库 `martian` 代替 `goproxy`
+ 重构了客户端结构,提供了一个简易的B/S架构的控制管理端
+ 修复了SOCKS链接不断开导致的函数计费超时问题。
+ 增加了Controller管理

## 1.0.0
## SeaMoon 1.0.0

+ 重新实现了 https://github.com/shimmeris/SCFProxy 大佬原有的网络功能: HTTP代理、SOCKs5代理
+ 优化了 SCFProxy 的部分机制:比如socks5的连接模式、socks5 15分钟超时的问题等。
1 change: 0 additions & 1 deletion manifest/Dockerfile

This file was deleted.

8 changes: 5 additions & 3 deletions pkg/client/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ package client

import (
"bytes"
"os"

"github.com/BurntSushi/toml"
"github.com/DVKunion/SeaMoon/pkg/consts"
log "github.com/sirupsen/logrus"
"os"

"github.com/DVKunion/SeaMoon/pkg/consts"
)

type clientConfig struct {
Expand Down Expand Up @@ -43,7 +45,7 @@ func defaultConfig() *clientConfig {
ProxyAddr: []string{""},
Control: controlConfig{
// is dangerous to open Control page for everyone, do not set value like: ":7777" / "0.0.0.0:7777"
ConfigAddr: "127.0.0.1:7777",
ConfigAddr: ":7777",
LogPath: "web.log",
},
Http: proxyConfig{
Expand Down
4 changes: 2 additions & 2 deletions s.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ actions:

services:
SeaMoon-FC-HTTP-Proxy:
component: devscomp/fc
component: fc
props:
region: ${vars.region}
service: ${vars.service}
Expand Down Expand Up @@ -65,7 +65,7 @@ services:
- DELETE
- OPTIONS
SeaMoon-FC-Socks-Proxy:
component: devscomp/fc
component: fc
props:
region: ${vars.region}
service: ${vars.service}
Expand Down

0 comments on commit f6e1ac7

Please sign in to comment.