Documentation
¶
Index ¶
- Constants
- Variables
- func DeleteBoundDevice(ctx *config.Context, targetDeviceId string) error
- func MakeApiClient(authToken *string) *openapi.APIClient
- func Register(publicKey *wireguard.Key, deviceModel string) (*openapi.Register200Response, error)
- func UpdateLicenseKey(ctx *config.Context) error
- func WireGuardEndpoint(endpoint openapi.Endpoint) (string, error)
- type Account
- type BoundDevice
- func FindDevice(devices []BoundDevice, deviceId string) (*BoundDevice, error)
- func GetBoundDevices(ctx *config.Context) ([]BoundDevice, error)
- func GetSourceBoundDevice(ctx *config.Context) (*BoundDevice, error)
- func UpdateSourceBoundDeviceActive(ctx *config.Context, targetDeviceId string, active bool) (*BoundDevice, error)
- func UpdateSourceBoundDeviceName(ctx *config.Context, targetDeviceId string, newName string) (*BoundDevice, error)
- type SourceDevice
Constants ¶
View Source
const ( ApiUrl = "https://api.cloudflareclient.com" ApiVersion = "v0a5641" )
Variables ¶
View Source
var ( DefaultHeaders = map[string]string{ "User-Agent": "1.1.1.1/6.38.9-5641 (Android 16.0.0)", "CF-Client-Version": "a-6.38.9-5641", } DefaultTransport = &http.Transport{ TLSClientConfig: warpTLSConfig, DialTLSContext: dialWarpTLS, ForceAttemptHTTP2: false, MaxIdleConns: 100, IdleConnTimeout: 90 * time.Second, TLSHandshakeTimeout: warpTLSHandshakeTimeout, ExpectContinueTimeout: 1 * time.Second, } )
Functions ¶
func DeleteBoundDevice ¶ added in v2.2.29
func MakeApiClient ¶
func UpdateLicenseKey ¶
Types ¶
type BoundDevice ¶
type BoundDevice openapi.BoundDevice
func FindDevice ¶
func FindDevice(devices []BoundDevice, deviceId string) (*BoundDevice, error)
func GetBoundDevices ¶
func GetBoundDevices(ctx *config.Context) ([]BoundDevice, error)
func GetSourceBoundDevice ¶
func GetSourceBoundDevice(ctx *config.Context) (*BoundDevice, error)
type SourceDevice ¶ added in v2.2.29
type SourceDevice openapi.GetSourceDevice200Response
func GetSourceDevice ¶
func GetSourceDevice(ctx *config.Context) (*SourceDevice, error)
Click to show internal directories.
Click to hide internal directories.