mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-08 00:26:37 +08:00
[优化] 目录调整
This commit is contained in:
@@ -18,6 +18,7 @@ RUN --mount=type=cache,target=/go/pkg/mod \
|
||||
|
||||
COPY openflare-server ./openflare-server
|
||||
COPY openflare-agent ./openflare-agent
|
||||
COPY pkg ./pkg
|
||||
RUN --mount=type=cache,target=/go/pkg/mod \
|
||||
--mount=type=cache,target=/root/.cache/go-build \
|
||||
go build -trimpath -ldflags "-s -w -X 'github.com/rain-kl/openflare/openflare-agent/internal/config.Version=$VERSION'" -o /build/bin/openflare-agent ./openflare-agent/cmd/agent
|
||||
@@ -37,4 +38,3 @@ COPY --from=builder /build/bin/openflare-agent /usr/local/bin/openflare-agent
|
||||
EXPOSE 80 443 18081
|
||||
ENTRYPOINT ["/usr/local/bin/openflare-agent"]
|
||||
CMD ["-config", "/etc/openflare/agent.json"]
|
||||
|
||||
|
||||
@@ -13,9 +13,9 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/rain-kl/openflare/openflare-server/utils"
|
||||
"github.com/rain-kl/openflare/openflare-server/utils/geoip"
|
||||
"github.com/rain-kl/openflare/openflare-server/utils/geoip/iputil"
|
||||
"github.com/rain-kl/openflare/pkg/geoip"
|
||||
"github.com/rain-kl/openflare/pkg/geoip/iputil"
|
||||
"github.com/rain-kl/openflare/pkg/utils"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/rain-kl/openflare/openflare-server/utils/geoip"
|
||||
"github.com/rain-kl/openflare/pkg/geoip"
|
||||
)
|
||||
|
||||
func TestLoadDefaultsToManagedBinaryPaths(t *testing.T) {
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/rain-kl/openflare/openflare-agent/internal/geoipdata"
|
||||
"github.com/rain-kl/openflare/openflare-server/utils/geoip"
|
||||
"github.com/rain-kl/openflare/pkg/geoip"
|
||||
)
|
||||
|
||||
type Updater struct {
|
||||
|
||||
@@ -20,8 +20,8 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/rain-kl/openflare/openflare-server/utils"
|
||||
openrestyrender "github.com/rain-kl/openflare/openflare-server/utils/render/openresty"
|
||||
openrestyrender "github.com/rain-kl/openflare/pkg/render/openresty"
|
||||
"github.com/rain-kl/openflare/pkg/utils"
|
||||
|
||||
"github.com/rain-kl/openflare/openflare-agent/internal/protocol"
|
||||
)
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
openrestyrender "github.com/rain-kl/openflare/openflare-server/utils/render/openresty"
|
||||
openrestyrender "github.com/rain-kl/openflare/pkg/render/openresty"
|
||||
|
||||
"github.com/rain-kl/openflare/openflare-agent/internal/nginx"
|
||||
"github.com/rain-kl/openflare/openflare-agent/internal/protocol"
|
||||
|
||||
@@ -14,7 +14,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/rain-kl/openflare/openflare-server/utils"
|
||||
"github.com/rain-kl/openflare/pkg/utils"
|
||||
|
||||
"github.com/rain-kl/openflare/openflare-agent/internal/agent"
|
||||
"github.com/rain-kl/openflare/openflare-agent/internal/config"
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/rain-kl/openflare/openflare-agent/internal/protocol"
|
||||
shared "github.com/rain-kl/openflare/openflare-server/utils/wsclient"
|
||||
shared "github.com/rain-kl/openflare/pkg/wsclient"
|
||||
)
|
||||
|
||||
type WSMessage = shared.WSMessage
|
||||
|
||||
Reference in New Issue
Block a user