Documentation ¶
Index ¶
Constants ¶
View Source
const ProxyHost = "proxy-cpt.cyclopcam.org"
At some point, if we have multiple geo-relevant proxies, then we'd choose the closest server instead of just hard-coding to a single one.
View Source
const ShortPublicKeyLen = 10
Used for host names, encoded as hex. First 10 bytes of public key. SYNC-SHORT-PUBLIC-KEY-LEN
Variables ¶
This section is empty.
Functions ¶
func ProxiedHostName ¶
Our proxied host name is hex(publicKey[:ShortPublicKeyLen]).p.cyclopcam.org
Types ¶
type VPN ¶
type VPN struct { Log logs.Log AllowedIP net.IPNet // Network of the VPN (actually just the proxy server's addresses, eg 10.6.0.0/32 or fdce:c10b:5ca1:1::1/128) // contains filtered or unexported fields }
Manage connection to our VPN/proxy server
func (*VPN) ConnectKernelWG ¶
Connect to our Wireguard interface process
func (*VPN) DisconnectKernelWG ¶
func (v *VPN) DisconnectKernelWG()
func (*VPN) RunRegisterLoop ¶
Keep pinging server so that it knows we're alive. Also, if we've been dormant for a long time, then the proxy may have culled us, and we may not receive a new VPN IP, so that's also why this system is essential.
Click to show internal directories.
Click to hide internal directories.