Connections

On Demand Connections

To create a connection from one device to another which will reconnect on demand, you can use the Desktop Application or the CLI tool. This type of connection is Peer to Peer by default with a Proxy Failover.

Create a Proxy Connection

For http and https remote.it Services, the returned value for "proxy" will be a single string similar to the following. It does not need an explicit port value to be used. These are "reverse proxies". Reverse proxies are always public, which is why the randomized URL is generated at the time of creating the connection.

"proxy": "https://xprbjalo.p18.rt3.io"

For all other types of remote.it Services, the returned value for "proxy" will include a hostname and a port value separated by a colon, as shown below. These are "port proxies".

"proxy": "http:\/\/proxy18.rt3.io:38575"

Proxy Connection Modes

The following options apply only to "port proxies", namely all Service types except the http and https Service types, which use "reverse proxies". Reverse proxies are always public which is why the randomized URL is created.

hostIP Options

Connect

#Query
mutation query($serviceId: String!, $hostIP: String!) {
  connect(serviceId: $serviceId, hostIP: $hostIP) {
	id
	created
	host
	port
	reverseProxy
	timeout
	}
}
#Variables
{
	"serviceId": "80:00:00:12:34:56:78:90",
	"hostIP": "255.255.255.255"
}

Query response for reverse proxy connections (http/s services)

{
  "data": {
    "connect": {
      "id": "123ddfff-6432-49d0-6432-205d49d08454",
      "created": "2020-01-01T01:09:00.000Z",
      "host": "a4csg2w9f8wipk.p16.rt3.io",
      "port": null,
      "reverseProxy": true,
      "timeout": 28800
    }
  }
}

The value returned for "id" can be used with the Disconnect API endpoint to terminate the proxy connection to your target when you are done using it.

Query response for all other proxy requests where host + port is required to connect

{
  "data": {
    "connect": {
      "id": "123ddfff-6432-49d0-6432-205d49d08454",
      "created": "2020-01-01T01:20:00.000Z",
      "host": "proxy18.rt3.io",
      "port": 37488,
      "reverseProxy": false,
      "timeout": 28800
    }
  }
}

Disconnect

#Query
mutation query($serviceId: String!, $connectionId: String!){
  disconnect(serviceId: $serviceId, connectionId: $connectionId)
}
#Variables
{
	"serviceId": "80:00:00:12:34:56:78:90",
	"connectionId": "123ddfff-6432-49d0-6432-205d49d08454"
}

Query Response

{
  "data": {
    "disconnect": true
  }
}

Last updated