Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
BringYour is a web-standards VPN marketplace with an emphasis on fast, secure internet everwhere.
The API for BringYour bootstraps the connect
protocol, and is the source of JWTs and other match-making transactions.
The JWT returned by /auth routes does not have a clientId. The connect
protocol requires a JWT with a clientId. Use the /network routes to obtain a JWT with a clientId.
In the BringYour network:
a network name is a globally unique subnet (xyz.bringyour.network)
a clientId is a globally unique 16-byte address
clientIds are equivalent to IPv6, but are expressed as UDID
clients also have an IPv6 and IPv4 mapped to their clientId
Outside of IP translation like taptun/utun, clients are typically addressed via their clientId.
Unless otherwise specified, time/date strings will be formatted in the Go default 2006-01-02 15:04:05.999999999 -0700 MST
.
Note the API lives at https://api.bringyour.com.
The API uses an authentication JWT. There are two roles of JWT: admin (user) and client. Admins have more privileges on the network. To get started with an admin JWT, . Then in the dialog, tap the button "Copy an Auth Code". This will copy a limited-time auth code to the clipboard. Use the following API request to convert the auth code into an admin JWT.
Get network statistics for the last 90 days. The statistics are updated approximately every 60s.
Get all providers in the caller network. Each provider includes stats from the last 24 hours.
Simple hello to the network that returns some useful information. This can be used for discovery.
Get account preferences.
Get statistics for all providers in the caller network for the last 90 days. This is meant to answer the top level question of how the providers in a network are performing.
Get the latest status of all clients on this network.
Includes:
A list of locations and groups where there are at least one active provider
in good health.
Note that a location or group will need to be mapped to an actual provider
using /network/find-providers
.
Get the balance for the USDC user custody wallet. The user custody wallet allows BringYour to query the balance, but the user must take actions against the wallet.
Initialize the Circle USDC user self custody wallet. This starts a process that must be completed by the user.
Get the current subscription status and transfer balance.
The devices associated with the caller network. Associated devices are:
A QR code that maps to a URL to add the shared device. Send it to someone to scan to add the device.
Share code
A QR code that maps to a URL to adopt the device. Send it to someone to scan to adopt the device.
Adopt code
Get a list of wallets associated with your network
Fetches the payout wallet associated with the network
Get detailed stats on a single provider in the caller network. This is meant to give the user complete visibility over usage.
udid
Set account preferences.
Start a login for a user authority. The user authority may be:
email or phone number
Verify ownership of email or phone number.
email or phone number
Password login for email and phone number.
email or phone number
Send verification code to email or phone number.
email or phone number
Change password.
Check if the network name is available. A new network name must satisfy:
Create a new network. A user authority can be associated with at most one network.
email or phone number
user consent to accept terms of service
Send password reset code to email or phone number.
email or phone number
Authenticate with an auth code. The returned session is tied to the session that created the auth code, and will be expired with any of the creator's sessions. This is a subset of an OAuth flow.
Search for locations and groups that match a query,
where there are at least one active provider in good health.
The match algorithm accounts for typos and misspelling,
and the tolerance can be tuned in the input.
Note that a location or group will need to be mapped to an actual provider
using /network/find-providers
.
Create a limited use code (auth code) to share authentication
with connected apps and tools.
The code is tied to the caller session,
and will be expired with any of the caller's sessions.
Currently a code cannot be created for a client JWT
(from /network/auth-client
).
This is a subset of an OAuth flow.
Gain permission to use the connect
protocol as the requested clientId,
or assign a new clientId.
Each network can have at most 128 clientIds.
Above that number, new clientId requests will error until one or more
existing clientIds are removed.
udid. Optional. If this is given, it must currently exist in the network. Omit this to assign a new client id.
If this is a new device, sets the device name to the description of the device.
If this is a new device, sets the device spec.
udid. Optional. | The client that the new client is derived from. If this is called with a client jwt, the derived client id is inferred from the jwt.
Remove a client from the network.
udid
Randomly sample providers that for a location or group, which are active and in good health. This allows random iteration by using the exclude input to mark visited providers.
udid
udid
udid
Create a spec object for find-providers2
using a description
of the intended use of the network.
description of the intended use of the connection
Feedback.
Search for locations, groups, and devices that match a query, regardless of whether an providers are active.
Validate a USDC wallet address on the user custody wallet chain. This can be used to check whether an address can receive a transfer out from the user custody wallet. Please use this before initiating any transfer out to avoid lost funds.
Randomly sample providers for locations, groups, or devices, which are active and in good health. This allows random iteration by using the exclude input to mark visited providers.
udid
Redeem the balance code and add the transfer balance to the caller network.
Check if the balance code is valid.
Set up a transfer from the Circle USDC user self custody wallet to an address. This starts a process that must be completed by the user.
user consent to accept terms of transfer
Creates an anonymous payment identifier to be used with purchases. This keeps network information out of the payment processor system. For example in Google Play this is called the "obfuscated account id".
Creates a code to share a device.
udid
Name of the device that will be shared to the guest
Add a device, which can either be owned by the network or shared with the network. The code provided can be either adoption code or a share code. Once a code is added, the device becomes an associated device until confirmation. If the device is a shared device, it will remain an associated device after confirmation.
share code or adopt code
Confirm the share of a device. This must be called from the side that initiates the share.
The status of the shared device. The status can be one of:
Creates a code to adopt a device. The adopt code is valid for a limited time.
Name of the device that will be shared to the adopter
The status of the adopt-code device. The status can be one of:
Confirm the adoption of a device. This must be called from the side that initiates the adoption.
Remove an adopt code. This must be called from the side that initiates the adoption.
Set the name of the association.
To set the name of devices owned by the network, use /device/set-name
.
Name of the device
Remove a device association. The association can be any of:
Set the provide mode for a device.
udid
Sets the name of a device owned by the network.
To set the name of devices shared with the network, use /device/set-association-name
.
udid
Out-of-band control messages for the connect protocol. Blocking request-response control messages need to be handled out-of-band to resolve the possibility of dedlocks in the client sequence.
base64 encoded connect protobuf Pack
processed as control messages.
As an inline message, these would be sent to the control id.
Create a new wallet for your network. You can then use it as a payout wallet by posting to /account/payout-wallet.
The blockchain associated with the address
The "SOL" or "MATIC" wallet address
We only support "USDC"
Set an existing account wallet as the wallet to receive network payments.
udid
Unique network code to refer new users
Retrieves the paid and unpaid byte count provided to the network
Remove a wallet from your list of account wallets
udid