mirror of
https://github.com/h44z/wg-portal.git
synced 2025-08-09 15:02:24 +00:00
minor cleanup
This commit is contained in:
parent
d8624748b7
commit
4b3225e293
27
Makefile
27
Makefile
@ -79,10 +79,6 @@ build: build-dependencies
|
||||
-ldflags "-w -s -extldflags \"-static\" -X 'github.com/h44z/wg-portal/internal/server.Version=${ENV_BUILD_IDENTIFIER}-${ENV_BUILD_VERSION}'" \
|
||||
cmd/wg-portal/main.go
|
||||
|
||||
CGO_ENABLED=0 $(GOCMD) build -o $(BUILDDIR)/hc \
|
||||
-ldflags "-w -s -extldflags \"-static\"" \
|
||||
cmd/hc/main.go
|
||||
|
||||
#< build-amd64: Build all executables for AMD64
|
||||
.PHONY: build-amd64
|
||||
build-amd64: build-dependencies
|
||||
@ -90,10 +86,6 @@ build-amd64: build-dependencies
|
||||
-ldflags "-w -s -extldflags \"-static\" -X 'github.com/h44z/wg-portal/internal/server.Version=${ENV_BUILD_IDENTIFIER}-${ENV_BUILD_VERSION}'" \
|
||||
cmd/wg-portal/main.go
|
||||
|
||||
CGO_ENABLED=0 $(GOCMD) build -o $(BUILDDIR)/hc-amd64 \
|
||||
-ldflags "-w -s -extldflags \"-static\"" \
|
||||
cmd/hc/main.go
|
||||
|
||||
#< build-arm64: Build all executables for ARM64
|
||||
.PHONY: build-arm64
|
||||
build-arm64: build-dependencies
|
||||
@ -101,10 +93,6 @@ build-arm64: build-dependencies
|
||||
-ldflags "-w -s -extldflags \"-static\" -X 'github.com/h44z/wg-portal/internal/server.Version=${ENV_BUILD_IDENTIFIER}-${ENV_BUILD_VERSION}'" \
|
||||
cmd/wg-portal/main.go
|
||||
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 $(GOCMD) build -o $(BUILDDIR)/hc-arm64 \
|
||||
-ldflags "-w -s -extldflags \"-static\"" \
|
||||
cmd/hc/main.go
|
||||
|
||||
#< build-arm: Build all executables for ARM32
|
||||
.PHONY: build-arm
|
||||
build-arm: build-dependencies
|
||||
@ -112,10 +100,6 @@ build-arm: build-dependencies
|
||||
-ldflags "-w -s -extldflags \"-static\" -X 'github.com/h44z/wg-portal/internal/server.Version=${ENV_BUILD_IDENTIFIER}-${ENV_BUILD_VERSION}'" \
|
||||
cmd/wg-portal/main.go
|
||||
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=7 $(GOCMD) build -o $(BUILDDIR)/hc-arm \
|
||||
-ldflags "-w -s -extldflags \"-static\"" \
|
||||
cmd/hc/main.go
|
||||
|
||||
#< build-dependencies: Generate the output directory for compiled executables and download dependencies
|
||||
.PHONY: build-dependencies
|
||||
build-dependencies:
|
||||
@ -123,8 +107,13 @@ build-dependencies:
|
||||
@mkdir -p $(BUILDDIR)
|
||||
cp scripts/wg-portal.service $(BUILDDIR)
|
||||
cp scripts/wg-portal.env $(BUILDDIR)
|
||||
cd frontend; $(NPMCMD) install
|
||||
|
||||
#< frontend: Build Vue.js frontend
|
||||
frontend:
|
||||
cd frontend; $(NPMCMD) run build
|
||||
frontend: frontend-dependencies
|
||||
cd frontend; $(NPMCMD) run build
|
||||
|
||||
#< frontend-dependencies: Generate the output directory for compiled executables and download frontend dependencies
|
||||
.PHONY: frontend-dependencies
|
||||
frontend-dependencies:
|
||||
@mkdir -p $(BUILDDIR)
|
||||
cd frontend; $(NPMCMD) install
|
||||
|
@ -62,6 +62,8 @@ The following configuration options are available:
|
||||
| use_ip_v6 | advanced | true | |
|
||||
| config_storage_path | advanced | | |
|
||||
| expiry_check_interval | advanced | 15m | |
|
||||
| rule_prio_offset | advanced | 20000 | |
|
||||
| route_table_offset | advanced | 20000 | |
|
||||
| use_ping_checks | statistics | true | |
|
||||
| ping_check_workers | statistics | 10 | |
|
||||
| ping_unprivileged | statistics | false | |
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -14,7 +14,7 @@
|
||||
let WGPORTAL_SITE_COMPANY_NAME="WireGuard Portal";
|
||||
</script>
|
||||
<script src="/api/v0/config/frontend.js"></script>
|
||||
<script type="module" crossorigin src="/app/assets/index-96214b1b.js"></script>
|
||||
<script type="module" crossorigin src="/app/assets/index-4c1df829.js"></script>
|
||||
<link rel="stylesheet" href="/app/assets/index-7144f109.css">
|
||||
</head>
|
||||
<body class="d-flex flex-column min-vh-100">
|
||||
|
@ -51,7 +51,7 @@ func (m Manager) SendPeerEmail(ctx context.Context, linkOnly bool, peers ...doma
|
||||
|
||||
user, err := m.users.GetUser(ctx, peer.UserIdentifier)
|
||||
if err != nil {
|
||||
logrus.Debugf("skipping peer email for %s, unable to fetch user: %w", peerId, err)
|
||||
logrus.Debugf("skipping peer email for %s, unable to fetch user: %v", peerId, err)
|
||||
continue
|
||||
}
|
||||
|
||||
|
@ -134,7 +134,7 @@ func (i *Interface) GetRoutingTable() int {
|
||||
numberStr := strings.ReplaceAll(routingTableStr, "0x", "")
|
||||
routingTable, err := strconv.ParseUint(numberStr, 16, 64)
|
||||
if err != nil {
|
||||
logrus.Errorf("invalid hex routing table %s: %w", routingTableStr, err)
|
||||
logrus.Errorf("invalid hex routing table %s: %v", routingTableStr, err)
|
||||
return -1
|
||||
}
|
||||
if routingTable > math.MaxInt32 {
|
||||
@ -145,7 +145,7 @@ func (i *Interface) GetRoutingTable() int {
|
||||
default:
|
||||
routingTable, err := strconv.Atoi(routingTableStr)
|
||||
if err != nil {
|
||||
logrus.Errorf("invalid routing table %s: %w", routingTableStr, err)
|
||||
logrus.Errorf("invalid routing table %s: %v", routingTableStr, err)
|
||||
return -1
|
||||
}
|
||||
return routingTable
|
||||
|
Loading…
x
Reference in New Issue
Block a user