app

package
v0.1.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 2, 2024 License: MIT Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(cfg *utils.Config)

Types

type ConfigDBResult

type ConfigDBResult struct {
	Id  int
	Ip  string
	Acc time.Time
	Fwc time.Time
	Crl time.Time
}

type ConfigLighthouseDBResult

type ConfigLighthouseDBResult struct {
	Crl time.Time
	Lgh string
}

type DeviceLoginData

type DeviceLoginData struct {
	UPN      string
	Provider string
	Secret   string
	URI      string
}

type ManagementConnectionStatistics

type ManagementConnectionStatistics struct {
	UPN                     string    `json:"upn"`
	VpnIP                   string    `json:"vpnIp"`
	Level                   string    `json:"level"`
	Time                    time.Time `json:"time"`
	IsConnected             bool      `json:"isConnected"`
	IsOverRestrictedNetwork bool      `json:"isOverRestrictedNetwork"`
}

type ManagementOSAutoupdateRequest

type ManagementOSAutoupdateRequest struct {
	Type                 string    `json:"type"`
	Name                 string    `json:"name"`
	Version              string    `json:"version"`
	Description          string    `json:"description"`
	LastUpdate           time.Time `json:"last_update"`
	LastUpdateOutput     string    `json:"last_update_output"`
	Success              bool      `json:"success"`
	SecurityUpdatesCount int       `json:"security_updates_count"`
	OtherUpdatesCount    int       `json:"other_updates_count"`
	SecurityUpdates      []string  `json:"security_updates"`
	OtherUpdates         []string  `json:"other_updates"`
}

type ManagementRequest

type ManagementRequest struct {
	AccessID      int       `json:"access_id"`
	ConfigHash    string    `json:"confighash"`
	DnsHash       string    `json:"dnshash"`
	Timestamp     time.Time `json:"timestamp"`
	LogData       string    `json:"log_data"`
	IsConnected   bool      `json:"is_connected"`
	OverWebSocket bool      `json:"over_websocket"`
}

type ManagementResponse

type ManagementResponse struct {
	Status     string                    `json:"status"`
	ConfigData *ManagementResponseConfig `json:"config_data"`
	Dns        *ManagementResponseDNS    `json:"dns"`
}

type ManagementResponseConfig

type ManagementResponseConfig struct {
	AccessID                  int                                  `json:"accessid"`
	Name                      string                               `json:"name"`
	UPN                       string                               `json:"upn"`
	ConfigData                ManagementResponseConfigData         `json:"config"`
	NebulaPunchBack           bool                                 `json:"nebulapunchback"`
	NebulaRestrictiveNetwork  bool                                 `json:"nebularestrictivenetwork"`
	Autoupdate                bool                                 `json:"autoupdate"`
	WebSocketUrl              string                               `json:"websocketurl"`
	WebSocketIPs              []string                             `json:"websocketips"`
	WebSocketUsernamePassword string                               `json:"websocketusernamepassword"`
	ApplianceListeners        []ManagementResponseListener         `json:"listeners"`
	NebulaCIDR                string                               `json:"nebulacidr"`
	OSAutoupdatePolicy        ManagementResponseOSAutoupdatePolicy `json:"osautoupdatepolicy"`
}

type ManagementResponseConfigData

type ManagementResponseConfigData struct {
	Data      string `json:"config"`
	Hash      string `json:"hash"`
	IPAddress string `json:"ipaddress"`
}

type ManagementResponseDNS

type ManagementResponseDNS struct {
	DnsRecords []string `json:"dnsrecords"`
	DnsHash    string   `json:"dnshash"`
}

type ManagementResponseListener

type ManagementResponseListener struct {
	Port        int    `json:"port"`
	Protocol    string `json:"protocol"`
	ForwardPort int    `json:"forwardport"`
	ForwardHost string `json:"forwardhost"`
}

type ManagementResponseOSAutoupdatePolicy

type ManagementResponseOSAutoupdatePolicy struct {
	Enabled                   bool `json:"enabled"`
	SecurityAutoupdateEnabled bool `json:"securityautoupdateenabled"`
	AllAutoupdateEnabled      bool `json:"allautoupdateenabled"`
	RestartAfterUpdate        bool `json:"restartafterupdate"`
	// 0 means any hour in day
	UpdateHour int `json:"updatehour"`
}

type ManagementSimpleUPNResponse

type ManagementSimpleUPNResponse struct {
	Status   string                               `json:"status"`
	Hash     string                               `json:"hash"`
	Accesses *[]ManagementSimpleUPNResponseAccess `json:"accesses"`
}

type ManagementSimpleUPNResponseAccess

type ManagementSimpleUPNResponseAccess struct {
	AccessID int    `json:"accessid"`
	Name     string `json:"name"`
	Secret   string `json:"secret"`
}

type ManagementUPNResponse

type ManagementUPNResponse struct {
	Status     string                      `json:"status"`
	Hash       string                      `json:"hash"`
	ConfigData *[]ManagementResponseConfig `json:"config_data"`
	Dns        *ManagementResponseDNS      `json:"dns"`
}

type OAuthLighthouseLoginRequest

type OAuthLighthouseLoginRequest struct {
	PublicIp  string `json:"publicip"`
	Timestamp int64  `json:"timestamp"`
	Key       string `json:"key"`
}

type OAuthLoginRequest

type OAuthLoginRequest struct {
	AccessID      int    `json:"access_id"`
	Timestamp     int64  `json:"timestamp"`
	Key           string `json:"key"`
	ClientID      string `json:"clientid"`
	ClientOS      string `json:"clientos"`
	ClientInfo    string `json:"clientinfo"`
	ClientVersion string `json:"clientversion"`
}

type OAuthLoginResponse

type OAuthLoginResponse struct {
	JWTToken string    `json:"jwt"`
	ValidTo  time.Time `json:"valid_to"`
}

type OAuthUPNLoginRequest

type OAuthUPNLoginRequest struct {
	Upn       string `json:"upn"`
	Timestamp int64  `json:"timestamp"`
	Key       string `json:"key"`
}

type PublicWebConfig

type PublicWebConfig struct {
	AadEnebled  bool   `json:"aad_enabled"`
	AadTenantId string `json:"aad_tenant_id"`
}

type SysApiUserDetail

type SysApiUserDetail struct {
	UPN    string   `json:"upn"`
	Origin string   `json:"origin"`
	Name   string   `json:"name"`
	Roles  []string `json:"roles"`
}

type UPNSimpleConfigDBResult

type UPNSimpleConfigDBResult struct {
	Id     int
	Acc    time.Time
	Name   string
	Secret string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL