Skip to content

Commit

Permalink
Go mod tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
willnode committed Jun 16, 2024
1 parent a257f8c commit 0031138
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 19 deletions.
8 changes: 2 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
module github.com/willnode/proxy-unit/v2

go 1.20
go 1.18

require (
github.com/elazarl/goproxy v0.0.0-20231117061959-7cc037d33fb5 // indirect
github.com/gorilla/websocket v1.5.3 // indirect
unit.nginx.org/go v0.0.0-20240321134741-48d79170596d // indirect
)
require unit.nginx.org/go v0.0.0-20240614141138-35a572c2813e
10 changes: 2 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,8 +1,2 @@
github.com/elazarl/goproxy v0.0.0-20231117061959-7cc037d33fb5 h1:m62nsMU279qRD9PQSWD1l66kmkXzuYcnVJqL4XLeV2M=
github.com/elazarl/goproxy v0.0.0-20231117061959-7cc037d33fb5/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM=
github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2/go.mod h1:gNh8nYJoAm43RfaxurUnxr+N1PwuFV3ZMl/efxlIlY8=
github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg=
github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/rogpeppe/go-charset v0.0.0-20180617210344-2471d30d28b4/go.mod h1:qgYeAmZ5ZIpBWTGllZSQnw97Dj+woV0toclVaRGI8pc=
unit.nginx.org/go v0.0.0-20240321134741-48d79170596d h1:BTuWe0M3bnaCJTCRJhaAX4ouyLZrGeI4knaSZ22W88Q=
unit.nginx.org/go v0.0.0-20240321134741-48d79170596d/go.mod h1:rIOZelt2HNxH+Usc1WT2b5OlEDHQwc3IZRxYxiZiKvM=
unit.nginx.org/go v0.0.0-20240614141138-35a572c2813e h1:QWYIHrz+Pu+IWP3r7aueoLUxTOzoSJqPJwumac2udBQ=
unit.nginx.org/go v0.0.0-20240614141138-35a572c2813e/go.mod h1:rIOZelt2HNxH+Usc1WT2b5OlEDHQwc3IZRxYxiZiKvM=
2 changes: 0 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"os"
"os/exec"

"github.com/gorilla/websocket"
unit "unit.nginx.org/go"
)

Expand Down Expand Up @@ -46,7 +45,6 @@ func main() {
func startProxy(address string) error {
proxy := Proxy{
DialTarget: fmt.Sprintf("localhost:%d", outPort),
upgrader: websocket.Upgrader{},
}

err := unit.ListenAndServe(address, proxy)
Expand Down
3 changes: 0 additions & 3 deletions proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,11 @@ import (
"net/http"
"strings"
"time"

"github.com/gorilla/websocket"
)

type Proxy struct {
DialTarget string
connected bool
upgrader websocket.Upgrader
}

func (proxy Proxy) ServeHTTP(w http.ResponseWriter, r *http.Request) {
Expand Down

0 comments on commit 0031138

Please sign in to comment.