Documentation ¶
Index ¶
- Constants
- Variables
- func AddRoute(IP string) (err error)
- func AddRouteToTunnelInterface(IP string) (err error)
- func AdjustRoutersForTunneling() (err error)
- func AdminCheck()
- func AutoReconnect() (connected bool)
- func BUILD_NAT_MAP(AP *AccessPoint) (err error)
- func BackupSettingsToFile(NewDefault *CONNECTION_SETTINGS)
- func BuildDomainBlocklist()
- func CalculateBandwidth(MONITOR chan int)
- func CaptureDNS(domain string)
- func ChangeDNS() error
- func ChangeDNSOnTunnelInterface() error
- func ChangeDNSWhileConnected() error
- func CleanPortMap(protoMap *[256]*O1, mapType string)
- func CleanPorts(MONITOR chan int)
- func CleanupOnClose()
- func CleanupWithStateLock()
- func ConnectToActiveRouter(RoutingBuffer [8]byte) (TUNNEL net.Conn, err error)
- func ControllerCustomDialer(ctx context.Context, network string, addr string) (net.Conn, error)
- func CopySlice(in []byte) (out []byte)
- func CreateBaseFolder()
- func CreateErrorLog(Type string, Line ...interface{})
- func CreateLog(Type string, Line ...interface{})
- func CreateMETABuffer(CODE, GROUP, RID, SID, X1, X2 byte, DL uint16) (METAID [8]byte)
- func CreateTunnelBuffer() []byte
- func DNSAMapping(domain string) (IPS []net.IP, CNAME string)
- func DNSCNameMapping(domain string) (CNAME string)
- func DNSTXTMapping(domain string) (TXTS []string)
- func Decrypt(text, key []byte) (out []byte)
- func DeleteRoute(IP string, ignoreActiveRouter bool) (err error)
- func DeleteTunnelInterfaceRoutes(IP string) (err error)
- func DisableIPv6() error
- func Disconnect()
- func DisconnectFromRouter(AdapterSettings *AdapterSettings)
- func DownloadRoutersFromOnlineSource() ([][]byte, error)
- func DumpLoadingLogs(L *Logs)
- func EnablePacketRouting() (err error)
- func Encrypt(text, key []byte) []byte
- func ErrorLog(err interface{}, msgs ...interface{})
- func FindAllInterfaces() (IFList map[string]*INTERFACE_SETTINGS)
- func FindDefaultInterfaceAndGatewayDuringStartup() (err error)
- func ForwardToController(FR *FORWARD_REQUEST) (interface{}, int, error)
- func ForwardToRouter(FR *FORWARD_REQUEST) (interface{}, int, error)
- func GET_FUNC(skip int) string
- func GenerateAEADFromPrivateKey(PK *ecdsa.PrivateKey, R *OTK_REQUEST) (AEAD cipher.AEAD, err error)
- func GenerateBaseFolderPath() string
- func GetDomainAndSubDomain(domain string) (d, s string)
- func GetIPv6Settings(PotentialDefault *CONNECTION_SETTINGS)
- func GetLowestLatencyRouter() (int, error)
- func GetPrivateAccessPoints(FR *FORWARD_REQUEST) (interface{}, int, error)
- func GetRoutersAndAccessPoints(FR *FORWARD_REQUEST) (interface{}, int, error)
- func GetRoutersFromLocalFile() ([][]byte, error)
- func InitLogfile()
- func InitPaths()
- func InitializeTunnelAdapter() (err error)
- func InitializeTunnelInterface() (err error)
- func InstantlyClearPortMaps()
- func InterfaceMaintenenceAndBackup()
- func IsDNSQuery(UDPData []byte) bool
- func IsDomainAllowed(domain string) bool
- func LaunchPreperation() (err error)
- func LoadBlockLists()
- func LoadConfig()
- func LoadDNSWhitelist() (err error)
- func LoadFileIntoMap(path string) (list map[string]bool, err error)
- func LoadRoutersUnAuthenticated() (interface{}, int, error)
- func LocalhostCustomDialer(ctx context.Context, network, addr string) (net.Conn, error)
- func Log(lines ...interface{})
- func OpenProxyTunnelToRouter(ctx context.Context) (TCP_CONN net.Conn, err error)
- func ParseRoutersFromRawDataToMemory(lines [][]byte) (count int)
- func PingAllRouters()
- func PingRouter(IP string) (*ping.Statistics, error)
- func PrepareState()
- func PrintDNS() (error, []byte)
- func PrintInterfaces() (error, []byte)
- func PrintRouters() (error, []byte)
- func ProcessEgressDNSQuery(UDPData []byte) (DNSResponse []byte, shouldProcess bool)
- func ProcessEgressPacket(p *[]byte) (sendRemote bool, sendLocal bool)
- func ProcessIngressDNSQuery(TPHeader []byte) bool
- func ProcessIngressPacket(packet []byte) bool
- func ReadFromLocalSocket(MONITOR chan int)
- func ReadFromRouterSocket(MONITOR chan int)
- func ReadMIDAndDataFromBuffer(CONN net.Conn, TunnelBuffer []byte) (n int, DL int, err error)
- func RecalculateAndReplaceIPv4HeaderChecksum(bytes []byte)
- func RecalculateAndReplaceTransportChecksum(IPv4Header []byte, TPPacket []byte)
- func RecoverAndLogToFile()
- func RefreshRouterList() (err error)
- func ResetAfterFailedConnectionAttempt()
- func ResetEverything()
- func RestoreDNS(force bool)
- func RestoreIPv6()
- func RestoreSettingsFromFile(PotentialDefault *CONNECTION_SETTINGS)
- func SaveConfig() (err error)
- func SendRawBytesToLocalhostProxy(method string, route string, data []byte, timeoutMS int) ([]byte, int, error)
- func SendRequestToControllerProxy(method string, route string, data interface{}, domain string, timeoutMS int) ([]byte, int, error)
- func SendRequestToLocalhostProxy(method string, route string, data interface{}, timeoutMS int) ([]byte, int, error)
- func SetActiveRouter(index int)
- func SetConfig(SF *CONFIG_FORM) error
- func SetGlobalStateAsDisconnected()
- func SetInterfaceStateToDown() (err error)
- func SetInterfaceStateToUp() (err error)
- func SetRouterFile(path string) error
- func StartCapturing()
- func StartLogQueueProcessor(MONITOR chan int)
- func StartService(MONITOR chan int)
- func StateMaintenance(MONITOR chan int)
- func StopCapturing(path string) (err error)
- func SwitchRouter(Tag string) (code int, err error)
- func VerifyAndBackupSettings(PotentialDefault *CONNECTION_SETTINGS) (err error)
- type AP_GEO_DB
- type AccessPoint
- type Adapter
- type AdapterSettings
- type CHACHA_RESPONSE
- type CLIENT_SESSION
- type CONFIG_FORM
- type CONNECTION_SETTINGS
- type CONTROLLER_SESSION
- type CONTROLLER_SESSION_REQUEST
- type CONTROLL_PUBLIC_DEVCE_RESPONSE
- type Config
- type DEBUG_OUT
- type DEVICE_TOKEN
- type DeviceDNSRegistration
- type DeviceNatRegistration
- type DeviceUserRegistration
- type FORWARD_REQUEST
- type GENERAL_LOGS_RESPONSE
- type GeneralLogResponse
- type INTERFACE_SETTINGS
- type IP
- type LOADING_LOGS_RESPONSE
- type List
- type LogItem
- type LoggerInterface
- func (l *LoggerInterface) Debug(message string)
- func (l *LoggerInterface) Error(message string)
- func (l *LoggerInterface) Fatal(message string)
- func (l *LoggerInterface) Info(message string)
- func (l *LoggerInterface) Print(message string)
- func (l *LoggerInterface) Trace(message string)
- func (l *LoggerInterface) Warning(message string)
- type LoginForm
- type LogoutForm
- type Logs
- type M
- type MIB_TCPROW_OWNER_PID
- type MIB_TCPTABLE_OWNER_PID
- type O1
- type O2
- type O3
- type OTK
- type OTK_REQUEST
- type OTK_RESPONSE
- type PS_DEFAULT_ROUTES
- type QR_CODE
- type ROUTER
- type ROUTER_STATS
- type RP
- type RemotePort
- type State
- type TWO_FACTOR_CONFIRM
- type User
Constants ¶
View Source
const ( CODE_CLIENT_new_ping = 1 CODE_CLIENT_ping = 20 CODE_CLIENT_connect_tunnel_with_handshake = 28 )
View Source
const ( META_DL_START = 6 META_DL_END = 8 )
Variables ¶
View Source
var ( PREV_DNS_IP [4]byte IS_UNIX bool = false )
View Source
var ( EP_Version byte EP_Protocol byte EP_DstIP [4]byte EP_IPv4HeaderLength byte EP_IPv4Header []byte EP_TPHeader []byte EP_SrcPort [2]byte EP_DstPort [2]byte EP_MappedPort *RP EP_NAT_IP [4]byte EP_NAT_OK bool EP_RST byte EP_DNS_Response []byte EP_DNS_OK bool EP_DNS_Port_Placeholder [2]byte EP_DNS_Packet []byte // This IP gets over-written on connect EP_VPNSrcIP [4]byte EP_NEW_RST int )
View Source
var ( IP_Version byte IP_Protocol byte IP_DstIP [4]byte IP_SrcIP [4]byte IP_IPv4HeaderLength byte IP_IPv4Header []byte IP_TPHeader []byte IP_SrcPort [2]byte IP_DstPort [2]byte IP_MappedPort *RP IP_NAT_IP [4]byte IP_NAT_OK bool // This IP gets over-written on connect // IP_VPNSrcIP [4]byte IP_InterfaceIP [4]byte )
View Source
var ( A = new(Adapter) AS = new(AdapterSettings) C = new(Config) GLOBAL_STATE = new(State) )
View Source
var ( BUFFER_ERROR bool IGNORE_NEXT_BUFFER_ERROR bool )
View Source
var ( TUNNEL_ADAPTER_NAME = "NicelandVPN" TUNNEL_ADAPTER_ADDRESS = "10.4.3.2" TUNNEL_ADAPTER_ADDRESS_IP = net.IP{10, 4, 3, 2} )
View Source
var ( CURRENT_UBBS int = 0 CURRENT_DBBS int = 0 EGRESS_PACKETS uint64 = 0 INGRESS_PACKETS uint64 = 0 )
NETWORKING STUFF
View Source
var ( L = new(Logs) LogQueue = make(chan LogItem, 10000) TAG_ERROR = "ERROR" TAG_GENERAL = "GENERAL" LogFile *os.File )
View Source
var BlockLists embed.FS
View Source
var DNSCapturMap = make(map[string]bool)
View Source
var DNSCaptureFile *os.File
View Source
var DNSWhitelist = make(map[string]bool)
View Source
var ENABLE_INSTERFACE = false
View Source
var GLOBAL_BLOCK_LIST = make(map[string]bool)
View Source
var LAST_PRIVATE_ACCESS_POINT_UPDATE = time.Now()
View Source
var LAST_ROUTER_AND_ACCESS_POINT_UPDATE = time.Now()
View Source
var LastConnectionAttemp = time.Now()
var LastRouterPing = time.Now()
View Source
var MIDBufferLength = 8
View Source
var NEXT_SERVER_REFRESH time.Time
View Source
var PREVDNS net.IP
View Source
var PRODUCTION = false
View Source
var PS_IFLIST []*PS_DEFAULT_ROUTES
View Source
var STATE_LOCK = sync.Mutex{}
View Source
var TCP_o0 [256]*O1
View Source
var UDP_o0 [256]*O1
Functions ¶
func AdjustRoutersForTunneling ¶
func AdjustRoutersForTunneling() (err error)
func AdminCheck ¶
func AdminCheck()
func AutoReconnect ¶
func AutoReconnect() (connected bool)
func BUILD_NAT_MAP ¶ added in v1.1.4
func BUILD_NAT_MAP(AP *AccessPoint) (err error)
func BackupSettingsToFile ¶
func BackupSettingsToFile(NewDefault *CONNECTION_SETTINGS)
func BuildDomainBlocklist ¶ added in v1.1.4
func BuildDomainBlocklist()
func CalculateBandwidth ¶
func CalculateBandwidth(MONITOR chan int)
func CaptureDNS ¶ added in v1.1.4
func CaptureDNS(domain string)
func ChangeDNSOnTunnelInterface ¶
func ChangeDNSOnTunnelInterface() error
func ChangeDNSWhileConnected ¶
func ChangeDNSWhileConnected() error
func CleanPortMap ¶ added in v1.1.4
func CleanPorts ¶ added in v1.1.4
func CleanPorts(MONITOR chan int)
func CleanupOnClose ¶
func CleanupOnClose()
func CleanupWithStateLock ¶
func CleanupWithStateLock()
func ConnectToActiveRouter ¶
func ControllerCustomDialer ¶
func CreateBaseFolder ¶
func CreateBaseFolder()
func CreateErrorLog ¶
func CreateErrorLog(Type string, Line ...interface{})
func CreateMETABuffer ¶
func CreateTunnelBuffer ¶
func CreateTunnelBuffer() []byte
func DNSCNameMapping ¶ added in v1.1.4
func DNSTXTMapping ¶ added in v1.1.4
func DeleteRoute ¶
func DisableIPv6 ¶
func DisableIPv6() error
func Disconnect ¶
func Disconnect()
func DisconnectFromRouter ¶
func DisconnectFromRouter(AdapterSettings *AdapterSettings)
func DumpLoadingLogs ¶
func DumpLoadingLogs(L *Logs)
func EnablePacketRouting ¶
func EnablePacketRouting() (err error)
func FindAllInterfaces ¶
func FindAllInterfaces() (IFList map[string]*INTERFACE_SETTINGS)
func FindDefaultInterfaceAndGatewayDuringStartup ¶
func FindDefaultInterfaceAndGatewayDuringStartup() (err error)
func ForwardToController ¶
func ForwardToController(FR *FORWARD_REQUEST) (interface{}, int, error)
func ForwardToRouter ¶
func ForwardToRouter(FR *FORWARD_REQUEST) (interface{}, int, error)
func GenerateAEADFromPrivateKey ¶
func GenerateAEADFromPrivateKey(PK *ecdsa.PrivateKey, R *OTK_REQUEST) (AEAD cipher.AEAD, err error)
func GenerateBaseFolderPath ¶
func GenerateBaseFolderPath() string
func GetDomainAndSubDomain ¶ added in v1.1.4
func GetIPv6Settings ¶
func GetIPv6Settings(PotentialDefault *CONNECTION_SETTINGS)
func GetLowestLatencyRouter ¶
func GetPrivateAccessPoints ¶ added in v1.1.4
func GetPrivateAccessPoints(FR *FORWARD_REQUEST) (interface{}, int, error)
func GetRoutersAndAccessPoints ¶
func GetRoutersAndAccessPoints(FR *FORWARD_REQUEST) (interface{}, int, error)
func GetRoutersFromLocalFile ¶
func InitLogfile ¶
func InitLogfile()
func InitializeTunnelAdapter ¶
func InitializeTunnelAdapter() (err error)
func InitializeTunnelInterface ¶
func InitializeTunnelInterface() (err error)
func InstantlyClearPortMaps ¶ added in v1.1.4
func InstantlyClearPortMaps()
func InterfaceMaintenenceAndBackup ¶
func InterfaceMaintenenceAndBackup()
func IsDNSQuery ¶ added in v1.1.4
func IsDomainAllowed ¶ added in v1.1.4
func LaunchPreperation ¶
func LaunchPreperation() (err error)
func LoadBlockLists ¶ added in v1.1.4
func LoadBlockLists()
func LoadConfig ¶
func LoadConfig()
func LoadDNSWhitelist ¶ added in v1.1.4
func LoadDNSWhitelist() (err error)
func LoadFileIntoMap ¶ added in v1.1.4
func LoadRoutersUnAuthenticated ¶ added in v1.1.5
func LocalhostCustomDialer ¶
func OpenProxyTunnelToRouter ¶
func PingAllRouters ¶
func PingAllRouters()
func PingRouter ¶
func PingRouter(IP string) (*ping.Statistics, error)
func PrepareState ¶
func PrepareState()
func PrintInterfaces ¶
func PrintRouters ¶
func ProcessEgressDNSQuery ¶ added in v1.1.4
func ProcessEgressPacket ¶ added in v1.1.4
func ProcessIngressDNSQuery ¶ added in v1.1.4
func ProcessIngressPacket ¶ added in v1.1.4
func ReadFromLocalSocket ¶ added in v1.1.4
func ReadFromLocalSocket(MONITOR chan int)
func ReadFromRouterSocket ¶
func ReadFromRouterSocket(MONITOR chan int)
func RecalculateAndReplaceIPv4HeaderChecksum ¶ added in v1.1.4
func RecalculateAndReplaceIPv4HeaderChecksum(bytes []byte)
func RecalculateAndReplaceTransportChecksum ¶ added in v1.1.4
func RecoverAndLogToFile ¶
func RecoverAndLogToFile()
func RefreshRouterList ¶
func RefreshRouterList() (err error)
func ResetAfterFailedConnectionAttempt ¶
func ResetAfterFailedConnectionAttempt()
func ResetEverything ¶
func ResetEverything()
func RestoreDNS ¶
func RestoreDNS(force bool)
func RestoreIPv6 ¶
func RestoreIPv6()
func RestoreSettingsFromFile ¶
func RestoreSettingsFromFile(PotentialDefault *CONNECTION_SETTINGS)
func SaveConfig ¶
func SaveConfig() (err error)
func SetActiveRouter ¶
func SetActiveRouter(index int)
func SetConfig ¶
func SetConfig(SF *CONFIG_FORM) error
func SetGlobalStateAsDisconnected ¶
func SetGlobalStateAsDisconnected()
func SetInterfaceStateToDown ¶
func SetInterfaceStateToDown() (err error)
func SetInterfaceStateToUp ¶
func SetInterfaceStateToUp() (err error)
func SetRouterFile ¶
func StartCapturing ¶ added in v1.1.4
func StartCapturing()
func StartLogQueueProcessor ¶
func StartLogQueueProcessor(MONITOR chan int)
func StartService ¶
func StartService(MONITOR chan int)
func StateMaintenance ¶
func StateMaintenance(MONITOR chan int)
func StopCapturing ¶ added in v1.1.4
func SwitchRouter ¶
func VerifyAndBackupSettings ¶
func VerifyAndBackupSettings(PotentialDefault *CONNECTION_SETTINGS) (err error)
Types ¶
type AP_GEO_DB ¶
type AP_GEO_DB struct { Updated time.Time `json:"Updated" bson:"U"` IPV string `bson:"IPV" json:"-"` Country string `bson:"Country" json:"Country"` CountryFull string `bson:"CountryFull" json:"CountryFull"` City string `bson:"City" json:"City"` // ASN string `bson:"ASN" json:"ASN"` ISP string `bson:"ISP" json:"-"` Proxy bool `bson:"Proxy" json:"Proxy"` Tor bool `bson:"Tor" json:"Tor"` }
type AccessPoint ¶
type AccessPoint struct { ID primitive.ObjectID `json:"_id,omitempty" bson:"_id"` UID primitive.ObjectID `json:"-" bson:"UID"` Tag string `json:"Tag" bson:"T"` GROUP uint8 `json:"GROUP" bson:"G"` ROUTERID uint8 `json:"ROUTERID" bson:"RID"` DEVICEID uint8 `json:"DEVICEID" bson:"DID"` IP string `json:"IP" bson:"IP"` Access []*DeviceUserRegistration `json:"Access" bson:"A"` Updated time.Time `json:"Updated" bson:"U"` InternetAccess bool `json:"InternetAccess" bson:"I"` LocalNetworkAccess bool `json:"LocalNetworkAccess" bson:"LA"` Public bool `json:"Public" bson:"P"` Online bool `json:"Online" bson:"O"` LastOnline time.Time `json:"LastOnline" bson:"LO"` GEO *AP_GEO_DB `json:"GEO,omitempty" bson:"GEO"` AvailableSlots int `json:"AvailableSlots" bson:"-"` Slots int `json:"Slots" bson:"-"` AvailableMbps int `json:"AvailableMbps" bson:"ABS"` UserMbps int `json:"UserMbps" bson:"UB"` Country string `json:"Country" bson:"Country"` CountryFull string `json:"CountryFull" bson:"CountryFull"` // MIGHT USE NAT []*DeviceNatRegistration `json:"NAT" bson:"NAT"` BlockedNetworks []string `json:"BlockedNetworks" bson:"BlockedNetworks"` DNS map[string]*DeviceDNSRegistration `json:"DNS" bson:"DNS"` DNSWhiteList bool `json:"DNSWhiteList" bson:"DNSWhiteList"` Router *ROUTER `json:"Router"` NAT_CACHE map[[4]byte][4]byte `json:"-"` REVERSE_NAT_CACHE map[[4]byte][4]byte `json:"-"` }
func GetActiveAccessPointFromActiveSession ¶ added in v1.1.4
func GetActiveAccessPointFromActiveSession() *AccessPoint
type AdapterSettings ¶
type AdapterSettings struct { // SleepTrigger bool Session *CLIENT_SESSION TCPTunnelSocket net.Conn RoutingBuffer [8]byte PingBuffer [8]byte StartPort uint16 EndPort uint16 AEAD cipher.AEAD AP *AccessPoint }
type CLIENT_SESSION ¶
type CLIENT_SESSION struct { Created time.Time CONTROLLER_SESSION PrivateKey *ecdsa.PrivateKey `json:"-"` StartPort uint16 EndPort uint16 VPNIP []byte ClientKeyResponse []byte `json:"CKR"` }
func Connect ¶
func Connect(NS *CONTROLLER_SESSION_REQUEST, initializeRouting bool) (S *CLIENT_SESSION, code int, err error)
func ConnectToAccessPoint ¶
func ConnectToAccessPoint(NS *CONTROLLER_SESSION_REQUEST, startRouting bool) (S *CLIENT_SESSION, code int, errm error)
type CONFIG_FORM ¶
type CONFIG_FORM struct { DNS1 string `json:"DNS1"` DNS2 string `json:"DNS2"` ManualRouter bool `json:"ManualRouter"` Region string `json:"Region"` Version string `json:"Version"` RouterFilePath string `json:"RouterFilePath"` DebugLogging bool `json:"DebugLogging"` AutoReconnect bool `json:"AutoReconnect"` KillSwitch bool `json:"KillSwitch"` PrevSession *CONTROLLER_SESSION_REQUEST `json:"PrevSlot"` DisableIPv6OnConnect bool `json:"DisableIPv6OnConnect"` CloseConnectionsOnConnect bool `json:"CloseConnectionsOnConnect"` CustomDNS bool `json:"CustomDNS"` }
type CONNECTION_SETTINGS ¶
type CONNECTION_SETTINGS struct { DNS1 string DNS2 string AutoDNS bool IP6Method string IPV6Enabled bool IFName string DefaultRouter string AdapterName string }
var MAC_CONNECTION_SETTINGS *CONNECTION_SETTINGS
func FindDefaultInterfaceAndGateway ¶
func FindDefaultInterfaceAndGateway() (POTENTIAL_DEFAULT *CONNECTION_SETTINGS, err error)
type CONTROLLER_SESSION ¶
type CONTROLLER_SESSION struct { UserID primitive.ObjectID `bson:"UID"` ID primitive.ObjectID `bson:"_id"` Permanent bool `bson:"P"` Count int `bson:"C"` SLOTID int `bson:"SLOTID"` GROUP uint8 `bson:"G"` ROUTERID uint8 `bson:"RID"` SESSIONID uint8 `bson:"SID"` XGROUP uint8 `bson:"XG"` XROUTERID uint8 `bson:"XRID"` DEVICEID uint8 `bson:"APID"` Assigned time.Time `bson:"A"` ShouldDelete bool `bson:"-"` }
type CONTROLLER_SESSION_REQUEST ¶
type CONTROLLER_SESSION_REQUEST struct { UserID primitive.ObjectID ID primitive.ObjectID DeviceToken string `json:",omitempty"` SLOTID int Type string `json:",omitempty"` Permanent bool `json:",omitempty"` Count int `json:",omitempty"` GROUP uint8 `json:"GROUP"` ROUTERID uint8 `json:"ROUTERID"` SESSIONID uint8 `json:"SESSIONID"` XGROUP uint8 `json:"XGROUP"` XROUTERID uint8 `json:"XROUTERID"` DEVICEID uint8 `json:"DEVICEID"` // QUICK CONNECT Country string `json:",omitempty"` TempKey *OTK_REQUEST }
type CONTROLL_PUBLIC_DEVCE_RESPONSE ¶
type CONTROLL_PUBLIC_DEVCE_RESPONSE struct { Routers []*ROUTER AccessPoints []*AccessPoint }
type Config ¶
type Config struct { AutoReconnect bool KillSwitch bool DNS1 string DNS1Bytes [4]byte DNSIP net.IP DNS2 string ManualRouter bool DebugLogging bool Version string RouterFilePath string DomainWhitelist string EnabledBlockLists []string LogBlockedDomains bool DisableIPv6OnConnect bool CloseConnectionsOnConnect bool CustomDNS bool PrevSession *CONTROLLER_SESSION_REQUEST `json:"-"` }
type DEVICE_TOKEN ¶ added in v1.1.5
Device token struct need for the login respons from user scruct
type DeviceDNSRegistration ¶ added in v1.1.4
type DeviceNatRegistration ¶ added in v1.1.4
type DeviceUserRegistration ¶ added in v1.1.4
type FORWARD_REQUEST ¶
type GENERAL_LOGS_RESPONSE ¶
type GENERAL_LOGS_RESPONSE struct {
Lines []string
}
type GeneralLogResponse ¶
func GetLogs ¶
func GetLogs(lengthFromJavascript int) (*GeneralLogResponse, error)
func GetLogsForCLI ¶ added in v1.1.3
func GetLogsForCLI() (*GeneralLogResponse, error)
type INTERFACE_SETTINGS ¶
type IP ¶
type IP struct { LOCAL map[uint16]*RemotePort REMOTE map[uint16]*RemotePort }
type LOADING_LOGS_RESPONSE ¶
type LOADING_LOGS_RESPONSE struct {
Lines [100]string
}
func GetLoadingLogs ¶
func GetLoadingLogs(t string) (Logs *LOADING_LOGS_RESPONSE, err error)
type LoggerInterface ¶
type LoggerInterface struct{}
func (*LoggerInterface) Debug ¶
func (l *LoggerInterface) Debug(message string)
func (*LoggerInterface) Error ¶
func (l *LoggerInterface) Error(message string)
func (*LoggerInterface) Fatal ¶
func (l *LoggerInterface) Fatal(message string)
func (*LoggerInterface) Info ¶
func (l *LoggerInterface) Info(message string)
func (*LoggerInterface) Print ¶
func (l *LoggerInterface) Print(message string)
We only want to see wails.io logs while in development mode
func (*LoggerInterface) Trace ¶
func (l *LoggerInterface) Trace(message string)
func (*LoggerInterface) Warning ¶
func (l *LoggerInterface) Warning(message string)
type LogoutForm ¶ added in v1.1.3
type MIB_TCPROW_OWNER_PID ¶ added in v1.1.4
type MIB_TCPROW_OWNER_PID struct {
// contains filtered or unexported fields
}
type OpenSockets struct { RemoteAddress string `json:"RemoteAddress"` RemoteIP [4]byte `json:"-"` LocalPort uint16 `json:"LocalPort"` RemotePort uint16 `json:"RemotePort"` }
type MIB_TCPTABLE_OWNER_PID ¶ added in v1.1.4
type MIB_TCPTABLE_OWNER_PID struct {
// contains filtered or unexported fields
}
type OTK_REQUEST ¶
func GenerateEllipticCurveAndPrivateKey ¶
func GenerateEllipticCurveAndPrivateKey() (PK *ecdsa.PrivateKey, R *OTK_REQUEST, err error)
type PS_DEFAULT_ROUTES ¶
type PS_DEFAULT_ROUTES struct { // CimClass struct { // CimSuperClassName string `json:"CimSuperClassName,omitempty"` // CimSuperClass struct { // CimSuperClassName string `json:"CimSuperClassName"` // CimSuperClass string `json:"CimSuperClass"` // CimClassProperties string `json:"CimClassProperties"` // CimClassQualifiers string `json:"CimClassQualifiers"` // CimClassMethods string `json:"CimClassMethods"` // CimSystemProperties string `json:"CimSystemProperties"` // } `json:"CimSuperClass,omitempty"` // CimClassProperties []string `json:"CimClassProperties,omitempty"` // CimClassQualifiers []string `json:"CimClassQualifiers,omitempty"` // CimClassMethods []string `json:"CimClassMethods,omitempty"` // CimSystemProperties struct { // Namespace string `json:"Namespace"` // ServerName string `json:"ServerName"` // ClassName string `json:"ClassName"` // Path interface{} `json:"Path"` // } `json:"CimSystemProperties,omitempty"` // } `json:"CimClass,omitempty"` // CimInstanceProperties []struct { // Name string `json:"Name"` // Value interface{} `json:"Value"` // CimType int `json:"CimType"` // Flags string `json:"Flags"` // IsValueModified bool `json:"IsValueModified"` // } `json:"CimInstanceProperties,omitempty"` // CimSystemProperties struct { // Namespace string `json:"Namespace"` // ServerName string `json:"ServerName"` // ClassName string `json:"ClassName"` // Path interface{} `json:"Path"` // } `json:"CimSystemProperties,omitempty"` // Publish int `json:"Publish"` // Protocol int `json:"Protocol"` // Store int `json:"Store"` // AddressFamily int `json:"AddressFamily"` // State int `json:"State"` // IfIndex int `json:"ifIndex"` // Caption interface{} `json:"Caption"` // Description interface{} `json:"Description"` // ElementName interface{} `json:"ElementName"` // InstanceID string `json:"InstanceID"` // AdminDistance interface{} `json:"AdminDistance"` // DestinationAddress interface{} `json:"DestinationAddress"` // IsStatic interface{} `json:"IsStatic"` RouteMetric int `json:"RouteMetric"` // TypeOfRoute int `json:"TypeOfRoute"` // CompartmentID int `json:"CompartmentId"` DestinationPrefix string `json:"DestinationPrefix"` InterfaceAlias string `json:"InterfaceAlias"` InterfaceIndex int `json:"InterfaceIndex"` InterfaceMetric int `json:"InterfaceMetric"` NextHop string `json:"NextHop"` }
type QR_CODE ¶
type QR_CODE struct {
Value string
}
func GetQRCode ¶
func GetQRCode(LF *TWO_FACTOR_CONFIRM) (QR *QR_CODE, err error)
type ROUTER ¶
type ROUTER struct { IP string `json:"PublicIP"` GROUP uint8 `json:"GROUP"` ROUTERID uint8 `json:"ROUTERID"` Tag string `json:"Tag"` MS uint64 `json:"MS"` Online bool `json:"Online"` Country string `json:"Country"` AvailableMbps int `json:"AvailableMbps"` Slots int `json:"Slots"` AvailableSlots int `json:"AvailableSlots"` LastPing time.Time `json:"-"` PingStats ping.Statistics `json:"-"` TCPControllerConnection net.Conn `json:"-"` TCPTunnelConnection net.Conn `json:"-"` ROUTER_STATS Score int `json:"Score"` }
type ROUTER_STATS ¶
type RP ¶ added in v1.1.4
func CreateOrGetPortMapping ¶ added in v1.1.4
type RemotePort ¶
type State ¶
type State struct { UMbps int `json:"UMbps"` DMbps int `json:"DMbps"` UMbpsString string `json:"UMbpsString"` DMbpsString string `json:"DMbpsString"` IngressPackets uint64 `json:"IngressPackets"` EgressPackets uint64 `json:"EgressPackets"` ConnectedTimer string `json:"ConnectedTimer"` IsAdmin bool `json:"IsAdmin"` NeedsRouterProbe bool `json:"NeedsRouterProbe"` BaseFolderInitialized bool `json:"BaseFolderInitialized"` TunnelInitialized bool `json:"TunnelInitialized"` LogFileInitialized bool `json:"LogFileInitialized"` ConfigInitialized bool `json:"ConfigInitialized"` ClientReady bool `json:"ClientReady"` ClientStartupError bool `json:"ClientStartupError"` BufferError bool `json:"BufferError"` Connected bool `json:"Connected"` Connecting bool `json:"Connecting"` Exiting bool `json:"Exiting"` C *Config `json:"C"` DefaultInterface *CONNECTION_SETTINGS `json:"DefaultInterface"` LastRouterPing time.Time `json:"LastRouterPing"` PingReceivedFromRouter time.Time `json:"PingReceivedFromRouter"` SecondsSincePingFromRouter string `json:"SecondsSincePingFromRouter"` LastAccessPointUpdate time.Time SecondsUntilAccessPointUpdate int AvailableCountries []string `json:"AvailableCountries"` RoutersList [2000]*ROUTER `json:"-"` Routers []*ROUTER `json:"Routers"` AccessPoints []*AccessPoint `json:"AccessPoints"` PrivateAccessPoints []*AccessPoint `json:"PrivateAccessPoints"` ActiveRouter *ROUTER `json:"ActiveRouter"` ActiveAccessPoint *AccessPoint `json:"ActiveAccessPoint"` ActiveSession *CLIENT_SESSION `json:"ActiveSession"` // FILE PATHS LogFileName string `json:"LogFileName"` LogPath string `json:"LogPath"` ConfigPath string `json:"ConfigPath"` BackupPath string `json:"BackupPath"` BlockListPath string `json:"BlockListPath"` BasePath string `json:"BasePath"` Version string `json:"Version"` // BLOCKING AND PARENTAL CONTROLS BLists []*List `json:"BlockLists"` DNSCaptureEnabled bool `json:"DNSCaptureEnabled"` DNSWhitelistEnabled bool `json:"DNSWhitelistEnabled"` }
type TWO_FACTOR_CONFIRM ¶
type User ¶ added in v1.1.5
type User struct { ID primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"` APIKey string `bson:"AK" json:"APIKey"` Email string `bson:"E"` TwoFactorEnabled bool `json:"TwoFactorEnabled" bson:"TFE"` Disabled bool `bson:"D" json:"Disabled"` Tokens []*DEVICE_TOKEN `json:"Tokens" bson:"T"` DeviceToken *DEVICE_TOKEN `json:",omitempty" bson:"-"` CashCode int `bson:"CSC" json:"CashCode"` Affiliate string `bson:"AF"` SubLevel int `bson:"SUL"` SubExpiration time.Time `bson:"SE"` TrialStarted time.Time `bson:"TrialStarted" json:"TrialStarted"` CancelSub bool `json:"CancelSub" bson:"CS"` Version string `json:"Version" bson:"-"` }
use struct you get from the login request
Click to show internal directories.
Click to hide internal directories.