Embed go exp package requirements to ensure we don't use arbitrary exp, move utilities to utils
This commit is contained in:
@@ -5,7 +5,7 @@ import (
|
||||
"crypto/subtle"
|
||||
"encoding/binary"
|
||||
"git.gammaspectra.live/git/go-away/lib/challenge"
|
||||
"git.gammaspectra.live/git/go-away/lib/challenge/inline"
|
||||
"git.gammaspectra.live/git/go-away/utils/inline"
|
||||
"math/bits"
|
||||
"strconv"
|
||||
)
|
||||
|
Binary file not shown.
1
go.mod
1
go.mod
@@ -30,4 +30,5 @@ require (
|
||||
)
|
||||
|
||||
// Used by github.com/antlr4-go/antlr v4.13.0 via github.com/google/cel-go
|
||||
// Ensure we have no other exp package usages by only proxying the slices functions in that package
|
||||
replace golang.org/x/exp v0.0.0 => ./utils/exp
|
||||
|
@@ -2,7 +2,7 @@ package challenge
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"git.gammaspectra.live/git/go-away/lib/challenge/inline"
|
||||
"git.gammaspectra.live/git/go-away/utils/inline"
|
||||
)
|
||||
|
||||
type MakeChallenge func(in Allocation) (out Allocation)
|
||||
|
@@ -10,8 +10,8 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"git.gammaspectra.live/git/go-away/embed"
|
||||
"git.gammaspectra.live/git/go-away/lib/network"
|
||||
"git.gammaspectra.live/git/go-away/lib/policy"
|
||||
"git.gammaspectra.live/git/go-away/utils"
|
||||
"github.com/google/cel-go/common/types"
|
||||
"html/template"
|
||||
"io"
|
||||
@@ -91,7 +91,7 @@ func makeReverseProxy(target string) (*httputil.ReverseProxy, error) {
|
||||
return dialer.DialContext(ctx, "unix", addr)
|
||||
}
|
||||
// tell transport how to handle the unix url scheme
|
||||
transport.RegisterProtocol("unix", network.UnixRoundTripper{Transport: transport})
|
||||
transport.RegisterProtocol("unix", utils.UnixRoundTripper{Transport: transport})
|
||||
}
|
||||
|
||||
rp := httputil.NewSingleHostReverseProxy(u)
|
||||
|
@@ -13,9 +13,9 @@ import (
|
||||
"fmt"
|
||||
"git.gammaspectra.live/git/go-away/embed"
|
||||
challenge2 "git.gammaspectra.live/git/go-away/lib/challenge"
|
||||
"git.gammaspectra.live/git/go-away/lib/challenge/inline"
|
||||
"git.gammaspectra.live/git/go-away/lib/condition"
|
||||
"git.gammaspectra.live/git/go-away/lib/policy"
|
||||
"git.gammaspectra.live/git/go-away/utils/inline"
|
||||
"github.com/google/cel-go/cel"
|
||||
"github.com/google/cel-go/common/types"
|
||||
"github.com/google/cel-go/common/types/ref"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
package network
|
||||
package utils
|
||||
|
||||
import "net/http"
|
||||
|
Reference in New Issue
Block a user