> ## Documentation Index
> Fetch the complete documentation index at: https://docs.salad.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Connect to SGS using HTTP CONNECT over TLS and begin using it in production

*Last Updated: October 10, 2024*

## Connecting

1. After you request SGS service in a region, SaladCloud will provision and test a new, dedicated SGS server before
   sending you its connection details, which will include a unique SGS hostname, port number, password, and other basic
   information.
   <Note>
     Note that this documentation assumes you are using HTTP CONNECT requests. SGS also supports HAProxy's PROXY v2
     protocol. Learn how to use it [here.](/gateway-service/explanation/proxy-v2)
   </Note>

2. All requests should be made through the SGS server using this connection information. The SGS server will then route
   them to the appropriate SaladCloud node. For example, `https://SESSION_ID:PASSWORD@HOSTNAME:PORT/`
   * Let's break down each component: `SESSION_ID`, `PASSWORD`, `HOSTNAME`, and `PORT`.
     * `SESSION_ID` can be anything you like, as a string encoded in ASCII or UTF8. There are no character length limits
       enforced. Each session ID will be associated with one SaladCloud node. Because all requests sent through a single
       session ID will be proxied through the same node, we recommend using separate session IDs for each of your end
       users. If a SaladCloud node goes offline for any reason, all connections that it was servicing will be
       automatically distributed to one or more nodes using a modified least connections algorithm.
     * `PASSWORD` is the password for connecting to SGS. It will be shared with you using a 1Password link before
       beginning the trial period.
     * `HOSTNAME` is the hostname of the SGS server. It is typically in the format `sgs-{unique_string}.salad.com`, and
       will be shared with you before beginning the trial period.
     * `PORT` is the port of the SGS server you should connect to. It will be shared with you before beginning the trial
       period.
       <Note>Proxy authentication with the SGS server MUST be made using TLS (https endpoint).</Note>

3. Using curl, you can check the IP address and region of a node connected to one of your SGS servers:

```shell sgs_connection.sh theme={null}
curl -x 'https://session123:PASSWORD@sgs-NAME.salad.com:PORT' https://www.ipinfo.io
```

<Note>
  Changing the session ID and resending this request will often - but not always - return a different IP address.
  Because of the nature of the least-loaded routing algorithm used by SGS, and the fact that SGS nodes can support
  multiple streaming connections simultaneously, multiple connections (session IDs) may be loaded on a single node.
</Note>
