Documentation
¶
Index ¶
- type API
- func (api *API) DoGeolocationLookup() error
- func (api *API) GetAllBridges(p *BridgeParams) ([]*models.ModelsBridge, error)
- func (api *API) GetGateways(p *GatewayParams) ([]*models.ModelsGateway, error)
- func (api *API) GetOpenVPNCert() (string, error)
- func (api *API) GetProvider() (*models.ModelsProvider, error)
- func (api *API) GetService() (*models.ModelsEIPService, error)
- func (api *API) SerializeConfig(params *GatewayParams) (string, error)
- type BridgeParams
- type Config
- type GatewayParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
func (*API) GetAllBridges ¶
func (api *API) GetAllBridges(p *BridgeParams) ([]*models.ModelsBridge, error)
func (*API) GetGateways ¶
func (api *API) GetGateways(p *GatewayParams) ([]*models.ModelsGateway, error)
GetGateways returns a list of gateways (it it's enabled by the menshen API). It optionally accepts a GatewayParams object where you can set different filters.
func (*API) GetOpenVPNCert ¶
GetOpenVPNCert returns valid OpenVPN client credentials (certificate and private key)
func (*API) GetProvider ¶
func (api *API) GetProvider() (*models.ModelsProvider, error)
func (*API) GetService ¶
func (api *API) GetService() (*models.ModelsEIPService, error)
call menshen endpoint /service and return response locations, openvpn arguments, serial+version, auth
func (*API) SerializeConfig ¶
func (api *API) SerializeConfig(params *GatewayParams) (string, error)
SerializeConfig returns a single string containing a valid OpenVPN configuration file.
type BridgeParams ¶
type Config ¶
type Config struct { // country code used to fetch gateways/bridges. CountryCode string // Host we will connect to for API operations. Host string // Port we will connect to for API operations (default 443) Port int // Use TLS to connect to menshen (default: true) UseTLS bool // Introducer is an obfsucated introducer to use for all bootstrap operations. Introducer string // Proxy is a local SOCKS5 proxy for all bootstrap operations. Proxy string // ResolveWithDoH indicates whether we should use a DoH resolver. ResolveWithDoH bool // STUNServers is a list of STUN users to be used to get the current ip adress // The order is kept. A provider can use a list of public STUN servers, use // its self-hosted STUN servers or use public STUN servers as a fallback here. // A STUN server should be in the format ip/host:port STUNServers []string // The CountryCodeLookupURL returns a country code for a given ip address. CountryCodeLookupURL string }
Click to show internal directories.
Click to hide internal directories.