Projects STRLCPY SeaMoon Commits af2d3f6d
🤬
  • feat(ci): add build client

    finish GitHub Action to auto build client
  • Loading...
  • DVKunion committed 2 years ago
    af2d3f6d
    1 parent 20d586ce
  • ■ ■ ■ ■ ■ ■
    .github/conf/.goreleaser.yml
     1 +before:
     2 + hooks:
     3 + - go mod tidy
     4 +builds:
     5 + - binary: client
     6 + env:
     7 + - CGO_ENABLED=0
     8 + main: ./cmd/client.go
     9 + goos:
     10 + - linux
     11 + - windows
     12 + - darwin
     13 + goarm:
     14 + - 6
     15 + - 7
     16 + ldflags:
     17 + - -s -w -X github.com/DVKunion/SeaMoon/pkg/consts.Version=1.0.0
     18 +archives:
     19 + - replacements:
     20 + darwin: Darwin
     21 + linux: Linux
     22 + windows: Windows
     23 + 386: i386
     24 + amd64: x86_64
     25 +checksum:
     26 + name_template: 'checksums.txt'
     27 +snapshot:
     28 + name_template: "{{ incpatch .Version }}-next"
     29 +changelog:
     30 + sort: asc
     31 + filters:
     32 + exclude:
     33 + - '^docs:'
     34 + - '^test:'
  • ■ ■ ■ ■ ■ ■
    .github/workflows/build.yml
    1  -# github.com/DVKunion/SeaMoon/pkg/consts.Version
     1 +name: SeaMoon
     2 + 
     3 +on:
     4 + push:
     5 + branches: [ main ]
     6 + pull_request:
     7 + branches: [ main ]
     8 + 
     9 +jobs:
     10 + 
     11 + build:
     12 + runs-on: ubuntu-latest
     13 + steps:
     14 + - uses: actions/checkout@v2
     15 + 
     16 + - name: Set up Go
     17 + uses: actions/setup-go@v2
     18 + with:
     19 + go-version: 1.18
     20 + 
     21 + - name: Build
     22 + run: go build --ldflags "-s -w -X github.com/DVKunion/SeaMoon/pkg/consts.Version=1.0.0" cmd/client.go
     23 + 
     24 + 
  • ■ ■ ■ ■ ■ ■
    .github/workflows/release.yml
    1  -#name: Release
    2  -#
    3  -#on:
    4  -# push:
    5  -# tags:
    6  -# - 'v*'
    7  -#
    8  -#jobs:
    9  -# binary:
    10  -# name: release binary files
    11  -# runs-on: ubuntu-latest
    12  -# steps:
    13  -# - name: Set up Go 1.x
    14  -# uses: actions/setup-go@v2
    15  -# with:
    16  -# go-version: ^1.18
    17  -#
    18  -# - name: Checkout
    19  -# uses: actions/checkout@v2
    20  -#
    21  -# - name: Build
    22  -# run: |
    23  -# bash build.sh ${GITHUB_REF##*/}
    24  -#
    25  -# - name: release
    26  -# env:
    27  -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    28  -# run: |
    29  -# set -x
    30  -# assets=()
    31  -# for asset in targets/*; do
    32  -# assets+=("-a" "$asset")
    33  -# done
    34  -# tag_name="${GITHUB_REF##*/}"
    35  -# hub release create "${assets[@]}" -m "$tag_name" "$tag_name"
    36  -#
    37  -# docker:
    38  -# name: Release Docker
    39  -# runs-on: ubuntu-latest
    40  -# steps:
    41  -# - name: Checkout
    42  -# uses: actions/checkout@v2
    43  -#
    44  -# - name: Dockerhub login
    45  -# env:
    46  -# DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
    47  -# run: |
    48  -# echo "${DOCKER_PASSWORD}" | docker login --username luyuhuang --password-stdin
    49  -#
    50  -# - name: Set up QEMU
    51  -# uses: docker/setup-qemu-action@v1
    52  -#
    53  -# - name: Set up Docker Buildx
    54  -# id: buildx
    55  -# uses: docker/setup-buildx-action@v1
    56  -# with:
    57  -# version: latest
    58  -#
    59  -# - name: Build dockerfile (with push)
    60  -# run: |
    61  -# docker buildx build \
    62  -# --platform=linux/amd64,linux/arm/v7,linux/arm64 \
    63  -# --output "type=image,push=true" \
    64  -# --build-arg VERSION=${GITHUB_REF##*/} \
    65  -# --file ./mainfest/Dockerfile . \
    66  -# --tag dvkunion/seamoon:latest \
    67  -# --tag dvkunion/seamoon:${GITHUB_REF##*/}
     1 +name: goreleaser
     2 + 
     3 +on:
     4 + push:
     5 + tags:
     6 + - "*"
     7 + 
     8 +jobs:
     9 + build:
     10 + name: GoReleaser build
     11 + runs-on: ubuntu-latest
     12 + steps:
     13 + - name: Checkout
     14 + uses: actions/checkout@v2
     15 + with:
     16 + fetch-depth: 0
     17 + 
     18 + - name: Set up Go
     19 + uses: actions/setup-go@v2
     20 + with:
     21 + go-version: 1.18
     22 + id: go
     23 + 
     24 + - name: Run GoReleaser
     25 + uses: goreleaser/goreleaser-action@v2
     26 + with:
     27 + distribution: goreleaser
     28 + version: latest
     29 + args: -f .github/conf/.goreleaser.yml
     30 + workdir: .
     31 + env:
     32 + GITHUB_TOKEN: ${{ secrets.GO_RELEASER_GITHUB_TOKEN }}
    68 33   
  • ■ ■ ■ ■ ■ ■
    .gitignore
    skipped 19 lines
    20 20  *.pem
    21 21  *.crt
    22 22  *.key
     23 + 
     24 +dist/
  • ■ ■ ■ ■ ■ ■
    CHANGELOG.md
     1 +# 1.0.0 (2022-09-09)
     2 + 
     3 + 
     4 +### Features
     5 + 
     6 +* **ci:** add build client ([215400c](https://github.com/DVKunion/SeaMoon/commit/215400cb7a3ae6c3f5f12df6828c8735156b810b))
     7 +* **pkg/socks5:** socks5 proxy beta version ([20d586c](https://github.com/DVKunion/SeaMoon/commit/20d586ce1ac36f143c1e340aa3bf9132e35af230))
     8 +* **pkg/http:** http proxy beta version ([3b41846](https://github.com/DVKunion/SeaMoon/commit/3b41846f75fe6d9510a9d040d76f97b35ce8c494))
     9 + 
     10 + 
     11 + 
     12 + 
  • ■ ■ ■ ■ ■ ■
    README.md
    1 1  <p align="center">
    2  - <img src="https://cdn.dvkunion.cn/github/logo.png" width="360" alt="logo"/>
     2 + <img src="https://cdn.dvkunion.cn/SeaMoon/logo.png" width="360" alt="logo"/>
    3 3  </p>
    4 4  <h1 align="center">Sea Moon</h1>
    5 5   
    skipped 10 lines
    16 16  <p align="center">
    17 17   月海之名取自于苏轼的《西江月·顷在黄州》,寓意月海取自于传统安全工具,用之于云,最终达到隐匿于海的效果。
    18 18  </p>
    19  -<p align="center">
    20  -目前工具正处于开发中,欢迎各位提交 <a href="https://github.com/DVKunion/SeaMoon/issues"><b>Issue</b></a> | <a href="https://github.com/DVKunion/SeaMoon/pulls"><b>Pr</b></a>
     19 +<p align="center"><b>
     20 +目前工具正处于开发中,欢迎各位提交</b> <a href="https://github.com/DVKunion/SeaMoon/issues" ><b>Issue</b></a> | <a href="https://github.com/DVKunion/SeaMoon/pulls"><b>Pr</b></a>
    21 21  </p>
    22 22   
    23 23  <br />
    skipped 77 lines
  • ■ ■ ■ ■ ■ ■
    docs/DEPLOY.md
    skipped 4 lines
    5 5  1. fork 该仓库到您自己的 github 账户下
    6 6  2. 进入阿里云控制台,点击应用 -> 创建应用
    7 7   
    8  -![创建应用](img/deploy-aliyun-1.png)
     8 +![创建应用](https://cdn.dvkunion.cn/SeaMoon/deploy-aliyun-1.png)
    9 9   
    10 10  3. 选择 `通过仓库导入应用` , 授权Github账户后,选择fork好的仓库,如果您之前没有使用过阿里云,在角色权限处还需要进行一次授权。
    11 11   
    12  -![导入应用](img/deploy-aliyun-2.png)
     12 +![导入应用](https://cdn.dvkunion.cn/SeaMoon/deploy-aliyun-2.png)
    13 13   
    14 14  4. 点击创建,等待服务部署成功,即可获取到代理地址
    15 15   
    16  -![img.png](img/deploy-aliyun-3.png)
     16 +![img.png](https://cdn.dvkunion.cn/SeaMoon/deploy-aliyun-3.png)
     17 + 
     18 +> 注意,socks5代理和http代理是不同的代理地址(因为是不同的云函数服务)。如果您部署了多个代理,请注意代理地址右侧会有一个`+1`,里面展示了您其他代理的地址。
     19 +>
     20 +> e.g.
     21 +> http://socks-proxy.seamon-service.xxx.xxxx.x.xx.x.x..x.x 表示是socks5代理
     22 +> http://http-proxy.seamon-service.xxx.xxxx.x.xx.x.x..x.x 表示是http代理
    17 23   
    18 24  5. [开启客户端](https://github.com/DVKunion/SeaMoon/blob/main/docs/START.md), 尽情享用
    19 25   
    20  -![speed.png](img/speed.png)
     26 +![speed.png](https://cdn.dvkunion.cn/SeaMoon/speed.png)
  • ■ ■ ■ ■ ■
    docs/FEATURE.md
    skipped 7 lines
    8 8  4. 如果将这些项目比作是概念性工具,那么月海致力于打造的是一个较为成熟化的,能够快速简易应用的工具集产品。
    9 9  5. 月海希望能够抛砖引玉,提出一个简易的框架和模式,将现有的大部分可迁移至云端操作的攻击手段集成进来,最终达到随手拿来的一台崭新电脑,5分钟即可进入攻击状态(理想)。
    10 10   
    11  -## V1.0.0
     11 +## 1.0.0
    12 12   
    13 13  + 重新实现了 https://github.com/shimmeris/SCFProxy 大佬原有的网络功能: HTTP代理、SOCKs5代理
    14 14  + 优化了 SCFProxy 的部分机制:比如socks5 15分钟超时的问题,以及socks5的连接模式
    15  -+ 实验性的增加了nmap分布式扫描功能
  • ■ ■ ■ ■ ■
    docs/START.md
    skipped 9 lines
    10 10  `go mod tidy`
    11 11   
    12 12  **http代理**
    13  -`go run cmd/client.go -m http -l :9000 -p http://YOUR_FC_SERVER -v`
     13 +`./client -m http -l :9000 -p http://YOUR_FC_SERVER -v`
     14 + 
     15 +YOUR_FC_SERVER是云函数部署后拿到的地址
    14 16   
    15 17  **socks5代理**
    16  -`go run cmd/client.go -m socks5 -l :9000 -p ws://YOUR_FC_SERVER -v`
     18 +`./client -m socks5 -l :9000 -p ws://YOUR_FC_SERVER -v`
     19 + 
     20 +注意要将http://地址协议改为ws://
    17 21   
    18 22  证书信任:
    19 23  客户端运行后,会自动在运行目录下生成证书文件。
    skipped 13 lines
  • docs/img/deploy-aliyun-1.png
  • docs/img/deploy-aliyun-2.png
  • docs/img/deploy-aliyun-3.png
  • docs/img/speed.png
  • docs/img/speed2.png
  • ■ ■ ■ ■
    docs/net/HTTP.md
    skipped 12 lines
    13 13   
    14 14  ## 效果
    15 15   
    16  -![speed.png](../img/speed.png)
     16 +![speed.png](https://cdn.dvkunion.cn/SeaMoon/speed.png)
    17 17   
    18 18  ## 原理
    19 19   
    skipped 54 lines
  • ■ ■ ■ ■
    docs/net/SOCKS5.md
    skipped 2 lines
    3 3  ## s5效果
    4 4   
    5 5  相比http代理更稳定,速度更快。
    6  -![speed.png](../img/speed2.png)
     6 +![speed.png](https://cdn.dvkunion.cn/SeaMoon/speed2.png)
    7 7   
    8 8  ## 原理
    9 9   
    skipped 72 lines
  • ■ ■ ■ ■
    manifest/Dockerfile
    1  - 
     1 +# Todo Docker Client
  • ■ ■ ■ ■ ■ ■
    manifest/build.sh
    1  -#! /bin/bash
    2  - 
    3  - 
  • ■ ■ ■ ■
    s.yaml
    skipped 66 lines
    67 67   pre-deploy:
    68 68   - run: go mod tidy
    69 69   path: ./
    70  - - run: GO111MODULE=on GOOS=linux CGO_ENABLED=0 go build -ldflags "-X github.com/DVKunion/SeaMoon/pkg/consts.Version=beta" -o main cmd/aliyun_server.go
     70 + - run: GO111MODULE=on GOOS=linux CGO_ENABLED=0 go build -ldflags "-X github.com/DVKunion/SeaMoon/pkg/consts.Version=1.0.0" -o main cmd/aliyun_server.go
    71 71   path: ./
    72 72   - run: chmod +x main
    73 73   path: ./
    skipped 38 lines
Please wait...
Page is in error, reload to recover