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 #5

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open
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
23 changes: 21 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ on:
paths:
- '**.go'
- 'go.mod'
- 'go.sum'
- '.github/workflows/go.yml'
pull_request:
paths:
- '**.go'
- 'go.mod'
- 'go.sum'
- '.github/workflows/go.yml'
env:
GOPROXY: "https://proxy.golang.org"
Expand All @@ -21,8 +23,25 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.22.x
- name: Create dist file
run: mkdir -p web/dist && touch web/dist/index.html
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v4
with:
version: v1.49.0
version: v1.54
args: --timeout=10m
- name: Check Go module tidiness
shell: bash
run: |
go mod tidy
STATUS=$(git status --porcelain)
if [ ! -z "$STATUS" ]; then
echo "Unstaged files:"
echo $STATUS
echo "Run 'go mod tidy' commit them"
exit 1
fi
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,3 @@
.idea/
config.json
data/

Houki
houki.db
12 changes: 0 additions & 12 deletions assets/embed.go

This file was deleted.

1 change: 0 additions & 1 deletion assets/migrations/000001_init.down.sql

This file was deleted.

9 changes: 0 additions & 9 deletions assets/migrations/000001_init.up.sql

This file was deleted.

12 changes: 0 additions & 12 deletions assets/migrations/embed.go

This file was deleted.

133 changes: 0 additions & 133 deletions assets/static/js/main.js

This file was deleted.

10 changes: 2 additions & 8 deletions Houki.go → cmd/houki/houki.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"os/signal"
"syscall"

"github.com/sirupsen/logrus"
"github.com/urfave/cli/v2"
log "unknwon.dev/clog/v2"

"github.com/wuhan005/Houki/internal/cmd"
)
Expand All @@ -16,12 +16,6 @@ var (
)

func main() {
defer log.Stop()
err := log.NewConsole()
if err != nil {
panic(err)
}

app := cli.NewApp()
app.Name = "Houki"
app.Usage = "Customizable MitM proxy"
Expand All @@ -30,7 +24,7 @@ func main() {
cmd.Web,
}
if err := app.Run(os.Args); err != nil {
log.Fatal("Failed to start application: %v", err)
logrus.WithError(err).Fatal("Failed to start application")
}

sig := make(chan os.Signal, 1)
Expand Down
49 changes: 39 additions & 10 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,25 +1,54 @@
module github.com/wuhan005/Houki

go 1.16
go 1.22.0

toolchain go1.22.2

require (
github.com/chromedp/chromedp v0.7.4
github.com/Code-Hex/go-generics-cache v1.5.1
github.com/elazarl/goproxy v0.0.0-20210110162100-a92cc753f88e
github.com/flamego/binding v0.0.0-20210821162210-4f53bad2a3a6
github.com/flamego/flamego v0.0.0-20210821060740-3c58a415258e
github.com/flamego/session v0.0.0-20210607182212-8d30fdff82f2
github.com/flamego/template v0.0.0-20210515150544-049eb6703243
github.com/flamego/flamego v1.9.4
github.com/glebarez/sqlite v1.5.0
github.com/golang-migrate/migrate/v4 v4.14.1
github.com/google/cel-go v0.7.2
github.com/lib/pq v1.10.4
github.com/mhmtszr/concurrent-swiss-map v1.0.8
github.com/pkg/errors v0.9.1
github.com/sirupsen/logrus v1.7.0
github.com/urfave/cli/v2 v2.3.0
github.com/wuhan005/govalid v0.0.4
gorm.io/gorm v1.24.2
unknwon.dev/clog/v2 v2.2.0
)

require (
golang.org/x/crypto v0.0.0-20220307211146-efcb8507fb70 // indirect
golang.org/x/text v0.3.7 // indirect
github.com/alecthomas/participle/v2 v2.1.1 // indirect
github.com/antlr/antlr4 v0.0.0-20200503195918-621b933c7a7f // indirect
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
github.com/charmbracelet/lipgloss v0.13.0 // indirect
github.com/charmbracelet/log v0.4.0 // indirect
github.com/charmbracelet/x/ansi v0.3.2 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d // indirect
github.com/glebarez/go-sqlite v1.19.1 // indirect
github.com/go-logfmt/logfmt v0.6.0 // indirect
github.com/golang/protobuf v1.4.3 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/jinzhu/now v1.1.5 // indirect
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.16 // indirect
github.com/muesli/termenv v0.15.2 // indirect
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/russross/blackfriday/v2 v2.0.1 // indirect
github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
github.com/stoewer/go-strcase v1.2.0 // indirect
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c // indirect
golang.org/x/sys v0.26.0 // indirect
golang.org/x/text v0.17.0 // indirect
google.golang.org/genproto v0.0.0-20201102152239-715cce707fb0 // indirect
google.golang.org/protobuf v1.25.0 // indirect
modernc.org/libc v1.19.0 // indirect
modernc.org/mathutil v1.5.0 // indirect
modernc.org/memory v1.4.0 // indirect
modernc.org/sqlite v1.19.1 // indirect
)
Loading
Loading