Skip to content
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 3 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,19 @@ jobs:
run: make build

- name: upload artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: binary
path: build/


oci:
name: OCI
runs-on: ubuntu-latest
needs: Build
needs: build
steps:
- uses: actions/checkout@v2

- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
name: binary
path: build/
Expand Down
8 changes: 6 additions & 2 deletions cmd/proxy/handle.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"fmt"
"net/http"
"path"

"github.com/gin-gonic/gin"

Expand Down Expand Up @@ -63,7 +64,7 @@ func newEngine(
return nil
}))

e.Any(conf.Component.Vless.Path, func(c *gin.Context) {
var fn = func(c *gin.Context) {
switch vlessConf.Auth {
case auth.GlobalUser, "":
username := c.Param("username")
Expand All @@ -79,7 +80,10 @@ func newEngine(
c.AbortWithStatus(http.StatusNotFound)
}
c.Abort()
})
}

e.Any(conf.Component.Vless.Path, fn)
e.Any(path.Join(conf.Component.Vless.Path, "*other"), fn)
}

if conf.Component.Registry.Enable {
Expand Down
4 changes: 2 additions & 2 deletions cmd/proxy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"syscall"

"github.com/gin-gonic/gin"
"github.com/lucas-clemente/quic-go/http3"
"github.com/quic-go/quic-go/http3"
"github.com/sirupsen/logrus"
"github.com/spf13/pflag"

Expand Down Expand Up @@ -84,7 +84,7 @@ func main() {
Addr: conf.HTTPS,
}
en.Use(func(c *gin.Context) {
err := h3Server.SetQuicHeaders(c.Writer.Header())
err := h3Server.SetQUICHeaders(c.Writer.Header())
if err != nil {
logrus.Errorf("setQuicHeaders:%s", err)
}
Expand Down
46 changes: 22 additions & 24 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
module github.com/lyp256/proxy

go 1.19
go 1.22

toolchain go1.23.2

require (
github.com/distribution/distribution/v3 v3.0.0-20221208165359-362910506bc2
github.com/gin-gonic/gin v1.8.2
github.com/lucas-clemente/quic-go v0.31.0
github.com/quic-go/quic-go v0.48.2
github.com/sirupsen/logrus v1.8.1
github.com/spf13/pflag v1.0.5
github.com/v2fly/v2ray-core/v4 v4.43.0
Expand All @@ -22,7 +24,7 @@ require (
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
github.com/aws/aws-sdk-go v1.43.16 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba // indirect
github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c // indirect
github.com/docker/go-metrics v0.0.1 // indirect
Expand All @@ -32,45 +34,41 @@ require (
github.com/go-playground/locales v0.14.0 // indirect
github.com/go-playground/universal-translator v0.18.0 // indirect
github.com/go-playground/validator/v10 v10.11.1 // indirect
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 // indirect
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/goccy/go-json v0.9.11 // indirect
github.com/gofrs/uuid v4.0.0+incompatible // indirect
github.com/golang-jwt/jwt/v4 v4.2.0 // indirect
github.com/golang/mock v1.6.0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/gomodule/redigo v1.8.2 // indirect
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 // indirect
github.com/gorilla/handlers v1.5.1 // indirect
github.com/gorilla/mux v1.8.0 // indirect
github.com/hashicorp/golang-lru v0.5.4 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/leodido/go-urn v1.2.1 // indirect
github.com/marten-seemann/qpack v0.3.0 // indirect
github.com/marten-seemann/qtls-go1-18 v0.1.3 // indirect
github.com/marten-seemann/qtls-go1-19 v0.1.1 // indirect
github.com/mattn/go-isatty v0.0.16 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/mitchellh/mapstructure v1.1.2 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/ncw/swift v1.0.47 // indirect
github.com/onsi/ginkgo/v2 v2.2.0 // indirect
github.com/onsi/ginkgo/v2 v2.9.5 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.0.2 // indirect
github.com/pelletier/go-toml/v2 v2.0.6 // indirect
github.com/prometheus/client_golang v1.12.1 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.32.1 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/prometheus/client_golang v1.19.1 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/common v0.48.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/quic-go/qpack v0.5.1 // indirect
github.com/ugorji/go/codec v1.2.7 // indirect
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3 // indirect
golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
golang.org/x/net v0.4.0 // indirect
golang.org/x/sys v0.3.0 // indirect
golang.org/x/text v0.5.0 // indirect
golang.org/x/tools v0.1.12 // indirect
google.golang.org/protobuf v1.28.1 // indirect
go.uber.org/mock v0.4.0 // indirect
golang.org/x/crypto v0.26.0 // indirect
golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/net v0.28.0 // indirect
golang.org/x/sys v0.23.0 // indirect
golang.org/x/text v0.17.0 // indirect
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
google.golang.org/protobuf v1.33.0 // indirect
)
Loading
Loading