Documentation ¶
Index ¶
Constants ¶
View Source
const CyclopsServerCookie = "CyclopsServerPublicKey"
SYNC-CYCLOPS-SERVER-COOKIE
View Source
const ProxyAddr = "10.6.0.0"
Our proxy is always at this address
View Source
const ProxyHttpPort = "127.0.0.1:8082"
View Source
const PublicKeyLen = 32
View Source
const ServerEndAddr = "10.255.255.255"
Servers end at this address (exclusive)
View Source
const ServerHttpPort = ":8080" // SYNC-SERVER-PORT. Servers always run on 8080, but we could make this configurable. It would need to be part of the 'register' API then...
View Source
const ServerStartAddr = "10.7.0.0"
Servers start at this address
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BaseModel ¶
type BaseModel struct {
ID int64 `gorm:"primaryKey"`
}
BaseModel is our base class for a GORM model. The default GORM Model uses int, but we prefer int64
type IPFreePool ¶
type IPFreePool struct {
VpnIP string // IP address inside Wireguard VPN (eg 10.7.0.0)
}
List of available VPN IP addresses Whenever we remove a peer, we add it's IP to this list. When we add a new peer, we take the first item from the list. If this list is empty when adding a new peer, then we populate it with a range of free addresses.
type ProxyConfig ¶
type Server ¶
type Server struct { BaseModel PublicKey []byte // Wireguard public key of this server VpnIP string // IP address inside Wireguard VPN (eg 10.7.0.0) CreatedAt time.Time // Time when server record was created LastRegisterAt time.Time // Time when server last called register LastTrafficAt time.Time // Time when we last saw authenticated Wireguard traffic from this server }
A Cyclops server
Source Files ¶
Click to show internal directories.
Click to hide internal directories.