The from-scratch Go rewrite had unresolved bugs (missing go.sum, UI 404s, path issues) from being built without a working local Go toolchain to verify against. Switching strategy: use the actual upstream wireguard-ui codebase (proven, battle-tested single-server manager) as the base, and extend it for multi-server support instead of re-deriving everything from zero. Kept our own installers (bootstrap.sh, update.sh, scripts/install.sh, scripts/proxmox-install.sh) - these still apply, just need updating to build/install the upstream module layout instead of the old cmd/wireguard-ui-multi structure. Module path intentionally left as upstream's own (github.com/ngoduykhanh/wireguard-ui) for now to avoid touching every internal import; revisit if this needs to be fully rebranded. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
39 lines
1.1 KiB
Go
39 lines
1.1 KiB
Go
package model
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
// Client model
|
|
type Client struct {
|
|
ID string `json:"id"`
|
|
PrivateKey string `json:"private_key"`
|
|
PublicKey string `json:"public_key"`
|
|
PresharedKey string `json:"preshared_key"`
|
|
Name string `json:"name"`
|
|
TgUserid string `json:"telegram_userid"`
|
|
Email string `json:"email"`
|
|
SubnetRanges []string `json:"subnet_ranges,omitempty"`
|
|
AllocatedIPs []string `json:"allocated_ips"`
|
|
AllowedIPs []string `json:"allowed_ips"`
|
|
ExtraAllowedIPs []string `json:"extra_allowed_ips"`
|
|
Endpoint string `json:"endpoint"`
|
|
AdditionalNotes string `json:"additional_notes"`
|
|
UseServerDNS bool `json:"use_server_dns"`
|
|
Enabled bool `json:"enabled"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|
|
|
|
// ClientData includes the Client and extra data
|
|
type ClientData struct {
|
|
Client *Client
|
|
QRCode string
|
|
}
|
|
|
|
type QRCodeSettings struct {
|
|
Enabled bool
|
|
IncludeDNS bool
|
|
IncludeMTU bool
|
|
}
|