docs: update README with desktop requirements, helper builds, and realistic MVP usage notes
Expand README with desktop platform requirements (Windows x86, macOS ARM), helper build commands, gateway utility scripts, and updated local test flow. Add realistic MVP usage section clarifying current platform build status, gateway configuration needs, and admin debug profile behavior with client private key handling.
This commit is contained in:
@@ -96,11 +96,19 @@ func (s *Service) ListAll(ctx context.Context) ([]Device, error) {
|
||||
}
|
||||
|
||||
func (s *Service) GetLatestEnrollmentByUser(ctx context.Context, userID uuid.UUID) (EnrollmentResponse, error) {
|
||||
return s.repo.GetLatestEnrollmentByUser(ctx, userID)
|
||||
enrollment, err := s.repo.GetLatestEnrollmentByUser(ctx, userID)
|
||||
if err != nil {
|
||||
return EnrollmentResponse{}, err
|
||||
}
|
||||
return withDebugProfile(enrollment), nil
|
||||
}
|
||||
|
||||
func (s *Service) GetEnrollmentByDeviceID(ctx context.Context, deviceID uuid.UUID) (EnrollmentResponse, error) {
|
||||
return s.repo.GetEnrollmentByDeviceID(ctx, deviceID)
|
||||
enrollment, err := s.repo.GetEnrollmentByDeviceID(ctx, deviceID)
|
||||
if err != nil {
|
||||
return EnrollmentResponse{}, err
|
||||
}
|
||||
return withDebugProfile(enrollment), nil
|
||||
}
|
||||
|
||||
func (s *Service) GetConnectionStatus(ctx context.Context, userID uuid.UUID) (ConnectionStatus, error) {
|
||||
@@ -128,3 +136,19 @@ func (s *Service) Revoke(ctx context.Context, deviceID uuid.UUID) error {
|
||||
func (s *Service) Rotate(ctx context.Context, deviceID uuid.UUID) error {
|
||||
return s.repo.Rotate(ctx, deviceID)
|
||||
}
|
||||
|
||||
func withDebugProfile(enrollment EnrollmentResponse) EnrollmentResponse {
|
||||
enrollment.Profile = ProfileView{
|
||||
Format: "wireguard",
|
||||
Content: profile.BuildWireGuardConfig(profile.BuildInput{
|
||||
PrivateKey: "__CLIENT_PRIVATE_KEY_REQUIRED__",
|
||||
Address: enrollment.Peer.AssignedIP,
|
||||
DNSServers: enrollment.Peer.DNSServers,
|
||||
ServerPublicKey: enrollment.Peer.Gateway.PublicKey,
|
||||
ServerEndpoint: enrollment.Peer.Gateway.Endpoint,
|
||||
AllowedIPs: enrollment.Peer.AllowedIPs,
|
||||
PersistentKeepal: 25,
|
||||
}),
|
||||
}
|
||||
return enrollment
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user